I was looking the sources of the forgotten server 1.2
I found in Player.cpp
bool Player::dropCorpse(Creature* lastHitCreature, Creature* mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified)
{
if (getZone() != ZONE_PVP || !Player::lastHitIsPlayer(lastHitCreature)) {
return Creature::dropCorpse(lastHitCreature, mostDamageCreature, lastHitUnjustified, mostDamageUnjustified);
}
setDropLoot(true);
return false;
}
Player.h
bool dropCorpse(Creature* lastHitCreature, Creature* mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified) final;
I tested what this function does, if in case the server have pvp tiles for example and the player die there for players is automatically sent to the temple.
my doubt is... i tested if the player die for monster, and after i tested if player die for field damage. this function don't work
how can i add in function if the player dies for monster or field does it work too?
I found in Player.cpp
bool Player::dropCorpse(Creature* lastHitCreature, Creature* mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified)
{
if (getZone() != ZONE_PVP || !Player::lastHitIsPlayer(lastHitCreature)) {
return Creature::dropCorpse(lastHitCreature, mostDamageCreature, lastHitUnjustified, mostDamageUnjustified);
}
setDropLoot(true);
return false;
}
Player.h
bool dropCorpse(Creature* lastHitCreature, Creature* mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified) final;
I tested what this function does, if in case the server have pvp tiles for example and the player die there for players is automatically sent to the temple.
my doubt is... i tested if the player die for monster, and after i tested if player die for field damage. this function don't work
how can i add in function if the player dies for monster or field does it work too?