Nottinghster
Tibia World RPG Developer
- Joined
- Oct 24, 2007
- Messages
- 1,570
- Solutions
- 6
- Reaction score
- 437
- Location
- Brazil - Rio de Janeiro
- GitHub
- Nottinghster
Hello OTLanders!
I'm trying to reproduce that new Tibia feature, but I'm having just 1 problem, read below
Peace between Monsters? (http://www.tibia.com/news/?subtopic=newsarchive&id=2240)
TIBIA. According to the journal of a dead explorer, evil forces have agreed to settle their differences so all monsters have stopped harming each other with their attacks. In addition, monsters with summons will not damage their own summons anymore. We expect some challenges to get tougher due to this cunning move, so be prepared when heading out on adventures!
The problem is that one:
My monsters are damaging their own summons, when it's not supposed to be
Here's the code:
Someone can help me with that ?
Kind regards,
Nottinghster.
I'm trying to reproduce that new Tibia feature, but I'm having just 1 problem, read below
Peace between Monsters? (http://www.tibia.com/news/?subtopic=newsarchive&id=2240)
TIBIA. According to the journal of a dead explorer, evil forces have agreed to settle their differences so all monsters have stopped harming each other with their attacks. In addition, monsters with summons will not damage their own summons anymore. We expect some challenges to get tougher due to this cunning move, so be prepared when heading out on adventures!
The problem is that one:
monsters with summons will not damage their own summons anymore.
My monsters are damaging their own summons, when it's not supposed to be
Here's the code:
Code:
if (g_config.getBoolean(ConfigManager::PEACE_BETWEEN_MONSTERS))
{
Player* targetPlayer = target->getPlayer();
Player* attackerPlayer;
if (attacker) {
attackerPlayer = attacker->getPlayer();
} else {
attackerPlayer = nullptr;
}
if(attacker && !attacker->isSummon() && target && !target->isSummon() && !attackerPlayer && !targetPlayer) {
return false;
}
}
Someone can help me with that ?
Kind regards,
Nottinghster.