mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +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);
|
SetInt32Value(UNIT_FIELD_POWER1 + powerIndex, val);
|
||||||
|
|
||||||
WorldPacket data(SMSG_POWER_UPDATE);
|
if (IsInWorld())
|
||||||
data << GetPackGUID();
|
{
|
||||||
data << uint8(powerIndex);
|
WorldPacket data(SMSG_POWER_UPDATE);
|
||||||
data << uint32(val);
|
data << GetPackGUID();
|
||||||
SendMessageToSet(&data, true);
|
data << uint32(1); // iteration count
|
||||||
|
data << uint8(powerIndex);
|
||||||
|
data << uint32(val);
|
||||||
|
SendMessageToSet(&data, true);
|
||||||
|
}
|
||||||
|
|
||||||
// group update
|
// group update
|
||||||
if (GetTypeId() == TYPEID_PLAYER)
|
if (GetTypeId() == TYPEID_PLAYER)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue