[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
This commit is contained in:
Chris Miles 2023-02-13 21:02:18 -06:00 committed by GitHub
parent 97edb09fba
commit 5b56a23a8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1382,11 +1382,10 @@ void Mob::CreateHPPacket(EQApplicationPacket* app)
{ {
if (ds->hp < GetNextHPEvent()) if (ds->hp < GetNextHPEvent())
{ {
SetNextHPEvent(-1); if (parse->HasQuestSub(CastToNPC()->GetNPCTypeID(), EVENT_HP)) {
if (parse->HasQuestSub(GetNPCTypeID(), EVENT_HP)) {
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, std::to_string(GetNextHPEvent()), 0); 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()) if (ds->hp > GetNextIncHPEvent())
{ {
SetNextIncHPEvent(-1); if (parse->HasQuestSub(CastToNPC()->GetNPCTypeID(), EVENT_HP)) {
if (parse->HasQuestSub(GetNPCTypeID(), EVENT_HP)) {
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, std::to_string(GetNextIncHPEvent()), 1); parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, std::to_string(GetNextIncHPEvent()), 1);
} }
SetNextIncHPEvent(-1);
} }
} }
} }