massuco
Brazilian, sorry for my bad english XD
I want to make the monster spells dont hit other monsters on OTHire 7.72
Like banshee wave, the banshee wave is killing demon, i want that they dont hit each other.
On an old topic about i saw @Peonso saying about changes on combat.cpp
He said to add something like this on combat.cpp (its a code from this forgottenserver)
Ive tried this, but no success, nothing happens, monsters still hit each other, maybe this arguments are not compatible with othire functions, can someone help me?
here is the original combat.cpp from othire:
TwistedScorpio/OTHire (https://github.com/TwistedScorpio/OTHire/blob/08a3e77d2be851d037efd3937095b65da6289ba5/source/combat.cpp#L421)
any idea?
Like banshee wave, the banshee wave is killing demon, i want that they dont hit each other.
On an old topic about i saw @Peonso saying about changes on combat.cpp
He said to add something like this on combat.cpp (its a code from this forgottenserver)
C++:
else if (attacker->getMonster()) {
const Creature* targetMaster = target->getMaster();
if (!targetMaster || !targetMaster->getPlayer()) {
const Creature* attackerMaster = attacker->getMaster();
if (!attackerMaster || !attackerMaster->getPlayer()) {
return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE;
}
}
}
Ive tried this, but no success, nothing happens, monsters still hit each other, maybe this arguments are not compatible with othire functions, can someone help me?
here is the original combat.cpp from othire:
TwistedScorpio/OTHire (https://github.com/TwistedScorpio/OTHire/blob/08a3e77d2be851d037efd3937095b65da6289ba5/source/combat.cpp#L421)
any idea?