[Quest API] Export killed XYZH to EVENT_DEATH_ZONE in Perl. (#2050)

- Export $killed_x, $killed_y, $killed_z, and $killed_h to EVENT_DEATH_ZONE in Perl.
- Cleanup export strings and unnecessary .c_str() calls on event exports.
This commit is contained in:
Kinglykrab
2022-03-12 13:44:01 -05:00
committed by GitHub
parent abcf8cbce1
commit 791d8b329d
9 changed files with 72 additions and 34 deletions
+4 -4
View File
@@ -1426,9 +1426,9 @@ void Mob::CreateHPPacket(EQApplicationPacket* app)
{
if (ds->hp < GetNextHPEvent())
{
std::string buf = fmt::format("{}", GetNextHPEvent());
std::string export_string = fmt::format("{}", GetNextHPEvent());
SetNextHPEvent(-1);
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, buf.c_str(), 0);
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, export_string, 0);
}
}
@@ -1436,9 +1436,9 @@ void Mob::CreateHPPacket(EQApplicationPacket* app)
{
if (ds->hp > GetNextIncHPEvent())
{
std::string buf = fmt::format("{}", GetNextIncHPEvent());
std::string export_string = fmt::format("{}", GetNextIncHPEvent());
SetNextIncHPEvent(-1);
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, buf.c_str(), 1);
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, export_string, 1);
}
}
}