mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
Forward-merge out of world SMSG_POWER_UPDATE and 4.x structure fixes.
This commit is contained in:
parent
9bfd741583
commit
6b1df231a5
1 changed files with 9 additions and 5 deletions
|
|
@ -9874,11 +9874,15 @@ void Unit::SetPowerByIndex(uint32 powerIndex, int32 val)
|
|||
|
||||
SetInt32Value(UNIT_FIELD_POWER1 + powerIndex, val);
|
||||
|
||||
WorldPacket data(SMSG_POWER_UPDATE);
|
||||
data << GetPackGUID();
|
||||
data << uint8(powerIndex);
|
||||
data << uint32(val);
|
||||
SendMessageToSet(&data, true);
|
||||
if (IsInWorld())
|
||||
{
|
||||
WorldPacket data(SMSG_POWER_UPDATE);
|
||||
data << GetPackGUID();
|
||||
data << uint32(1); // iteration count
|
||||
data << uint8(powerIndex);
|
||||
data << uint32(val);
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
// group update
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue