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

Compiling Problem with magic effects limit.

Megazort

Banned User
Joined
Apr 26, 2009
Messages
3
Reaction score
0
Hello!
I have problem with magic effects limit.
In client have 300 magic effects, in protocolgame.cpp changed:
Code:
void ProtocolGame::sendMagicEffect(const Position& pos, uint8_t type)
{
        if(type > MAGIC_EFFECT_LAST || !canSee(pos))
                return;

        NetworkMessage_ptr msg = getOutputBuffer();
        if(msg)
        {
                TRACK_MESSAGE(msg);
                AddMagicEffect(msg, pos, type);
        }
}

MAGIC_EFFECT_LAST exchanged at 254, but could not be at 300, because he showed me this error when compiling:
Code:
[WARNING] comparison is always false due to limited range of data type.

const.h also changed, but nothing. As I type /z 254 is the effect the show, and how to type /z 256 is shown an effect (physicaldamage), and how to give /z 257 is showing a 2-effect, repeated effects...


I changed the uint8_t type on uint16_t type, but is this error:
Code:
  [Linker error] undefined reference to `ProtocolGame::sendMagicEffect(Position const&, unsigned char)'

I have:
Server: TFS 0.3.6PL1
Client version: 8.54

That is the script with protocolgame.cpp:
Code:
void ProtocolGame::sendMagicEffect(const Position& pos, uint8_t type)
{
        if(type > MAGIC_EFFECT_LAST || !canSee(pos))
                return;

        NetworkMessage_ptr msg = getOutputBuffer();
        if(msg)
        {
                TRACK_MESSAGE(msg);
                AddMagicEffect(msg, pos, type);
        }
}

Please, help me!

P.S. Sorry, I'm not good with English.
 
256 is the size of a byte, You need to increase it to higher.. but im unsure if the client can handle more than a byte when it comes to effects.
 
Back
Top