Hello!
In TFS there is no such thing as summons follow so I putted in from some other OT (can't remember which) and it worked very well in previous TFS servers but now when I downloaded the last rev it crashes when someone with a summon reloggs.
This is how the code looks now.
in monster.cpp at:
void Monster:nCreatureLeave(Creature* creature)
changed
to
Any idea why it crashes?
The code works, it does TP but the carsh is the only thing.
In TFS there is no such thing as summons follow so I putted in from some other OT (can't remember which) and it worked very well in previous TFS servers but now when I downloaded the last rev it crashes when someone with a summon reloggs.
This is how the code looks now.
in monster.cpp at:
void Monster:nCreatureLeave(Creature* creature)
changed
Code:
if(getMaster() == creature)
{
//Turn the monster off until its master comes back
isMasterInRange = false;
deactivate();
}
to
Code:
if(getMaster() == creature)
{
if(g_config.getString(ConfigManager::SUMMONS_FOLLOW) == "yes")
{
if(g_game.internalTeleport(this, creature->getPosition(), true) == RET_NOERROR)
g_game.addMagicEffect(creature->getPosition(), NM_ME_ENERGY_AREA);
}
else
{
//Turn the monster off until its master comes back
isMasterInRange = false;
deactivate();
}
}
Any idea why it crashes?
The code works, it does TP but the carsh is the only thing.