mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +00:00
[Hotfix] Fix HP_EVENT regression (#2927)
* [Hotfix] Fix HP_EVENT regression * Update mob.cpp
This commit is contained in:
parent
02302802b8
commit
064ae7ba89
26
zone/mob.cpp
26
zone/mob.cpp
@ -1378,25 +1378,23 @@ void Mob::CreateHPPacket(EQApplicationPacket* app)
|
|||||||
ds->hp = (int)GetHPRatio();
|
ds->hp = (int)GetHPRatio();
|
||||||
|
|
||||||
// hp event
|
// hp event
|
||||||
if (IsNPC() && (GetNextHPEvent() > 0))
|
if (IsNPC() && (GetNextHPEvent() > 0)) {
|
||||||
{
|
if (ds->hp < GetNextHPEvent()) {
|
||||||
if (ds->hp < GetNextHPEvent())
|
std::string export_string = fmt::format("{}", GetNextHPEvent());
|
||||||
{
|
|
||||||
if (parse->HasQuestSub(CastToNPC()->GetNPCTypeID(), EVENT_HP)) {
|
|
||||||
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, std::to_string(GetNextHPEvent()), 0);
|
|
||||||
}
|
|
||||||
SetNextHPEvent(-1);
|
SetNextHPEvent(-1);
|
||||||
|
if (parse->HasQuestSub(CastToNPC()->GetNPCTypeID(), EVENT_HP)) {
|
||||||
|
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, export_string, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsNPC() && (GetNextIncHPEvent() > 0))
|
if (IsNPC() && (GetNextIncHPEvent() > 0)) {
|
||||||
{
|
if (ds->hp > GetNextIncHPEvent()) {
|
||||||
if (ds->hp > GetNextIncHPEvent())
|
std::string export_string = fmt::format("{}", GetNextIncHPEvent());
|
||||||
{
|
|
||||||
if (parse->HasQuestSub(CastToNPC()->GetNPCTypeID(), EVENT_HP)) {
|
|
||||||
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, std::to_string(GetNextIncHPEvent()), 1);
|
|
||||||
}
|
|
||||||
SetNextIncHPEvent(-1);
|
SetNextIncHPEvent(-1);
|
||||||
|
if (parse->HasQuestSub(CastToNPC()->GetNPCTypeID(), EVENT_HP)) {
|
||||||
|
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, export_string, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user