[Quest API] (Performance) Check event EVENT_SLAY exists before export and execute (#2910)

* [Quest API] Optionally parse EVENT_SLAY

# Notes
- Optionally parse this event instead of always doing so.

* Update attack.cpp
This commit is contained in:
Alex King 2023-02-12 23:24:38 -05:00 committed by GitHub
parent 086538754e
commit d210b1e5ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1815,7 +1815,9 @@ bool Client::Death(Mob* killerMob, int64 damage, uint16 spell, EQ::skills::Skill
if (killerMob) {
if (killerMob->IsNPC()) {
if (parse->HasQuestSub(killerMob->GetNPCTypeID(), EVENT_SLAY)) {
parse->EventNPC(EVENT_SLAY, killerMob->CastToNPC(), this, "", 0);
}
mod_client_death_npc(killerMob);
@ -1826,7 +1828,10 @@ bool Client::Death(Mob* killerMob, int64 damage, uint16 spell, EQ::skills::Skill
killerMob->TrySpellOnKill(killed_level, spell);
} else if (killerMob->IsBot()) {
if (parse->BotHasQuestSub(EVENT_SLAY)) {
parse->EventBot(EVENT_SLAY, killerMob->CastToBot(), this, "", 0);
}
killerMob->TrySpellOnKill(killed_level, spell);
}