mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 11:31:30 +00:00
[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:
parent
086538754e
commit
d210b1e5ff
@ -1815,7 +1815,9 @@ bool Client::Death(Mob* killerMob, int64 damage, uint16 spell, EQ::skills::Skill
|
||||
|
||||
if (killerMob) {
|
||||
if (killerMob->IsNPC()) {
|
||||
parse->EventNPC(EVENT_SLAY, killerMob->CastToNPC(), this, "", 0);
|
||||
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()) {
|
||||
parse->EventBot(EVENT_SLAY, killerMob->CastToBot(), this, "", 0);
|
||||
if (parse->BotHasQuestSub(EVENT_SLAY)) {
|
||||
parse->EventBot(EVENT_SLAY, killerMob->CastToBot(), this, "", 0);
|
||||
}
|
||||
|
||||
killerMob->TrySpellOnKill(killed_level, spell);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user