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

Windows tfs 1.2 magic wall

Solution
@M0ustafa Please help me find a solution for what I want
As much as I remember, I've helped you with this once. Anyway, try the following in your combat.cpp
Find
C++:
ReturnValue Combat::canDoCombat(Creature* caster, Tile* tile, bool aggressive)
and below it replace this
C++:
if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {
        return RETURNVALUE_NOTENOUGHROOM;
    }
by this
C++:
if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE) && !tile->getFieldItem()){
        return RETURNVALUE_NOTENOUGHROOM;
    }
Then find
C++:
void AreaCombat::getList(const Position& centerPos, const Position& targetPos, std::forward_list<Tile*>& list) const
and below it replace this
C++:
Tile* tile =...
bro use updated server files you wont have to face those errors and that way everything will be easier for you, because you will have more support and won't need to fix things that are already fixed in newer source files
GitHub - otland/forgottenserver: A free and open-source MMORPG server emulator written in C++ (https://github.com/otland/forgottenserver) 10.98 +
the same tutorial for every protocol
 
bro use updated server files you wont have to face those errors and that way everything will be easier for you, because you will have more support and won't need to fix things that are already fixed in newer source files
GitHub - otland/forgottenserver: A free and open-source MMORPG server emulator written in C++ (https://github.com/otland/forgottenserver) 10.98 +
the same tutorial for every protocol
I want her to hit like that in the picture
I want a wave that crosses the magic wall
 
@M0ustafa Please help me find a solution for what I want
As much as I remember, I've helped you with this once. Anyway, try the following in your combat.cpp
Find
C++:
ReturnValue Combat::canDoCombat(Creature* caster, Tile* tile, bool aggressive)
and below it replace this
C++:
if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {
        return RETURNVALUE_NOTENOUGHROOM;
    }
by this
C++:
if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE) && !tile->getFieldItem()){
        return RETURNVALUE_NOTENOUGHROOM;
    }
Then find
C++:
void AreaCombat::getList(const Position& centerPos, const Position& targetPos, std::forward_list<Tile*>& list) const
and below it replace this
C++:
Tile* tile = g_game.map.getTile(targetPos);
    if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {
        return;
    }
by this
C++:
Tile* tile = g_game.map.getTile(targetPos);
    if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE) && !tile->getFieldItem()) {
        return;
    }
Those are the only changes I can recall, Last time I had to check the old XML source and compare it with TFS 1.2, Maybe only one change of the above is needed.
You can also check the spells.cpp changes here
 
Solution
As much as I remember, I've helped you with this once. Anyway, try the following in your combat.cpp
Find
C++:
ReturnValue Combat::canDoCombat(Creature* caster, Tile* tile, bool aggressive)
and below it replace this
C++:
if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {
        return RETURNVALUE_NOTENOUGHROOM;
    }
by this
C++:
if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE) && !tile->getFieldItem()){
        return RETURNVALUE_NOTENOUGHROOM;
    }
Then find
C++:
void AreaCombat::getList(const Position& centerPos, const Position& targetPos, std::forward_list<Tile*>& list) const
and below it replace this
C++:
Tile* tile = g_game.map.getTile(targetPos);
    if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {
        return;
    }
by this
C++:
Tile* tile = g_game.map.getTile(targetPos);
    if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE) && !tile->getFieldItem()) {
        return;
    }
Those are the only changes I can recall, Last time I had to check the old XML source and compare it with TFS 1.2, Maybe only one change of the above is needed.
You can also check the spells.cpp changes here
i will test
 
As much as I remember, I've helped you with this once. Anyway, try the following in your combat.cpp
Find
C++:
ReturnValue Combat::canDoCombat(Creature* caster, Tile* tile, bool aggressive)
and below it replace this
C++:
if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {
        return RETURNVALUE_NOTENOUGHROOM;
    }
by this
C++:
if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE) && !tile->getFieldItem()){
        return RETURNVALUE_NOTENOUGHROOM;
    }
Then find
C++:
void AreaCombat::getList(const Position& centerPos, const Position& targetPos, std::forward_list<Tile*>& list) const
and below it replace this
C++:
Tile* tile = g_game.map.getTile(targetPos);
    if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE)) {
        return;
    }
by this
C++:
Tile* tile = g_game.map.getTile(targetPos);
    if (tile->hasProperty(CONST_PROP_BLOCKPROJECTILE) && !tile->getFieldItem()) {
        return;
    }
Those are the only changes I can recall, Last time I had to check the old XML source and compare it with TFS 1.2, Maybe only one change of the above is needed.
You can also check the spells.cpp changes here
You are the best my friend
 
Back
Top