mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 11:28:25 +00:00
[Quest API] Convert all char arrays to strings. (#1612)
* [Quest API] Convert all char arrays to strings. Also change multiple loops for zone controller to one loop. * Remove 'this' keyword'
This commit is contained in:
+4
-8
@@ -1334,11 +1334,9 @@ void Mob::CreateHPPacket(EQApplicationPacket* app)
|
||||
{
|
||||
if (ds->hp < GetNextHPEvent())
|
||||
{
|
||||
char buf[10];
|
||||
snprintf(buf, 9, "%i", GetNextHPEvent());
|
||||
buf[9] = '\0';
|
||||
std::string buf = fmt::format("{}", GetNextHPEvent());
|
||||
SetNextHPEvent(-1);
|
||||
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, buf, 0);
|
||||
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, buf.c_str(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1346,11 +1344,9 @@ void Mob::CreateHPPacket(EQApplicationPacket* app)
|
||||
{
|
||||
if (ds->hp > GetNextIncHPEvent())
|
||||
{
|
||||
char buf[10];
|
||||
snprintf(buf, 9, "%i", GetNextIncHPEvent());
|
||||
buf[9] = '\0';
|
||||
std::string buf = fmt::format("{}", GetNextIncHPEvent());
|
||||
SetNextIncHPEvent(-1);
|
||||
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, buf, 1);
|
||||
parse->EventNPC(EVENT_HP, CastToNPC(), nullptr, buf.c_str(), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user