aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/SpellHandler.cpp
diff options
context:
space:
mode:
authorForesterDev <11771800+ForesterDev@users.noreply.github.com>2019-07-05 16:07:35 +0400
committerWyrserth <wyrserth@protonmail.com>2019-07-05 14:07:35 +0200
commitc44fb37f74347e3b6d399c941716971503af4cf8 (patch)
treea5770aa1baf7678e50b8774f566b85b03128b19e /src/server/game/Handlers/SpellHandler.cpp
parent9530c33af0847ac13826d20f21d2447f0817bfa5 (diff)
Core/Unit: Implement more helper methods (#23555)
Diffstat (limited to 'src/server/game/Handlers/SpellHandler.cpp')
-rw-r--r--src/server/game/Handlers/SpellHandler.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index 39c40dbc47d..9baa16cba72 100644
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -636,15 +636,14 @@ void WorldSession::HandleMirrorImageDataRequest(WorldPacket& recvData)
data << uint8(creator->GetGender());
data << uint8(creator->GetClass());
- if (creator->GetTypeId() == TYPEID_PLAYER)
- {
- Player* player = creator->ToPlayer();
- data << uint8(player->GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_SKIN_ID));
- data << uint8(player->GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_FACE_ID));
- data << uint8(player->GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_STYLE_ID));
- data << uint8(player->GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_COLOR_ID));
- data << uint8(player->GetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_FACIAL_STYLE));
- data << uint32(player->GetGuildId()); // unk
+ if (Player* player = creator->ToPlayer())
+ {
+ data << uint8(player->GetSkinId());
+ data << uint8(player->GetFaceId());
+ data << uint8(player->GetHairStyleId());
+ data << uint8(player->GetHairColorId());
+ data << uint8(player->GetFacialStyle());
+ data << uint32(player->GetGuildId());
static EquipmentSlots const itemSlots[] =
{