For the Health bar:
void Mob::CreateHPPacket(APPLAYER* app)
{
this->IsFullHP=(cur_hp>=max_hp);
app->opcode = OP_HPUpdate;
app->size = sizeof(SpawnHPUpdate_Struct);
app->pBuffer = new uchar[app->size];
memset(app->pBuffer, 0, sizeof(SpawnHPUpdate_Struct));
SpawnHPUpdate_Struct* ds = (SpawnHPUpdate_Struct*)app->pBuffer;
ds->spawn_id = GetID();
if(IsClient())
{
ds->max_hp=max_hp;
ds->cur_hp=GetHP()-itembonuses->HP;
ds->cur_hp=ds->cur_hp>30000?30000:ds->cur_hp;
}
else
{
ds->cur_hp=IsNPC()?(sint32)GetHPRatio():cur_hp;
ds->max_hp=100;
}
}
Replacing the former lines in the mob.cpp doesnt work for me.
For the LD fix on player death i would like to see the one-liner that fixes the problem. Thanks
__________________
go climb a rock
|