Revert "[Quest API] Cleanup string copies and push_backs. (#2807)"

This reverts commit bcc2e022dc.
This commit is contained in:
Akkadius
2023-01-31 20:30:34 -06:00
parent f727c9f75a
commit 54050924d8
21 changed files with 397 additions and 372 deletions
+3 -3
View File
@@ -2788,7 +2788,7 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
combat_record.Stop();
/* Zone controller process EVENT_DEATH_ZONE (Death events) */
args.emplace_back(this);
args.push_back(this);
DispatchZoneControllerEvent(EVENT_DEATH_ZONE, oos, export_string, 0, &args);
return true;
@@ -3881,7 +3881,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
if (IsBot() && has_bot_taken_event) {
parse->EventBot(EVENT_DAMAGE_TAKEN, CastToBot(), attacker ? attacker : nullptr, export_string, 0);
} else if (IsClient() && has_player_taken_event) {
args.emplace_back(attacker ? attacker : nullptr);
args.push_back(attacker ? attacker : nullptr);
parse->EventPlayer(EVENT_DAMAGE_TAKEN, CastToClient(), export_string, 0, &args);
} else if (IsNPC() && has_npc_taken_event) {
parse->EventNPC(EVENT_DAMAGE_TAKEN, CastToNPC(), attacker ? attacker : nullptr, export_string, 0);
@@ -3905,7 +3905,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
if (attacker->IsBot() && has_bot_given_event) {
parse->EventBot(EVENT_DAMAGE_GIVEN, attacker->CastToBot(), this, export_string, 0);
} else if (attacker->IsClient() && has_player_given_event) {
args.emplace_back(this);
args.push_back(this);
parse->EventPlayer(EVENT_DAMAGE_GIVEN, attacker->CastToClient(), export_string, 0, &args);
} else if (attacker->IsNPC() && has_npc_given_event) {
parse->EventNPC(EVENT_DAMAGE_GIVEN, attacker->CastToNPC(), this, export_string, 0);