It's easy. More then 255 effects are not supported by any real tibia client, but OTClient already has this feature!
It's not only client problem! Server must also send effects with higher IDs (normal server sends uint8 [also known as 'byte'] = values 0 - 255)!
In case of newest TFS, code that sends that uint8 is here:
otland/forgottenserver
You need some C++ programmer to change it to uint16 (in few places in engine).
OTClient is compatible with all popular tibia versions. There is a script that check what 'features' were available in X version of tibia:
edubart/otclient
As 255+ effects were not available in any tibia version. There is no code that enables it.
You must add after:
This line:
Code:
enableFeature(Otc::GameMagicEffectU16);
And there is a code that 'parse' packet from server:
edubart/otclient
Code:
void ProtocolGame::parseMagicEffect(const InputMessagePtr& msg)
{
Position pos = getPosition(msg);
int effectId;
if(g_game.getFeature(Otc::GameMagicEffectU16))
effectId = msg->getU16(); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<< HERE!
else
effectId = msg->getU8();
if(!g_things.isValidDatId(effectId, ThingCategoryEffect)) {
g_logger.traceError(stdext::format("invalid effect id %d", effectId));
return;
}
EffectPtr effect = EffectPtr(new Effect());
effect->setId(effectId);
g_map.addThing(effect, pos);
}
With enabled feature 'GameMagicEffectU16', it reads 'short/uint16' from server packet (up to 65535 effects).
If you enable it in client and not modify server, it may block all effects or crash client!