• 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!

Removing the "Golden" from the set

IgoR lYCAN

New Member
Joined
Dec 1, 2018
Messages
169
Reaction score
4
Based on TFS 1.3
Well.. That's the problem:

1579955885325.png

on protocolgame.cpp i've made this change:
Code:
void ProtocolGame::sendBlessStatus()
{
    if (true) return;

With this, I removed the golden from the set, like I want, but the problem is that:
1579956111943.png
The "symbol of bless" is desactived either.

How to set only the symbol active?
 
Solution
C++:
void ProtocolGame::sendBlessStatus()
{
    NetworkMessage msg;
    uint8_t blessCount = 0;
    uint8_t maxBlessings = (player->operatingSystem == CLIENTOS_NEW_WINDOWS) ? 8 : 6;
    for (int i = 1; i <= maxBlessings; i++) {
        if (player->hasBlessing(i)) {
            blessCount++;
        }
    }

    msg.addByte(0x9C);
        msg.add<uint16_t>(0x00);

    if (player->getProtocolVersion() >= 1120) {
        msg.addByte((blessCount >= 5) ? 2 : 1); // 1 = Disabled | 2 = normal | 3 = green
    }

    writeToOutputBuffer(msg);
}

Try replacing the whole function with this one

as you can see, there's no funcion with that name in TFS 1.3.

Well.. I've it inside the protocolgame;
without made any change on it.
Only like I said : Ive added this line:
if (true) return;
to make the Golden set doenst work;

Code:
void ProtocolGame::sendBlessStatus()
{
    if (true) return;
    NetworkMessage msg;
    uint8_t blessCount = 0;
    uint8_t maxBlessings = (player->operatingSystem == CLIENTOS_NEW_WINDOWS) ? 8 : 6;
    for (int i = 1; i <= maxBlessings; i++) {
        if (player->hasBlessing(i)) {
            blessCount++;
        }
    }

    msg.addByte(0x9C);
    if (blessCount >= 5) {
        if (player->getProtocolVersion() >= 1120) {
            uint8_t blessFlag = 0;
            uint8_t maxFlag = static_cast<uint8_t>((maxBlessings == 8) ? 256 : 64);
            for (int i = 2; i < maxFlag; i *= 2) {
                blessFlag += i;
            }

            msg.add<uint16_t>(blessFlag - 1);
        } else {
            msg.add<uint16_t>(0x01);
        }
    } else {
        msg.add<uint16_t>(0x00);
    }

    if (player->getProtocolVersion() >= 1120) {
        msg.addByte((blessCount >= 5) ? 2 : 1); // 1 = Disabled | 2 = normal | 3 = green
    }

    writeToOutputBuffer(msg);
}


also:
1579966846470.png
 
C++:
void ProtocolGame::sendBlessStatus()
{
    NetworkMessage msg;
    uint8_t blessCount = 0;
    uint8_t maxBlessings = (player->operatingSystem == CLIENTOS_NEW_WINDOWS) ? 8 : 6;
    for (int i = 1; i <= maxBlessings; i++) {
        if (player->hasBlessing(i)) {
            blessCount++;
        }
    }

    msg.addByte(0x9C);
        msg.add<uint16_t>(0x00);

    if (player->getProtocolVersion() >= 1120) {
        msg.addByte((blessCount >= 5) ? 2 : 1); // 1 = Disabled | 2 = normal | 3 = green
    }

    writeToOutputBuffer(msg);
}

Try replacing the whole function with this one
 
Solution
C++:
void ProtocolGame::sendBlessStatus()
{
    NetworkMessage msg;
    uint8_t blessCount = 0;
    uint8_t maxBlessings = (player->operatingSystem == CLIENTOS_NEW_WINDOWS) ? 8 : 6;
    for (int i = 1; i <= maxBlessings; i++) {
        if (player->hasBlessing(i)) {
            blessCount++;
        }
    }

    msg.addByte(0x9C);
        msg.add<uint16_t>(0x00);

    if (player->getProtocolVersion() >= 1120) {
        msg.addByte((blessCount >= 5) ? 2 : 1); // 1 = Disabled | 2 = normal | 3 = green
    }

    writeToOutputBuffer(msg);
}

Try replacing the whole function with this one

Thanks! :D
 
Last edited:
Back
Top