vitorbertolucci
Member
- Joined
- Apr 15, 2014
- Messages
- 75
- Reaction score
- 18
Hello I need to know how to check wether a kill was justified or not in the callback onKill. Could someone help?
95% sure he's using 0.4Distro?
uint32_t flags = 0;
if(entry.isLast() && entry.isJustify()) {
flags |= 1, 2;
}
if(entry.isLast() && entry.isUnjustified()) {
flags |= 1, 4;
}
Did you try the suggestion above your question? And if so what was the output?7 years later, but i've a 0.4 server and had this same issue XD
at bool Player:nKilledCreature(Creature* target, DeathEntry& entry)
this code:
if (!Creature:nKilledCreature(target, entry))
return false;
that triggers the creatureEvent function, was called before the entry was setted to unjustified. So you just move it near to the end of the function, before:
if(entry.isUnjustified())
Greetings!