mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
refactor(Core/Chat): PSendSysMessage to fmt (#19449)
* refactor(Core/Chat): PSendSysMessage to `fmt`
This commit is contained in:
@@ -348,7 +348,7 @@ public:
|
||||
switch (result)
|
||||
{
|
||||
case AOR_OK:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_DELETED, accountName.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_DELETED, accountName);
|
||||
break;
|
||||
case AOR_NAME_NOT_EXIST:
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
@@ -400,12 +400,12 @@ public:
|
||||
{
|
||||
Field* fieldsLogin = resultLogin->Fetch();
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_LIST_LINE,
|
||||
fieldsLogin[0].Get<std::string>().c_str(), name.c_str(), fieldsLogin[1].Get<std::string>().c_str(),
|
||||
fieldsLogin[0].Get<std::string>(), name, fieldsLogin[1].Get<std::string>(),
|
||||
fieldsDB[2].Get<uint16>(), fieldsDB[3].Get<uint16>(), fieldsLogin[3].Get<uint8>(),
|
||||
fieldsLogin[2].Get<uint8>());
|
||||
}
|
||||
else
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR, name.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR, name);
|
||||
} while (result->NextRow());
|
||||
|
||||
handler->SendSysMessage(LANG_ACCOUNT_LIST_BAR);
|
||||
@@ -428,14 +428,14 @@ public:
|
||||
std::string accountName = _accountName;
|
||||
if (!Utf8ToUpperOnlyLatin(accountName))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 accountId = AccountMgr::GetId(accountName);
|
||||
if (!accountId)
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -599,14 +599,14 @@ public:
|
||||
|
||||
if (!Utf8ToUpperOnlyLatin(accountName))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 targetAccountId = AccountMgr::GetId(accountName);
|
||||
if (!targetAccountId)
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -651,7 +651,7 @@ public:
|
||||
stmt->SetData(1, targetAccountId);
|
||||
LoginDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage(LANG_2FA_SECRET_SET_COMPLETE, accountName.c_str());
|
||||
handler->PSendSysMessage(LANG_2FA_SECRET_SET_COMPLETE, accountName);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -691,14 +691,14 @@ public:
|
||||
accountName = account;
|
||||
if (!Utf8ToUpperOnlyLatin(accountName))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
|
||||
return false;
|
||||
}
|
||||
|
||||
accountId = AccountMgr::GetId(accountName);
|
||||
if (!accountId)
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -720,7 +720,7 @@ public:
|
||||
|
||||
LoginDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_SETADDON, accountName.c_str(), accountId, *expansion);
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_SETADDON, accountName, accountId, *expansion);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -755,7 +755,7 @@ public:
|
||||
targetAccountName = arg1;
|
||||
if (!Utf8ToUpperOnlyLatin(targetAccountName))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, targetAccountName.c_str());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, targetAccountName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -838,7 +838,7 @@ public:
|
||||
LoginDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_SECURITY, targetAccountName.c_str(), gm);
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_SECURITY, targetAccountName, gm);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -859,14 +859,14 @@ public:
|
||||
std::string accountName = account;
|
||||
if (!Utf8ToUpperOnlyLatin(accountName))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 targetAccountId = AccountMgr::GetId(accountName);
|
||||
if (!targetAccountId)
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -889,7 +889,7 @@ public:
|
||||
handler->SendSysMessage(LANG_COMMAND_PASSWORD);
|
||||
break;
|
||||
case AOR_NAME_NOT_EXIST:
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
|
||||
return false;
|
||||
case AOR_PASS_TOO_LONG:
|
||||
handler->SendErrorMessage(LANG_PASSWORD_TOO_LONG);
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
{
|
||||
if (sArenaTeamMgr->GetArenaTeamByName(name))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ARENA_ERROR_NAME_EXISTS, name.c_str());
|
||||
handler->SendErrorMessage(LANG_ARENA_ERROR_NAME_EXISTS, name);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
|
||||
if (Player::GetArenaTeamIdFromDB(captain->GetGUID(), type) != 0)
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ARENA_ERROR_SIZE, captain->GetName().c_str());
|
||||
handler->SendErrorMessage(LANG_ARENA_ERROR_SIZE, captain->GetName());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
}
|
||||
|
||||
sArenaTeamMgr->AddArenaTeam(arena);
|
||||
handler->PSendSysMessage(LANG_ARENA_CREATE, arena->GetName().c_str(), arena->GetId(), arena->GetType(), arena->GetCaptain().GetCounter());
|
||||
handler->PSendSysMessage(LANG_ARENA_CREATE, arena->GetName(), arena->GetId(), arena->GetType(), arena->GetCaptain().ToString());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
|
||||
delete(arena);
|
||||
|
||||
handler->PSendSysMessage(LANG_ARENA_DISBAND, name.c_str(), teamId);
|
||||
handler->PSendSysMessage(LANG_ARENA_DISBAND, name, teamId);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -119,13 +119,13 @@ public:
|
||||
ArenaTeam* arena = sArenaTeamMgr->GetArenaTeamByName(oldName);
|
||||
if (!arena)
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ARENA_ERROR_NAME_NOT_FOUND, oldName.c_str());
|
||||
handler->SendErrorMessage(LANG_ARENA_ERROR_NAME_NOT_FOUND, oldName);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sArenaTeamMgr->GetArenaTeamByName(newName))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ARENA_ERROR_NAME_EXISTS, oldName.c_str());
|
||||
handler->SendErrorMessage(LANG_ARENA_ERROR_NAME_EXISTS, oldName);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_ARENA_RENAME, arena->GetId(), oldName.c_str(), newName.c_str());
|
||||
handler->PSendSysMessage(LANG_ARENA_RENAME, arena->GetId(), oldName, newName);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -169,13 +169,13 @@ public:
|
||||
|
||||
if (!arena->IsMember(target->GetGUID()))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ARENA_ERROR_NOT_MEMBER, target->GetName().c_str(), arena->GetName().c_str());
|
||||
handler->SendErrorMessage(LANG_ARENA_ERROR_NOT_MEMBER, target->GetName(), arena->GetName());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (arena->GetCaptain() == target->GetGUID())
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ARENA_ERROR_CAPTAIN, target->GetName().c_str(), arena->GetName().c_str());
|
||||
handler->SendErrorMessage(LANG_ARENA_ERROR_CAPTAIN, target->GetName(), arena->GetName());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
sCharacterCache->GetCharacterNameByGuid(arena->GetCaptain(), oldCaptainName);
|
||||
arena->SetCaptain(target->GetGUID());
|
||||
|
||||
handler->PSendSysMessage(LANG_ARENA_CAPTAIN, arena->GetName().c_str(), arena->GetId(), oldCaptainName.c_str(), target->GetName().c_str());
|
||||
handler->PSendSysMessage(LANG_ARENA_CAPTAIN, arena->GetName(), arena->GetId(), oldCaptainName, target->GetName());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -197,10 +197,10 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_ARENA_INFO_HEADER, arena->GetName().c_str(), arena->GetId(), arena->GetRating(), arena->GetType(), arena->GetType());
|
||||
handler->PSendSysMessage(LANG_ARENA_INFO_HEADER, arena->GetName(), arena->GetId(), arena->GetRating(), arena->GetType(), arena->GetType());
|
||||
|
||||
for (auto const& itr : arena->GetMembers())
|
||||
handler->PSendSysMessage(LANG_ARENA_INFO_MEMBERS, itr.Name.c_str(), itr.Guid.GetCounter(), itr.PersonalRating, (arena->GetCaptain() == itr.Guid ? "- Captain" : ""));
|
||||
handler->PSendSysMessage(LANG_ARENA_INFO_MEMBERS, itr.Name, itr.Guid.ToString(), itr.PersonalRating, (arena->GetCaptain() == itr.Guid ? "- Captain" : ""));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
{
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ARENA_LOOKUP, team->GetName().c_str(), team->GetId(), team->GetType(), team->GetType());
|
||||
handler->PSendSysMessage(LANG_ARENA_LOOKUP, team->GetName(), team->GetId(), team->GetType(), team->GetType());
|
||||
found = true;
|
||||
continue;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ public:
|
||||
}
|
||||
|
||||
if (!found)
|
||||
handler->PSendSysMessage(LANG_ARENA_ERROR_NAME_NOT_FOUND, std::string(needle).c_str());
|
||||
handler->PSendSysMessage(LANG_ARENA_ERROR_NAME_NOT_FOUND, std::string(needle));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -131,17 +131,17 @@ public:
|
||||
if (atoi(durationStr) > 0)
|
||||
{
|
||||
if (!sWorld->getBoolConfig(CONFIG_SHOW_BAN_IN_WORLD))
|
||||
handler->PSendSysMessage(LANG_BAN_YOUBANNED, name.c_str(), secsToTimeString(TimeStringToSecs(durationStr), true).c_str(), reasonStr);
|
||||
handler->PSendSysMessage(LANG_BAN_YOUBANNED, name, secsToTimeString(TimeStringToSecs(durationStr), true), reasonStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!sWorld->getBoolConfig(CONFIG_SHOW_BAN_IN_WORLD))
|
||||
handler->PSendSysMessage(LANG_BAN_YOUPERMBANNED, name.c_str(), reasonStr);
|
||||
handler->PSendSysMessage(LANG_BAN_YOUPERMBANNED, name, reasonStr);
|
||||
}
|
||||
break;
|
||||
case BAN_NOTFOUND:
|
||||
{
|
||||
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "character", name.c_str());
|
||||
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "character", name);
|
||||
return false;
|
||||
}
|
||||
default:
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
case BAN_ACCOUNT:
|
||||
if (!Utf8ToUpperOnlyLatin(nameOrIP))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, nameOrIP.c_str());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, nameOrIP);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -224,12 +224,12 @@ public:
|
||||
if (atoi(durationStr) > 0)
|
||||
{
|
||||
if (!sWorld->getBoolConfig(CONFIG_SHOW_BAN_IN_WORLD))
|
||||
handler->PSendSysMessage(LANG_BAN_YOUBANNED, nameOrIP.c_str(), secsToTimeString(TimeStringToSecs(durationStr), true).c_str(), reasonStr);
|
||||
handler->PSendSysMessage(LANG_BAN_YOUBANNED, nameOrIP, secsToTimeString(TimeStringToSecs(durationStr), true), reasonStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!sWorld->getBoolConfig(CONFIG_SHOW_BAN_IN_WORLD))
|
||||
handler->PSendSysMessage(LANG_BAN_YOUPERMBANNED, nameOrIP.c_str(), reasonStr);
|
||||
handler->PSendSysMessage(LANG_BAN_YOUPERMBANNED, nameOrIP, reasonStr);
|
||||
}
|
||||
break;
|
||||
case BAN_SYNTAX_ERROR:
|
||||
@@ -238,13 +238,13 @@ public:
|
||||
switch (mode)
|
||||
{
|
||||
default:
|
||||
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "account", nameOrIP.c_str());
|
||||
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "account", nameOrIP);
|
||||
break;
|
||||
case BAN_CHARACTER:
|
||||
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "character", nameOrIP.c_str());
|
||||
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "character", nameOrIP);
|
||||
break;
|
||||
case BAN_IP:
|
||||
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "ip", nameOrIP.c_str());
|
||||
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "ip", nameOrIP);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
@@ -270,14 +270,14 @@ public:
|
||||
std::string accountName = nameStr;
|
||||
if (!Utf8ToUpperOnlyLatin(accountName))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 accountId = AccountMgr::GetId(accountName);
|
||||
if (!accountId)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ public:
|
||||
bool permanent = (fields[1].Get<uint64>() == uint64(0));
|
||||
std::string banTime = permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].Get<uint64>(), true);
|
||||
handler->PSendSysMessage(LANG_BANINFO_HISTORYENTRY,
|
||||
fields[0].Get<std::string>().c_str(), banTime.c_str(), active ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO), fields[4].Get<std::string>().c_str(), fields[5].Get<std::string>().c_str());
|
||||
fields[0].Get<std::string>(), banTime, active ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO), fields[4].Get<std::string>(), fields[5].Get<std::string>());
|
||||
} while (result->NextRow());
|
||||
|
||||
return true;
|
||||
@@ -338,11 +338,11 @@ public:
|
||||
PreparedQueryResult result = CharacterDatabase.Query(stmt);
|
||||
if (!result)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CHAR_NOT_BANNED, name.c_str());
|
||||
handler->PSendSysMessage(LANG_CHAR_NOT_BANNED, name);
|
||||
return true;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_BANINFO_BANHISTORY, name.c_str());
|
||||
handler->PSendSysMessage(LANG_BANINFO_BANHISTORY, name);
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
@@ -353,7 +353,7 @@ public:
|
||||
bool permanent = (fields[1].Get<uint32>() == uint32(0));
|
||||
std::string banTime = permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].Get<uint64>(), true);
|
||||
handler->PSendSysMessage(LANG_BANINFO_HISTORYENTRY,
|
||||
fields[0].Get<std::string>().c_str(), banTime.c_str(), active ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO), fields[4].Get<std::string>().c_str(), fields[5].Get<std::string>().c_str());
|
||||
fields[0].Get<std::string>(), banTime, active ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO), fields[4].Get<std::string>(), fields[5].Get<std::string>());
|
||||
} while (result->NextRow());
|
||||
|
||||
return true;
|
||||
@@ -391,8 +391,8 @@ public:
|
||||
Field* fields = result->Fetch();
|
||||
bool permanent = fields[6].Get<uint64>() == 1;
|
||||
handler->PSendSysMessage(LANG_BANINFO_IPENTRY,
|
||||
fields[0].Get<std::string>().c_str(), fields[1].Get<std::string>().c_str(), permanent ? handler->GetAcoreString(LANG_BANINFO_NEVER) : fields[2].Get<std::string>().c_str(),
|
||||
permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[3].Get<uint64>(), true).c_str(), fields[4].Get<std::string>().c_str(), fields[5].Get<std::string>().c_str());
|
||||
fields[0].Get<std::string>(), fields[1].Get<std::string>(), permanent ? handler->GetAcoreString(LANG_BANINFO_NEVER) : fields[2].Get<std::string>(),
|
||||
permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[3].Get<uint64>(), true), fields[4].Get<std::string>(), fields[5].Get<std::string>());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -444,7 +444,7 @@ public:
|
||||
if (banResult)
|
||||
{
|
||||
Field* fields2 = banResult->Fetch();
|
||||
handler->PSendSysMessage("%s", fields2[0].Get<std::string>().c_str());
|
||||
handler->PSendSysMessage("%s", fields2[0].Get<std::string>());
|
||||
}
|
||||
} while (result->NextRow());
|
||||
}
|
||||
@@ -481,16 +481,16 @@ public:
|
||||
if (fields2[0].Get<uint32>() == fields2[1].Get<uint32>())
|
||||
{
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
|
||||
accountName.c_str(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
fields2[2].Get<std::string>().c_str(), fields2[3].Get<std::string>().c_str());
|
||||
accountName, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
fields2[2].Get<std::string>(), fields2[3].Get<std::string>());
|
||||
}
|
||||
else
|
||||
{
|
||||
tm tmUnban = Acore::Time::TimeBreakdown(fields2[1].Get<uint32>());
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
|
||||
accountName.c_str(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
accountName, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
tmUnban.tm_year % 100, tmUnban.tm_mon + 1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
|
||||
fields2[2].Get<std::string>().c_str(), fields2[3].Get<std::string>().c_str());
|
||||
fields2[2].Get<std::string>(), fields2[3].Get<std::string>());
|
||||
}
|
||||
} while (banInfo->NextRow());
|
||||
}
|
||||
@@ -534,7 +534,7 @@ public:
|
||||
|
||||
PreparedQueryResult banResult = CharacterDatabase.Query(stmt2);
|
||||
if (banResult)
|
||||
handler->PSendSysMessage("%s", (*banResult)[0].Get<std::string>().c_str());
|
||||
handler->PSendSysMessage("%s", (*banResult)[0].Get<std::string>());
|
||||
} while (result->NextRow());
|
||||
}
|
||||
// Console wide output
|
||||
@@ -565,16 +565,16 @@ public:
|
||||
if (banFields[0].Get<uint32>() == banFields[1].Get<uint32>())
|
||||
{
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
|
||||
char_name.c_str(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
banFields[2].Get<std::string>().c_str(), banFields[3].Get<std::string>().c_str());
|
||||
char_name, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
banFields[2].Get<std::string>(), banFields[3].Get<std::string>());
|
||||
}
|
||||
else
|
||||
{
|
||||
tm tmUnban = Acore::Time::TimeBreakdown(banFields[1].Get<uint32>());
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
|
||||
char_name.c_str(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
char_name, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
tmUnban.tm_year % 100, tmUnban.tm_mon + 1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
|
||||
banFields[2].Get<std::string>().c_str(), banFields[3].Get<std::string>().c_str());
|
||||
banFields[2].Get<std::string>(), banFields[3].Get<std::string>());
|
||||
}
|
||||
} while (banInfo->NextRow());
|
||||
}
|
||||
@@ -621,7 +621,7 @@ public:
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
handler->PSendSysMessage("%s", fields[0].Get<std::string>().c_str());
|
||||
handler->PSendSysMessage("%s", fields[0].Get<std::string>());
|
||||
} while (result->NextRow());
|
||||
}
|
||||
// Console wide output
|
||||
@@ -638,16 +638,16 @@ public:
|
||||
if (fields[1].Get<uint32>() == fields[2].Get<uint32>())
|
||||
{
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
|
||||
fields[0].Get<std::string>().c_str(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
fields[3].Get<std::string>().c_str(), fields[4].Get<std::string>().c_str());
|
||||
fields[0].Get<std::string>(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
fields[3].Get<std::string>(), fields[4].Get<std::string>());
|
||||
}
|
||||
else
|
||||
{
|
||||
tm tmUnban = Acore::Time::TimeBreakdown(fields[2].Get<uint32>());
|
||||
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
|
||||
fields[0].Get<std::string>().c_str(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
fields[0].Get<std::string>(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
|
||||
tmUnban.tm_year % 100, tmUnban.tm_mon + 1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
|
||||
fields[3].Get<std::string>().c_str(), fields[4].Get<std::string>().c_str());
|
||||
fields[3].Get<std::string>(), fields[4].Get<std::string>());
|
||||
}
|
||||
} while (result->NextRow());
|
||||
|
||||
@@ -714,7 +714,7 @@ public:
|
||||
case BAN_ACCOUNT:
|
||||
if (!Utf8ToUpperOnlyLatin(nameOrIP))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, nameOrIP.c_str());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, nameOrIP);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -735,21 +735,21 @@ public:
|
||||
{
|
||||
case BAN_ACCOUNT:
|
||||
if (sBan->RemoveBanAccount(nameOrIP))
|
||||
handler->PSendSysMessage(LANG_UNBAN_UNBANNED, nameOrIP.c_str());
|
||||
handler->PSendSysMessage(LANG_UNBAN_UNBANNED, nameOrIP);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_UNBAN_ERROR, nameOrIP.c_str());
|
||||
handler->PSendSysMessage(LANG_UNBAN_ERROR, nameOrIP);
|
||||
break;
|
||||
case BAN_CHARACTER:
|
||||
if (sBan->RemoveBanAccountByPlayerName(nameOrIP))
|
||||
handler->PSendSysMessage(LANG_UNBAN_UNBANNED, nameOrIP.c_str());
|
||||
handler->PSendSysMessage(LANG_UNBAN_UNBANNED, nameOrIP);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_UNBAN_ERROR, nameOrIP.c_str());
|
||||
handler->PSendSysMessage(LANG_UNBAN_ERROR, nameOrIP);
|
||||
break;
|
||||
case BAN_IP:
|
||||
if (sBan->RemoveBanIP(nameOrIP))
|
||||
handler->PSendSysMessage(LANG_UNBAN_UNBANNED, nameOrIP.c_str());
|
||||
handler->PSendSysMessage(LANG_UNBAN_UNBANNED, nameOrIP);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_UNBAN_ERROR, nameOrIP.c_str());
|
||||
handler->PSendSysMessage(LANG_UNBAN_ERROR, nameOrIP);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -65,8 +65,8 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_CACHE_INFO, cache->Name, cache->Guid.GetCounter(), cache->AccountId,
|
||||
cache->Class, cache->Race, cache->Sex, cache->Level, cache->MailCount, cache->GuildId, cache->GroupGuid.GetCounter(),
|
||||
handler->PSendSysMessage(LANG_COMMAND_CACHE_INFO, cache->Name, cache->Guid.ToString(), cache->AccountId,
|
||||
cache->Class, cache->Race, cache->Sex, cache->Level, cache->MailCount, cache->GuildId, cache->GroupGuid.ToString(),
|
||||
cache->ArenaTeamId[ARENA_SLOT_2v2], cache->ArenaTeamId[ARENA_SLOT_3v3], cache->ArenaTeamId[ARENA_SLOT_5v5]);
|
||||
|
||||
handler->SetSentErrorMessage(false);
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
}
|
||||
|
||||
sCharacterCache->DeleteCharacterCacheEntry(player->GetGUID(), player->GetName());
|
||||
handler->PSendSysMessage(LANG_COMMAND_CACHE_DELETE, player->GetName(), player->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage(LANG_COMMAND_CACHE_DELETE, player->GetName(), player->GetGUID().ToString());
|
||||
handler->SetSentErrorMessage(false);
|
||||
return true;
|
||||
}
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
sCharacterCache->RefreshCacheEntry(player->GetGUID().GetCounter());
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_CACHE_REFRESH, player->GetName(), player->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage(LANG_COMMAND_CACHE_REFRESH, player->GetName(), player->GetGUID().ToString());
|
||||
handler->SetSentErrorMessage(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -188,12 +188,12 @@ public:
|
||||
|
||||
if (!handler->GetSession())
|
||||
handler->PSendSysMessage(LANG_CHARACTER_DELETED_LIST_LINE_CONSOLE,
|
||||
itr->lowGuid, itr->name.c_str(), itr->accountName.empty() ? "<Not existing>" : itr->accountName.c_str(),
|
||||
itr->accountId, dateStr.c_str());
|
||||
itr->lowGuid, itr->name, itr->accountName.empty() ? "<Not existing>" : itr->accountName,
|
||||
itr->accountId, dateStr);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_CHARACTER_DELETED_LIST_LINE_CHAT,
|
||||
itr->lowGuid, itr->name.c_str(), itr->accountName.empty() ? "<Not existing>" : itr->accountName.c_str(),
|
||||
itr->accountId, dateStr.c_str());
|
||||
itr->lowGuid, itr->name, itr->accountName.empty() ? "<Not existing>" : itr->accountName,
|
||||
itr->accountId, dateStr);
|
||||
}
|
||||
|
||||
if (!handler->GetSession())
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
{
|
||||
if (delInfo.accountName.empty()) // account does not exist
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_ACCOUNT, delInfo.name.c_str(), delInfo.lowGuid, delInfo.accountId);
|
||||
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_ACCOUNT, delInfo.name, delInfo.lowGuid, delInfo.accountId);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -222,13 +222,13 @@ public:
|
||||
uint32 charcount = AccountMgr::GetCharactersCount(delInfo.accountId);
|
||||
if (charcount >= 10)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_FULL, delInfo.name.c_str(), delInfo.lowGuid, delInfo.accountId);
|
||||
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_FULL, delInfo.name, delInfo.lowGuid, delInfo.accountId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (sCharacterCache->GetCharacterGuidByName(delInfo.name))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_NAME, delInfo.name.c_str(), delInfo.lowGuid, delInfo.accountId);
|
||||
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_NAME, delInfo.name, delInfo.lowGuid, delInfo.accountId);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -257,11 +257,11 @@ public:
|
||||
if (handler->needReportToTarget(player))
|
||||
{
|
||||
if (oldLevel == newLevel)
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_PROGRESS_RESET, handler->GetNameLink().c_str());
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_PROGRESS_RESET, handler->GetNameLink());
|
||||
else if (oldLevel < newLevel)
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_UP, handler->GetNameLink().c_str(), newLevel);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_UP, handler->GetNameLink(), newLevel);
|
||||
else // if (oldlevel > newlevel)
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_DOWN, handler->GetNameLink().c_str(), newLevel);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_DOWN, handler->GetNameLink(), newLevel);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -314,7 +314,7 @@ public:
|
||||
|
||||
// send title in "id (idx:idx) - [namedlink locale]" format
|
||||
if (handler->GetSession())
|
||||
handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->bit_index, id, titleName.c_str(), localeNames[loc], knownStr, activeStr);
|
||||
handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->bit_index, id, titleName, localeNames[loc], knownStr, activeStr);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, id, titleInfo->bit_index, name, localeNames[loc], knownStr, activeStr);
|
||||
}
|
||||
@@ -371,7 +371,7 @@ public:
|
||||
PreparedQueryResult result = CharacterDatabase.Query(stmt);
|
||||
if (result)
|
||||
{
|
||||
handler->SendErrorMessage(LANG_RENAME_PLAYER_ALREADY_EXISTS, newName.c_str());
|
||||
handler->SendErrorMessage(LANG_RENAME_PLAYER_ALREADY_EXISTS, newName);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -399,13 +399,13 @@ public:
|
||||
|
||||
sCharacterCache->UpdateCharacterData(player->GetGUID(), newName);
|
||||
|
||||
handler->PSendSysMessage(LANG_RENAME_PLAYER_WITH_NEW_NAME, player->GetName().c_str(), newName.c_str());
|
||||
handler->PSendSysMessage(LANG_RENAME_PLAYER_WITH_NEW_NAME, player->GetName(), newName);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Player* target = player->GetConnectedPlayer())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_RENAME_PLAYER, handler->GetNameLink(target).c_str());
|
||||
handler->PSendSysMessage(LANG_RENAME_PLAYER, handler->GetNameLink(target));
|
||||
target->SetAtLoginFlag(AT_LOGIN_RENAME);
|
||||
}
|
||||
else
|
||||
@@ -414,7 +414,7 @@ public:
|
||||
if (handler->HasLowerSecurity(nullptr, player->GetGUID()))
|
||||
return false;
|
||||
|
||||
handler->PSendSysMessage(LANG_RENAME_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage(LANG_RENAME_PLAYER_GUID, handler->playerLink(*player), player->GetGUID().ToString());
|
||||
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
|
||||
stmt->SetData(0, uint16(AT_LOGIN_RENAME));
|
||||
@@ -450,7 +450,7 @@ public:
|
||||
HandleCharacterLevel(player->GetConnectedPlayer(), player->GetGUID(), oldlevel, newlevel, handler);
|
||||
|
||||
if (!handler->GetSession() || (handler->GetSession()->GetPlayer() != player->GetConnectedPlayer())) // including chr == NULL
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_LVL, handler->playerLink(*player).c_str(), newlevel);
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_LVL, handler->playerLink(*player), newlevel);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -465,12 +465,12 @@ public:
|
||||
|
||||
if (Player* target = player->GetConnectedPlayer())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target).c_str());
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target));
|
||||
target->SetAtLoginFlag(AT_LOGIN_CUSTOMIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player), player->GetGUID().ToString());
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
|
||||
stmt->SetData(0, static_cast<uint16>(AT_LOGIN_CUSTOMIZE));
|
||||
stmt->SetData(1, player->GetGUID().GetCounter());
|
||||
@@ -489,12 +489,12 @@ public:
|
||||
|
||||
if (Player* target = player->GetConnectedPlayer())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target).c_str());
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target));
|
||||
target->SetAtLoginFlag(AT_LOGIN_CHANGE_FACTION);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player), player->GetGUID().ToString());
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
|
||||
stmt->SetData(0, uint16(AT_LOGIN_CHANGE_FACTION));
|
||||
stmt->SetData(1, player->GetGUID().GetCounter());
|
||||
@@ -513,12 +513,12 @@ public:
|
||||
|
||||
if (Player* target = player->GetConnectedPlayer())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target).c_str());
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target));
|
||||
target->SetAtLoginFlag(AT_LOGIN_CHANGE_RACE);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player), player->GetGUID().ToString());
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
|
||||
stmt->SetData(0, uint16(AT_LOGIN_CHANGE_RACE));
|
||||
stmt->SetData(1, player->GetGUID().GetCounter());
|
||||
@@ -746,7 +746,7 @@ public:
|
||||
AccountMgr::GetName(accountId, accountName);
|
||||
|
||||
Player::DeleteFromDB(player.GetGUID().GetCounter(), accountId, true, true);
|
||||
handler->PSendSysMessage(LANG_CHARACTER_DELETED, player.GetName().c_str(), player.GetGUID().GetCounter(), accountName.c_str(), accountId);
|
||||
handler->PSendSysMessage(LANG_CHARACTER_DELETED, player.GetName(), player.GetGUID().ToString(), accountName, accountId);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -771,7 +771,7 @@ public:
|
||||
HandleCharacterLevel(player->GetConnectedPlayer(), player->GetGUID(), oldlevel, newlevel, handler);
|
||||
|
||||
if (!handler->GetSession() || (handler->GetSession()->GetPlayer() != player->GetConnectedPlayer())) // including chr == NULL
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_LVL, handler->playerLink(*player).c_str(), newlevel);
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_LVL, handler->playerLink(*player), newlevel);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -819,13 +819,13 @@ public:
|
||||
handler->PSendSysMessage(LANG_COMMAND_IMPORT_SUCCESS);
|
||||
break;
|
||||
case DUMP_FILE_OPEN_ERROR:
|
||||
handler->SendErrorMessage(LANG_FILE_OPEN_FAIL, fileName.c_str());
|
||||
handler->SendErrorMessage(LANG_FILE_OPEN_FAIL, fileName);
|
||||
return false;
|
||||
case DUMP_FILE_BROKEN:
|
||||
handler->SendErrorMessage(LANG_DUMP_BROKEN, fileName.c_str());
|
||||
handler->SendErrorMessage(LANG_DUMP_BROKEN, fileName);
|
||||
return false;
|
||||
case DUMP_TOO_MANY_CHARS:
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_CHARACTER_LIST_FULL, account.GetName().c_str(), account.GetID());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_CHARACTER_LIST_FULL, account.GetName(), account.GetID());
|
||||
return false;
|
||||
default:
|
||||
handler->SendErrorMessage(LANG_COMMAND_IMPORT_FAILED);
|
||||
@@ -860,7 +860,7 @@ public:
|
||||
case DUMP_SUCCESS:
|
||||
break;
|
||||
case DUMP_TOO_MANY_CHARS:
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_CHARACTER_LIST_FULL, account.GetName().c_str(), account.GetID());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_CHARACTER_LIST_FULL, account.GetName(), account.GetID());
|
||||
return false;
|
||||
case DUMP_FILE_OPEN_ERROR: // this error code should not happen
|
||||
case DUMP_FILE_BROKEN: // this error code should not happen
|
||||
@@ -884,7 +884,7 @@ public:
|
||||
handler->PSendSysMessage(LANG_COMMAND_EXPORT_SUCCESS);
|
||||
break;
|
||||
case DUMP_FILE_OPEN_ERROR:
|
||||
handler->SendErrorMessage(LANG_FILE_OPEN_FAIL, fileName.c_str());
|
||||
handler->SendErrorMessage(LANG_FILE_OPEN_FAIL, fileName);
|
||||
return false;
|
||||
case DUMP_CHARACTER_DELETED:
|
||||
handler->SendErrorMessage(LANG_COMMAND_EXPORT_DELETED_CHAR);
|
||||
@@ -942,7 +942,7 @@ public:
|
||||
std::ostringstream ItemString;
|
||||
ItemString << std::hex << ItemQualityColors[item->GetTemplate()->Quality];
|
||||
|
||||
handler->PSendSysMessage("%u - |c%s|Hitem:%u:0:0:0:0:0:0:0:0:0|h[%s]|h|r - %u", Counter, ItemString.str().c_str(), item->GetEntry(), item->GetTemplate()->Name1.c_str(), item->GetCount());
|
||||
handler->PSendSysMessage("{} - |c{}|Hitem:{}:0:0:0:0:0:0:0:0:0|h[{}]|h|r - {}", Counter, ItemString.str(), item->GetEntry(), item->GetTemplate()->Name1, item->GetCount());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -958,7 +958,7 @@ public:
|
||||
std::ostringstream ItemString;
|
||||
ItemString << std::hex << ItemQualityColors[item->GetTemplate()->Quality];
|
||||
|
||||
handler->PSendSysMessage("%u - |c%s|Hitem:%u:0:0:0:0:0:0:0:0:0|h[%s]|h|r - %u", Counter, ItemString.str().c_str(), item->GetEntry(), item->GetTemplate()->Name1.c_str(), item->GetCount());
|
||||
handler->PSendSysMessage("{} - |c{}|Hitem:{}:0:0:0:0:0:0:0:0:0|h[{}]|h|r - {}", Counter, ItemString.str(), item->GetEntry(), item->GetTemplate()->Name1, item->GetCount());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -998,43 +998,43 @@ public:
|
||||
switch (SkillID)
|
||||
{
|
||||
case SKILL_ALCHEMY:
|
||||
handler->PSendSysMessage("%u - Alchemy - %u", Counter, player->GetSkillValue(SkillID));
|
||||
handler->PSendSysMessage("{} - Alchemy - {}", Counter, player->GetSkillValue(SkillID));
|
||||
break;
|
||||
case SKILL_BLACKSMITHING:
|
||||
handler->PSendSysMessage("%u - Blacksmithing - %u", Counter, player->GetSkillValue(SkillID));
|
||||
handler->PSendSysMessage("{} - Blacksmithing - {}", Counter, player->GetSkillValue(SkillID));
|
||||
break;
|
||||
case SKILL_ENCHANTING:
|
||||
handler->PSendSysMessage("%u - Enchanting - %u", Counter, player->GetSkillValue(SkillID));
|
||||
handler->PSendSysMessage("{} - Enchanting - {}", Counter, player->GetSkillValue(SkillID));
|
||||
break;
|
||||
case SKILL_ENGINEERING:
|
||||
handler->PSendSysMessage("%u - Engineering - %u", Counter, player->GetSkillValue(SkillID));
|
||||
handler->PSendSysMessage("{} - Engineering - {}", Counter, player->GetSkillValue(SkillID));
|
||||
break;
|
||||
case SKILL_INSCRIPTION:
|
||||
handler->PSendSysMessage("%u - Inscription - %u", Counter, player->GetSkillValue(SkillID));
|
||||
handler->PSendSysMessage("{} - Inscription - {}", Counter, player->GetSkillValue(SkillID));
|
||||
break;
|
||||
case SKILL_JEWELCRAFTING:
|
||||
handler->PSendSysMessage("%u - Jewelcrafting - %u", Counter, player->GetSkillValue(SkillID));
|
||||
handler->PSendSysMessage("{} - Jewelcrafting - {}", Counter, player->GetSkillValue(SkillID));
|
||||
break;
|
||||
case SKILL_LEATHERWORKING:
|
||||
handler->PSendSysMessage("%u - Leatherworking - %u", Counter, player->GetSkillValue(SkillID));
|
||||
handler->PSendSysMessage("{} - Leatherworking - {}", Counter, player->GetSkillValue(SkillID));
|
||||
break;
|
||||
case SKILL_TAILORING:
|
||||
handler->PSendSysMessage("%u - Tailoring - %u", Counter, player->GetSkillValue(SkillID));
|
||||
handler->PSendSysMessage("{} - Tailoring - {}", Counter, player->GetSkillValue(SkillID));
|
||||
break;
|
||||
case SKILL_SKINNING:
|
||||
handler->PSendSysMessage("%u - Skinning - %u", Counter, player->GetSkillValue(SkillID));
|
||||
handler->PSendSysMessage("{} - Skinning - {}", Counter, player->GetSkillValue(SkillID));
|
||||
break;
|
||||
case SKILL_HERBALISM:
|
||||
handler->PSendSysMessage("%u - Herbalism - %u", Counter, player->GetSkillValue(SkillID));
|
||||
handler->PSendSysMessage("{} - Herbalism - {}", Counter, player->GetSkillValue(SkillID));
|
||||
break;
|
||||
case SKILL_MINING:
|
||||
handler->PSendSysMessage("%u - Mining - %u", Counter, player->GetSkillValue(SkillID));
|
||||
handler->PSendSysMessage("{} - Mining - {}", Counter, player->GetSkillValue(SkillID));
|
||||
break;
|
||||
case SKILL_COOKING:
|
||||
handler->PSendSysMessage("%u - Cooking - %u", Counter, player->GetSkillValue(SkillID));
|
||||
handler->PSendSysMessage("{} - Cooking - {}", Counter, player->GetSkillValue(SkillID));
|
||||
break;
|
||||
case SKILL_FIRST_AID:
|
||||
handler->PSendSysMessage("%u - First Aid - %u", Counter, player->GetSkillValue(SkillID));
|
||||
handler->PSendSysMessage("{} - First Aid - {}", Counter, player->GetSkillValue(SkillID));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -1071,7 +1071,7 @@ public:
|
||||
{
|
||||
std::string accName;
|
||||
AccountMgr::GetName(cache->AccountId, accName);
|
||||
handler->PSendSysMessage(LANG_CMD_CHAR_CHANGE_ACC_SUCCESS, player->GetName(), player->GetGUID().GetCounter(), accName, cache->AccountId, accountName, accountId);
|
||||
handler->PSendSysMessage(LANG_CMD_CHAR_CHANGE_ACC_SUCCESS, player->GetName(), player->GetGUID().ToString(), accName, cache->AccountId, accountName, accountId);
|
||||
}
|
||||
|
||||
if (player->IsConnected())
|
||||
|
||||
@@ -185,16 +185,16 @@ public:
|
||||
if (enable)
|
||||
{
|
||||
chr->SetTaxiCheater(true);
|
||||
handler->PSendSysMessage(LANG_YOU_GIVE_TAXIS, handler->GetNameLink(chr).c_str());
|
||||
handler->PSendSysMessage(LANG_YOU_GIVE_TAXIS, handler->GetNameLink(chr));
|
||||
if (handler->needReportToTarget(chr))
|
||||
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_ADDED, handler->GetNameLink().c_str());
|
||||
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_ADDED, handler->GetNameLink());
|
||||
}
|
||||
else
|
||||
{
|
||||
chr->SetTaxiCheater(false);
|
||||
handler->PSendSysMessage(LANG_YOU_REMOVE_TAXIS, handler->GetNameLink(chr).c_str());
|
||||
handler->PSendSysMessage(LANG_YOU_REMOVE_TAXIS, handler->GetNameLink(chr));
|
||||
if (handler->needReportToTarget(chr))
|
||||
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_REMOVED, handler->GetNameLink().c_str());
|
||||
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_REMOVED, handler->GetNameLink());
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -211,15 +211,15 @@ public:
|
||||
|
||||
if (reveal)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_ALL, handler->GetNameLink(chr).c_str());
|
||||
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_ALL, handler->GetNameLink(chr));
|
||||
if (handler->needReportToTarget(chr))
|
||||
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_ALL, handler->GetNameLink().c_str());
|
||||
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_ALL, handler->GetNameLink());
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_NOTHING, handler->GetNameLink(chr).c_str());
|
||||
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_NOTHING, handler->GetNameLink(chr));
|
||||
if (handler->needReportToTarget(chr))
|
||||
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING, handler->GetNameLink().c_str());
|
||||
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING, handler->GetNameLink());
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < PLAYER_EXPLORED_ZONES_SIZE; ++i)
|
||||
|
||||
@@ -127,14 +127,14 @@ public:
|
||||
// Dump camera locations
|
||||
if (std::vector<FlyByCamera> const* flyByCameras = GetFlyByCameras(cineSeq->cinematicCamera))
|
||||
{
|
||||
handler->PSendSysMessage("Waypoints for sequence %u, camera %u", cinematicId, cineSeq->cinematicCamera);
|
||||
handler->PSendSysMessage("Waypoints for sequence {}, camera {}", cinematicId, cineSeq->cinematicCamera);
|
||||
uint32 count = 1;
|
||||
for (FlyByCamera const& cam : *flyByCameras)
|
||||
{
|
||||
handler->PSendSysMessage("%02u - %7ums [%s (%f degrees)]", count, cam.timeStamp, cam.locations.ToString().c_str(), cam.locations.GetOrientation() * (180 / M_PI));
|
||||
handler->PSendSysMessage("{} - {}ms [{} ({} degrees)]", count, cam.timeStamp, cam.locations.ToString(), cam.locations.GetOrientation() * (180 / M_PI));
|
||||
++count;
|
||||
}
|
||||
handler->PSendSysMessage("%u waypoints dumped", flyByCameras->size());
|
||||
handler->PSendSysMessage("{} waypoints dumped", flyByCameras->size());
|
||||
}
|
||||
|
||||
handler->GetPlayer()->SendCinematicStart(cinematicId);
|
||||
@@ -437,7 +437,7 @@ public:
|
||||
|
||||
data.hexlike();
|
||||
player->GetSession()->SendPacket(&data);
|
||||
handler->PSendSysMessage(LANG_COMMAND_OPCODESENT, data.GetOpcode(), unit->GetName().c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_OPCODESENT, data.GetOpcode(), unit->GetName());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -495,9 +495,9 @@ public:
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
handler->PSendSysMessage("Loot recipient for creature %s (GUID %u, SpawnID %u) is %s",
|
||||
target->GetName().c_str(), target->GetGUID().GetCounter(), target->GetSpawnId(),
|
||||
target->hasLootRecipient() ? (target->GetLootRecipient() ? target->GetLootRecipient()->GetName().c_str() : "offline") : "no loot recipient");
|
||||
handler->PSendSysMessage("Loot recipient for creature {} (GUID {}, SpawnID {}) is {}",
|
||||
target->GetName(), target->GetGUID().ToString(), target->GetSpawnId(),
|
||||
target->hasLootRecipient() ? (target->GetLootRecipient() ? target->GetLootRecipient()->GetName() : "offline") : "no loot recipient");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -548,10 +548,10 @@ public:
|
||||
for (uint8 j = 0; j < bag->GetBagSize(); ++j)
|
||||
if (Item* item2 = bag->GetItemByPos(j))
|
||||
if (item2->GetState() == state)
|
||||
handler->PSendSysMessage("bag: 255 slot: %d %s owner: %s", item2->GetSlot(), item2->GetGUID().ToString().c_str(), item2->GetOwnerGUID().ToString().c_str());
|
||||
handler->PSendSysMessage("bag: 255 slot: {} {} owner: {}", item2->GetSlot(), item2->GetGUID().ToString(), item2->GetOwnerGUID().ToString());
|
||||
}
|
||||
else if (item->GetState() == state)
|
||||
handler->PSendSysMessage("bag: 255 slot: %d %s owner: %s", item->GetSlot(), item->GetGUID().ToString().c_str(), item->GetOwnerGUID().ToString().c_str());
|
||||
handler->PSendSysMessage("bag: 255 slot: {} {} owner: {}", item->GetSlot(), item->GetGUID().ToString(), item->GetOwnerGUID().ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -582,7 +582,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("bag: %d slot: %d guid: %d - state: %s", bagSlot, item->GetSlot(), item->GetGUID().GetCounter(), st.c_str());
|
||||
handler->PSendSysMessage("bag: {} slot: {} guid: {} - state: {}", bagSlot, item->GetSlot(), item->GetGUID().ToString(), st);
|
||||
}
|
||||
|
||||
if (updateQueue.empty())
|
||||
@@ -604,21 +604,21 @@ public:
|
||||
|
||||
if (item->GetSlot() != i)
|
||||
{
|
||||
handler->PSendSysMessage("Item with slot %d and guid %d has an incorrect slot value: %d", i, item->GetGUID().GetCounter(), item->GetSlot());
|
||||
handler->PSendSysMessage("Item with slot {} and guid {} has an incorrect slot value: {}", i, item->GetGUID().ToString(), item->GetSlot());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item->GetOwnerGUID() != player->GetGUID())
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d %s does have non-matching owner guid %s and %s!", item->GetSlot(), item->GetGUID().ToString().c_str(), item->GetOwnerGUID().ToString().c_str(), player->GetGUID().ToString().c_str());
|
||||
handler->PSendSysMessage("The item with slot {} {} does have non-matching owner guid {} and {}!", item->GetSlot(), item->GetGUID().ToString(), item->GetOwnerGUID().ToString(), player->GetGUID().ToString());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Bag* container = item->GetContainer())
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d %s has a container (slot: %d, %s) but shouldn't!", item->GetSlot(), item->GetGUID().ToString().c_str(), container->GetSlot(), container->GetGUID().ToString().c_str());
|
||||
handler->PSendSysMessage("The item with slot {} {} has a container (slot: {}, {}) but shouldn't!", item->GetSlot(), item->GetGUID().ToString(), container->GetSlot(), container->GetGUID().ToString());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -628,28 +628,28 @@ public:
|
||||
uint16 qp = item->GetQueuePos();
|
||||
if (qp > updateQueue.size())
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) larger than the update queue size! ", item->GetSlot(), item->GetGUID().GetCounter(), qp);
|
||||
handler->PSendSysMessage("The item with slot {} and guid {} has its queuepos ({}) larger than the update queue size! ", item->GetSlot(), item->GetGUID().ToString(), qp);
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!updateQueue[qp])
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) pointing to NULL in the queue!", item->GetSlot(), item->GetGUID().GetCounter(), qp);
|
||||
handler->PSendSysMessage("The item with slot {} and guid {} has its queuepos ({}) pointing to NULL in the queue!", item->GetSlot(), item->GetGUID().ToString(), qp);
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] != item)
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", item->GetSlot(), item->GetGUID().GetCounter(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage("The item with slot {} and guid {} has a queuepos ({}) that points to another item in the queue (bag: {}, slot: {}, guid: {})", item->GetSlot(), item->GetGUID().ToString(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUID().ToString());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (item->GetState() != ITEM_UNCHANGED)
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d and guid %d is not in queue but should be (state: %d)!", item->GetSlot(), item->GetGUID().GetCounter(), item->GetState());
|
||||
handler->PSendSysMessage("The item with slot {} and guid {} is not in queue but should be (state: {})!", item->GetSlot(), item->GetGUID().ToString(), item->GetState());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -664,14 +664,14 @@ public:
|
||||
|
||||
if (item2->GetSlot() != j)
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d and slot %d (guid: %d) has an incorrect slot value: %d", bag->GetSlot(), j, item2->GetGUID().GetCounter(), item2->GetSlot());
|
||||
handler->PSendSysMessage("The item in bag {} and slot {} (guid: {}) has an incorrect slot value: {}", bag->GetSlot(), j, item2->GetGUID().ToString(), item2->GetSlot());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item2->GetOwnerGUID() != player->GetGUID())
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d and %s, the owner (%s) and the player (%s) don't match!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString().c_str(), item2->GetOwnerGUID().ToString().c_str(), player->GetGUID().ToString().c_str());
|
||||
handler->PSendSysMessage("The item in bag {} at slot {} and {}, the owner ({}) and the player ({}) don't match!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString(), item2->GetOwnerGUID().ToString(), player->GetGUID().ToString());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -679,14 +679,14 @@ public:
|
||||
Bag* container = item2->GetContainer();
|
||||
if (!container)
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d %s has no container!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString().c_str());
|
||||
handler->PSendSysMessage("The item in bag {} at slot {} {} has no container!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (container != bag)
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d %s has a different container(slot %d %s)!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString().c_str(), container->GetSlot(), container->GetGUID().ToString().c_str());
|
||||
handler->PSendSysMessage("The item in bag {} at slot {} {} has a different container(slot {} {})!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString(), container->GetSlot(), container->GetGUID().ToString());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -696,28 +696,28 @@ public:
|
||||
uint16 qp = item2->GetQueuePos();
|
||||
if (qp > updateQueue.size())
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) larger than the update queue size! ", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().GetCounter(), qp);
|
||||
handler->PSendSysMessage("The item in bag {} at slot {} having guid {} has a queuepos ({}) larger than the update queue size! ", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString(), qp);
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!updateQueue[qp])
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to NULL in the queue!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().GetCounter(), qp);
|
||||
handler->PSendSysMessage("The item in bag {} at slot {} having guid {} has a queuepos ({}) that points to NULL in the queue!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString(), qp);
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (updateQueue[qp] != item2)
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().GetCounter(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage("The item in bag {} at slot {} having guid {} has a queuepos ({}) that points to another item in the queue (bag: {}, slot: {}, guid: {})", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUID().ToString());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (item2->GetState() != ITEM_UNCHANGED)
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d is not in queue but should be (state: %d)!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().GetCounter(), item2->GetState());
|
||||
handler->PSendSysMessage("The item in bag {} at slot {} having guid {} is not in queue but should be (state: {})!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString(), item2->GetState());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -759,7 +759,7 @@ public:
|
||||
|
||||
if (test != item)
|
||||
{
|
||||
handler->SendSysMessage(Acore::StringFormatFmt("queue({}): The bag({}) and slot({}) values for the %s are incorrect, {} is there instead!", index, item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString(), test->GetGUID().ToString()));
|
||||
handler->SendSysMessage(Acore::StringFormatFmt("queue({}): The bag({}) and slot({}) values for the {} are incorrect, {} is there instead!", index, item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString(), test->GetGUID().ToString()));
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -800,18 +800,18 @@ public:
|
||||
ThreatContainer::StorageType::const_iterator itr;
|
||||
uint32 count = 0;
|
||||
|
||||
handler->PSendSysMessage("Threat list of %s (%s)", target->GetName().c_str(), target->GetGUID().ToString().c_str());
|
||||
handler->PSendSysMessage("Threat list of {} ({})", target->GetName(), target->GetGUID().ToString());
|
||||
|
||||
for (itr = threatList.begin(); itr != threatList.end(); ++itr)
|
||||
{
|
||||
Unit* unit = (*itr)->getTarget();
|
||||
if (!unit)
|
||||
{
|
||||
handler->PSendSysMessage(" %u. No Unit - threat %f", ++count, (*itr)->GetThreat());
|
||||
handler->PSendSysMessage(" {}. No Unit - threat {}", ++count, (*itr)->GetThreat());
|
||||
continue;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(" %u. %s (%s) - threat %f", ++count, unit->GetName().c_str(), unit->GetGUID().ToString().c_str(), (*itr)->GetThreat());
|
||||
handler->PSendSysMessage(" {}. {} ({}) - threat {}", ++count, unit->GetName(), unit->GetGUID().ToString(), (*itr)->GetThreat());
|
||||
}
|
||||
|
||||
auto const& threatList2 = target->GetThreatMgr().GetOfflineThreatList();
|
||||
@@ -820,11 +820,11 @@ public:
|
||||
Unit* unit = (*itr)->getTarget();
|
||||
if (!unit)
|
||||
{
|
||||
handler->PSendSysMessage(" %u. [offline] No Unit - threat %f", ++count, (*itr)->GetThreat());
|
||||
handler->PSendSysMessage(" {}. [offline] No Unit - threat {}", ++count, (*itr)->GetThreat());
|
||||
continue;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(" %u. [offline] %s (%s) - threat %f", ++count, unit->GetName().c_str(), unit->GetGUID().ToString().c_str(), (*itr)->GetThreat());
|
||||
handler->PSendSysMessage(" {}. [offline] {} ({}) - threat {}", ++count, unit->GetName(), unit->GetGUID().ToString(), (*itr)->GetThreat());
|
||||
}
|
||||
|
||||
handler->SendSysMessage("End of threat list.");
|
||||
@@ -841,18 +841,18 @@ public:
|
||||
HostileReference* ref = target->getHostileRefMgr().getFirst();
|
||||
uint32 count = 0;
|
||||
|
||||
handler->PSendSysMessage("Hostile reference list of %s (%s)", target->GetName().c_str(), target->GetGUID().ToString().c_str());
|
||||
handler->PSendSysMessage("Hostile reference list of {} ({})", target->GetName(), target->GetGUID().ToString());
|
||||
|
||||
while (ref)
|
||||
{
|
||||
if (Unit* unit = ref->GetSource()->GetOwner())
|
||||
{
|
||||
handler->PSendSysMessage(" %u. %s %s (%s) - threat %f", ++count, (ref->IsOnline() ? "" : "[offline]"),
|
||||
unit->GetName().c_str(), unit->GetGUID().ToString().c_str(), ref->GetThreat());
|
||||
handler->PSendSysMessage(" {}. {} {} ({}) - threat {}", ++count, (ref->IsOnline() ? "" : "[offline]"),
|
||||
unit->GetName(), unit->GetGUID().ToString(), ref->GetThreat());
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(" %u. No Owner - threat %f", ++count, ref->GetThreat());
|
||||
handler->PSendSysMessage(" {}. No Owner - threat {}", ++count, ref->GetThreat());
|
||||
}
|
||||
|
||||
ref = ref->next();
|
||||
@@ -869,7 +869,7 @@ public:
|
||||
return false;
|
||||
|
||||
//target->SetVehicleId(id);
|
||||
handler->PSendSysMessage("Vehicle id set to %u", id);
|
||||
handler->PSendSysMessage("Vehicle id set to {}", id);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -897,7 +897,7 @@ public:
|
||||
passenger->EnterVehicle(target, *seatId);
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("Unit %u entered vehicle %hhd", entry, *seatId);
|
||||
handler->PSendSysMessage("Unit {} entered vehicle %hhd", entry, *seatId);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -963,7 +963,7 @@ public:
|
||||
|
||||
uint32 value = i->GetUInt32Value(index);
|
||||
|
||||
handler->PSendSysMessage("Item %u: value at %u is %u", guid, index, value);
|
||||
handler->PSendSysMessage("Item {}: value at {} is {}", guid, index, value);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1002,7 +1002,7 @@ public:
|
||||
if (Unit* unit = handler->getSelectedUnit())
|
||||
unit->HandleEmoteCommand(emote);
|
||||
|
||||
handler->PSendSysMessage("Playing emote %s", EnumUtils::ToConstant(emote));
|
||||
handler->PSendSysMessage("Playing emote {}", EnumUtils::ToConstant(emote));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1012,10 +1012,10 @@ public:
|
||||
if (Unit* unit = handler->getSelectedUnit())
|
||||
{
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
handler->PSendSysMessage("Checking LoS %s -> %s:", player->GetName().c_str(), unit->GetName().c_str());
|
||||
handler->PSendSysMessage(" VMAP LoS: %s", player->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::Nothing, LINEOFSIGHT_CHECK_VMAP) ? "clear" : "obstructed");
|
||||
handler->PSendSysMessage(" GObj LoS: %s", player->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::Nothing, LINEOFSIGHT_CHECK_GOBJECT_ALL) ? "clear" : "obstructed");
|
||||
handler->PSendSysMessage("%s is %sin line of sight of %s.", unit->GetName().c_str(), (player->IsWithinLOSInMap(unit) ? "" : "not "), player->GetName().c_str());
|
||||
handler->PSendSysMessage("Checking LoS {} -> {}:", player->GetName(), unit->GetName());
|
||||
handler->PSendSysMessage(" VMAP LoS: {}", player->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::Nothing, LINEOFSIGHT_CHECK_VMAP) ? "clear" : "obstructed");
|
||||
handler->PSendSysMessage(" GObj LoS: {}", player->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::Nothing, LINEOFSIGHT_CHECK_GOBJECT_ALL) ? "clear" : "obstructed");
|
||||
handler->PSendSysMessage("{} is {}in line of sight of {}.", unit->GetName(), (player->IsWithinLOSInMap(unit) ? "" : "not "), player->GetName());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1054,19 +1054,19 @@ public:
|
||||
|
||||
if (index >= target->GetValuesCount())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, target->GetGUID().GetCounter(), target->GetValuesCount());
|
||||
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, target->GetGUID().ToString(), target->GetValuesCount());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (value.holds_alternative<uint32>())
|
||||
{
|
||||
target->SetUInt32Value(index, value.get<uint32>());
|
||||
handler->PSendSysMessage(LANG_SET_UINT_FIELD, target->GetGUID().GetCounter(), uint32(index), uint32(value));
|
||||
handler->PSendSysMessage(LANG_SET_UINT_FIELD, target->GetGUID().ToString(), uint32(index), uint32(value));
|
||||
}
|
||||
else if (value.holds_alternative<float>())
|
||||
{
|
||||
target->SetFloatValue(index, value.get<float>());
|
||||
handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, target->GetGUID().GetCounter(), static_cast<float>(index), uint32(value));
|
||||
handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, target->GetGUID().ToString(), static_cast<float>(index), uint32(value));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1085,19 +1085,19 @@ public:
|
||||
|
||||
if (index >= target->GetValuesCount())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, guid.GetCounter(), target->GetValuesCount());
|
||||
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, guid.ToString(), target->GetValuesCount());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isInt)
|
||||
{
|
||||
uint32 value = target->GetUInt32Value(index);
|
||||
handler->PSendSysMessage(LANG_GET_UINT_FIELD, guid.GetCounter(), index, value);
|
||||
handler->PSendSysMessage(LANG_GET_UINT_FIELD, guid.ToString(), index, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
float value = target->GetFloatValue(index);
|
||||
handler->PSendSysMessage(LANG_GET_FLOAT_FIELD, guid.GetCounter(), index, value);
|
||||
handler->PSendSysMessage(LANG_GET_FLOAT_FIELD, guid.ToString(), index, value);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1107,7 +1107,7 @@ public:
|
||||
{
|
||||
if (index >= handler->GetPlayer()->GetValuesCount())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, handler->GetPlayer()->GetGUID().GetCounter(), handler->GetPlayer()->GetValuesCount());
|
||||
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, handler->GetPlayer()->GetGUID().ToString(), handler->GetPlayer()->GetValuesCount());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1146,13 +1146,13 @@ public:
|
||||
{
|
||||
value = unit->GetUInt32Value(index);
|
||||
|
||||
handler->PSendSysMessage(LANG_UPDATE, unit->GetGUID().GetCounter(), index, *value);
|
||||
handler->PSendSysMessage(LANG_UPDATE, unit->GetGUID().ToString(), index, *value);
|
||||
return true;
|
||||
}
|
||||
|
||||
unit->SetUInt32Value(index, *value);
|
||||
|
||||
handler->PSendSysMessage(LANG_UPDATE_CHANGE, unit->GetGUID().GetCounter(), index, *value);
|
||||
handler->PSendSysMessage(LANG_UPDATE_CHANGE, unit->GetGUID().ToString(), index, *value);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1325,7 +1325,7 @@ public:
|
||||
|
||||
static void HandleDebugObjectCountMap(ChatHandler* handler, Map* map)
|
||||
{
|
||||
handler->PSendSysMessage("Map Id: %u Name: '%s' Instance Id: %u Creatures: %u GameObjects: %u SetActive Objects: %u",
|
||||
handler->PSendSysMessage("Map Id: {} Name: '{}' Instance Id: {} Creatures: {} GameObjects: {} SetActive Objects: {}",
|
||||
map->GetId(), map->GetMapName(), map->GetInstanceId(),
|
||||
uint64(map->GetObjectsStore().Size<Creature>()),
|
||||
uint64(map->GetObjectsStore().Size<GameObject>()),
|
||||
@@ -1338,7 +1338,7 @@ public:
|
||||
handler->PSendSysMessage("Top Creatures count:");
|
||||
|
||||
for (auto&& p : worker.GetTopCreatureCount(5))
|
||||
handler->PSendSysMessage("Entry: %u Count: %u", p.first, p.second);
|
||||
handler->PSendSysMessage("Entry: {} Count: {}", p.first, p.second);
|
||||
}
|
||||
|
||||
static bool HandleDebugDummyCommand(ChatHandler* handler)
|
||||
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
Aura* aura = target->GetAura(deserterSpell);
|
||||
if (aura && aura->GetDuration() >= duration * IN_MILLISECONDS)
|
||||
{
|
||||
handler->PSendSysMessage("Player %s already has a longer %s Deserter active.", handler->playerLink(*playerName), isInstance ? "Instance" : "Battleground");
|
||||
handler->PSendSysMessage("Player {} already has a longer {} Deserter active.", handler->playerLink(*playerName), isInstance ? "Instance" : "Battleground");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
|
||||
if (remainTime < 0 || remainTime >= duration * IN_MILLISECONDS)
|
||||
{
|
||||
handler->PSendSysMessage("Player %s already has a longer %s Deserter active.", handler->playerLink(*playerName), isInstance ? "Instance" : "Battleground");
|
||||
handler->PSendSysMessage("Player {} already has a longer {} Deserter active.", handler->playerLink(*playerName), isInstance ? "Instance" : "Battleground");
|
||||
return true;
|
||||
}
|
||||
CharacterDatabase.Query("DELETE FROM character_aura WHERE guid = {} AND spell = {}", guid.GetCounter(), deserterSpell);
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("%s of %s Deserter has been added to player %s.", secsToTimeString(duration), isInstance ? "Instance" : "Battleground", handler->playerLink(*playerName));
|
||||
handler->PSendSysMessage("{} of {} Deserter has been added to player {}.", secsToTimeString(duration), isInstance ? "Instance" : "Battleground", handler->playerLink(*playerName));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -274,17 +274,17 @@ public:
|
||||
|
||||
if (duration == 0)
|
||||
{
|
||||
handler->SendErrorMessage("Player %s does not have %s Deserter.", handler->playerLink(player->GetName()), isInstance ? "Instance" : "Battleground");
|
||||
handler->SendErrorMessage("Player {} does not have {} Deserter.", handler->playerLink(player->GetName()), isInstance ? "Instance" : "Battleground");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (duration < 0)
|
||||
{
|
||||
handler->SendErrorMessage("Permanent %s Deserter has been removed from player %s (GUID %u).", isInstance ? "Instance" : "Battleground", handler->playerLink(player->GetName()), player->GetGUID().GetCounter());
|
||||
handler->SendErrorMessage("Permanent {} Deserter has been removed from player {} (GUID {}).", isInstance ? "Instance" : "Battleground", handler->playerLink(player->GetName()), player->GetGUID().ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("%s of %s Deserter has been removed from player %s (GUID %u).", secsToTimeString(duration / IN_MILLISECONDS), isInstance ? "Instance" : "Battleground", handler->playerLink(player->GetName()), player->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage("{} of {} Deserter has been removed from player {} (GUID {}).", secsToTimeString(duration / IN_MILLISECONDS), isInstance ? "Instance" : "Battleground", handler->playerLink(player->GetName()), player->GetGUID().ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -386,11 +386,11 @@ public:
|
||||
|
||||
if (deserterCount == 0)
|
||||
{
|
||||
handler->PSendSysMessage("No player on this realm has %s Deserter with a duration of %s or less.", isInstance ? "Instance" : "Battleground", remainTimeStr);
|
||||
handler->PSendSysMessage("No player on this realm has {} Deserter with a duration of {} or less.", isInstance ? "Instance" : "Battleground", remainTimeStr);
|
||||
return true;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("%s Deserter has been removed from %u player(s) with a duration of %s or less.", isInstance ? "Instance" : "Battleground", deserterCount, remainTimeStr);
|
||||
handler->PSendSysMessage("{} Deserter has been removed from {} player(s) with a duration of {} or less.", isInstance ? "Instance" : "Battleground", deserterCount, remainTimeStr);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
PreparedQueryResult result = WorldDatabase.Query(stmt);
|
||||
if (result)
|
||||
{
|
||||
handler->SendErrorMessage("This %s (Id: %u) is already disabled.", disableTypeStr.c_str(), entry);
|
||||
handler->SendErrorMessage("This {} (Id: {}) is already disabled.", disableTypeStr, entry);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
stmt->SetData(3, disableComment);
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage("Add Disabled %s (Id: %u) for reason %s", disableTypeStr.c_str(), entry, disableComment.c_str());
|
||||
handler->PSendSysMessage("Add Disabled {} (Id: {}) for reason {}", disableTypeStr, entry, disableComment);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
PreparedQueryResult result = WorldDatabase.Query(stmt);
|
||||
if (!result)
|
||||
{
|
||||
handler->SendErrorMessage("This %s (Id: %u) is not disabled.", disableTypeStr.c_str(), entry);
|
||||
handler->SendErrorMessage("This {} (Id: {}) is not disabled.", disableTypeStr, entry);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ public:
|
||||
stmt->SetData(1, disableType);
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage("Remove Disabled %s (Id: %u)", disableTypeStr.c_str(), entry);
|
||||
handler->PSendSysMessage("Remove Disabled {} (Id: {})", disableTypeStr, entry);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,11 +69,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, eventId, eventId, eventData.description.c_str(), active);
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, eventId, eventId, eventData.description, active);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, eventId, eventData.description.c_str(), active);
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, eventId, eventData.description, active);
|
||||
}
|
||||
|
||||
++counter;
|
||||
@@ -120,9 +120,9 @@ public:
|
||||
std::string occurenceStr = secsToTimeString(eventData.occurence * MINUTE, true);
|
||||
std::string lengthStr = secsToTimeString(eventData.length * MINUTE, true);
|
||||
|
||||
handler->PSendSysMessage(LANG_EVENT_INFO, uint16(eventId), eventData.description.c_str(), activeStr,
|
||||
startTimeStr.c_str(), endTimeStr.c_str(), occurenceStr.c_str(), lengthStr.c_str(),
|
||||
nextStr.c_str());
|
||||
handler->PSendSysMessage(LANG_EVENT_INFO, uint16(eventId), eventData.description, activeStr,
|
||||
startTimeStr, endTimeStr, occurenceStr, lengthStr,
|
||||
nextStr);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -147,11 +147,11 @@ public:
|
||||
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
|
||||
if (activeEvents.find(eventId) != activeEvents.end())
|
||||
{
|
||||
handler->SendErrorMessage(LANG_EVENT_ALREADY_ACTIVE, uint16(eventId), eventData.description.c_str());
|
||||
handler->SendErrorMessage(LANG_EVENT_ALREADY_ACTIVE, uint16(eventId), eventData.description);
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_EVENT_STARTED, uint16(eventId), eventData.description.c_str());
|
||||
handler->PSendSysMessage(LANG_EVENT_STARTED, uint16(eventId), eventData.description);
|
||||
sGameEventMgr->StartEvent(eventId, true);
|
||||
return true;
|
||||
}
|
||||
@@ -177,11 +177,11 @@ public:
|
||||
|
||||
if (activeEvents.find(eventId) == activeEvents.end())
|
||||
{
|
||||
handler->SendErrorMessage(LANG_EVENT_NOT_ACTIVE, uint16(eventId), eventData.description.c_str());
|
||||
handler->SendErrorMessage(LANG_EVENT_NOT_ACTIVE, uint16(eventId), eventData.description);
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_EVENT_STOPPED, uint16(eventId), eventData.description.c_str());
|
||||
handler->PSendSysMessage(LANG_EVENT_STOPPED, uint16(eventId), eventData.description);
|
||||
sGameEventMgr->StopEvent(eventId, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -67,11 +67,11 @@ public:
|
||||
|
||||
std::string nameLink = handler->playerLink(target->GetName());
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_REPAIR_ITEMS, nameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_YOU_REPAIR_ITEMS, nameLink);
|
||||
|
||||
if (handler->needReportToTarget(target->GetConnectedPlayer()))
|
||||
{
|
||||
ChatHandler(target->GetConnectedPlayer()->GetSession()).PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, nameLink.c_str());
|
||||
ChatHandler(target->GetConnectedPlayer()->GetSession()).PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, nameLink);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -86,8 +86,8 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("Character: %s", player->GetPlayerName().c_str());
|
||||
handler->PSendSysMessage("Current equipment average item level: |cff00ffff%u|r", (int16)player->GetAverageItemLevel());
|
||||
handler->PSendSysMessage("Character: {}", player->GetPlayerName());
|
||||
handler->PSendSysMessage("Current equipment average item level: |cff00ffff{}|r", (int16)player->GetAverageItemLevel());
|
||||
|
||||
if (sWorld->getIntConfig(CONFIG_MIN_LEVEL_STAT_SAVE))
|
||||
{
|
||||
@@ -109,11 +109,11 @@ public:
|
||||
uint32 SpellPower = fields[8].Get<uint32>();
|
||||
uint32 Resilience = fields[9].Get<uint32>();
|
||||
|
||||
handler->PSendSysMessage("Health: |cff00ffff%u|r - Stamina: |cff00ffff%u|r", MaxHealth, Stamina);
|
||||
handler->PSendSysMessage("Strength: |cff00ffff%u|r - Agility: |cff00ffff%u|r", Strength, Agility);
|
||||
handler->PSendSysMessage("Intellect: |cff00ffff%u|r - Spirit: |cff00ffff%u|r", Intellect, Spirit);
|
||||
handler->PSendSysMessage("AttackPower: |cff00ffff%u|r - SpellPower: |cff00ffff%u|r", AttackPower, SpellPower);
|
||||
handler->PSendSysMessage("Armor: |cff00ffff%u|r - Resilience: |cff00ffff%u|r", Armor, Resilience);
|
||||
handler->PSendSysMessage("Health: |cff00ffff{}|r - Stamina: |cff00ffff{}|r", MaxHealth, Stamina);
|
||||
handler->PSendSysMessage("Strength: |cff00ffff{}|r - Agility: |cff00ffff{}|r", Strength, Agility);
|
||||
handler->PSendSysMessage("Intellect: |cff00ffff{}|r - Spirit: |cff00ffff{}|r", Intellect, Spirit);
|
||||
handler->PSendSysMessage("AttackPower: |cff00ffff{}|r - SpellPower: |cff00ffff{}|r", AttackPower, SpellPower);
|
||||
handler->PSendSysMessage("Armor: |cff00ffff{}|r - Resilience: |cff00ffff{}|r", Armor, Resilience);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
data << target->GetPackGUID();
|
||||
data << uint32(0); // unknown
|
||||
target->SendMessageToSet(&data, true);
|
||||
handler->PSendSysMessage(LANG_COMMAND_FLYMODE_STATUS, handler->GetNameLink(target).c_str(), enable ? "on" : "off");
|
||||
handler->PSendSysMessage(LANG_COMMAND_FLYMODE_STATUS, handler->GetNameLink(target), enable ? "on" : "off");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -139,9 +139,9 @@ public:
|
||||
if ((max + max2 + size) == 16)
|
||||
max2 = max - 1;
|
||||
if (handler->GetSession())
|
||||
handler->PSendSysMessage("| %s GMLevel %u", name.c_str(), security);
|
||||
handler->PSendSysMessage("| {} GMLevel {}", name, security);
|
||||
else
|
||||
handler->PSendSysMessage("|%*s%s%*s| %u |", max, " ", name.c_str(), max2, " ", security);
|
||||
handler->PSendSysMessage("|{}{}{}| {} |", max, " ", name, max2, " ", security);
|
||||
}
|
||||
}
|
||||
if (footer)
|
||||
@@ -175,9 +175,9 @@ public:
|
||||
if ((max + max2 + name.length()) == 16)
|
||||
max2 = max - 1;
|
||||
if (handler->GetSession())
|
||||
handler->PSendSysMessage("| %s GMLevel %u", name.c_str(), security);
|
||||
handler->PSendSysMessage("| {} GMLevel {}", name, security);
|
||||
else
|
||||
handler->PSendSysMessage("|%*s%s%*s| %u |", max, " ", name.c_str(), max2, " ", security);
|
||||
handler->PSendSysMessage("|{}{}{}| {} |", max, " ", name, max2, " ", security);
|
||||
} while (result->NextRow());
|
||||
handler->SendSysMessage("========================");
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
/// @todo is it really necessary to add both the real and DB table guid here ?
|
||||
sObjectMgr->AddGameobjectToGrid(guidLow, sObjectMgr->GetGameObjectData(guidLow));
|
||||
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_ADD, uint32(objectId), objectInfo->name.c_str(), guidLow, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_ADD, uint32(objectId), objectInfo->name, guidLow, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
|
||||
GameObject* target = handler->GetObjectFromPlayerMapByDbGuid(guidLow);
|
||||
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_DETAIL, guidLow, objectInfo->name.c_str(), guidLow, id, x, y, z, mapId, o, phase);
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_DETAIL, guidLow, objectInfo->name, guidLow, id, x, y, z, mapId, o, phase);
|
||||
|
||||
if (target)
|
||||
{
|
||||
@@ -277,7 +277,7 @@ public:
|
||||
std::string curRespawnDelayStr = secsToTimeString(curRespawnDelay, true);
|
||||
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(), true);
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr, curRespawnDelayStr);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -298,7 +298,7 @@ public:
|
||||
Unit* owner = ObjectAccessor::GetUnit(*handler->GetSession()->GetPlayer(), ownerGuid);
|
||||
if (!owner || !ownerGuid.IsPlayer())
|
||||
{
|
||||
handler->SendErrorMessage(LANG_COMMAND_DELOBJREFERCREATURE, ownerGuid.GetCounter(), object->GetSpawnId());
|
||||
handler->SendErrorMessage(LANG_COMMAND_DELOBJREFERCREATURE, ownerGuid.ToString(), object->GetSpawnId());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_TURNOBJMESSAGE, object->GetSpawnId(), object->GetGOInfo()->name.c_str(), object->GetSpawnId());
|
||||
handler->PSendSysMessage(LANG_COMMAND_TURNOBJMESSAGE, object->GetSpawnId(), object->GetGOInfo()->name, object->GetSpawnId());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_MOVEOBJMESSAGE, object->GetSpawnId(), object->GetGOInfo()->name.c_str(), object->GetSpawnId());
|
||||
handler->PSendSysMessage(LANG_COMMAND_MOVEOBJMESSAGE, object->GetSpawnId(), object->GetGOInfo()->name, object->GetSpawnId());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -467,7 +467,7 @@ public:
|
||||
if (!gameObjectInfo)
|
||||
continue;
|
||||
|
||||
handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gameObjectInfo->name.c_str(), x, y, z, mapId, "", "");
|
||||
handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gameObjectInfo->name, x, y, z, mapId, "", "");
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
@@ -522,21 +522,21 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_GOINFO_ENTRY, entry);
|
||||
if (gameObject)
|
||||
handler->PSendSysMessage("GUID: %u", gameObject->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage("GUID: {}", gameObject->GetGUID().ToString());
|
||||
handler->PSendSysMessage(LANG_GOINFO_TYPE, type);
|
||||
handler->PSendSysMessage(LANG_GOINFO_LOOTID, lootId);
|
||||
handler->PSendSysMessage(LANG_GOINFO_DISPLAYID, displayId);
|
||||
if (gameObject)
|
||||
{
|
||||
handler->PSendSysMessage("LootMode: %u", gameObject->GetLootMode());
|
||||
handler->PSendSysMessage("LootState: %u", gameObject->getLootState());
|
||||
handler->PSendSysMessage("GOState: %u", gameObject->GetGoState());
|
||||
handler->PSendSysMessage("PhaseMask: %u", gameObject->GetPhaseMask());
|
||||
handler->PSendSysMessage("IsLootEmpty: %u", gameObject->loot.empty());
|
||||
handler->PSendSysMessage("IsLootLooted: %u", gameObject->loot.isLooted());
|
||||
handler->PSendSysMessage("LootMode: {}", gameObject->GetLootMode());
|
||||
handler->PSendSysMessage("LootState: {}", gameObject->getLootState());
|
||||
handler->PSendSysMessage("GOState: {}", gameObject->GetGoState());
|
||||
handler->PSendSysMessage("PhaseMask: {}", gameObject->GetPhaseMask());
|
||||
handler->PSendSysMessage("IsLootEmpty: {}", gameObject->loot.empty());
|
||||
handler->PSendSysMessage("IsLootLooted: {}", gameObject->loot.isLooted());
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_GOINFO_NAME, name.c_str());
|
||||
handler->PSendSysMessage(LANG_GOINFO_NAME, name);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -571,7 +571,7 @@ public:
|
||||
{
|
||||
object->SendCustomAnim(*objectState);
|
||||
}
|
||||
handler->PSendSysMessage("Set gobject type %d state %u", objectType, *objectState);
|
||||
handler->PSendSysMessage("Set gobject type {} state {}", objectType, *objectState);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
{
|
||||
groupSource->AddMember(playerTarget);
|
||||
groupSource->BroadcastGroupUpdate();
|
||||
handler->PSendSysMessage(LANG_GROUP_PLAYER_JOINED, playerTarget->GetName().c_str(), playerSource->GetName().c_str());
|
||||
handler->PSendSysMessage(LANG_GROUP_PLAYER_JOINED, playerTarget->GetName(), playerSource->GetName());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
else
|
||||
{
|
||||
// group is full or target player already in a group
|
||||
handler->PSendSysMessage(LANG_GROUP_ALREADY_IN_GROUP, playerTarget->GetName().c_str());
|
||||
handler->PSendSysMessage(LANG_GROUP_ALREADY_IN_GROUP, playerTarget->GetName());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
else
|
||||
{
|
||||
// specified source player is not in a group
|
||||
handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, playerSource->GetName().c_str());
|
||||
handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, playerSource->GetName());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
|
||||
if (!groupTarget)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, target->GetName().c_str());
|
||||
handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, target->GetName());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -239,11 +239,11 @@ public:
|
||||
return false;
|
||||
|
||||
// Display Guild Information
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_NAME, guild->GetName().c_str(), guild->GetId()); // Guild Id + Name
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_NAME, guild->GetName(), guild->GetId()); // Guild Id + Name
|
||||
|
||||
std::string guildMasterName;
|
||||
if (sCharacterCache->GetCharacterNameByGuid(guild->GetLeaderGUID(), guildMasterName))
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_GUILD_MASTER, guildMasterName.c_str(), guild->GetLeaderGUID().GetCounter()); // Guild Master
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_GUILD_MASTER, guildMasterName, guild->GetLeaderGUID().ToString()); // Guild Master
|
||||
|
||||
// Format creation date
|
||||
char createdDateStr[20];
|
||||
@@ -254,8 +254,8 @@ public:
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_CREATION_DATE, createdDateStr); // Creation Date
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_MEMBER_COUNT, guild->GetMemberCount()); // Number of Members
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_BANK_GOLD, guild->GetTotalBankMoney() / 100 / 100); // Bank Gold (in gold coins)
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_MOTD, guild->GetMOTD().c_str()); // Message of the Day
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_EXTRA_INFO, guild->GetInfo().c_str()); // Extra Information
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_MOTD, guild->GetMOTD()); // Message of the Day
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_EXTRA_INFO, guild->GetInfo()); // Extra Information
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -74,13 +74,13 @@ public:
|
||||
uint32 resetTime = bind.extended ? save->GetExtendedResetTime() : save->GetResetTime();
|
||||
uint32 ttr = (resetTime >= GameTime::GetGameTime().count() ? resetTime - GameTime::GetGameTime().count() : 0);
|
||||
std::string timeleft = secsToTimeString(ttr);
|
||||
handler->PSendSysMessage("map: %d, inst: %d, perm: %s, diff: %d, canReset: %s, TTR: %s%s",
|
||||
mapId, save->GetInstanceId(), bind.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str(), (bind.extended ? " (extended)" : ""));
|
||||
handler->PSendSysMessage("map: {}, inst: {}, perm: {}, diff: {}, canReset: {}, TTR: {}{}",
|
||||
mapId, save->GetInstanceId(), bind.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft, (bind.extended ? " (extended)" : ""));
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("player binds: %d", counter);
|
||||
handler->PSendSysMessage("player binds: {}", counter);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
uint32 resetTime = itr->second.extended ? save->GetExtendedResetTime() : save->GetResetTime();
|
||||
uint32 ttr = (resetTime >= GameTime::GetGameTime().count() ? resetTime - GameTime::GetGameTime().count() : 0);
|
||||
std::string timeleft = secsToTimeString(ttr);
|
||||
handler->PSendSysMessage("unbinding map: %d, inst: %d, perm: %s, diff: %d, canReset: %s, TTR: %s%s", itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str(), (itr->second.extended ? " (extended)" : ""));
|
||||
handler->PSendSysMessage("unbinding map: {}, inst: {}, perm: {}, diff: {}, canReset: {}, TTR: {}{}", itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft, (itr->second.extended ? " (extended)" : ""));
|
||||
sInstanceSaveMgr->PlayerUnbindInstance(player->GetGUID(), itr->first, Difficulty(i), true, player);
|
||||
itr = m_boundInstances.begin();
|
||||
counter++;
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("instances unbound: %d", counter);
|
||||
handler->PSendSysMessage("instances unbound: {}", counter);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -131,13 +131,13 @@ public:
|
||||
{
|
||||
uint32 dungeon = 0, battleground = 0, arena = 0, spectators = 0;
|
||||
sMapMgr->GetNumInstances(dungeon, battleground, arena);
|
||||
handler->PSendSysMessage("instances loaded: dungeons (%d), battlegrounds (%d), arenas (%d)", dungeon, battleground, arena);
|
||||
handler->PSendSysMessage("instances loaded: dungeons ({}), battlegrounds ({}), arenas ({})", dungeon, battleground, arena);
|
||||
dungeon = 0;
|
||||
battleground = 0;
|
||||
arena = 0;
|
||||
spectators = 0;
|
||||
sMapMgr->GetNumPlayersInInstances(dungeon, battleground, arena, spectators);
|
||||
handler->SendErrorMessage("players in instances: dungeons (%d), battlegrounds (%d), arenas (%d + %d spect)", dungeon, battleground, arena, spectators);
|
||||
handler->SendErrorMessage("players in instances: dungeons ({}), battlegrounds ({}), arenas ({} + {} spect)", dungeon, battleground, arena, spectators);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
|
||||
map->GetInstanceScript()->SetBossState(encounterId, EncounterState(state));
|
||||
std::string stateName = InstanceScript::GetBossStateName(state);
|
||||
handler->PSendSysMessage(LANG_COMMAND_INST_SET_BOSS_STATE, encounterId, state, stateName.c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_INST_SET_BOSS_STATE, encounterId, state, stateName);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
|
||||
uint32 state = map->GetInstanceScript()->GetBossState(encounterId);
|
||||
std::string stateName = InstanceScript::GetBossStateName(state);
|
||||
handler->PSendSysMessage(LANG_COMMAND_INST_GET_BOSS_STATE, encounterId, state, stateName.c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_INST_GET_BOSS_STATE, encounterId, state, stateName);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
CharacterDatabase.Execute(delStmt);
|
||||
|
||||
std::string nameLink = handler->playerLink(player.GetName());
|
||||
handler->PSendSysMessage(LANG_MAIL_SENT, nameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_MAIL_SENT, nameLink);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ public:
|
||||
target->LearnCustomSpells();
|
||||
target->learnQuestRewardedSpells();
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_DEFAULT_AND_QUEST, handler->GetNameLink(target).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_DEFAULT_AND_QUEST, handler->GetNameLink(target));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@ void GetPlayerInfo(ChatHandler* handler, Player* player)
|
||||
lfg::LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(guid);
|
||||
|
||||
std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid));
|
||||
handler->PSendSysMessage(LANG_LFG_PLAYER_INFO, player->GetName().c_str(),
|
||||
state.c_str(), uint8(dungeons.size()), lfg::ConcatenateDungeons(dungeons).c_str(),
|
||||
lfg::GetRolesString(sLFGMgr->GetRoles(guid)).c_str(), sLFGMgr->GetComment(guid).c_str());
|
||||
handler->PSendSysMessage(LANG_LFG_PLAYER_INFO, player->GetName(),
|
||||
state, uint8(dungeons.size()), lfg::ConcatenateDungeons(dungeons),
|
||||
lfg::GetRolesString(sLFGMgr->GetRoles(guid)), sLFGMgr->GetComment(guid));
|
||||
}
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
@@ -89,14 +89,14 @@ public:
|
||||
groupTarget = target->GetGroup();
|
||||
if (!groupTarget)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_LFG_NOT_IN_GROUP, player->GetName().c_str());
|
||||
handler->PSendSysMessage(LANG_LFG_NOT_IN_GROUP, player->GetName());
|
||||
return true;
|
||||
}
|
||||
|
||||
ObjectGuid guid = groupTarget->GetGUID();
|
||||
std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid));
|
||||
handler->PSendSysMessage(LANG_LFG_GROUP_INFO, groupTarget->isLFGGroup(),
|
||||
state.c_str(), sLFGMgr->GetDungeon(guid));
|
||||
state, sLFGMgr->GetDungeon(guid));
|
||||
|
||||
for (GroupReference* itr = groupTarget->GetFirstMember(); itr != nullptr; itr = itr->next())
|
||||
GetPlayerInfo(handler, itr->GetSource());
|
||||
|
||||
@@ -124,9 +124,9 @@ public:
|
||||
for (std::unordered_multimap<uint32, Creature*>::const_iterator itr = creBounds.first; itr != creBounds.second;)
|
||||
{
|
||||
if (handler->GetSession())
|
||||
handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, cInfo->Entry, guid, cInfo->Name.c_str(), x, y, z, mapId, itr->second->GetGUID().ToString().c_str(), itr->second->IsAlive() ? "*" : " ");
|
||||
handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, cInfo->Entry, guid, cInfo->Name, x, y, z, mapId, itr->second->GetGUID().ToString(), itr->second->IsAlive() ? "*" : " ");
|
||||
else
|
||||
handler->PSendSysMessage(LANG_CREATURE_LIST_CONSOLE, guid, cInfo->Name.c_str(), x, y, z, mapId, itr->second->GetGUID().ToString().c_str(), itr->second->IsAlive() ? "*" : " ");
|
||||
handler->PSendSysMessage(LANG_CREATURE_LIST_CONSOLE, guid, cInfo->Name, x, y, z, mapId, itr->second->GetGUID().ToString(), itr->second->IsAlive() ? "*" : " ");
|
||||
++itr;
|
||||
}
|
||||
liveFound = true;
|
||||
@@ -136,9 +136,9 @@ public:
|
||||
if (!liveFound)
|
||||
{
|
||||
if (handler->GetSession())
|
||||
handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, cInfo->Entry, guid, cInfo->Name.c_str(), x, y, z, mapId, "", "");
|
||||
handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, cInfo->Entry, guid, cInfo->Name, x, y, z, mapId, "", "");
|
||||
else
|
||||
handler->PSendSysMessage(LANG_CREATURE_LIST_CONSOLE, guid, cInfo->Name.c_str(), x, y, z, mapId, "", "");
|
||||
handler->PSendSysMessage(LANG_CREATURE_LIST_CONSOLE, guid, cInfo->Name, x, y, z, mapId, "", "");
|
||||
}
|
||||
}
|
||||
while (result->NextRow());
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
else
|
||||
itemPos = "";
|
||||
|
||||
handler->PSendSysMessage(LANG_ITEMLIST_SLOT, itemGuid, ownerName.c_str(), ownerGuid, ownerAccountId, itemPos);
|
||||
handler->PSendSysMessage(LANG_ITEMLIST_SLOT, itemGuid, ownerName, ownerGuid, ownerAccountId, itemPos);
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
|
||||
char const* itemPos = "[in mail]";
|
||||
|
||||
handler->PSendSysMessage(LANG_ITEMLIST_MAIL, itemGuid, itemSenderName.c_str(), itemSender, itemSenderAccountId, itemReceiverName.c_str(), itemReceiver, itemReceiverAccount, itemPos);
|
||||
handler->PSendSysMessage(LANG_ITEMLIST_MAIL, itemGuid, itemSenderName, itemSender, itemSenderAccountId, itemReceiverName, itemReceiver, itemReceiverAccount, itemPos);
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
@@ -296,7 +296,7 @@ public:
|
||||
|
||||
char const* itemPos = "[in auction]";
|
||||
|
||||
handler->PSendSysMessage(LANG_ITEMLIST_AUCTION, itemGuid, ownerName.c_str(), owner, ownerAccountId, itemPos);
|
||||
handler->PSendSysMessage(LANG_ITEMLIST_AUCTION, itemGuid, ownerName, owner, ownerAccountId, itemPos);
|
||||
}
|
||||
while (result->NextRow());
|
||||
}
|
||||
@@ -327,7 +327,7 @@ public:
|
||||
|
||||
char const* itemPos = "[in guild bank]";
|
||||
|
||||
handler->PSendSysMessage(LANG_ITEMLIST_GUILD, itemGuid, guildName.c_str(), guildGuid, itemPos);
|
||||
handler->PSendSysMessage(LANG_ITEMLIST_GUILD, itemGuid, guildName, guildGuid, itemPos);
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
@@ -410,9 +410,9 @@ public:
|
||||
for (std::unordered_multimap<uint32, GameObject*>::const_iterator itr = goBounds.first; itr != goBounds.second;)
|
||||
{
|
||||
if (handler->GetSession())
|
||||
handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gInfo->name.c_str(), x, y, z, mapId, itr->second->GetGUID().ToString().c_str(), itr->second->isSpawned() ? "*" : " ");
|
||||
handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gInfo->name, x, y, z, mapId, itr->second->GetGUID().ToString(), itr->second->isSpawned() ? "*" : " ");
|
||||
else
|
||||
handler->PSendSysMessage(LANG_GO_LIST_CONSOLE, guid, gInfo->name.c_str(), x, y, z, mapId, itr->second->GetGUID().ToString().c_str(), itr->second->isSpawned() ? "*" : " ");
|
||||
handler->PSendSysMessage(LANG_GO_LIST_CONSOLE, guid, gInfo->name, x, y, z, mapId, itr->second->GetGUID().ToString(), itr->second->isSpawned() ? "*" : " ");
|
||||
++itr;
|
||||
}
|
||||
liveFound = true;
|
||||
@@ -422,9 +422,9 @@ public:
|
||||
if (!liveFound)
|
||||
{
|
||||
if (handler->GetSession())
|
||||
handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gInfo->name.c_str(), x, y, z, mapId, "", "");
|
||||
handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gInfo->name, x, y, z, mapId, "", "");
|
||||
else
|
||||
handler->PSendSysMessage(LANG_GO_LIST_CONSOLE, guid, gInfo->name.c_str(), x, y, z, mapId, "", "");
|
||||
handler->PSendSysMessage(LANG_GO_LIST_CONSOLE, guid, gInfo->name, x, y, z, mapId, "", "");
|
||||
}
|
||||
}
|
||||
while (result->NextRow());
|
||||
@@ -479,11 +479,11 @@ public:
|
||||
std::ostringstream ss_name;
|
||||
ss_name << "|cffffffff|Hspell:" << aura->GetId() << "|h[" << name << "]|h|r";
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_TARGET_AURADETAIL, aura->GetId(), (handler->GetSession() ? ss_name.str().c_str() : name),
|
||||
handler->PSendSysMessage(LANG_COMMAND_TARGET_AURADETAIL, aura->GetId(), (handler->GetSession() ? ss_name.str() : name),
|
||||
aurApp->GetEffectMask(), aura->GetCharges(), aura->GetStackAmount(), aurApp->GetSlot(),
|
||||
aura->GetDuration(), aura->GetMaxDuration(), (aura->IsPassive() ? passiveStr : ""),
|
||||
(talent ? talentStr : ""), aura->GetCasterGUID().IsPlayer() ? "player" : "creature",
|
||||
aura->GetCasterGUID().GetCounter());
|
||||
aura->GetCasterGUID().ToString());
|
||||
}
|
||||
|
||||
for (uint16 i = 0; i < TOTAL_AURAS; ++i)
|
||||
|
||||
@@ -211,11 +211,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name.c_str());
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name.c_str());
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -244,11 +244,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name.c_str());
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name.c_str());
|
||||
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -312,11 +312,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, id, id, eventData.description.c_str(), active);
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, id, id, eventData.description, active);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, id, eventData.description.c_str(), active);
|
||||
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, id, eventData.description, active);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -516,11 +516,13 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, ItemQualityColors[itemTemplate.Quality], itemTemplate.ItemId, name.c_str());
|
||||
std::ostringstream color;
|
||||
color << std::hex << ItemQualityColors[itemTemplate.Quality];
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, color.str(), itemTemplate.ItemId, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itemTemplate.ItemId, name.c_str());
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itemTemplate.ItemId, name);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -550,11 +552,13 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, ItemQualityColors[itemTemplate.Quality], itemTemplate.ItemId, name.c_str());
|
||||
std::ostringstream color;
|
||||
color << std::hex << ItemQualityColors[itemTemplate.Quality];
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, color.str(), itemTemplate.ItemId, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itemTemplate.ItemId, name.c_str());
|
||||
handler->PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itemTemplate.ItemId, name);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -640,11 +644,11 @@ public:
|
||||
// send item set in "id - [namedlink locale]" format
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEMSET_LIST_CHAT, id, id, name.c_str(), localeNames[locale]);
|
||||
handler->PSendSysMessage(LANG_ITEMSET_LIST_CHAT, id, id, name, localeNames[locale]);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEMSET_LIST_CONSOLE, id, name.c_str(), localeNames[locale]);
|
||||
handler->PSendSysMessage(LANG_ITEMSET_LIST_CONSOLE, id, name, localeNames[locale]);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -703,11 +707,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, gameObjectTemplate.entry, gameObjectTemplate.entry, name.c_str());
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, gameObjectTemplate.entry, gameObjectTemplate.entry, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, gameObjectTemplate.entry, name.c_str());
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, gameObjectTemplate.entry, name);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -736,11 +740,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, gameObjectTemplate.entry, gameObjectTemplate.entry, name.c_str());
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, gameObjectTemplate.entry, gameObjectTemplate.entry, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, gameObjectTemplate.entry, name.c_str());
|
||||
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, gameObjectTemplate.entry, name);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -826,11 +830,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title.c_str(), statusStr);
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title, statusStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title.c_str(), statusStr);
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title, statusStr);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -882,11 +886,11 @@ public:
|
||||
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title.c_str(), statusStr);
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title, statusStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title.c_str(), statusStr);
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title, statusStr);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -987,11 +991,11 @@ public:
|
||||
// send skill in "id - [namedlink locale]" format
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_SKILL_LIST_CHAT, skillInfo->id, skillInfo->id, name.c_str(), localeNames[locale], knownStr.c_str(), valStr.c_str());
|
||||
handler->PSendSysMessage(LANG_SKILL_LIST_CHAT, skillInfo->id, skillInfo->id, name, localeNames[locale], knownStr, valStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_SKILL_LIST_CONSOLE, skillInfo->id, name.c_str(), localeNames[locale], knownStr.c_str(), valStr.c_str());
|
||||
handler->PSendSysMessage(LANG_SKILL_LIST_CONSOLE, skillInfo->id, name, localeNames[locale], knownStr, valStr);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -1341,12 +1345,12 @@ public:
|
||||
// send taxinode in "id - [name] (Map:m X:x Y:y Z:z)" format
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CHAT, nodeEntry->ID, nodeEntry->ID, name.c_str(), localeNames[locale],
|
||||
handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CHAT, nodeEntry->ID, nodeEntry->ID, name, localeNames[locale],
|
||||
nodeEntry->map_id, nodeEntry->x, nodeEntry->y, nodeEntry->z);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CONSOLE, nodeEntry->ID, name.c_str(), localeNames[locale],
|
||||
handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CONSOLE, nodeEntry->ID, name, localeNames[locale],
|
||||
nodeEntry->map_id, nodeEntry->x, nodeEntry->y, nodeEntry->z);
|
||||
}
|
||||
|
||||
@@ -1416,7 +1420,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_TELE_LOCATION, reply.str().c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_TELE_LOCATION, reply.str());
|
||||
}
|
||||
|
||||
if (limitReached)
|
||||
@@ -1675,7 +1679,7 @@ public:
|
||||
|
||||
if (result2)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_LOOKUP_PLAYER_ACCOUNT, accountName.c_str(), accountId);
|
||||
handler->PSendSysMessage(LANG_LOOKUP_PLAYER_ACCOUNT, accountName, accountId);
|
||||
|
||||
do
|
||||
{
|
||||
@@ -1694,11 +1698,11 @@ public:
|
||||
|
||||
if (plevel > 0 && prace > 0 && prace <= RACE_DRAENEI && pclass > 0 && pclass <= CLASS_DRUID)
|
||||
{
|
||||
handler->PSendSysMessage(" %s (GUID %u) - %s - %s - %u%s", name.c_str(), guid, EnumUtils::ToTitle(Races(prace)), EnumUtils::ToTitle(Classes(pclass)), plevel, (online ? " - [ONLINE]" : ""));
|
||||
handler->PSendSysMessage(" {} (GUID {}) - {} - {} - {}{}", name, guid, EnumUtils::ToTitle(Races(prace)), EnumUtils::ToTitle(Classes(pclass)), plevel, (online ? " - [ONLINE]" : ""));
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_LOOKUP_PLAYER_CHARACTER, name.c_str(), guid);
|
||||
handler->PSendSysMessage(LANG_LOOKUP_PLAYER_CHARACTER, name, guid);
|
||||
}
|
||||
|
||||
++counter;
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
if (message.empty())
|
||||
return false;
|
||||
|
||||
sWorld->SendServerMessage(SERVER_MSG_STRING, Acore::StringFormat(handler->GetAcoreString(LANG_SYSTEMMESSAGE), message.data()).c_str());
|
||||
sWorld->SendServerMessage(SERVER_MSG_STRING, Acore::StringFormatFmt(handler->GetAcoreString(LANG_SYSTEMMESSAGE), message.data()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -357,43 +357,43 @@ public:
|
||||
switch (error)
|
||||
{
|
||||
case 1:
|
||||
handler->PSendSysMessage("Player %s not found.", last_name.c_str());
|
||||
handler->PSendSysMessage("Player {} not found.", last_name);
|
||||
break;
|
||||
case 2:
|
||||
handler->PSendSysMessage("Player %s is being teleported.", last_name.c_str());
|
||||
handler->PSendSysMessage("Player {} is being teleported.", last_name);
|
||||
break;
|
||||
case 3:
|
||||
handler->PSendSysMessage("Player %s is in instance/battleground/arena.", last_name.c_str());
|
||||
handler->PSendSysMessage("Player {} is in instance/battleground/arena.", last_name);
|
||||
break;
|
||||
case 4:
|
||||
handler->PSendSysMessage("Player %s is in LFG system.", last_name.c_str());
|
||||
handler->PSendSysMessage("Player {} is in LFG system.", last_name);
|
||||
break;
|
||||
case 5:
|
||||
handler->PSendSysMessage("Player %s is queued for battleground/arena.", last_name.c_str());
|
||||
handler->PSendSysMessage("Player {} is queued for battleground/arena.", last_name);
|
||||
break;
|
||||
case 6:
|
||||
handler->PSendSysMessage("Player %s is not in group.", last_name.c_str());
|
||||
handler->PSendSysMessage("Player {} is not in group.", last_name);
|
||||
break;
|
||||
case 7:
|
||||
handler->PSendSysMessage("Player %s is not in normal group.", last_name.c_str());
|
||||
handler->PSendSysMessage("Player {} is not in normal group.", last_name);
|
||||
break;
|
||||
case 8:
|
||||
handler->PSendSysMessage("Group of player %s has invalid member count.", last_name.c_str());
|
||||
handler->PSendSysMessage("Group of player {} has invalid member count.", last_name);
|
||||
break;
|
||||
case 9:
|
||||
handler->PSendSysMessage("Players %s are not in the same group.", last_name.c_str());
|
||||
handler->PSendSysMessage("Players {} are not in the same group.", last_name);
|
||||
break;
|
||||
case 10:
|
||||
handler->PSendSysMessage("Player %s is in flight.", last_name.c_str());
|
||||
handler->PSendSysMessage("Player {} is in flight.", last_name);
|
||||
break;
|
||||
case 11:
|
||||
handler->PSendSysMessage("Player %s is dead.", last_name.c_str());
|
||||
handler->PSendSysMessage("Player {} is dead.", last_name);
|
||||
break;
|
||||
case 12:
|
||||
handler->PSendSysMessage("Player %s is in a group.", last_name.c_str());
|
||||
handler->PSendSysMessage("Player {} is in a group.", last_name);
|
||||
break;
|
||||
case 13:
|
||||
handler->PSendSysMessage("Player %s occurs more than once.", last_name.c_str());
|
||||
handler->PSendSysMessage("Player {} occurs more than once.", last_name);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -724,7 +724,7 @@ public:
|
||||
// only allow if gm mode is on
|
||||
if (!_player->IsGameMaster())
|
||||
{
|
||||
handler->SendErrorMessage(LANG_CANNOT_GO_TO_BG_GM, nameLink.c_str());
|
||||
handler->SendErrorMessage(LANG_CANNOT_GO_TO_BG_GM, nameLink);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -745,7 +745,7 @@ public:
|
||||
// we are in group, we can go only if we are in the player group
|
||||
if (_player->GetGroup() != targetPlayer->GetGroup())
|
||||
{
|
||||
handler->SendErrorMessage(LANG_CANNOT_GO_TO_INST_PARTY, nameLink.c_str());
|
||||
handler->SendErrorMessage(LANG_CANNOT_GO_TO_INST_PARTY, nameLink);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -754,7 +754,7 @@ public:
|
||||
// we are not in group, let's verify our GM mode
|
||||
if (!_player->IsGameMaster())
|
||||
{
|
||||
handler->SendErrorMessage(LANG_CANNOT_GO_TO_INST_GM, nameLink.c_str());
|
||||
handler->SendErrorMessage(LANG_CANNOT_GO_TO_INST_GM, nameLink);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -779,7 +779,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_APPEARING_AT, nameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_APPEARING_AT, nameLink);
|
||||
|
||||
// stop flight if need
|
||||
if (_player->IsInFlight())
|
||||
@@ -805,7 +805,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_APPEARING_AT, nameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_APPEARING_AT, nameLink);
|
||||
|
||||
// to point where player stay (if loaded)
|
||||
float x, y, z, o;
|
||||
@@ -869,7 +869,7 @@ public:
|
||||
|
||||
if (targetPlayer->IsBeingTeleported())
|
||||
{
|
||||
handler->SendErrorMessage(LANG_IS_TELEPORTED, nameLink.c_str());
|
||||
handler->SendErrorMessage(LANG_IS_TELEPORTED, nameLink);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -906,15 +906,15 @@ public:
|
||||
(handler->GetSession()->GetPlayer()->GetGroup()->GetLeaderGUID() != handler->GetSession()->GetPlayer()->GetGUID()))
|
||||
// the last check is a bit excessive, but let it be, just in case
|
||||
{
|
||||
handler->SendErrorMessage(LANG_CANNOT_SUMMON_TO_INST, nameLink.c_str());
|
||||
handler->SendErrorMessage(LANG_CANNOT_SUMMON_TO_INST, nameLink);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), "");
|
||||
handler->PSendSysMessage(LANG_SUMMONING, nameLink, "");
|
||||
if (handler->needReportToTarget(targetPlayer))
|
||||
{
|
||||
ChatHandler(targetPlayer->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->playerLink(_player->GetName()).c_str());
|
||||
ChatHandler(targetPlayer->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->playerLink(_player->GetName()));
|
||||
}
|
||||
|
||||
// stop flight if need
|
||||
@@ -942,7 +942,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), handler->GetAcoreString(LANG_OFFLINE));
|
||||
handler->PSendSysMessage(LANG_SUMMONING, nameLink, handler->GetAcoreString(LANG_OFFLINE));
|
||||
|
||||
// in point where GM stay
|
||||
Player::SavePositionInDB(handler->GetSession()->GetPlayer()->GetMapId(),
|
||||
@@ -984,7 +984,7 @@ public:
|
||||
|
||||
if (!group)
|
||||
{
|
||||
handler->SendErrorMessage(LANG_NOT_IN_GROUP, nameLink.c_str());
|
||||
handler->SendErrorMessage(LANG_NOT_IN_GROUP, nameLink);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1020,7 +1020,7 @@ public:
|
||||
|
||||
if (player->IsBeingTeleported())
|
||||
{
|
||||
handler->SendErrorMessage(LANG_IS_TELEPORTED, plNameLink.c_str());
|
||||
handler->SendErrorMessage(LANG_IS_TELEPORTED, plNameLink);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1031,15 +1031,15 @@ public:
|
||||
if (playerMap->Instanceable() && playerMap->GetInstanceId() != gmMap->GetInstanceId())
|
||||
{
|
||||
// cannot summon from instance to instance
|
||||
handler->SendErrorMessage(LANG_CANNOT_SUMMON_TO_INST, plNameLink.c_str());
|
||||
handler->SendErrorMessage(LANG_CANNOT_SUMMON_TO_INST, plNameLink);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_SUMMONING, plNameLink.c_str(), "");
|
||||
handler->PSendSysMessage(LANG_SUMMONING, plNameLink, "");
|
||||
if (handler->needReportToTarget(player))
|
||||
{
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink().c_str());
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink());
|
||||
}
|
||||
|
||||
// stop flight if need
|
||||
@@ -1169,7 +1169,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_OBJECT_GUID, guid.ToString().c_str());
|
||||
handler->PSendSysMessage(LANG_OBJECT_GUID, guid.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1199,7 +1199,7 @@ public:
|
||||
if (!spell)
|
||||
{
|
||||
target->RemoveAllSpellCooldown();
|
||||
handler->PSendSysMessage(LANG_REMOVEALL_COOLDOWN, nameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_REMOVEALL_COOLDOWN, nameLink);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1210,7 +1210,7 @@ public:
|
||||
}
|
||||
|
||||
target->RemoveSpellCooldown(spell.value()->Id, true);
|
||||
handler->PSendSysMessage(LANG_REMOVE_COOLDOWN, spell.value()->Id, target == handler->GetSession()->GetPlayer() ? handler->GetAcoreString(LANG_YOU) : nameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_REMOVE_COOLDOWN, spell.value()->Id, target == handler->GetSession()->GetPlayer() ? handler->GetAcoreString(LANG_YOU) : nameLink);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1265,7 +1265,7 @@ public:
|
||||
|
||||
if (targetPlayer->IsBeingTeleported())
|
||||
{
|
||||
handler->SendErrorMessage(LANG_IS_TELEPORTED, handler->playerLink(target->GetName()).c_str());
|
||||
handler->SendErrorMessage(LANG_IS_TELEPORTED, handler->playerLink(target->GetName()));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1357,7 +1357,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_KICKMESSAGE, target->GetName().c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_KICKMESSAGE, target->GetName());
|
||||
}
|
||||
|
||||
targetPlayer->GetSession()->KickPlayer("HandleKickPlayerCommand");
|
||||
@@ -1550,7 +1550,7 @@ public:
|
||||
team_name = handler->GetAcoreString(LANG_COMMAND_GRAVEYARD_ALLIANCE);
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDNEAREST, graveyardId, team_name.c_str(), zone_id);
|
||||
handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDNEAREST, graveyardId, team_name, zone_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1569,7 +1569,7 @@ public:
|
||||
team_name = handler->GetAcoreString(LANG_COMMAND_GRAVEYARD_ALLIANCE);
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_ZONENOGRAFACTION, zone_id, team_name.c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_ZONENOGRAFACTION, zone_id, team_name);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1674,21 +1674,21 @@ public:
|
||||
if (!playerTarget->HasItemCount(itemId, 0))
|
||||
{
|
||||
// output that player don't have any items to destroy
|
||||
handler->SendErrorMessage(LANG_REMOVEITEM_FAILURE, handler->GetNameLink(playerTarget).c_str(), itemId);
|
||||
handler->SendErrorMessage(LANG_REMOVEITEM_FAILURE, handler->GetNameLink(playerTarget), itemId);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!playerTarget->HasItemCount(itemId, -count))
|
||||
{
|
||||
// output that player don't have as many items that you want to destroy
|
||||
handler->SendErrorMessage(LANG_REMOVEITEM_ERROR, handler->GetNameLink(playerTarget).c_str(), itemId);
|
||||
handler->SendErrorMessage(LANG_REMOVEITEM_ERROR, handler->GetNameLink(playerTarget), itemId);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// output successful amount of destroyed items
|
||||
playerTarget->DestroyItemCount(itemId, -count, true, false);
|
||||
handler->PSendSysMessage(LANG_REMOVEITEM, itemId, -count, handler->GetNameLink(playerTarget).c_str());
|
||||
handler->PSendSysMessage(LANG_REMOVEITEM, itemId, -count, handler->GetNameLink(playerTarget));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1883,7 +1883,7 @@ public:
|
||||
// add the skill to the player's book with step 1 (which is the first rank, in most cases something
|
||||
// like 'Apprentice <skill>'.
|
||||
target->SetSkill(skillID, targetHasSkill ? target->GetSkillStep(skillID) : 1, level, max);
|
||||
handler->PSendSysMessage(LANG_SET_SKILL, skillID, skillLine->name[handler->GetSessionDbcLocale()], handler->GetNameLink(target).c_str(), level, max);
|
||||
handler->PSendSysMessage(LANG_SET_SKILL, skillID, skillLine->name[handler->GetSessionDbcLocale()], handler->GetNameLink(target), level, max);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2131,7 +2131,7 @@ public:
|
||||
|
||||
// Initiate output
|
||||
// Output I. LANG_PINFO_PLAYER
|
||||
handler->PSendSysMessage(LANG_PINFO_PLAYER, playerTarget ? "" : handler->GetAcoreString(LANG_OFFLINE), nameLink.c_str(), target->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage(LANG_PINFO_PLAYER, playerTarget ? "" : handler->GetAcoreString(LANG_OFFLINE), nameLink, target->GetGUID().ToString());
|
||||
|
||||
// Output II. LANG_PINFO_GM_ACTIVE if character is gamemaster
|
||||
if (playerTarget && playerTarget->IsGameMaster())
|
||||
@@ -2142,29 +2142,29 @@ public:
|
||||
// Output III. LANG_PINFO_BANNED if ban exists and is applied
|
||||
if (banTime >= 0)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_PINFO_BANNED, banType.c_str(), banReason.c_str(), banTime > 0 ? secsToTimeString(banTime - GameTime::GetGameTime().count(), true).c_str() : handler->GetAcoreString(LANG_PERMANENTLY), bannedBy.c_str());
|
||||
handler->PSendSysMessage(LANG_PINFO_BANNED, banType, banReason, banTime > 0 ? secsToTimeString(banTime - GameTime::GetGameTime().count(), true) : handler->GetAcoreString(LANG_PERMANENTLY), bannedBy);
|
||||
}
|
||||
|
||||
// Output IV. LANG_PINFO_MUTED if mute is applied
|
||||
if (muteTime > 0)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_PINFO_MUTED, muteReason.c_str(), secsToTimeString(muteTime - GameTime::GetGameTime().count(), true).c_str(), muteBy.c_str());
|
||||
handler->PSendSysMessage(LANG_PINFO_MUTED, muteReason, secsToTimeString(muteTime - GameTime::GetGameTime().count(), true), muteBy);
|
||||
}
|
||||
|
||||
// Output V. LANG_PINFO_ACC_ACCOUNT
|
||||
handler->PSendSysMessage(LANG_PINFO_ACC_ACCOUNT, userName.c_str(), accId, security);
|
||||
handler->PSendSysMessage(LANG_PINFO_ACC_ACCOUNT, userName, accId, security);
|
||||
|
||||
// Output VI. LANG_PINFO_ACC_LASTLOGIN
|
||||
handler->PSendSysMessage(LANG_PINFO_ACC_LASTLOGIN, lastLogin.c_str(), failedLogins);
|
||||
handler->PSendSysMessage(LANG_PINFO_ACC_LASTLOGIN, lastLogin, failedLogins);
|
||||
|
||||
// Output VII. LANG_PINFO_ACC_OS
|
||||
handler->PSendSysMessage(LANG_PINFO_ACC_OS, OS.c_str(), latency);
|
||||
handler->PSendSysMessage(LANG_PINFO_ACC_OS, OS, latency);
|
||||
|
||||
// Output VIII. LANG_PINFO_ACC_REGMAILS
|
||||
handler->PSendSysMessage(LANG_PINFO_ACC_REGMAILS, regMail.c_str(), eMail.c_str());
|
||||
handler->PSendSysMessage(LANG_PINFO_ACC_REGMAILS, regMail, eMail);
|
||||
|
||||
// Output IX. LANG_PINFO_ACC_IP
|
||||
handler->PSendSysMessage(LANG_PINFO_ACC_IP, lastIp.c_str(), locked ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO));
|
||||
handler->PSendSysMessage(LANG_PINFO_ACC_IP, lastIp, locked ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO));
|
||||
|
||||
// Output X. LANG_PINFO_CHR_LEVEL
|
||||
if (level != sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
@@ -2245,10 +2245,10 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_RACE, (gender == 0 ? handler->GetAcoreString(LANG_CHARACTER_GENDER_MALE) : handler->GetAcoreString(LANG_CHARACTER_GENDER_FEMALE)), raceStr.c_str(), classStr.c_str());
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_RACE, (gender == 0 ? handler->GetAcoreString(LANG_CHARACTER_GENDER_MALE) : handler->GetAcoreString(LANG_CHARACTER_GENDER_FEMALE)), raceStr, classStr);
|
||||
|
||||
// Output XII. LANG_PINFO_CHR_ALIVE
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_ALIVE, alive.c_str());
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_ALIVE, alive);
|
||||
|
||||
// Output XIII. LANG_PINFO_CHR_PHASE if player is not in GM mode (GM is in every phase)
|
||||
if (playerTarget && !playerTarget->IsGameMaster()) // IsInWorld() returns false on loadingscreen, so it's more
|
||||
@@ -2296,22 +2296,22 @@ public:
|
||||
// Output XVII. - XVIX. if they are not empty
|
||||
if (!guildName.empty())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD, guildName.c_str(), guildId);
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD_RANK, guildRank.c_str(), uint32(guildRankId));
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD, guildName, guildId);
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD_RANK, guildRank, uint32(guildRankId));
|
||||
|
||||
if (!note.empty())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD_NOTE, note.c_str());
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD_NOTE, note);
|
||||
}
|
||||
|
||||
if (!officeNote.empty())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD_ONOTE, officeNote.c_str());
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD_ONOTE, officeNote);
|
||||
}
|
||||
}
|
||||
|
||||
// Output XX. LANG_PINFO_CHR_PLAYEDTIME
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_PLAYEDTIME, (secsToTimeString(totalPlayerTime, true)).c_str());
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_PLAYEDTIME, (secsToTimeString(totalPlayerTime, true)));
|
||||
|
||||
// Mail Data - an own query, because it may or may not be useful.
|
||||
// SQL: "SELECT SUM(CASE WHEN (checked & 1) THEN 1 ELSE 0 END) AS 'readmail', COUNT(*) AS 'totalmail' FROM mail WHERE `receiver` = ?"
|
||||
@@ -2458,7 +2458,7 @@ public:
|
||||
sWorld->SendWorldText(LANG_COMMAND_MUTEMESSAGE_WORLD, muteBy.c_str(), nameLink.c_str(), secsToTimeString(muteDuration, true).c_str(), muteReasonStr.c_str());
|
||||
}
|
||||
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, secsToTimeString(muteDuration, true).c_str(), muteBy.c_str(), muteReasonStr.c_str());
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, secsToTimeString(muteDuration, true), muteBy, muteReasonStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2492,7 +2492,7 @@ public:
|
||||
for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
if (itr->second->GetSession()->GetSecurity())
|
||||
ChatHandler(itr->second->GetSession()).PSendSysMessage(target ? LANG_YOU_DISABLE_CHAT : LANG_COMMAND_DISABLE_CHAT_DELAYED,
|
||||
(handler->GetSession() ? handler->GetSession()->GetPlayerName().c_str() : handler->GetAcoreString(LANG_CONSOLE)), nameLink.c_str(), secsToTimeString(muteDuration, true).c_str(), muteReasonStr.c_str());
|
||||
(handler->GetSession() ? handler->GetSession()->GetPlayerName() : handler->GetAcoreString(LANG_CONSOLE)), nameLink, secsToTimeString(muteDuration, true), muteReasonStr);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -2552,7 +2552,7 @@ public:
|
||||
ChatHandler(playerTarget->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_ENABLED);
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_ENABLE_CHAT, handler->playerLink(target->GetName().c_str()));
|
||||
handler->PSendSysMessage(LANG_YOU_ENABLE_CHAT, handler->playerLink(target->GetName()));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -2562,14 +2562,14 @@ public:
|
||||
{
|
||||
if (!Utf8ToUpperOnlyLatin(accountName))
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 accountId = AccountMgr::GetId(accountName);
|
||||
if (!accountId)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2593,7 +2593,7 @@ public:
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
handler->PSendSysMessage(LANG_COMMAND_MUTEHISTORY_OUTPUT, Acore::Time::TimeToHumanReadable(Seconds(fields[0].Get<uint32>())).c_str(), fields[1].Get<uint32>(), fields[2].Get<std::string>().c_str(), fields[3].Get<std::string>().c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_MUTEHISTORY_OUTPUT, Acore::Time::TimeToHumanReadable(Seconds(fields[0].Get<uint32>())), fields[1].Get<uint32>(), fields[2].Get<std::string>(), fields[3].Get<std::string>());
|
||||
} while (result->NextRow());
|
||||
|
||||
return true;
|
||||
@@ -2608,7 +2608,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_LIST, (unit->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), unit->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_LIST, (unit->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), unit->GetGUID().ToString());
|
||||
|
||||
MotionMaster* motionMaster = unit->GetMotionMaster();
|
||||
float x, y, z;
|
||||
@@ -2658,11 +2658,11 @@ public:
|
||||
}
|
||||
else if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_CHASE_PLAYER, target->GetName().c_str(), target->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_CHASE_PLAYER, target->GetName(), target->GetGUID().ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_CHASE_CREATURE, target->GetName().c_str(), target->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_CHASE_CREATURE, target->GetName(), target->GetGUID().ToString());
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2684,11 +2684,11 @@ public:
|
||||
}
|
||||
else if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_FOLLOW_PLAYER, target->GetName().c_str(), target->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_FOLLOW_PLAYER, target->GetName(), target->GetGUID().ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_FOLLOW_CREATURE, target->GetName().c_str(), target->GetGUID().GetCounter());
|
||||
handler->PSendSysMessage(LANG_MOVEGENS_FOLLOW_CREATURE, target->GetName(), target->GetGUID().ToString());
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2841,7 +2841,7 @@ public:
|
||||
Player* playerTarget = target->GetConnectedPlayer();
|
||||
if (playerTarget && !creatureTarget)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_FREEZE, target->GetName().c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_FREEZE, target->GetName());
|
||||
|
||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_FREEZE))
|
||||
{
|
||||
@@ -2852,7 +2852,7 @@ public:
|
||||
}
|
||||
else if (creatureTarget && creatureTarget->IsAlive())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_FREEZE, GetLocalizeCreatureName(creatureTarget, handler->GetSessionDbcLocale()).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_FREEZE, GetLocalizeCreatureName(creatureTarget, handler->GetSessionDbcLocale()));
|
||||
|
||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_FREEZE))
|
||||
{
|
||||
@@ -2885,13 +2885,13 @@ public:
|
||||
|
||||
if (!creatureTarget && playerTarget && playerTarget->HasAura(SPELL_FREEZE))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_UNFREEZE, target->GetName().c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_UNFREEZE, target->GetName());
|
||||
playerTarget->RemoveAurasDueToSpell(SPELL_FREEZE);
|
||||
return true;
|
||||
}
|
||||
else if (creatureTarget && creatureTarget->HasAura(SPELL_FREEZE))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_UNFREEZE, GetLocalizeCreatureName(creatureTarget, handler->GetSessionDbcLocale()).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_UNFREEZE, GetLocalizeCreatureName(creatureTarget, handler->GetSessionDbcLocale()));
|
||||
creatureTarget->RemoveAurasDueToSpell(SPELL_FREEZE);
|
||||
return true;
|
||||
}
|
||||
@@ -2900,7 +2900,7 @@ public:
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_AURA_FROZEN);
|
||||
stmt->SetData(0, target->GetGUID().GetCounter());
|
||||
CharacterDatabase.Execute(stmt);
|
||||
handler->PSendSysMessage(LANG_COMMAND_UNFREEZE, target->GetName().c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_UNFREEZE, target->GetName());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,17 +105,17 @@ public:
|
||||
bool result = path.CalculatePath(x, y, z, false);
|
||||
|
||||
Movement::PointsArray const& pointPath = path.GetPath();
|
||||
handler->PSendSysMessage("%s's path to %s:", target->GetName().c_str(), player->GetName().c_str());
|
||||
handler->PSendSysMessage("Building: %s", useStraightPath ? "StraightPath" : useRaycast ? "Raycast" : "SmoothPath");
|
||||
handler->PSendSysMessage(Acore::StringFormatFmt("Result: {} - Length: {} - Type: {}", (result ? "true" : "false"), pointPath.size(), path.GetPathType()).c_str());
|
||||
handler->PSendSysMessage("{}'s path to {}:", target->GetName(), player->GetName());
|
||||
handler->PSendSysMessage("Building: {}", useStraightPath ? "StraightPath" : useRaycast ? "Raycast" : "SmoothPath");
|
||||
handler->PSendSysMessage("Result: {} - Length: {} - Type: {}", (result ? "true" : "false"), pointPath.size(), path.GetPathType());
|
||||
|
||||
G3D::Vector3 const& start = path.GetStartPosition();
|
||||
G3D::Vector3 const& end = path.GetEndPosition();
|
||||
G3D::Vector3 const& actualEnd = path.GetActualEndPosition();
|
||||
|
||||
handler->PSendSysMessage("StartPosition (%.3f, %.3f, %.3f)", start.x, start.y, start.z);
|
||||
handler->PSendSysMessage("EndPosition (%.3f, %.3f, %.3f)", end.x, end.y, end.z);
|
||||
handler->PSendSysMessage("ActualEndPosition (%.3f, %.3f, %.3f)", actualEnd.x, actualEnd.y, actualEnd.z);
|
||||
handler->PSendSysMessage("StartPosition ({}, {}, {})", start.x, start.y, start.z);
|
||||
handler->PSendSysMessage("EndPosition ({}, {}, {})", end.x, end.y, end.z);
|
||||
handler->PSendSysMessage("ActualEndPosition ({}, {}, {})", actualEnd.x, actualEnd.y, actualEnd.z);
|
||||
|
||||
if (!player->IsGameMaster())
|
||||
handler->PSendSysMessage("Enable GM mode to see the path points.");
|
||||
@@ -136,8 +136,8 @@ public:
|
||||
int32 gx = 32 - player->GetPositionX() / SIZE_OF_GRIDS;
|
||||
int32 gy = 32 - player->GetPositionY() / SIZE_OF_GRIDS;
|
||||
|
||||
handler->PSendSysMessage("%03u%02i%02i.mmtile", player->GetMapId(), gx, gy);
|
||||
handler->PSendSysMessage("gridloc [%i, %i]", gy, gx);
|
||||
handler->PSendSysMessage("{}{}{}.mmtile", player->GetMapId(), gx, gy);
|
||||
handler->PSendSysMessage("gridloc [{}, {}]", gy, gx);
|
||||
|
||||
// calculate navmesh tile location
|
||||
dtNavMesh const* navmesh = MMAP::MMapFactory::createOrGetMMapMgr()->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId());
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
int32 tilex = int32((y - min[0]) / SIZE_OF_GRIDS);
|
||||
int32 tiley = int32((x - min[2]) / SIZE_OF_GRIDS);
|
||||
|
||||
handler->PSendSysMessage("Calc [%02i, %02i]", tilex, tiley);
|
||||
handler->PSendSysMessage("Calc [{}, {}]", tilex, tiley);
|
||||
|
||||
// navmesh poly -> navmesh tile location
|
||||
dtQueryFilterExt filter = dtQueryFilterExt();
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
{
|
||||
if (tile)
|
||||
{
|
||||
handler->PSendSysMessage("Dt [%02i,%02i]", tile->header->x, tile->header->y);
|
||||
handler->PSendSysMessage("Dt [{},{}]", tile->header->x, tile->header->y);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
if (!tile || !tile->header)
|
||||
continue;
|
||||
|
||||
handler->PSendSysMessage("[%02i, %02i]", tile->header->x, tile->header->y);
|
||||
handler->PSendSysMessage("[{}, {}]", tile->header->x, tile->header->y);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
//handler->PSendSysMessage(" global mmap pathfinding is %sabled", DisableMgr::IsPathfindingEnabled(mapId) ? "en" : "dis");
|
||||
|
||||
MMAP::MMapMgr* manager = MMAP::MMapFactory::createOrGetMMapMgr();
|
||||
handler->PSendSysMessage(" %u maps loaded with %u tiles overall", manager->getLoadedMapsCount(), manager->getLoadedTilesCount());
|
||||
handler->PSendSysMessage(" {} maps loaded with {} tiles overall", manager->getLoadedMapsCount(), manager->getLoadedTilesCount());
|
||||
|
||||
dtNavMesh const* navmesh = manager->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId());
|
||||
if (!navmesh)
|
||||
@@ -252,11 +252,11 @@ public:
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("Navmesh stats:");
|
||||
handler->PSendSysMessage(" %u tiles loaded", tileCount);
|
||||
handler->PSendSysMessage(" %u BVTree nodes", nodeCount);
|
||||
handler->PSendSysMessage(" %u polygons (%u vertices)", polyCount, vertCount);
|
||||
handler->PSendSysMessage(" %u triangles (%u vertices)", triCount, triVertCount);
|
||||
handler->PSendSysMessage(" %.2f MB of data (not including pointers)", ((float)dataSize / sizeof(unsigned char)) / 1048576);
|
||||
handler->PSendSysMessage(" {} tiles loaded", tileCount);
|
||||
handler->PSendSysMessage(" {} BVTree nodes", nodeCount);
|
||||
handler->PSendSysMessage(" {} polygons ({} vertices)", polyCount, vertCount);
|
||||
handler->PSendSysMessage(" {} triangles ({} vertices)", triCount, triVertCount);
|
||||
handler->PSendSysMessage(" {} MB of data (not including pointers)", ((float)dataSize / sizeof(unsigned char)) / 1048576);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -274,7 +274,7 @@ public:
|
||||
|
||||
if (!creatureList.empty())
|
||||
{
|
||||
handler->PSendSysMessage(Acore::StringFormatFmt("Found {} Creatures.", creatureList.size()).c_str());
|
||||
handler->PSendSysMessage("Found {} Creatures.", creatureList.size());
|
||||
|
||||
uint32 paths = 0;
|
||||
uint32 uStartTime = getMSTime();
|
||||
@@ -289,10 +289,10 @@ public:
|
||||
}
|
||||
|
||||
uint32 uPathLoadTime = getMSTimeDiff(uStartTime, getMSTime());
|
||||
handler->PSendSysMessage("Generated %i paths in %i ms", paths, uPathLoadTime);
|
||||
handler->PSendSysMessage("Generated {} paths in {} ms", paths, uPathLoadTime);
|
||||
}
|
||||
else
|
||||
handler->PSendSysMessage("No creatures in %f yard range.", radius);
|
||||
handler->PSendSysMessage("No creatures in {} yard range.", radius);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -94,11 +94,11 @@ public:
|
||||
{
|
||||
if (Player* player = target->ToPlayer())
|
||||
{
|
||||
handler->PSendSysMessage(resourceMessage, std::forward<Args>(args)..., handler->GetNameLink(player).c_str());
|
||||
handler->PSendSysMessage(resourceMessage, std::forward<Args>(args)..., handler->GetNameLink(player));
|
||||
|
||||
if (handler->needReportToTarget(player))
|
||||
{
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(resourceReportMessage, handler->GetNameLink().c_str(), std::forward<Args>(args)...);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(resourceReportMessage, handler->GetNameLink(), std::forward<Args>(args)...);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,11 +135,11 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_HP, handler->GetNameLink(target).c_str(), healthPoints, healthPoints);
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_HP, handler->GetNameLink(target), healthPoints, healthPoints);
|
||||
|
||||
if (handler->needReportToTarget(target))
|
||||
{
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_HP_CHANGED, handler->GetNameLink().c_str(), healthPoints, healthPoints);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_HP_CHANGED, handler->GetNameLink(), healthPoints, healthPoints);
|
||||
}
|
||||
|
||||
target->SetMaxHealth(healthPoints);
|
||||
@@ -158,11 +158,11 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_MANA, handler->GetNameLink(target).c_str(), manaPoints, manaPoints);
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_MANA, handler->GetNameLink(target), manaPoints, manaPoints);
|
||||
|
||||
if (handler->needReportToTarget(target))
|
||||
{
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MANA_CHANGED, handler->GetNameLink().c_str(), manaPoints, manaPoints);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MANA_CHANGED, handler->GetNameLink(), manaPoints, manaPoints);
|
||||
}
|
||||
|
||||
target->SetMaxPower(POWER_MANA, manaPoints);
|
||||
@@ -183,11 +183,11 @@ public:
|
||||
|
||||
energyPoints *= 10;
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_ENERGY, handler->GetNameLink(target).c_str(), energyPoints / 10, energyPoints / 10);
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_ENERGY, handler->GetNameLink(target), energyPoints / 10, energyPoints / 10);
|
||||
|
||||
if (handler->needReportToTarget(target))
|
||||
{
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, handler->GetNameLink().c_str(), energyPoints / 10, energyPoints / 10);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, handler->GetNameLink(), energyPoints / 10, energyPoints / 10);
|
||||
}
|
||||
|
||||
target->SetMaxPower(POWER_ENERGY, energyPoints);
|
||||
@@ -210,11 +210,11 @@ public:
|
||||
|
||||
ragePoints *= 10;
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_RAGE, handler->GetNameLink(target).c_str(), ragePoints / 10, ragePoints / 10);
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_RAGE, handler->GetNameLink(target), ragePoints / 10, ragePoints / 10);
|
||||
|
||||
if (handler->needReportToTarget(target))
|
||||
{
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, handler->GetNameLink().c_str(), ragePoints / 10, ragePoints / 10);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, handler->GetNameLink(), ragePoints / 10, ragePoints / 10);
|
||||
}
|
||||
|
||||
target->SetMaxPower(POWER_RAGE, ragePoints);
|
||||
@@ -235,11 +235,11 @@ public:
|
||||
|
||||
runePoints *= 10;
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_RUNIC_POWER, handler->GetNameLink(target).c_str(), runePoints / 10, runePoints / 10);
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_RUNIC_POWER, handler->GetNameLink(target), runePoints / 10, runePoints / 10);
|
||||
|
||||
if (handler->needReportToTarget(target))
|
||||
{
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, handler->GetNameLink().c_str(), runePoints / 10, runePoints / 10);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, handler->GetNameLink(), runePoints / 10, runePoints / 10);
|
||||
}
|
||||
|
||||
target->SetMaxPower(POWER_RUNIC_POWER, runePoints);
|
||||
@@ -264,7 +264,7 @@ public:
|
||||
uint32 flag = target->GetUnitFlags();
|
||||
uint32 npcflag = target->GetNpcFlags();
|
||||
uint32 dyflag = target->GetDynamicFlags();
|
||||
handler->PSendSysMessage(LANG_CURRENT_FACTION, target->GetGUID().GetCounter(), factionid, flag, npcflag, dyflag);
|
||||
handler->PSendSysMessage(LANG_CURRENT_FACTION, target->GetGUID().ToString(), factionid, flag, npcflag, dyflag);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_FACTION, target->GetGUID().GetCounter(), factionid, flag, npcflag, dyflag);
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_FACTION, target->GetGUID().ToString(), factionid, flag, npcflag, dyflag);
|
||||
|
||||
target->SetFaction(factionid);
|
||||
target->ReplaceAllUnitFlags(flag);
|
||||
@@ -323,10 +323,10 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_SPELLFLATID, spellFlatID, val, mark ? *mark : 65535, handler->GetNameLink(target).c_str());
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_SPELLFLATID, spellFlatID, val, mark ? *mark : 65535, handler->GetNameLink(target));
|
||||
if (handler->needReportToTarget(target))
|
||||
{
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SPELLFLATID_CHANGED, handler->GetNameLink().c_str(), spellFlatID, val, mark ? *mark : 65535);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SPELLFLATID_CHANGED, handler->GetNameLink(), spellFlatID, val, mark ? *mark : 65535);
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_SET_FLAT_SPELL_MODIFIER, (1 + 1 + 2 + 2));
|
||||
@@ -511,9 +511,9 @@ public:
|
||||
if (handler->HasLowerSecurity(player))
|
||||
return false;
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, scale, handler->GetNameLink(player).c_str());
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, scale, handler->GetNameLink(player));
|
||||
if (handler->needReportToTarget(player))
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), scale);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink(), scale);
|
||||
}
|
||||
|
||||
target->SetObjectScale(scale);
|
||||
@@ -617,9 +617,9 @@ public:
|
||||
LOG_DEBUG("chat.system", handler->GetAcoreString(LANG_CURRENT_MONEY), targetMoney, moneyToAdd, newmoney);
|
||||
if (newmoney <= 0)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, handler->GetNameLink(target).c_str());
|
||||
handler->PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, handler->GetNameLink(target));
|
||||
if (handler->needReportToTarget(target))
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ALL_MONEY_GONE, handler->GetNameLink().c_str());
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ALL_MONEY_GONE, handler->GetNameLink());
|
||||
|
||||
target->SetMoney(0);
|
||||
}
|
||||
@@ -628,17 +628,17 @@ public:
|
||||
if (newmoney > MAX_MONEY_AMOUNT)
|
||||
newmoney = MAX_MONEY_AMOUNT;
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_TAKE_MONEY, std::abs(moneyToAdd), handler->GetNameLink(target).c_str());
|
||||
handler->PSendSysMessage(LANG_YOU_TAKE_MONEY, std::abs(moneyToAdd), handler->GetNameLink(target));
|
||||
if (handler->needReportToTarget(target))
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_TAKEN, handler->GetNameLink().c_str(), std::abs(moneyToAdd));
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_TAKEN, handler->GetNameLink(), std::abs(moneyToAdd));
|
||||
target->SetMoney(newmoney);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_YOU_GIVE_MONEY, moneyToAdd, handler->GetNameLink(target).c_str());
|
||||
handler->PSendSysMessage(LANG_YOU_GIVE_MONEY, moneyToAdd, handler->GetNameLink(target));
|
||||
if (handler->needReportToTarget(target))
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), moneyToAdd);
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink(), moneyToAdd);
|
||||
|
||||
if (moneyToAdd >= MAX_MONEY_AMOUNT)
|
||||
moneyToAdd = MAX_MONEY_AMOUNT;
|
||||
@@ -713,7 +713,7 @@ public:
|
||||
|
||||
target->ModifyHonorPoints(amount);
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_MODIFY_HONOR, handler->GetNameLink(target).c_str(), target->GetHonorPoints());
|
||||
handler->PSendSysMessage(LANG_COMMAND_MODIFY_HONOR, handler->GetNameLink(target), target->GetHonorPoints());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -830,7 +830,7 @@ public:
|
||||
target->GetReputationMgr().SendState(target->GetReputationMgr().GetState(factionEntry));
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_MODIFY_REP, factionEntry->name[handler->GetSessionDbcLocale()], factionId,
|
||||
handler->GetNameLink(target).c_str(), target->GetReputationMgr().GetReputation(factionEntry));
|
||||
handler->GetNameLink(target), target->GetReputationMgr().GetReputation(factionEntry));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -903,7 +903,7 @@ public:
|
||||
|
||||
target->ModifyArenaPoints(amount);
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_MODIFY_ARENA, handler->GetNameLink(target).c_str(), target->GetArenaPoints());
|
||||
handler->PSendSysMessage(LANG_COMMAND_MODIFY_ARENA, handler->GetNameLink(target), target->GetArenaPoints());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -959,11 +959,11 @@ public:
|
||||
|
||||
char const* gender_full = gender ? "female" : "male";
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_GENDER, handler->GetNameLink(target).c_str(), gender_full);
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_GENDER, handler->GetNameLink(target), gender_full);
|
||||
|
||||
if (handler->needReportToTarget(target))
|
||||
{
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_GENDER_CHANGED, gender_full, handler->GetNameLink().c_str());
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_GENDER_CHANGED, gender_full, handler->GetNameLink());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -289,7 +289,7 @@ public:
|
||||
|
||||
sObjectMgr->AddVendorItem(vendor_entry, itemId, maxcount, incrtime, extendedcost);
|
||||
|
||||
handler->PSendSysMessage(LANG_ITEM_ADDED_TO_LIST, itemId, item->Name1.c_str(), maxcount, incrtime, extendedcost);
|
||||
handler->PSendSysMessage(LANG_ITEM_ADDED_TO_LIST, itemId, item->Name1, maxcount, incrtime, extendedcost);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -416,7 +416,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_ITEM_DELETED_FROM_LIST, itemId, item->Name1.c_str());
|
||||
handler->PSendSysMessage(LANG_ITEM_DELETED_FROM_LIST, itemId, item->Name1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -531,7 +531,7 @@ public:
|
||||
|
||||
creature->AI()->SetData(data_1, data_2);
|
||||
std::string AIorScript = !creature->GetAIName().empty() ? "AI type: " + creature->GetAIName() : (!creature->GetScriptName().empty() ? "Script Name: " + creature->GetScriptName() : "No AI or Script Name Set");
|
||||
handler->PSendSysMessage(LANG_NPC_SETDATA, creature->GetGUID().GetCounter(), creature->GetEntry(), creature->GetName().c_str(), data_1, data_2, AIorScript.c_str());
|
||||
handler->PSendSysMessage(LANG_NPC_SETDATA, creature->GetGUID().ToString(), creature->GetEntry(), creature->GetName(), data_1, data_2, AIorScript);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -550,7 +550,7 @@ public:
|
||||
// Follow player - Using pet's default dist and angle
|
||||
creature->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, creature->GetFollowAngle());
|
||||
|
||||
handler->PSendSysMessage(LANG_CREATURE_FOLLOW_YOU_NOW, creature->GetName().c_str());
|
||||
handler->PSendSysMessage(LANG_CREATURE_FOLLOW_YOU_NOW, creature->GetName());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -588,18 +588,18 @@ public:
|
||||
std::string curRespawnDelayStr = secsToTimeString(uint64(curRespawnDelay), true);
|
||||
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(), true);
|
||||
|
||||
handler->PSendSysMessage(LANG_NPCINFO_CHAR, target->GetSpawnId(), target->GetGUID().GetCounter(), entry, id1, id2, id3, displayid, nativeid, faction, npcflags);
|
||||
handler->PSendSysMessage(LANG_NPCINFO_CHAR, target->GetSpawnId(), target->GetGUID().ToString(), entry, id1, id2, id3, displayid, nativeid, faction, npcflags);
|
||||
handler->PSendSysMessage(LANG_NPCINFO_LEVEL, target->GetLevel());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_EQUIPMENT, target->GetCurrentEquipmentId(), target->GetOriginalEquipmentId());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_HEALTH, target->GetCreateHealth(), target->GetMaxHealth(), target->GetHealth());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_FLAGS, target->GetUnitFlags(), target->GetUnitFlags2(), target->GetDynamicFlags(), target->GetFaction());
|
||||
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr, curRespawnDelayStr);
|
||||
handler->PSendSysMessage(LANG_NPCINFO_LOOT, cInfo->lootid, cInfo->pickpocketLootId, cInfo->SkinLootId);
|
||||
handler->PSendSysMessage(LANG_NPCINFO_DUNGEON_ID, target->GetInstanceId());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_PHASEMASK, target->GetPhaseMask());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_ARMOR, target->GetArmor());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_POSITION, float(target->GetPositionX()), float(target->GetPositionY()), float(target->GetPositionZ()));
|
||||
handler->PSendSysMessage(LANG_NPCINFO_AIINFO, target->GetAIName().c_str(), target->GetScriptName().c_str());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_AIINFO, target->GetAIName(), target->GetScriptName());
|
||||
|
||||
for (uint8 i = 0; i < NPCFLAG_COUNT; i++)
|
||||
{
|
||||
@@ -654,7 +654,7 @@ public:
|
||||
id3 = cData->id3;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_NPCINFO_CHAR, target->GetSpawnId(), target->GetGUID().GetCounter(), entry, id1, id2, id3, displayid, nativeid, faction, npcflags);
|
||||
handler->PSendSysMessage(LANG_NPCINFO_CHAR, target->GetSpawnId(), target->GetGUID().ToString(), entry, id1, id2, id3, displayid, nativeid, faction, npcflags);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -696,7 +696,7 @@ public:
|
||||
if (!creatureTemplate)
|
||||
continue;
|
||||
|
||||
handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, entry, guid, creatureTemplate->Name.c_str(), x, y, z, mapId, "", "");
|
||||
handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, entry, guid, creatureTemplate->Name, x, y, z, mapId, "", "");
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
@@ -1022,7 +1022,7 @@ public:
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
creature->SetRespawnDelay(spawnTime);
|
||||
handler->PSendSysMessage(LANG_COMMAND_SPAWNTIME, secsToTimeString(spawnTime, true).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_SPAWNTIME, secsToTimeString(spawnTime, true));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1101,7 +1101,7 @@ public:
|
||||
// reset movement
|
||||
creature->GetMotionMaster()->MovementExpired(true);
|
||||
|
||||
handler->PSendSysMessage(LANG_CREATURE_NOT_FOLLOW_YOU_NOW, creature->GetName().c_str());
|
||||
handler->PSendSysMessage(LANG_CREATURE_NOT_FOLLOW_YOU_NOW, creature->GetName());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1166,8 +1166,8 @@ public:
|
||||
Creature* creatureTarget = handler->getSelectedCreature();
|
||||
if (!creatureTarget || creatureTarget->IsPet())
|
||||
{
|
||||
handler->PSendSysMessage (LANG_SELECT_CREATURE);
|
||||
handler->SetSentErrorMessage (true);
|
||||
handler->PSendSysMessage(LANG_SELECT_CREATURE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1210,7 +1210,7 @@ public:
|
||||
ObjectGuid::LowType lowguid = creature->GetSpawnId();
|
||||
if (creature->GetFormation())
|
||||
{
|
||||
handler->PSendSysMessage("Selected creature is already member of group %u", creature->GetFormation()->GetId());
|
||||
handler->PSendSysMessage("Selected creature is already member of group {}", creature->GetFormation()->GetId());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1236,7 +1236,7 @@ public:
|
||||
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage("Creature %u added to formation with leader %u", lowguid, leaderGUID);
|
||||
handler->PSendSysMessage("Creature {} added to formation with leader {}", lowguid, leaderGUID);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1253,7 +1253,7 @@ public:
|
||||
|
||||
if (!creature->GetSpawnId())
|
||||
{
|
||||
handler->SendErrorMessage("Selected creature %u isn't in creature table", creature->GetGUID().GetCounter());
|
||||
handler->SendErrorMessage("Selected creature {} isn't in creature table", creature->GetGUID().ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1263,7 +1263,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("LinkGUID '%u' added to creature with DBTableGUID: '%u'", linkguid, creature->GetSpawnId());
|
||||
handler->PSendSysMessage("LinkGUID '{}' added to creature with DBTableGUID: '{}'", linkguid, creature->GetSpawnId());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -108,19 +108,19 @@ public:
|
||||
uint32 spellDifficultyId = sSpellMgr->GetSpellDifficultyId(spell->Id);
|
||||
if (bounds.first != bounds.second || spellDifficultyId)
|
||||
{
|
||||
handler->SendErrorMessage("Spell %u cannot be learnt using a command!", spell->Id);
|
||||
handler->SendErrorMessage("Spell {} cannot be learnt using a command!", spell->Id);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if pet already has it
|
||||
if (pet->HasSpell(spell->Id))
|
||||
{
|
||||
handler->SendErrorMessage("Pet already has spell: %u", spell->Id);
|
||||
handler->SendErrorMessage("Pet already has spell: {}", spell->Id);
|
||||
return false;
|
||||
}
|
||||
|
||||
pet->learnSpell(spell->Id);
|
||||
handler->PSendSysMessage("Pet has learned spell %u", spell->Id);
|
||||
handler->PSendSysMessage("Pet has learned spell {}", spell->Id);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_QUEST_ADD, quest->GetTitle().c_str(), entry);
|
||||
handler->PSendSysMessage(LANG_COMMAND_QUEST_ADD, quest->GetTitle(), entry);
|
||||
handler->SetSentErrorMessage(false);
|
||||
return true;
|
||||
}
|
||||
@@ -216,7 +216,7 @@ public:
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_QUEST_REMOVED, quest->GetTitle().c_str(), entry);
|
||||
handler->PSendSysMessage(LANG_COMMAND_QUEST_REMOVED, quest->GetTitle(), entry);
|
||||
handler->SetSentErrorMessage(false);
|
||||
return true;
|
||||
}
|
||||
@@ -482,7 +482,7 @@ public:
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_QUEST_COMPLETE, quest->GetTitle().c_str(), entry);
|
||||
handler->PSendSysMessage(LANG_COMMAND_QUEST_COMPLETE, quest->GetTitle(), entry);
|
||||
handler->SetSentErrorMessage(false);
|
||||
return true;
|
||||
}
|
||||
@@ -727,7 +727,7 @@ public:
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_QUEST_REWARDED, quest->GetTitle().c_str(), entry);
|
||||
handler->PSendSysMessage(LANG_COMMAND_QUEST_REWARDED, quest->GetTitle(), entry);
|
||||
handler->SetSentErrorMessage(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ public:
|
||||
|
||||
ChatHandler(playerTarget->GetSession()).SendSysMessage(LANG_RESET_SPELLS);
|
||||
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != playerTarget)
|
||||
handler->PSendSysMessage(LANG_RESET_SPELLS_ONLINE, handler->GetNameLink(playerTarget).c_str());
|
||||
handler->PSendSysMessage(LANG_RESET_SPELLS_ONLINE, handler->GetNameLink(playerTarget));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
targetPlayer->SendTalentsInfoData(false);
|
||||
ChatHandler(targetPlayer->GetSession()).SendSysMessage(LANG_RESET_TALENTS);
|
||||
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != targetPlayer)
|
||||
handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(targetPlayer).c_str());
|
||||
handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(targetPlayer));
|
||||
|
||||
Pet* pet = targetPlayer->GetPet();
|
||||
Pet::resetTalentsForAllPetsOf(targetPlayer, pet);
|
||||
@@ -268,7 +268,7 @@ public:
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
std::string nameLink = handler->playerLink(target->GetName());
|
||||
handler->PSendSysMessage(LANG_RESET_TALENTS_OFFLINE, nameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_RESET_TALENTS_OFFLINE, nameLink);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -320,7 +320,7 @@ public:
|
||||
else
|
||||
{
|
||||
int16 deletedItemsCount = ResetItemsEquipped(targetPlayer);
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_EQUIPPED, deletedItemsCount, handler->GetNameLink(targetPlayer).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_EQUIPPED, deletedItemsCount, handler->GetNameLink(targetPlayer));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -337,7 +337,7 @@ public:
|
||||
else
|
||||
{
|
||||
int16 deletedItemsCount = ResetItemsInBags(targetPlayer);
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_BAGS, deletedItemsCount, handler->GetNameLink(targetPlayer).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_BAGS, deletedItemsCount, handler->GetNameLink(targetPlayer));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -354,7 +354,7 @@ public:
|
||||
else
|
||||
{
|
||||
int16 deletedItemsCount = ResetItemsInKeyring(targetPlayer);
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_KEYRING, deletedItemsCount, handler->GetNameLink(targetPlayer).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_KEYRING, deletedItemsCount, handler->GetNameLink(targetPlayer));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -371,7 +371,7 @@ public:
|
||||
else
|
||||
{
|
||||
int16 deletedItemsCount = ResetItemsInCurrenciesList(targetPlayer);
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_CURRENCY, deletedItemsCount, handler->GetNameLink(targetPlayer).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_CURRENCY, deletedItemsCount, handler->GetNameLink(targetPlayer));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -388,7 +388,7 @@ public:
|
||||
else
|
||||
{
|
||||
int16 deletedItemsCount = ResetItemsInBank(targetPlayer);
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_BANK, deletedItemsCount, handler->GetNameLink(targetPlayer).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_BANK, deletedItemsCount, handler->GetNameLink(targetPlayer));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -405,7 +405,7 @@ public:
|
||||
else
|
||||
{
|
||||
int16 deletedItemsCount = ResetItemsInVendorBuyBackTab(targetPlayer);
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_BUYBACK, deletedItemsCount, handler->GetNameLink(targetPlayer).c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_BUYBACK, deletedItemsCount, handler->GetNameLink(targetPlayer));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -430,7 +430,7 @@ public:
|
||||
int16 deletedItemsInCurrenciesListCount = ResetItemsInCurrenciesList(targetPlayer);
|
||||
int16 deletedItemsInVendorBuyBackTabCount = ResetItemsInVendorBuyBackTab(targetPlayer);
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_ALL, handler->GetNameLink(targetPlayer).c_str(),
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_ALL, handler->GetNameLink(targetPlayer),
|
||||
deletedItemsEquippedCount,
|
||||
deletedItemsInBagsCount,
|
||||
deletedItemsInBankCount,
|
||||
@@ -463,7 +463,7 @@ public:
|
||||
int16 deletedItemsStandardBagsCount = ResetItemsDeleteStandardBags(targetPlayer);
|
||||
int16 deletedItemsBankBagsCount = ResetItemsDeleteBankBags(targetPlayer);
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_ALL_BAGS, handler->GetNameLink(targetPlayer).c_str(),
|
||||
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_ALL_BAGS, handler->GetNameLink(targetPlayer),
|
||||
deletedItemsEquippedCount,
|
||||
deletedItemsInBagsCount,
|
||||
deletedItemsInBankCount,
|
||||
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
draft.SendMailTo(trans, MailReceiver(target->GetConnectedPlayer(), target->GetGUID().GetCounter()), sender);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
handler->PSendSysMessage(LANG_MAIL_SENT, handler->playerLink(target->GetName()).c_str());
|
||||
handler->PSendSysMessage(LANG_MAIL_SENT, handler->playerLink(target->GetName()));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
draft.SendMailTo(trans, MailReceiver(target->GetConnectedPlayer(), target->GetGUID().GetCounter()), sender);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
handler->PSendSysMessage(LANG_MAIL_SENT, handler->playerLink(target->GetName()).c_str());
|
||||
handler->PSendSysMessage(LANG_MAIL_SENT, handler->playerLink(target->GetName()));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
player->GetSession()->SendAreaTriggerMessage("|cffff0000[Message from administrator]:|r");
|
||||
|
||||
// Confirmation message
|
||||
handler->PSendSysMessage(LANG_SENDMESSAGE, handler->playerLink(target->GetName()).c_str(), msg.c_str());
|
||||
handler->PSendSysMessage(LANG_SENDMESSAGE, handler->playerLink(target->GetName()), msg);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
handler->PSendSysMessage(LANG_MAIL_SENT, handler->playerLink(target->GetName()).c_str());
|
||||
handler->PSendSysMessage(LANG_MAIL_SENT, handler->playerLink(target->GetName()));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -123,22 +123,22 @@ public:
|
||||
if (dbPort)
|
||||
dbPortOutput = Acore::StringFormatFmt("Realmlist (Realm Id: {}) configured in port {}", realm.Id.Realm, dbPort);
|
||||
else
|
||||
dbPortOutput = Acore::StringFormat("Realm Id: %u not found in `realmlist` table. Please check your setup", realm.Id.Realm);
|
||||
dbPortOutput = Acore::StringFormatFmt("Realm Id: {} not found in `realmlist` table. Please check your setup", realm.Id.Realm);
|
||||
}
|
||||
|
||||
HandleServerInfoCommand(handler);
|
||||
|
||||
handler->PSendSysMessage("Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, OpenSSL_version(OPENSSL_VERSION));
|
||||
handler->PSendSysMessage("Using Boost version: %i.%i.%i", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100);
|
||||
handler->PSendSysMessage("Using CMake version: %s", GitRevision::GetCMakeVersion());
|
||||
handler->PSendSysMessage("Using SSL version: {} (library: {})", OPENSSL_VERSION_TEXT, OpenSSL_version(OPENSSL_VERSION));
|
||||
handler->PSendSysMessage("Using Boost version: {}.{}.{}", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100);
|
||||
handler->PSendSysMessage("Using CMake version: {}", GitRevision::GetCMakeVersion());
|
||||
|
||||
handler->PSendSysMessage("Using MySQL version: %u", MySQL::GetLibraryVersion());
|
||||
handler->PSendSysMessage("Found MySQL Executable: %s", GitRevision::GetMySQLExecutable());
|
||||
handler->PSendSysMessage("Using MySQL version: {}", MySQL::GetLibraryVersion());
|
||||
handler->PSendSysMessage("Found MySQL Executable: {}", GitRevision::GetMySQLExecutable());
|
||||
|
||||
handler->PSendSysMessage("Compiled on: %s", GitRevision::GetHostOSVersion());
|
||||
handler->PSendSysMessage("Compiled on: {}", GitRevision::GetHostOSVersion());
|
||||
|
||||
handler->PSendSysMessage("Worldserver listening connections on port %" PRIu16, worldPort);
|
||||
handler->PSendSysMessage("%s", dbPortOutput.c_str());
|
||||
handler->PSendSysMessage("{}", dbPortOutput);
|
||||
|
||||
bool vmapIndoorCheck = sWorld->getBoolConfig(CONFIG_VMAP_INDOOR_CHECK);
|
||||
bool vmapLOSCheck = VMAP::VMapFactory::createOrGetVMapMgr()->isLineOfSightCalcEnabled();
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
subDirs.emplace_back("maps");
|
||||
if (vmapIndoorCheck || vmapLOSCheck || vmapHeightCheck)
|
||||
{
|
||||
handler->PSendSysMessage("VMAPs status: Enabled. LineOfSight: %i, getHeight: %i, indoorCheck: %i", vmapLOSCheck, vmapHeightCheck, vmapIndoorCheck);
|
||||
handler->PSendSysMessage("VMAPs status: Enabled. LineOfSight: {}, getHeight: {}, indoorCheck: {}", vmapLOSCheck, vmapHeightCheck, vmapIndoorCheck);
|
||||
subDirs.emplace_back("vmaps");
|
||||
}
|
||||
else
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
|
||||
if (!std::filesystem::exists(mapPath))
|
||||
{
|
||||
handler->PSendSysMessage("%s directory doesn't exist!. Using path: %s", subDir.c_str(), mapPath.generic_string().c_str());
|
||||
handler->PSendSysMessage("{} directory doesn't exist!. Using path: {}", subDir, mapPath.generic_string());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
return val;
|
||||
});
|
||||
|
||||
handler->PSendSysMessage(Acore::StringFormatFmt("{} directory located in {}. Total size: {} bytes", subDir.c_str(), mapPath.generic_string().c_str(), folderSize).c_str());
|
||||
handler->PSendSysMessage("{} directory located in {}. Total size: {} bytes", subDir, mapPath.generic_string(), folderSize);
|
||||
}
|
||||
|
||||
LocaleConstant defaultLocale = sWorld->GetDefaultDbcLocale();
|
||||
@@ -211,9 +211,9 @@ public:
|
||||
availableLocales += " ";
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("Default DBC locale: %s.\nAll available DBC locales: %s", localeNames[defaultLocale], availableLocales.c_str());
|
||||
handler->PSendSysMessage("Default DBC locale: {}.\nAll available DBC locales: {}", localeNames[defaultLocale], availableLocales);
|
||||
|
||||
handler->PSendSysMessage("Using World DB: %s", sWorld->GetDBVersion());
|
||||
handler->PSendSysMessage("Using World DB: {}", sWorld->GetDBVersion());
|
||||
|
||||
std::string lldb = "No updates found!";
|
||||
if (QueryResult resL = LoginDatabase.Query("SELECT name FROM updates ORDER BY name DESC LIMIT 1"))
|
||||
@@ -234,22 +234,22 @@ public:
|
||||
lwdb = fields[0].Get<std::string>();
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("Latest LoginDatabase update: %s", lldb.c_str());
|
||||
handler->PSendSysMessage("Latest CharacterDatabase update: %s", lcdb.c_str());
|
||||
handler->PSendSysMessage("Latest WorldDatabase update: %s", lwdb.c_str());
|
||||
handler->PSendSysMessage("Latest LoginDatabase update: {}", lldb);
|
||||
handler->PSendSysMessage("Latest CharacterDatabase update: {}", lcdb);
|
||||
handler->PSendSysMessage("Latest WorldDatabase update: {}", lwdb);
|
||||
|
||||
handler->PSendSysMessage("LoginDatabase queue size: %zu", LoginDatabase.QueueSize());
|
||||
handler->PSendSysMessage("CharacterDatabase queue size: %zu", CharacterDatabase.QueueSize());
|
||||
handler->PSendSysMessage("WorldDatabase queue size: %zu", WorldDatabase.QueueSize());
|
||||
handler->PSendSysMessage("LoginDatabase queue size: {}", LoginDatabase.QueueSize());
|
||||
handler->PSendSysMessage("CharacterDatabase queue size: {}", CharacterDatabase.QueueSize());
|
||||
handler->PSendSysMessage("WorldDatabase queue size: {}", WorldDatabase.QueueSize());
|
||||
|
||||
if (Acore::Module::GetEnableModulesList().empty())
|
||||
handler->SendSysMessage("No modules are enabled");
|
||||
handler->PSendSysMessage("No modules are enabled");
|
||||
else
|
||||
handler->SendSysMessage("List of enabled modules:");
|
||||
handler->PSendSysMessage("List of enabled modules:");
|
||||
|
||||
for (auto const& modName : Acore::Module::GetEnableModulesList())
|
||||
{
|
||||
handler->SendSysMessage(Acore::StringFormatFmt("|- {}", modName));
|
||||
handler->PSendSysMessage("|- {}", modName);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -263,25 +263,25 @@ public:
|
||||
uint32 queuedSessionCount = sWorld->GetQueuedSessionCount();
|
||||
uint32 connPeak = sWorld->GetMaxActiveSessionCount();
|
||||
|
||||
handler->PSendSysMessage("%s", GitRevision::GetFullVersion());
|
||||
handler->PSendSysMessage("{}", GitRevision::GetFullVersion());
|
||||
if (!queuedSessionCount)
|
||||
handler->PSendSysMessage("Connected players: %u. Characters in world: %u.", activeSessionCount, playerCount);
|
||||
handler->PSendSysMessage("Connected players: {}. Characters in world: {}.", activeSessionCount, playerCount);
|
||||
else
|
||||
handler->PSendSysMessage("Connected players: %u. Characters in world: %u. Queue: %u.", activeSessionCount, playerCount, queuedSessionCount);
|
||||
handler->PSendSysMessage("Connected players: {}. Characters in world: {}. Queue: {}.", activeSessionCount, playerCount, queuedSessionCount);
|
||||
|
||||
handler->PSendSysMessage("Connection peak: %u.", connPeak);
|
||||
handler->PSendSysMessage(LANG_UPTIME, secsToTimeString(GameTime::GetUptime().count()).c_str());
|
||||
handler->PSendSysMessage("Update time diff: %ums. Last %d diffs summary:", sWorldUpdateTime.GetLastUpdateTime(), sWorldUpdateTime.GetDatasetSize());
|
||||
handler->PSendSysMessage("|- Mean: %ums", sWorldUpdateTime.GetAverageUpdateTime());
|
||||
handler->PSendSysMessage("|- Median: %ums", sWorldUpdateTime.GetPercentile(50));
|
||||
handler->PSendSysMessage("|- Percentiles (95, 99, max): %ums, %ums, %ums",
|
||||
handler->PSendSysMessage("Connection peak: {}.", connPeak);
|
||||
handler->PSendSysMessage(LANG_UPTIME, secsToTimeString(GameTime::GetUptime().count()));
|
||||
handler->PSendSysMessage("Update time diff: {}ms. Last %d diffs summary:", sWorldUpdateTime.GetLastUpdateTime(), sWorldUpdateTime.GetDatasetSize());
|
||||
handler->PSendSysMessage("|- Mean: {}ms", sWorldUpdateTime.GetAverageUpdateTime());
|
||||
handler->PSendSysMessage("|- Median: {}ms", sWorldUpdateTime.GetPercentile(50));
|
||||
handler->PSendSysMessage("|- Percentiles (95, 99, max): {}ms, {}ms, {}ms",
|
||||
sWorldUpdateTime.GetPercentile(95),
|
||||
sWorldUpdateTime.GetPercentile(99),
|
||||
sWorldUpdateTime.GetPercentile(100));
|
||||
|
||||
//! Can't use sWorld->ShutdownMsg here in case of console command
|
||||
if (sWorld->IsShuttingDown())
|
||||
handler->PSendSysMessage(LANG_SHUTDOWN_TIMELEFT, secsToTimeString(sWorld->GetShutDownTimeLeft()).append(".").c_str());
|
||||
handler->PSendSysMessage(LANG_SHUTDOWN_TIMELEFT, secsToTimeString(sWorld->GetShutDownTimeLeft()).append("."));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -134,9 +134,9 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_TELEPORTING_TO, chrNameLink.c_str(), "", locationName.c_str());
|
||||
handler->PSendSysMessage(LANG_TELEPORTING_TO, chrNameLink, "", locationName);
|
||||
if (handler->needReportToTarget(target))
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, handler->GetNameLink().c_str());
|
||||
ChatHandler(target->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, handler->GetNameLink());
|
||||
|
||||
// stop flight if need
|
||||
if (target->IsInFlight())
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
|
||||
std::string nameLink = handler->playerLink(player.GetName());
|
||||
|
||||
handler->PSendSysMessage(LANG_TELEPORTING_TO, nameLink.c_str(), handler->GetAcoreString(LANG_OFFLINE), locationName.c_str());
|
||||
handler->PSendSysMessage(LANG_TELEPORTING_TO, nameLink, handler->GetAcoreString(LANG_OFFLINE), locationName);
|
||||
|
||||
Player::SavePositionInDB({ mapId, pos }, sMapMgr->GetZoneId(PHASEMASK_NORMAL, { mapId, pos }), player.GetGUID(), nullptr);
|
||||
}
|
||||
@@ -252,13 +252,13 @@ public:
|
||||
|
||||
if (player->IsBeingTeleported())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_IS_TELEPORTED, plNameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_IS_TELEPORTED, plNameLink);
|
||||
continue;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_TELEPORTING_TO, plNameLink.c_str(), "", tele->name.c_str());
|
||||
handler->PSendSysMessage(LANG_TELEPORTING_TO, plNameLink.c_str(), "", tele->name);
|
||||
if (handler->needReportToTarget(player))
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str());
|
||||
ChatHandler(player->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink);
|
||||
|
||||
// stop flight if need
|
||||
if (target->IsInFlight())
|
||||
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
Player* player = handler->GetSession() ? handler->GetSession()->GetPlayer() : nullptr;
|
||||
if (player && ticket->IsAssignedNotTo(player->GetGUID()))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_TICKETALREADYASSIGNED, ticket->GetId(), target.c_str());
|
||||
handler->PSendSysMessage(LANG_COMMAND_TICKETALREADYASSIGNED, ticket->GetId(), target);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -469,7 +469,7 @@ public:
|
||||
std::string msg = ticket->FormatMessageString(*handler, nullptr, nullptr, nullptr, nullptr);
|
||||
msg += handler->PGetParseString(LANG_COMMAND_TICKETRESPONSEAPPENDED, response);
|
||||
|
||||
handler->PSendSysMessage(msg.c_str());
|
||||
handler->PSendSysMessage(msg);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -526,7 +526,7 @@ public:
|
||||
std::string msg = ticket->FormatMessageString(*handler, nullptr, nullptr, nullptr, nullptr);
|
||||
msg += handler->PGetParseString(LANG_COMMAND_TICKETLISTRESPONSE, ticket->GetResponse());
|
||||
|
||||
handler->PSendSysMessage(msg.c_str());
|
||||
handler->PSendSysMessage(msg);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
|
||||
uint32 maxpathid = result->Fetch()->Get<int32>();
|
||||
pathid = maxpathid + 1;
|
||||
handler->PSendSysMessage("%s%s|r", "|cff00ff00", "New path started.");
|
||||
handler->PSendSysMessage("{}{}|r", "|cff00ff00", "New path started.");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
|
||||
if (!pathid)
|
||||
{
|
||||
handler->PSendSysMessage("%s%s|r", "|cffff33ff", "Current creature haven't loaded path.");
|
||||
handler->PSendSysMessage("{}{}|r", "|cffff33ff", "Current creature haven't loaded path.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage("%s%s%u%s%u%s|r", "|cff00ff00", "PathID: |r|cff00ffff", pathid, "|r|cff00ff00: Waypoint |r|cff00ffff", point + 1, "|r|cff00ff00 created. ");
|
||||
handler->PSendSysMessage("{}{}{}{}{}{}|r", "|cff00ff00", "PathID: |r|cff00ffff", pathid, "|r|cff00ff00: Waypoint |r|cff00ffff", point + 1, "|r|cff00ff00 created. ");
|
||||
return true;
|
||||
} // HandleWpAddCommand
|
||||
|
||||
@@ -167,7 +167,7 @@ public:
|
||||
|
||||
if (target->GetEntry() == 1)
|
||||
{
|
||||
handler->SendErrorMessage("%s%s|r", "|cffff33ff", "You want to load path to a waypoint? Aren't you?");
|
||||
handler->SendErrorMessage("{}{}|r", "|cffff33ff", "You want to load path to a waypoint? Aren't you?");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
|
||||
if (!pathid)
|
||||
{
|
||||
handler->PSendSysMessage("%s%s|r", "|cffff33ff", "No valid path number provided.");
|
||||
handler->PSendSysMessage("{}{}|r", "|cffff33ff", "No valid path number provided.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
if (!id)
|
||||
return false;
|
||||
|
||||
handler->PSendSysMessage("%s%s|r|cff00ffff%u|r", "|cff00ff00", "Loading Path: ", id);
|
||||
handler->PSendSysMessage("{}{}|r|cff00ffff{}|r", "|cff00ff00", "Loading Path: ", id);
|
||||
sWaypointMgr->ReloadPath(id);
|
||||
return true;
|
||||
}
|
||||
@@ -240,7 +240,7 @@ public:
|
||||
|
||||
if (!target)
|
||||
{
|
||||
handler->PSendSysMessage("%s%s|r", "|cff33ffff", "You must select target.");
|
||||
handler->PSendSysMessage("{}{}|r", "|cff33ffff", "You must select target.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ public:
|
||||
target->Say("Path unloaded.", LANG_UNIVERSAL);
|
||||
return true;
|
||||
}
|
||||
handler->PSendSysMessage("%s%s|r", "|cffff33ff", "Target have no loaded path.");
|
||||
handler->PSendSysMessage("{}{}|r", "|cffff33ff", "Target have no loaded path.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -309,10 +309,10 @@ public:
|
||||
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: New waypoint event added: ", id);
|
||||
handler->PSendSysMessage("{}{}{}|r", "|cff00ff00", "Wp Event: New waypoint event added: ", id);
|
||||
}
|
||||
else
|
||||
handler->PSendSysMessage("|cff00ff00Wp Event: You have choosed an existing waypoint script guid: %u|r", id);
|
||||
handler->PSendSysMessage("|cff00ff00Wp Event: You have choosed an existing waypoint script guid: {}|r", id);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -328,7 +328,7 @@ public:
|
||||
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: New waypoint event added: |r|cff00ffff", id + 1);
|
||||
handler->PSendSysMessage("{}{}{}|r", "|cff00ff00", "Wp Event: New waypoint event added: |r|cff00ffff", id + 1);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -338,7 +338,7 @@ public:
|
||||
{
|
||||
if (!arg_id)
|
||||
{
|
||||
handler->PSendSysMessage("%s%s|r", "|cff33ffff", "Wp Event: You must provide waypoint script id.");
|
||||
handler->PSendSysMessage("{}{}|r", "|cff33ffff", "Wp Event: You must provide waypoint script id.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -354,7 +354,7 @@ public:
|
||||
|
||||
if (!result)
|
||||
{
|
||||
handler->PSendSysMessage("%s%s%u|r", "|cff33ffff", "Wp Event: No waypoint scripts found on id: ", id);
|
||||
handler->PSendSysMessage("{}{}{}|r", "|cff33ffff", "Wp Event: No waypoint scripts found on id: ", id);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ public:
|
||||
a10 = fields[8].Get<float>();
|
||||
a11 = fields[9].Get<float>();
|
||||
|
||||
handler->PSendSysMessage("|cffff33ffid:|r|cff00ffff %u|r|cff00ff00, guid: |r|cff00ffff%u|r|cff00ff00, delay: |r|cff00ffff%u|r|cff00ff00, command: |r|cff00ffff%u|r|cff00ff00, datalong: |r|cff00ffff%u|r|cff00ff00, datalong2: |r|cff00ffff%u|r|cff00ff00, datatext: |r|cff00ffff%s|r|cff00ff00, posx: |r|cff00ffff%f|r|cff00ff00, posy: |r|cff00ffff%f|r|cff00ff00, posz: |r|cff00ffff%f|r|cff00ff00, orientation: |r|cff00ffff%f|r", id, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
|
||||
handler->PSendSysMessage("|cffff33ffid:|r|cff00ffff {}|r|cff00ff00, guid: |r|cff00ffff{}|r|cff00ff00, delay: |r|cff00ffff{}|r|cff00ff00, command: |r|cff00ffff{}|r|cff00ff00, datalong: |r|cff00ffff{}|r|cff00ff00, datalong2: |r|cff00ffff{}|r|cff00ff00, datatext: |r|cff00ffff{}|r|cff00ff00, posx: |r|cff00ffff{}|r|cff00ff00, posy: |r|cff00ffff{}|r|cff00ff00, posz: |r|cff00ffff{}|r|cff00ff00, orientation: |r|cff00ffff{}|r", id, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
|
||||
} while (result->NextRow());
|
||||
}
|
||||
|
||||
@@ -402,10 +402,10 @@ public:
|
||||
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: Waypoint script removed: ", id);
|
||||
handler->PSendSysMessage("{}{}{}|r", "|cff00ff00", "Wp Event: Waypoint script removed: ", id);
|
||||
}
|
||||
else
|
||||
handler->PSendSysMessage("|cffff33ffWp Event: ERROR: you have selected a non existing script: %u|r", id);
|
||||
handler->PSendSysMessage("|cffff33ffWp Event: ERROR: you have selected a non existing script: {}|r", id);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -457,7 +457,7 @@ public:
|
||||
if (arg_str_2 == "setid")
|
||||
{
|
||||
uint32 newid = atoi(arg_3);
|
||||
handler->PSendSysMessage("%s%s|r|cff00ffff%u|r|cff00ff00%s|r|cff00ffff%u|r", "|cff00ff00", "Wp Event: Wypoint scipt guid: ", newid, " id changed: ", id);
|
||||
handler->PSendSysMessage("{}{}|r|cff00ffff{}|r|cff00ff00{}|r|cff00ffff{}|r", "|cff00ff00", "Wp Event: Wypoint scipt guid: ", newid, " id changed: ", id);
|
||||
|
||||
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_SCRIPT_ID);
|
||||
|
||||
@@ -489,7 +489,7 @@ public:
|
||||
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage("|cff00ff00Waypoint script:|r|cff00ffff %u|r|cff00ff00 position_x updated.|r", id);
|
||||
handler->PSendSysMessage("|cff00ff00Waypoint script:|r|cff00ffff {}|r|cff00ff00 position_x updated.|r", id);
|
||||
return true;
|
||||
}
|
||||
else if (arg_str_2 == "posy")
|
||||
@@ -501,7 +501,7 @@ public:
|
||||
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage("|cff00ff00Waypoint script: %u position_y updated.|r", id);
|
||||
handler->PSendSysMessage("|cff00ff00Waypoint script: {} position_y updated.|r", id);
|
||||
return true;
|
||||
}
|
||||
else if (arg_str_2 == "posz")
|
||||
@@ -513,7 +513,7 @@ public:
|
||||
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 position_z updated.|r", id);
|
||||
handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff{}|r|cff00ff00 position_z updated.|r", id);
|
||||
return true;
|
||||
}
|
||||
else if (arg_str_2 == "orientation")
|
||||
@@ -525,14 +525,14 @@ public:
|
||||
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 orientation updated.|r", id);
|
||||
handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff{}|r|cff00ff00 orientation updated.|r", id);
|
||||
return true;
|
||||
}
|
||||
else if (arg_str_2 == "dataint")
|
||||
{
|
||||
WorldDatabase.Execute("UPDATE waypoint_scripts SET {}='{}' WHERE guid='{}'", arg_2, atoi(arg_3), id); // Query can't be a prepared statement
|
||||
|
||||
handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 dataint updated.|r", id);
|
||||
handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff{}|r|cff00ff00 dataint updated.|r", id);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -542,7 +542,7 @@ public:
|
||||
WorldDatabase.Execute("UPDATE waypoint_scripts SET {}='{}' WHERE guid='{}'", arg_2, arg_str_3, id); // Query can't be a prepared statement
|
||||
}
|
||||
}
|
||||
handler->PSendSysMessage("%s%s|r|cff00ffff%u:|r|cff00ff00 %s %s|r", "|cff00ff00", "Waypoint script:", id, arg_2, "updated.");
|
||||
handler->PSendSysMessage("{}{}|r|cff00ffff{}:|r|cff00ff00 {} {}|r", "|cff00ff00", "Waypoint script:", id, arg_2, "updated.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -642,7 +642,7 @@ public:
|
||||
|
||||
if (show == "del")
|
||||
{
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp modify del, PathID: |r|cff00ffff%u|r", pathid);
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp modify del, PathID: |r|cff00ffff{}|r", pathid);
|
||||
|
||||
if (wpSpawnId != 0)
|
||||
if (Creature* wpCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(target->GetGUID()))
|
||||
@@ -670,7 +670,7 @@ public:
|
||||
|
||||
if (show == "move")
|
||||
{
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp move, PathID: |r|cff00ffff%u|r", pathid);
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp move, PathID: |r|cff00ffff{}|r", pathid);
|
||||
|
||||
Player* chr = handler->GetSession()->GetPlayer();
|
||||
Map* map = chr->GetMap();
|
||||
@@ -787,7 +787,7 @@ public:
|
||||
|
||||
std::string show = show_str;
|
||||
|
||||
//handler->PSendSysMessage("wpshow - show: %s", show);
|
||||
//handler->PSendSysMessage("wpshow - show: {}", show);
|
||||
|
||||
// Show info for the selected waypoint
|
||||
if (show == "info")
|
||||
@@ -822,11 +822,11 @@ public:
|
||||
uint32 ev_id = fields[4].Get<uint32>();
|
||||
uint32 ev_chance = fields[5].Get<uint32>();
|
||||
|
||||
handler->PSendSysMessage("|cff00ff00Show info: for current point: |r|cff00ffff%u|r|cff00ff00, Path ID: |r|cff00ffff%u|r", point, pathid);
|
||||
handler->PSendSysMessage("|cff00ff00Show info: delay: |r|cff00ffff%u|r", delay);
|
||||
handler->PSendSysMessage("|cff00ff00Show info: Move flag: |r|cff00ffff%u|r", flag);
|
||||
handler->PSendSysMessage("|cff00ff00Show info: Waypoint event: |r|cff00ffff%u|r", ev_id);
|
||||
handler->PSendSysMessage("|cff00ff00Show info: Event chance: |r|cff00ffff%u|r", ev_chance);
|
||||
handler->PSendSysMessage("|cff00ff00Show info: for current point: |r|cff00ffff{}|r|cff00ff00, Path ID: |r|cff00ffff{}|r", point, pathid);
|
||||
handler->PSendSysMessage("|cff00ff00Show info: delay: |r|cff00ffff{}|r", delay);
|
||||
handler->PSendSysMessage("|cff00ff00Show info: Move flag: |r|cff00ffff{}|r", flag);
|
||||
handler->PSendSysMessage("|cff00ff00Show info: Waypoint event: |r|cff00ffff{}|r", ev_id);
|
||||
handler->PSendSysMessage("|cff00ff00Show info: Event chance: |r|cff00ffff{}|r", ev_chance);
|
||||
} while (result->NextRow());
|
||||
|
||||
return true;
|
||||
@@ -846,7 +846,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp on, PathID: |cff00ffff%u|r", pathid);
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp on, PathID: |cff00ffff{}|r", pathid);
|
||||
|
||||
// Delete all visuals for this NPC
|
||||
stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_DATA_WPGUID_BY_ID);
|
||||
@@ -943,7 +943,7 @@ public:
|
||||
|
||||
if (show == "first")
|
||||
{
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp first, GUID: %u|r", pathid);
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp first, GUID: {}|r", pathid);
|
||||
|
||||
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_DATA_POS_FIRST_BY_ID);
|
||||
stmt->SetData(0, pathid);
|
||||
@@ -992,7 +992,7 @@ public:
|
||||
|
||||
if (show == "last")
|
||||
{
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp last, PathID: |r|cff00ffff%u|r", pathid);
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp last, PathID: |r|cff00ffff{}|r", pathid);
|
||||
|
||||
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_DATA_POS_LAST_BY_ID);
|
||||
stmt->SetData(0, pathid);
|
||||
|
||||
Reference in New Issue
Block a user