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

[Help] Summon follow crash

Lejjo

New Member
Joined
Sep 21, 2007
Messages
78
Reaction score
1
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::eek: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.
 
Seriously, isn't there some fix to this?

I used this on former TFS versions but on the newer it crashes.

Can someone help me here and/or the developers of TFS make this function available, but code better than I did.
 
Back
Top