[Bug Fix] Fix Killed XYZH support in EVENT_DEATH in Perl. (#3591)

* [Bug Fix] Fix Killer XYZH support in EVENT_DEATH in Perl.

# Notes
- Fixes XYZH exports in Perl.

* Update embparser.cpp
This commit is contained in:
Alex King
2023-09-17 14:40:07 -04:00
committed by GitHub
parent 65d4533568
commit 9b992167f0
2 changed files with 44 additions and 19 deletions
+7 -3
View File
@@ -1741,7 +1741,8 @@ bool Client::Death(Mob* killerMob, int64 damage, uint16 spell, EQ::skills::Skill
static_cast<int>(attack_skill)
);
if (parse->EventPlayer(EVENT_DEATH, this, export_string, 0) != 0) {
std::vector<std::any> args = { CastToMob() };
if (parse->EventPlayer(EVENT_DEATH, this, export_string, 0, &args) != 0) {
if (GetHP() < 0) {
SetHP(0);
}
@@ -2388,7 +2389,8 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
static_cast<int>(attack_skill)
);
if (parse->EventNPC(EVENT_DEATH, this, oos, export_string, 0) != 0) {
std::vector<std::any> args = { CastToMob() };
if (parse->EventNPC(EVENT_DEATH, this, oos, export_string, 0, &args) != 0) {
if (GetHP() < 0) {
SetHP(0);
}
@@ -2405,7 +2407,9 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
spell,
static_cast<int>(attack_skill)
);
if (parse->EventBot(EVENT_DEATH, CastToBot(), oos, export_string, 0) != 0) {
std::vector<std::any> args = { CastToMob() };
if (parse->EventBot(EVENT_DEATH, CastToBot(), oos, export_string, 0, &args) != 0) {
if (GetHP() < 0) {
SetHP(0);
}