event_death_complete

This commit is contained in:
KimLS
2013-06-27 15:07:28 -07:00
parent 945cc2117f
commit f46f7bd528
5 changed files with 23 additions and 3 deletions
+14
View File
@@ -1697,6 +1697,7 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_
GoToDeath();
}
parse->EventPlayer(EVENT_DEATH_COMPLETE, this, buffer, 0);
return true;
}
@@ -2037,6 +2038,16 @@ bool NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_ski
entity_list.MessageClose_StringID(this, false, 100, MT_NonMelee, HIT_NON_MELEE,
killerMob->GetCleanName(), GetCleanName(), ConvertArray(damage, val1));
}
} else {
char buffer[32] = { 0 };
snprintf(buffer, 31, "%d %d %d", damage, spell, static_cast<int>(attack_skill));
if(parse->EventNPC(EVENT_DEATH, this, nullptr, buffer, 0) != 0)
{
if(GetHP() < 0) {
SetHP(0);
}
return false;
}
}
if (IsEngaged())
@@ -2371,6 +2382,9 @@ bool NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_ski
entity_list.UpdateFindableNPCState(this, true);
char buffer[32] = { 0 };
snprintf(buffer, 31, "%d %d %d", damage, spell, static_cast<int>(attack_skill));
parse->EventNPC(EVENT_DEATH_COMPLETE, this, oos, buffer, 0);
return true;
}