Core/Units: Updated unit power mods

This commit is contained in:
Shauren
2012-08-13 14:56:20 +02:00
parent 03144920d3
commit 3ad20d6bbd
2 changed files with 15 additions and 7 deletions
+9 -6
View File
@@ -13941,12 +13941,15 @@ void Unit::SetPower(Powers power, int32 val)
SetStatInt32Value(UNIT_FIELD_POWER1 + powerIndex, val);
WorldPacket data(SMSG_POWER_UPDATE, 8 + 4 + 1 + 4);
data.append(GetPackGUID());
data << uint32(1);//unk
data << uint8(powerIndex);
data << int32(val);
SendMessageToSet(&data, GetTypeId() == TYPEID_PLAYER ? true : false);
if (IsInWorld())
{
WorldPacket data(SMSG_POWER_UPDATE, 8 + 4 + 1 + 4);
data.append(GetPackGUID());
data << uint32(1); //power count
data << uint8(powerIndex);
data << int32(val);
SendMessageToSet(&data, GetTypeId() == TYPEID_PLAYER ? true : false);
}
// group update
if (Player* player = ToPlayer())