mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-18 12:28:26 +00:00
[Quest API] Cleanup string copies and push_backs. (#2807)
# Notes - Several places use `push_back` instead of `emplace_back`. - Several places use `std::string` instead of `const std::string&`.
This commit is contained in:
+7
-7
@@ -1784,8 +1784,8 @@ void EntityList::DuelMessage(Mob *winner, Mob *loser, bool flee)
|
||||
{
|
||||
if (winner->GetLevelCon(winner->GetLevel(), loser->GetLevel()) > 2) {
|
||||
std::vector<std::any> args;
|
||||
args.push_back(winner);
|
||||
args.push_back(loser);
|
||||
args.emplace_back(winner);
|
||||
args.emplace_back(loser);
|
||||
|
||||
parse->EventPlayer(EVENT_DUEL_WIN, winner->CastToClient(), loser->GetName(), loser->CastToClient()->CharacterID(), &args);
|
||||
parse->EventPlayer(EVENT_DUEL_LOSE, loser->CastToClient(), winner->GetName(), winner->CastToClient()->CharacterID(), &args);
|
||||
@@ -3642,7 +3642,7 @@ void EntityList::ClearFeignAggro(Mob *targ)
|
||||
|
||||
if (targ->IsClient()) {
|
||||
std::vector<std::any> args;
|
||||
args.push_back(it->second);
|
||||
args.emplace_back(it->second);
|
||||
int i = parse->EventPlayer(EVENT_FEIGN_DEATH, targ->CastToClient(), "", 0, &args);
|
||||
if (i != 0) {
|
||||
++it;
|
||||
@@ -3989,8 +3989,8 @@ void EntityList::ProcessMove(Client *c, const glm::vec3& location)
|
||||
quest_proximity_event& evt = (*iter);
|
||||
|
||||
std::vector<std::any> args;
|
||||
args.push_back(&evt.area_id);
|
||||
args.push_back(&evt.area_type);
|
||||
args.emplace_back(&evt.area_id);
|
||||
args.emplace_back(&evt.area_type);
|
||||
|
||||
if (evt.npc) {
|
||||
if (evt.event_id == EVENT_ENTER) {
|
||||
@@ -4066,8 +4066,8 @@ void EntityList::ProcessMove(NPC *n, float x, float y, float z) {
|
||||
quest_proximity_event &evt = (*iter);
|
||||
|
||||
std::vector<std::any> args;
|
||||
args.push_back(&evt.area_id);
|
||||
args.push_back(&evt.area_type);
|
||||
args.emplace_back(&evt.area_id);
|
||||
args.emplace_back(&evt.area_type);
|
||||
|
||||
if (evt.event_id == EVENT_ENTER) {
|
||||
parse->EventNPC(EVENT_ENTER, evt.npc, evt.client, "", 0);
|
||||
|
||||
Reference in New Issue
Block a user