• 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+ How to hide magic effect on no tile zone

Breaak

New Member
Joined
Feb 5, 2016
Messages
28
Reaction score
4
Hello guys,
I have little trouble in spell, effects appear on a tile that doesn't exist. I don't know, it's maybe normal behavior in this TFS 1.2 downgraded to 8.0 but for me, it's a bug.
Here a picture describe that problem

I would to fix it like check that in this area exists tile (ground) but I don't know where put if/else statement..

I will be happy to receive a hint ;)
 

Attachments

It's client side, depends what client u using, because as you can see the "effect" and "tile" is properly blocked on solid objects (walls, etc.).
 
Last edited:
Try
C++:
void ProtocolGame::sendMagicEffect(const Position& pos, uint8_t type)
{
    if (!canSee(pos)) {
        return;
    }

    Tile* tile = g_game.map.getTile(pos);
    if (!tile) {
        return;
    }

    NetworkMessage msg;
    msg.addByte(0x83);
    msg.addPosition(pos);
    msg.addByte(type);
    writeToOutputBuffer(msg);
}
 
Ok I resolved problem I changed to
Code:
if (!tile->getGround()) {
The magic effect disappeared on no tile zone but now how to block spells when players throw spell in no tile zone like example player cast spell on edge

The map sight clear functions need to be edit?

Edit:
I think the edge in tfs is like no tile zone so I think maybe spells or combat functions when start cast, check if that ground exists like above?
Thanks in advance for any hint
Post automatically merged:

Ok I resolved problem I added in combat statement .
Thank you :)
 

Attachments

Last edited:
Back
Top