void ProtocolGame::AddCreatureOutfit(NetworkMessage_ptr msg, const Creature* creature, const Outfit_t& outfit, bool outfitWindow/* = false*/)
{
if(outfitWindow || !creature->getPlayer() || (!creature->isInvisible() && (!creature->isGhost()
|| !g_config.getBool(ConfigManager::GHOST_INVISIBLE_EFFECT))))
{
msg->put<uint16_t>(outfit.lookType);
if(outfit.lookType)
{
msg->put<char>(outfit.lookHead);
msg->put<char>(outfit.lookBody);
msg->put<char>(outfit.lookLegs);
msg->put<char>(outfit.lookFeet);
msg->put<char>(outfit.lookAddons);
}
else if(outfit.lookTypeEx)
msg->putItemId(outfit.lookTypeEx);
else
msg->put<uint16_t>(outfit.lookTypeEx);
}
else
msg->put<uint32_t>(0x00);
}