aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/SpellHandler.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2016-06-05 14:08:53 +0200
committerShauren <shauren.trinity@gmail.com>2016-06-05 14:08:53 +0200
commit6b1c85a6762e6343e5b1787db73e0b200c5af70d (patch)
tree63f03ecbbe89b13dd03f48dab10baf9bc6d80f2d /src/server/game/Handlers/SpellHandler.cpp
parent40065aa658bf6eb0e4321983d36f16e8e61ad58e (diff)
Core/PacketIO: Updated spell packets
Diffstat (limited to 'src/server/game/Handlers/SpellHandler.cpp')
-rw-r--r--src/server/game/Handlers/SpellHandler.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index 12dcfcb77df..323dec31e5a 100644
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -300,7 +300,12 @@ void WorldSession::HandleCastSpellOpcode(WorldPackets::Spells::CastSpell& cast)
}
Spell* spell = new Spell(caster, spellInfo, TRIGGERED_NONE, ObjectGuid::Empty, false);
- spell->m_cast_count = cast.Cast.CastID; // set count of casts
+
+ WorldPackets::Spells::SpellPrepare spellPrepare;
+ spellPrepare.ClientCastID = cast.Cast.CastID;
+ spellPrepare.ServerCastID = spell->m_castId;
+ SendPacket(spellPrepare.Write());
+
spell->m_misc.Raw.Data[0] = cast.Cast.Misc[0];
spell->m_misc.Raw.Data[1] = cast.Cast.Misc[1];
spell->prepare(&targets);
@@ -509,6 +514,8 @@ void WorldSession::HandleMirrorImageDataRequest(WorldPackets::Spells::GetMirrorI
mirrorImageComponentedData.HairVariation = player->GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_STYLE_ID);
mirrorImageComponentedData.HairColor = player->GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_COLOR_ID);
mirrorImageComponentedData.BeardVariation = player->GetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_FACIAL_STYLE);
+ for (uint32 i = 0; i < PLAYER_CUSTOM_DISPLAY_SIZE; ++i)
+ mirrorImageComponentedData.CustomDisplay[i] = player->GetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_CUSTOM_DISPLAY_OPTION + i);
mirrorImageComponentedData.GuildGUID = (guild ? guild->GetGUID() : ObjectGuid::Empty);
mirrorImageComponentedData.ItemDisplayID.reserve(11);
@@ -530,7 +537,7 @@ void WorldSession::HandleMirrorImageDataRequest(WorldPackets::Spells::GetMirrorI
};
// Display items in visible slots
- for (auto const& slot : itemSlots)
+ for (EquipmentSlots slot : itemSlots)
{
uint32 itemDisplayId;
if ((slot == EQUIPMENT_SLOT_HEAD && player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM)) ||