darkmubr
Member
- Joined
- Mar 8, 2019
- Messages
- 47
- Solutions
- 1
- Reaction score
- 13
i want change combat.cpp for dont accept my own damage in my summon.
I noticed that in no-pvp mode my summon does not get damage. But I also can not deal damage to enemy summon.
what I want: do not hit my summon but hit whatever else.
I did some testing and it looks like this can be adjusted around here.
Someone help me?
I noticed that in no-pvp mode my summon does not get damage. But I also can not deal damage to enemy summon.
what I want: do not hit my summon but hit whatever else.
I did some testing and it looks like this can be adjusted around here.
Someone help me?
LUA:
if (g_game.getWorldType() == WORLD_TYPE_NO_PVP ) {
if (attacker->getPlayer() || (attacker->isSummon() && attacker->getMaster()->getPlayer())) {
if (target->getPlayer()) {
if (!isInPvpZone(attacker, target)) {
return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER;
}
}
if (target->isSummon() && target->getMaster()->getPlayer()) {
if (!isInPvpZone(attacker, target)) {
return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE;
}
}
}
}