• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Limited Outfits

Sigoles

Discord: @sigoles
Joined
Nov 20, 2015
Messages
1,200
Solutions
2
Reaction score
149
Hi,
where I can change to enable more outfits? my src its like limited (I created one monster with outfit 1120 to test and its works but my Gamemaster don't appear the outfit there in outfit widow)

I did some test like:
C++:
bool getOutfitAddons(const Outfit& outfit, uint8_t& addons) const;
to
C++:
bool getOutfitAddons(const Outfit& outfit, uint16_t& addons) const;

C++:
if (protocolOutfits.size() == 250) { // Game client doesn't allow more than 250 outfits
to
C++:
if (protocolOutfits.size() == 400) { // Game client doesn't allow more than 400 outfits

still the same proble, can anyone help?


my sendOutfitWindow (idk if is there the function to show outfits):
C++:
void ProtocolGame::sendOutfitWindow()
{
    NetworkMessage msg;
    msg.addByte(0xC8);

    Outfit_t currentOutfit = player->getDefaultOutfit();
    Mount* currentMount = g_game.mounts.getMountByID(player->getCurrentMount());
    if (currentMount) {
        currentOutfit.lookMount = currentMount->clientId;
    }

    AddOutfit(msg, currentOutfit);

    std::vector<ProtocolOutfit> protocolOutfits;
   
    if (player->isAccessPlayer()) {
        static const std::string gamemasterOutfitName = "Game Master";
        protocolOutfits.emplace_back(gamemasterOutfitName, 75, 0);

        static const std::string gmCustomerSupport = "Customer Support";
        protocolOutfits.emplace_back(gmCustomerSupport, 266, 0);

        static const std::string communityManager = "Community Manager";
        protocolOutfits.emplace_back(communityManager, 302, 0);
    }

    const auto& outfits = Outfits::getInstance().getOutfits(player->getSex());
    protocolOutfits.reserve(outfits.size());
    for (const Outfit& outfit : outfits) {
        uint8_t addons;
        if (!player->getOutfitAddons(outfit, addons)) {
            continue;
        }

        protocolOutfits.emplace_back(outfit.name, outfit.lookType, addons);
       
        if (protocolOutfits.size() == 250) { // Game client doesn't allow more than 250 outfits
            break;
        }
    }

    msg.addByte(protocolOutfits.size());
    for (const ProtocolOutfit& outfit : protocolOutfits) {
        msg.add<uint16_t>(outfit.lookType);
        msg.addString(outfit.name);
        msg.addByte(outfit.addons);
    }

    std::vector<const Mount*> mounts;
    for (const Mount& mount : g_game.mounts.getMounts()) {
        if (player->hasMount(&mount)) {
            mounts.push_back(&mount);
        }
    }

    msg.addByte(mounts.size());
    for (const Mount* mount : mounts) {
        msg.add<uint16_t>(mount->clientId);
        msg.addString(mount->name);
    }

    writeToOutputBuffer(msg);
}
 
Last edited by a moderator:
Back
Top