Companion HP Bar

12/21/2016 06:35 InsomniacPro#1
Hey all, so I'm working on companions on a 5517 source. I have them spawning with one issue. The HP bar doesn't show. I'm spawning them just i would spawn a monster. Am I missing anything?

Monsters spawn with HP bars no issue and I'm spawning them just the same. Is there something different in 10014 for companions?
[Only registered and activated users can see links. Click Here To Register...]
12/21/2016 08:14 Nyorai#2
Quote:
Originally Posted by InsomniacPro View Post
Hey all, so I'm working on companions on a 5517 source. I have them spawning with one issue. The HP bar doesn't show. I'm spawning them just i would spawn a monster. Am I missing anything?

Monsters spawn with HP bars no issue and I'm spawning them just the same. Is there something different in 10014 for companions?
[Only registered and activated users can see links. Click Here To Register...]
Hm perhaps you're not sending their HP at the correct offset?
It should be 48 or 52 as a ushort (?) if I recall correctly. Not sure on such high patches.
12/21/2016 08:38 EOS 60D#3
I fixed this problem before, iirc i think you need to make sure the Hitpoints must be the same in client and server..
12/21/2016 15:06 InsomniacPro#4
Quote:
Originally Posted by EOS 60D View Post
I fixed this problem before, iirc i think you need to make sure the Hitpoints must be the same in client and server..
I verified that the HP was correct in both server and client.

Quote:
Originally Posted by Nyorai View Post
Hm perhaps you're not sending their HP at the correct offset?
It should be 48 or 52 as a ushort (?) if I recall correctly. Not sure on such high patches.
The HP offset is correct, any other monster spawns with the HP bar above their head. Unless there's something different about the way companions are spawned.
12/21/2016 15:51 pro4never#5
For HP bar to show it needs the name being sent to match what's in monstertype.dat
12/21/2016 16:07 nTL3fTy#6
CallPets fall into the 700000-799999 ID range. Don't forget to send MsgCallPetInfo (2035) to the owner of the CallPet. Otherwise, yes, it's just the normal MsgPlayer (1014/10014) to spawn it.
12/22/2016 04:42 InsomniacPro#7
Quote:
Originally Posted by nTL3fTy View Post
CallPets fall into the 700000-799999 ID range. Don't forget to send MsgCallPetInfo (2035) to the owner of the CallPet. Otherwise, yes, it's just the normal MsgPlayer (1014/10014) to spawn it.
I'm following the 700k-799k for their ids, but no luck. Even setting a spawn in the db like a normal mob, they appear with no health bar.

S/n:
do you have any documentation on 2035?
12/22/2016 05:38 nTL3fTy#8
Quote:
Originally Posted by InsomniacPro View Post
do you have any documentation on 2035?
OffsetDataTypeName
4DWORDUID (700000-799999)
8DWORDLookface
12DWORDAIType
16WORDPositionX
18WORDPositionY
20char[16]Name

Pretty basic stuff, the only point worth mentioning is the AIType which informs the client (the owner) how it should control the CallPet, since it is the client that controls the movement, attacking, etc.

idnamelookfaceai_type
9000IronGuard9201
9001CopperGuard9201
9002SilverGuard9201
9003GoldGuard9201
9005GhostBat1482
9006FastBat1482
9007SwiftBat1482
9008MagicBat1482
9010GhostBatBoss5482
9011FastBatBoss5482
9012SwiftBatBoss5482
9013MagicBatBoss5482
9015EvilBatA2063
9016EvilBatB2063
9017EvilBatC2063
9018EvilBatD2063
9020FireRatA2094
9021FireRatB2094
9022FireRatC2094
9023FireRatD2094
9025SkeletonA2115
9026SkeletonB2115
9027SkeletonC2115
9028SkeletonD2115
12/23/2016 00:49 InsomniacPro#9
Quote:
Originally Posted by nTL3fTy View Post
OffsetDataTypeName
4DWORDUID (700000-799999)
8DWORDLookface
12DWORDAIType
16WORDPositionX
18WORDPositionY
20char[16]Name

Pretty basic stuff, the only point worth mentioning is the AIType which informs the client (the owner) how it should control the CallPet, since it is the client that controls the movement, attacking, etc.

idnamelookfaceai_type
9000IronGuard9201
9001CopperGuard9201
9002SilverGuard9201
9003GoldGuard9201
9005GhostBat1482
9006FastBat1482
9007SwiftBat1482
9008MagicBat1482
9010GhostBatBoss5482
9011FastBatBoss5482
9012SwiftBatBoss5482
9013MagicBatBoss5482
9015EvilBatA2063
9016EvilBatB2063
9017EvilBatC2063
9018EvilBatD2063
9020FireRatA2094
9021FireRatB2094
9022FireRatC2094
9023FireRatD2094
9025SkeletonA2115
9026SkeletonB2115
9027SkeletonC2115
9028SkeletonD2115

So I've followed this, sent the packet once the minion is spawned. Ensured the UID is between 700000-799999, spawn entity packet is correct. Yet HP bar is still not showing up. You have any ideas as to what other issues could be?

Btw, thanks a lot lefty. Shit helps.

So Chris was so correct. Apparently in 5517, the monster.dat names them as escorts instead of guards.
[Only registered and activated users can see links. Click Here To Register...]