Skip to content

Commit

Permalink
Scripts/Command: Solve several format exception crashes introduced in…
Browse files Browse the repository at this point in the history
… a recent commit

Ref #16648
Closes #16751
  • Loading branch information
Nyeriah committed Mar 9, 2016
1 parent a41bd8e commit c190577
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/server/scripts/Commands/cs_modify.cpp
Expand Up @@ -473,7 +473,7 @@ class modify_commandscript : public CommandScript
return false;
}

handler->PSendSysMessage(LANG_YOU_CHANGE_ASPEED, ASpeed, targetNameLink.c_str());
handler->PSendSysMessage(LANG_YOU_CHANGE_ASPEED, targetNameLink.c_str(), ASpeed);
if (handler->needReportToTarget(target))
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ASPEED_CHANGED, handler->GetNameLink().c_str(), ASpeed);

Expand Down Expand Up @@ -521,7 +521,7 @@ class modify_commandscript : public CommandScript
return false;
}

handler->PSendSysMessage(LANG_YOU_CHANGE_SPEED, Speed, targetNameLink.c_str());
handler->PSendSysMessage(LANG_YOU_CHANGE_SPEED, targetNameLink.c_str(), Speed);
if (handler->needReportToTarget(target))
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SPEED_CHANGED, handler->GetNameLink().c_str(), Speed);

Expand Down Expand Up @@ -566,7 +566,7 @@ class modify_commandscript : public CommandScript
return false;
}

handler->PSendSysMessage(LANG_YOU_CHANGE_SWIM_SPEED, Swim, targetNameLink.c_str());
handler->PSendSysMessage(LANG_YOU_CHANGE_SWIM_SPEED, targetNameLink.c_str(), Swim);
if (handler->needReportToTarget(target))
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SWIM_SPEED_CHANGED, handler->GetNameLink().c_str(), Swim);

Expand Down Expand Up @@ -611,7 +611,7 @@ class modify_commandscript : public CommandScript
return false;
}

handler->PSendSysMessage(LANG_YOU_CHANGE_BACK_SPEED, BSpeed, targetNameLink.c_str());
handler->PSendSysMessage(LANG_YOU_CHANGE_BACK_SPEED, targetNameLink.c_str(), BSpeed);
if (handler->needReportToTarget(target))
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_BACK_SPEED_CHANGED, handler->GetNameLink().c_str(), BSpeed);

Expand Down Expand Up @@ -647,7 +647,7 @@ class modify_commandscript : public CommandScript
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;

handler->PSendSysMessage(LANG_YOU_CHANGE_FLY_SPEED, FSpeed, handler->GetNameLink(target).c_str());
handler->PSendSysMessage(LANG_YOU_CHANGE_FLY_SPEED, handler->GetNameLink(target).c_str(), FSpeed);
if (handler->needReportToTarget(target))
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_FLY_SPEED_CHANGED, handler->GetNameLink().c_str(), FSpeed);

Expand Down Expand Up @@ -684,7 +684,7 @@ class modify_commandscript : public CommandScript
if (handler->HasLowerSecurity(player, ObjectGuid::Empty))
return false;

handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink(player).c_str());
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, handler->GetNameLink(player).c_str(), Scale);
if (handler->needReportToTarget(player))
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
}
Expand Down

2 comments on commit c190577

@DDuarte
Copy link
Contributor

@DDuarte DDuarte commented on c190577 Mar 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to you for the fix ;)

@jackpoz
Copy link
Member

@jackpoz jackpoz commented on c190577 Mar 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally expected behavior since none of the updated sql strings got tested most likely

Please sign in to comment.