potinho
Advanced OT User
Hey guys,
I've already managed to add some outfits on my server but in a very limited way, I can't put outfits as a quest reward and there's no way to use addons. I use OTX 2 and would like to know what I need to change in the sources to use a system of outfits/addons per sale and per quest. I already use UTCv8 so the client wouldn't be a problem.
The way I added new outfits was in the line below, in protocolgame.cpp. But the outfits need to be in sequence and I can't restrict their use by a storage, for example.
I've already managed to add some outfits on my server but in a very limited way, I can't put outfits as a quest reward and there's no way to use addons. I use OTX 2 and would like to know what I need to change in the sources to use a system of outfits/addons per sale and per quest. I already use UTCv8 so the client wouldn't be a problem.
The way I added new outfits was in the line below, in protocolgame.cpp. But the outfits need to be in sequence and I can't restrict their use by a storage, for example.
C++:
void ProtocolGame::sendOutfitWindow()
{
NetworkMessage_ptr msg = getOutputBuffer();
if(!msg)
return;
TRACK_MESSAGE(msg);
msg->put<char>(0xC8);
AddCreatureOutfit(msg, player, player->getDefaultOutfit(), true);
#ifdef _MULTIPLATFORM77
msg->put<uint16_t>(player->sex % 2 ? 291 : 306); //start male and female
msg->put<uint16_t>(player->isPremium() ? (player->sex % 2 ? 305 : 320) : (player->sex % 2 ? 299 : 313)); //first, premium ends male and female, second no premium ends male and female
#else
msg->put<char>(player->sex % 2 ? 291 : 306);//start male and female
msg->put<char>(player->isPremium() ? (player->sex % 2 ? 305 : 320) : (player->sex % 2 ? 299 : 313));//first, premium ends male and female, second no premium ends male and female
#endif
player->hasRequestedOutfit(true);
}