View Single Post
  #48  
Old 03-29-2010, 04:25 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Well, I think I know why NPC HPs aren't updating in the target window for SoD. It seems they added new HP/Mana/Endurance packets that give the spawn ID and a percentage value to keep the client current with it's target's health and such.

So, we will need to add in new code to support these new packets. The main priority is the health update, but the others can go in as well.

Code:
Feb 18 2009 01:00:21:741 [Decoded] [Server->Client] [Size: 3] - OP_MobHealth
[OPCode: 0x47ea]
000 | da 0f 64                                         | ..d 

Feb 18 2009 01:00:21:742 [Decoded] [Server->Client] [Size: 3] - OP_MobMana?
[OPCode: 0x2ac1]
000 | da 0f 00                                         | ... 

Feb 18 2009 01:00:21:742 [Decoded] [Server->Client] [Size: 3] - OP_MobEndurance?
[OPCode: 0x6c5f]
000 | da 0f 00                                         | ...

These structures should work for the above packets. We will just need to add in handling for them and set places in the code to know when to send them out. Why they didn't combine these 3 into a single 5 byte packet, I don't know (LOL), but this is how it looks now. At least it is still less than what we previously sent I think.

Code:
struct MobHealth_Struct
{
/* 00 */	int16	SpawnID;
/* 02 */	int8	HpPercent;
/* 03 */
};

struct MobMana_Struct
{
/* 00 */	int16	SpawnID;
/* 02 */	int8	ManaPercent;
/* 03 */
};

struct MobEndurance_Struct
{
/* 00 */	int16	SpawnID;
/* 02 */	int8	EndurancePercent;
/* 03 */
};
Other than the addition of these for the target HP/Mana/End updates, there will still need to be some more targeting work done. I am still trying to figure out what else has been changed with targeting.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote