Skip to content

Commit 5f6974c

Browse files
committed
Scripts/Commands: Replaced lowguid printing in command output with ToString() formatted guid
(cherry picked from commit b10d3cd)
1 parent 96bd126 commit 5f6974c

File tree

11 files changed

+50
-29
lines changed

11 files changed

+50
-29
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
UPDATE `trinity_string` SET `content_default`='New ArenaTeam created [Name: "%s"][Id: %u][Type: %u][Captain: %s]' WHERE `entry`=864;
2+
UPDATE `trinity_string` SET `content_default`='Name:"%s"[%s] - PR: %u - %s' WHERE `entry`=869;
3+
UPDATE `trinity_string` SET `content_default`='SetData performed on [%s, name: %s] Field: %u, Data: %u, with %s' WHERE `entry`=555;
4+
UPDATE `trinity_string` SET `content_default`='| %80s | %20s | %15s (%10u) | %19s |' WHERE `entry`=1017;
5+
UPDATE `trinity_string` SET `content_default`='%s Name: %s Account: %s (%u) Date: %s' WHERE `entry`=1026;
6+
UPDATE `trinity_string` SET `content_default`='Character ''%s'' (%s Account %u) can''t be restored: account not exist!' WHERE `entry`=1023;
7+
UPDATE `trinity_string` SET `content_default`='Character ''%s'' (%s Account %u) can''t be restored: account character list full!' WHERE `entry`=1024;
8+
UPDATE `trinity_string` SET `content_default`='Character ''%s'' (%s Account %u) can''t be restored: new name already used!' WHERE `entry`=1025;
9+
UPDATE `trinity_string` SET `content_default`='Forced rename for player %s (%s) will be requested at next login.' WHERE `entry`=254;
10+
UPDATE `trinity_string` SET `content_default`='Customization for Player %s (%s) will be requested at next login.' WHERE `entry`=346;
11+
UPDATE `trinity_string` SET `content_default`='Player %s (%s) Account %s (Id: %u) deleted.' WHERE `entry`=1009;
12+
UPDATE `trinity_string` SET `content_default`='GameObject (GUID: %u) is referenced by nonexisting %s, can''t be deleted.' WHERE `entry`=274;
13+
UPDATE `trinity_string` SET `content_default`='id: %d %s effmask: %d charges: %d stack: %d slot %d duration: %d maxduration: %d %s %s caster: %s %s' WHERE `entry`=468;
14+
UPDATE `trinity_string` SET `content_default`='Mail List Info: # of mails: %u, Player: %s (%s)' WHERE `entry`=1151;
15+
UPDATE `trinity_string` SET `content_default`='Name: %s (%s), Zone: %s, Phase: %u, %s, Flags: %s, Roles: %s' WHERE `entry`=1150;
16+
UPDATE `trinity_string` SET `content_default`='Object %s' WHERE `entry`=201;
17+
UPDATE `trinity_string` SET `content_default`='│Player %s %s (%s)' WHERE `entry`=453;
18+
UPDATE `trinity_string` SET `content_default`='The value index %u is too big for %s (count: %u).' WHERE `entry`=564;
19+
UPDATE `trinity_string` SET `content_default`='You set %s field: %u to uint32 value: %u' WHERE `entry`=566;
20+
UPDATE `trinity_string` SET `content_default`='You set %s field: %u to float value: %f' WHERE `entry`=568;
21+
UPDATE `trinity_string` SET `content_default`='The uint32 value of %s in %u is: %u' WHERE `entry`=570;
22+
UPDATE `trinity_string` SET `content_default`='The float of %s value in %u is: %f' WHERE `entry`=572;
23+
UPDATE `trinity_string` SET `content_default`='| Guild Master: %s (%s)' WHERE `entry`=1178;

src/server/scripts/Commands/cs_arena.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class arena_commandscript : public CommandScript
9090
}
9191

9292
sArenaTeamMgr->AddArenaTeam(arena);
93-
handler->PSendSysMessage(LANG_ARENA_CREATE, arena->GetName().c_str(), arena->GetId(), arena->GetType(), arena->GetCaptain().GetCounter());
93+
handler->PSendSysMessage(LANG_ARENA_CREATE, arena->GetName().c_str(), arena->GetId(), arena->GetType(), arena->GetCaptain().ToString().c_str());
9494

9595
return true;
9696
}
@@ -216,7 +216,7 @@ class arena_commandscript : public CommandScript
216216

217217
handler->PSendSysMessage(LANG_ARENA_INFO_HEADER, arena->GetName().c_str(), arena->GetId(), arena->GetRating(), arena->GetType(), arena->GetType());
218218
for (ArenaTeam::MemberList::iterator itr = arena->m_membersBegin(); itr != arena->m_membersEnd(); ++itr)
219-
handler->PSendSysMessage(LANG_ARENA_INFO_MEMBERS, itr->Name.c_str(), itr->Guid.GetCounter(), itr->PersonalRating, (arena->GetCaptain() == itr->Guid ? "- Captain" : ""));
219+
handler->PSendSysMessage(LANG_ARENA_INFO_MEMBERS, itr->Name.c_str(), itr->Guid.ToString().c_str(), itr->PersonalRating, (arena->GetCaptain() == itr->Guid ? " - Captain" : ""));
220220

221221
return true;
222222
}

src/server/scripts/Commands/cs_character.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@ class character_commandscript : public CommandScript
180180

181181
if (!handler->GetSession())
182182
handler->PSendSysMessage(LANG_CHARACTER_DELETED_LIST_LINE_CONSOLE,
183-
itr->guid.GetCounter(), itr->name.c_str(), itr->accountName.empty() ? "<Not existing>" : itr->accountName.c_str(),
183+
itr->guid.ToString().c_str(), itr->name.c_str(), itr->accountName.empty() ? "<Not existing>" : itr->accountName.c_str(),
184184
itr->accountId, dateStr.c_str());
185185
else
186186
handler->PSendSysMessage(LANG_CHARACTER_DELETED_LIST_LINE_CHAT,
187-
itr->guid.GetCounter(), itr->name.c_str(), itr->accountName.empty() ? "<Not existing>" : itr->accountName.c_str(),
187+
itr->guid.ToString().c_str(), itr->name.c_str(), itr->accountName.empty() ? "<Not existing>" : itr->accountName.c_str(),
188188
itr->accountId, dateStr.c_str());
189189
}
190190

@@ -206,21 +206,21 @@ class character_commandscript : public CommandScript
206206
{
207207
if (delInfo.accountName.empty()) // account does not exist
208208
{
209-
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_ACCOUNT, delInfo.name.c_str(), delInfo.guid.GetCounter(), delInfo.accountId);
209+
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_ACCOUNT, delInfo.name.c_str(), delInfo.guid.ToString().c_str(), delInfo.accountId);
210210
return;
211211
}
212212

213213
// check character count
214214
uint32 charcount = AccountMgr::GetCharactersCount(delInfo.accountId);
215215
if (charcount >= 10)
216216
{
217-
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_FULL, delInfo.name.c_str(), delInfo.guid.GetCounter(), delInfo.accountId);
217+
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_FULL, delInfo.name.c_str(), delInfo.guid.ToString().c_str(), delInfo.accountId);
218218
return;
219219
}
220220

221221
if (!sCharacterCache->GetCharacterGuidByName(delInfo.name).IsEmpty())
222222
{
223-
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_NAME, delInfo.name.c_str(), delInfo.guid.GetCounter(), delInfo.accountId);
223+
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_NAME, delInfo.name.c_str(), delInfo.guid.ToString().c_str(), delInfo.accountId);
224224
return;
225225
}
226226

@@ -378,7 +378,7 @@ class character_commandscript : public CommandScript
378378
if (handler->HasLowerSecurity(nullptr, player->GetGUID()))
379379
return false;
380380

381-
handler->PSendSysMessage(LANG_RENAME_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter());
381+
handler->PSendSysMessage(LANG_RENAME_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().ToString().c_str());
382382

383383
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
384384
stmt->setUInt16(0, uint16(AT_LOGIN_RENAME));
@@ -405,7 +405,7 @@ class character_commandscript : public CommandScript
405405
}
406406
else
407407
{
408-
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter());
408+
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().ToString().c_str());
409409
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
410410
stmt->setUInt16(0, static_cast<uint16>(AT_LOGIN_CUSTOMIZE));
411411
stmt->setUInt32(1, player->GetGUID().GetCounter());
@@ -447,7 +447,7 @@ class character_commandscript : public CommandScript
447447
}
448448
else
449449
{
450-
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter());
450+
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().ToString().c_str());
451451
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
452452
stmt->setUInt16(0, uint16(AT_LOGIN_CHANGE_FACTION));
453453
stmt->setUInt32(1, player->GetGUID().GetCounter());
@@ -471,7 +471,7 @@ class character_commandscript : public CommandScript
471471
}
472472
else
473473
{
474-
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter());
474+
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().ToString().c_str());
475475
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
476476
stmt->setUInt16(0, uint16(AT_LOGIN_CHANGE_RACE));
477477
stmt->setUInt32(1, player->GetGUID().GetCounter());
@@ -749,7 +749,7 @@ class character_commandscript : public CommandScript
749749
AccountMgr::GetName(accountId, accountName);
750750

751751
Player::DeleteFromDB(player, accountId, true, true);
752-
handler->PSendSysMessage(LANG_CHARACTER_DELETED, player.GetName().c_str(), player.GetGUID().GetCounter(), accountName.c_str(), accountId);
752+
handler->PSendSysMessage(LANG_CHARACTER_DELETED, player.GetName().c_str(), player.GetGUID().ToString().c_str(), accountName.c_str(), accountId);
753753

754754
return true;
755755
}

src/server/scripts/Commands/cs_debug.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,19 +1157,19 @@ class debug_commandscript : public CommandScript
11571157

11581158
if (index >= target->GetValuesCount())
11591159
{
1160-
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, target->GetGUID().GetCounter(), target->GetValuesCount());
1160+
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, target->GetGUID().ToString().c_str(), target->GetValuesCount());
11611161
return false;
11621162
}
11631163

11641164
if (value.holds_alternative<uint32>())
11651165
{
11661166
target->SetUInt32Value(index, value.get<uint32>());
1167-
handler->PSendSysMessage(LANG_SET_UINT_FIELD, target->GetGUID().GetCounter(), index, value.get<uint32>());
1167+
handler->PSendSysMessage(LANG_SET_UINT_FIELD, target->GetGUID().ToString().c_str(), index, value.get<uint32>());
11681168
}
11691169
else if (value.holds_alternative<float>())
11701170
{
11711171
target->SetFloatValue(index, value.get<float>());
1172-
handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, target->GetGUID().GetCounter(), index, value.get<float>());
1172+
handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, target->GetGUID().ToString().c_str(), index, value.get<float>());
11731173
}
11741174

11751175
return true;
@@ -1189,19 +1189,19 @@ class debug_commandscript : public CommandScript
11891189

11901190
if (index >= target->GetValuesCount())
11911191
{
1192-
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, guid.GetCounter(), target->GetValuesCount());
1192+
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, guid.ToString().c_str(), target->GetValuesCount());
11931193
return false;
11941194
}
11951195

11961196
if (isInt)
11971197
{
11981198
uint32 value = target->GetUInt32Value(index);
1199-
handler->PSendSysMessage(LANG_GET_UINT_FIELD, guid.GetCounter(), index, value);
1199+
handler->PSendSysMessage(LANG_GET_UINT_FIELD, guid.ToString().c_str(), index, value);
12001200
}
12011201
else
12021202
{
12031203
float value = target->GetFloatValue(index);
1204-
handler->PSendSysMessage(LANG_GET_FLOAT_FIELD, guid.GetCounter(), index, value);
1204+
handler->PSendSysMessage(LANG_GET_FLOAT_FIELD, guid.ToString().c_str(), index, value);
12051205
}
12061206

12071207
return true;
@@ -1211,7 +1211,7 @@ class debug_commandscript : public CommandScript
12111211
{
12121212
if (index >= handler->GetPlayer()->GetValuesCount())
12131213
{
1214-
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, handler->GetPlayer()->GetGUID().GetCounter(), handler->GetPlayer()->GetValuesCount());
1214+
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, handler->GetPlayer()->GetGUID().ToString().c_str(), handler->GetPlayer()->GetValuesCount());
12151215
return false;
12161216
}
12171217

src/server/scripts/Commands/cs_gobject.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ class gobject_commandscript : public CommandScript
308308
Unit* owner = ObjectAccessor::GetUnit(*player, ownerGuid);
309309
if (!owner || !ownerGuid.IsPlayer())
310310
{
311-
handler->PSendSysMessage(LANG_COMMAND_DELOBJREFERCREATURE, ownerGuid.GetCounter(), spawnId);
311+
handler->PSendSysMessage(LANG_COMMAND_DELOBJREFERCREATURE, *spawnId, ownerGuid.ToString().c_str());
312312
handler->SetSentErrorMessage(true);
313313
return false;
314314
}

src/server/scripts/Commands/cs_group.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ class group_commandscript : public CommandScript
513513

514514
// Now we can print those informations for every single member of each group!
515515
handler->PSendSysMessage(LANG_GROUP_PLAYER_NAME_GUID, slot.name.c_str(), onlineState,
516-
zoneName, phase, slot.guid.GetCounter(), flags.c_str(),
516+
zoneName, phase, slot.guid.ToString().c_str(), flags.c_str(),
517517
lfg::GetRolesString(slot.roles).c_str());
518518
}
519519

src/server/scripts/Commands/cs_guild.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ class guild_commandscript : public CommandScript
281281

282282
std::string guildMasterName;
283283
if (sCharacterCache->GetCharacterNameByGuid(guild->GetLeaderGUID(), guildMasterName))
284-
handler->PSendSysMessage(LANG_GUILD_INFO_GUILD_MASTER, guildMasterName.c_str(), guild->GetLeaderGUID().GetCounter()); // Guild Master
284+
handler->PSendSysMessage(LANG_GUILD_INFO_GUILD_MASTER, guildMasterName.c_str(), guild->GetLeaderGUID().ToString().c_str()); // Guild Master
285285

286286
// Format creation date
287287
char createdDateStr[20];

src/server/scripts/Commands/cs_list.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ class list_commandscript : public CommandScript
486486
aurApp->GetEffectMask(), aura->GetCharges(), aura->GetStackAmount(), aurApp->GetSlot(),
487487
aura->GetDuration(), aura->GetMaxDuration(), (aura->IsPassive() ? passiveStr : ""),
488488
(talent ? talentStr : ""), aura->GetCasterGUID().IsPlayer() ? "player" : "creature",
489-
aura->GetCasterGUID().GetCounter());
489+
aura->GetCasterGUID().ToString().c_str());
490490
}
491491

492492
for (uint16 i = 0; i < TOTAL_AURAS; ++i)
@@ -546,7 +546,7 @@ class list_commandscript : public CommandScript
546546
uint32 countMail = fields[0].GetUInt64();
547547

548548
std::string nameLink = handler->playerLink(player->GetName());
549-
handler->PSendSysMessage(LANG_LIST_MAIL_HEADER, countMail, nameLink.c_str(), player->GetGUID().GetCounter());
549+
handler->PSendSysMessage(LANG_LIST_MAIL_HEADER, countMail, nameLink.c_str(), player->GetGUID().ToString().c_str());
550550
handler->PSendSysMessage(LANG_ACCOUNT_LIST_BAR);
551551

552552
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAIL_LIST_INFO);

src/server/scripts/Commands/cs_misc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1840,7 +1840,7 @@ class misc_commandscript : public CommandScript
18401840

18411841
// Initiate output
18421842
// Output I. LANG_PINFO_PLAYER
1843-
handler->PSendSysMessage(LANG_PINFO_PLAYER, target ? "" : handler->GetTrinityString(LANG_OFFLINE), nameLink.c_str(), lowguid);
1843+
handler->PSendSysMessage(LANG_PINFO_PLAYER, target ? "" : handler->GetTrinityString(LANG_OFFLINE), nameLink.c_str(), targetGuid.ToString().c_str());
18441844

18451845
// Output II. LANG_PINFO_GM_ACTIVE if character is gamemaster
18461846
if (target && target->IsGameMaster())

src/server/scripts/Commands/cs_npc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ class npc_commandscript : public CommandScript
431431

432432
creature->AI()->SetData(data_1, data_2);
433433
std::string AIorScript = !creature->GetAIName().empty() ? "AI type: " + creature->GetAIName() : (!creature->GetScriptName().empty() ? "Script Name: " + creature->GetScriptName() : "No AI or Script Name Set");
434-
handler->PSendSysMessage(LANG_NPC_SETDATA, creature->GetGUID().GetCounter(), creature->GetEntry(), creature->GetName().c_str(), data_1, data_2, AIorScript.c_str());
434+
handler->PSendSysMessage(LANG_NPC_SETDATA, creature->GetGUID().ToString().c_str(), creature->GetName().c_str(), data_1, data_2, AIorScript.c_str());
435435
return true;
436436
}
437437

0 commit comments

Comments
 (0)