mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Bug Fix] Fix EVENT_COMBAT on NPC Death (#4558)
This commit is contained in:
parent
3d7cf4235c
commit
fe9df46a24
@ -1815,12 +1815,18 @@ void Mob::AI_Event_NoLongerEngaged() {
|
||||
StopNavigation();
|
||||
ClearRampage();
|
||||
|
||||
parse->EventBotMercNPC(EVENT_COMBAT, this, nullptr, [&]() { return "0"; });
|
||||
|
||||
if (IsNPC()) {
|
||||
SetPrimaryAggro(false);
|
||||
SetAssistAggro(false);
|
||||
if (CastToNPC()->GetCombatEvent() && GetHP() > 0) {
|
||||
if (
|
||||
CastToNPC()->GetCombatEvent() &&
|
||||
GetHP() > 0 &&
|
||||
entity_list.GetNPCByID(GetID())
|
||||
) {
|
||||
if (parse->HasQuestSub(GetNPCTypeID(), EVENT_COMBAT)) {
|
||||
parse->EventNPC(EVENT_COMBAT, CastToNPC(), nullptr, "0", 0);
|
||||
}
|
||||
|
||||
const uint32 emote_id = CastToNPC()->GetEmoteID();
|
||||
if (emote_id) {
|
||||
CastToNPC()->DoNPCEmote(EQ::constants::EmoteEventTypes::LeaveCombat, emote_id);
|
||||
@ -1829,6 +1835,8 @@ void Mob::AI_Event_NoLongerEngaged() {
|
||||
m_combat_record.Stop();
|
||||
CastToNPC()->SetCombatEvent(false);
|
||||
}
|
||||
} else {
|
||||
parse->EventBotMerc(EVENT_COMBAT, this, nullptr, [&]() { return "0"; });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user