From 5b56a23a8ae1a13398984f97f66f3a3362fa904c Mon Sep 17 00:00:00 2001 From: Chris Miles Date: Mon, 13 Feb 2023 21:02:18 -0600 Subject: [PATCH] [Hotfix] Fix issue with EVENT_HP firing regression from #2904 (#2924) * [Hotfix] Fix issue with EVENT_HP firing from https://github.com/EQEmu/Server/pull/2904 * Fix * Fix --- zone/mob.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index c484866ee..b5f03a5fd 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1382,11 +1382,10 @@ void Mob::CreateHPPacket(EQApplicationPacket* app) { if (ds->hp < GetNextHPEvent()) { - SetNextHPEvent(-1); - - if (parse->HasQuestSub(GetNPCTypeID(), EVENT_HP)) { + if (parse->HasQuestSub(CastToNPC()->GetNPCTypeID(), EVENT_HP)) { parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, std::to_string(GetNextHPEvent()), 0); } + SetNextHPEvent(-1); } } @@ -1394,11 +1393,10 @@ void Mob::CreateHPPacket(EQApplicationPacket* app) { if (ds->hp > GetNextIncHPEvent()) { - SetNextIncHPEvent(-1); - - if (parse->HasQuestSub(GetNPCTypeID(), EVENT_HP)) { + if (parse->HasQuestSub(CastToNPC()->GetNPCTypeID(), EVENT_HP)) { parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, std::to_string(GetNextIncHPEvent()), 1); } + SetNextIncHPEvent(-1); } } }