• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved [OTHIRE]- Problem changing outfits range

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
2,035
Solutions
9
Reaction score
361
Location
Chile
Hello Otlanders

Im having issues with changing othire outfits ranges (i've added new outfits)
the problem is that the new outfits appears at outfits windows, but when i choose the outfit ingame player becomes invisible like i've used utana vid
i had edit my protocol game from this
Code:
void ProtocolGame::sendOutfitWindow()
{
    NetworkMessage_ptr msg = getOutputBuffer();
    if (msg){
        msg->AddByte(0xC8); //code for client to open outfit window
        AddCreatureOutfit(msg, player, player->getDefaultOutfit()); //your current outfit as first showin outfit in window
        switch (player->getSex()) {
        case PLAYERSEX_FEMALE: //for female players
            msg->AddU16(136); //first female outfit
            if (player->isPremium())
                msg->AddU16(142); //last female outfit if player got premium (+3 premium outfits)
            else
                msg->AddU16(139); //last female outfit if players is facc
            break;
        case PLAYERSEX_MALE: //same for males
            msg->AddU16(128);
            if (player->isPremium())
                msg->AddU16(134);
            else
                msg->AddU16(131);
            break;
        case 2:
            msg->AddU16(160); // GM outfit? idk whats on sex=2
            msg->AddU16(160);
            break;
        default: //male facc outfits as default, but should never gets here
            msg->AddU16(128);
            msg->AddU16(134);
        }
    }
}

to this:
Code:
void ProtocolGame::sendOutfitWindow()
{
    NetworkMessage_ptr msg = getOutputBuffer();
    if (msg){
        msg->AddByte(0xC8);
        AddCreatureOutfit(msg, player, player->getDefaultOutfit());

        switch (player->getSex()) {
        case PLAYERSEX_FEMALE:
            msg->AddU16(410);
            if (player->isPremium())
                msg->AddU16(456);
            else
                msg->AddU16(413);

            break;
        case PLAYERSEX_MALE:
            msg->AddU16(362);
            if (player->isPremium())
                msg->AddU16(408);
            else
                msg->AddU16(365);

            break;
        case 2:
            msg->AddU16(160);
            msg->AddU16(160);

            break;
        default:
            msg->AddU16(362);
            msg->AddU16(408);
        }
    }
}

i need to edit others files? i know my ranges are okey
@Peonso could you help me into this pls?


thanks to all by advance
 
Maybe i solved it i figured out
that i have to edit this too....
Code:
void ProtocolGame::parseSetOutfit(NetworkMessage& msg)
{
    uint16_t lookType = msg.GetU16();

    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 >= 410 &&
        lookType <= lastFemaleOutfit) ||
        (player->getSex() == PLAYERSEX_MALE &&
        lookType >= 362 &&
        lookType <= lastMaleOutfit))
    {
        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);
}

thanks anyway :) i'll post if it was solved by if someone in a future would search for this like me
 
othire doesn't handle ranks id so high :C u.u

i had this issue i know i converted it properly
because the exe was created

i've done this before with others server like OTX but that distro is so buggy
HEEEELPP

Code:
1>source\protocolgame.cpp(957): warning C4305: 'initializing' : truncation from 'int' to 'uint8_t'
1>source\protocolgame.cpp(957): warning C4309: 'initializing' : truncation of constant value
1>source\protocolgame.cpp(958): warning C4305: 'initializing' : truncation from 'int' to 'uint8_t'
1>source\protocolgame.cpp(958): warning C4309: 'initializing' : truncation of constant value
1>source\protocolgame.cpp(962): warning C4305: '=' : truncation from 'int' to 'uint8_t'
1>source\protocolgame.cpp(962): warning C4309: '=' : truncation of constant value
1>source\protocolgame.cpp(964): warning C4305: '=' : truncation from 'int' to 'uint8_t'
1>source\protocolgame.cpp(964): warning C4309: '=' : truncation of constant value
 
Last edited:
Back
Top