• 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 with C++ TFS 1.2

bizao030188

Member
Joined
Jun 4, 2012
Messages
50
Solutions
2
Reaction score
7
Hi guys!
I am trying to chance the monster.cpp function
C++:
bool Monster::selectTarget(Creature* creature)

and I must know if the creature is a player and has at least one summon. How can I do that?

It is something like this:

Code:
if (creature->getPlayer() && creature->getPlayer()->...) {

What should I put on the ... part? Is there any function that I can use for that?

Thanks in advance
 
C++:
if (creature->isSummon() && creature->getMaster()->getPlayer()) {
Something like that, you've got isSummon() and getMaster(), do something out of that.
 
C++:
if (creature->isSummon() && creature->getMaster()->getPlayer()) {
Something like that, you've got isSummon() and getMaster(), do something out of that.
Actually what I want is to know if the player has a summon not if the creature is a summon. Would be something like
Code:
creature->getPlayer()->hasSummons()
but the hasSummons function doesn’t exist
 
Back
Top