void ProtocolGame::parseSetOutfit(NetworkMessage& msg)
{
#ifdef __PROTOCOL_77__
uint16_t lookType = msg.GetU16();
#else
uint8_t lookType = msg.GetByte();
#endif // __PROTOCOL_77__
Outfit_t newOutfit;
// only first 4 outfits
uint8_t lastFemaleOutfit = 0x8B;
uint8_t lastMaleOutfit = 0x83;
// if premium then all 7 outfits
if (player->getSex() == PLAYERSEX_FEMALE && player->isPremium())
lastFemaleOutfit = 0x8E;
else if (player->getSex() == PLAYERSEX_MALE && player->isPremium())
lastMaleOutfit = 0x86;
if ((player->getSex() == PLAYERSEX_FEMALE &&
lookType >= PLAYER_FEMALE_1 &&
lookType <= lastFemaleOutfit) ||
(player->getSex() == PLAYERSEX_MALE &&
lookType >= PLAYER_MALE_1 &&
lookType <= lastMaleOutfit))
{
msg.SkipBytes(32);
newOutfit = player->getCurrentOutfit();
newOutfit.lookType = lookType;
// newOutfit.lookHead = msg.GetByte();
// newOutfit.lookBody = msg.GetByte();
// newOutfit.lookLegs = msg.GetByte();
// newOutfit.lookFeet = msg.GetByte();
}
addGameTask(&Game::playerChangeOutfit, player->getID(), newOutfit);
}