Core/Objects: fixed single destroy object

This commit is contained in:
Rat
2015-01-01 17:53:08 +01:00
parent 8428aee8c9
commit 1f8f8fc5a5

View File

@@ -301,12 +301,11 @@ void Object::DestroyForPlayer(Player* target, bool onDeath) const
}
}
WorldPacket data(SMSG_DESTROY_OBJECT, 8 + 1);
data << GetGUID();
//! If the following bool is true, the client will call "void CGUnit_C::OnDeath()" for this object.
//! OnDeath() does for eg trigger death animation and interrupts certain spells/missiles/auras/sounds...
data << uint8(onDeath ? 1 : 0);
target->GetSession()->SendPacket(&data);
UpdateData updateData(target->GetMapId());
BuildOutOfRangeUpdateBlock(&updateData);
WorldPacket packet;
updateData.BuildPacket(&packet);
target->SendDirectMessage(&packet);
}
int32 Object::GetInt32Value(uint16 index) const