Core/PacketIO: updated SMSG_CONVERT_RUNE and SMSG_RESYNC_RUNES

This commit is contained in:
MitchesD
2015-07-23 22:00:40 +02:00
parent fb09d62962
commit a487ddad4e
4 changed files with 60 additions and 11 deletions
+11 -9
View File
@@ -24520,22 +24520,24 @@ void Player::ConvertRune(uint8 index, RuneType newType)
{
SetCurrentRune(index, newType);
WorldPacket data(SMSG_CONVERT_RUNE, 2);
data << uint8(index);
data << uint8(newType);
GetSession()->SendPacket(&data);
WorldPackets::Spells::ConvertRune data;
data.Index = index;
data.Rune = newType;
GetSession()->SendPacket(data.Write());
}
void Player::ResyncRunes(uint8 count)
{
WorldPacket data(SMSG_RESYNC_RUNES, 4 + count * 2);
data << uint32(count);
WorldPackets::Spells::ResyncRunes data(count);
for (uint32 i = 0; i < count; ++i)
{
data << uint8(GetCurrentRune(i)); // rune type
data << uint8(255 - (GetRuneCooldown(i) * 51)); // passed cooldown time (0-255)
WorldPackets::Spells::ResyncRunes::ResyncRune rune;
rune.RuneType = GetCurrentRune(i); // rune type
rune.Cooldown = uint8(255 - (GetRuneCooldown(i) * 51)); // passed cooldown time (0-255)
data.Runes.push_back(rune);
}
GetSession()->SendPacket(&data);
GetSession()->SendPacket(data.Write());
}
void Player::AddRunePower(uint8 index)