• 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+ 1.4.2 Check if monster has flag

DawacPliki

New Member
Joined
May 8, 2023
Messages
9
Reaction score
2
Is there a way to check the value of monster flag inside monster.cpp file? Something like player->hasFlag(). I read somewhere that it's not possible but I want to be sure.

Pseudocode

C++:
bool Monster::isOpponent(const Creature* creature) const
{
        if (creature->getMonster() && creature->getMonster()->hasFlag(Team) && hasFlag(Team)) {
            return true;
        }
}
 
Back
Top