diff options
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Commands/cs_arena.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_character.cpp | 20 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_debug.cpp | 14 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_gobject.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_group.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_guild.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_list.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_npc.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/World/action_ip_logger.cpp | 4 |
10 files changed, 27 insertions, 29 deletions
diff --git a/src/server/scripts/Commands/cs_arena.cpp b/src/server/scripts/Commands/cs_arena.cpp index dc7b5c329f8..68438d36061 100644 --- a/src/server/scripts/Commands/cs_arena.cpp +++ b/src/server/scripts/Commands/cs_arena.cpp @@ -90,7 +90,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().c_str(), arena->GetId(), arena->GetType(), arena->GetCaptain().ToString().c_str()); return true; } @@ -216,7 +216,7 @@ public: handler->PSendSysMessage(LANG_ARENA_INFO_HEADER, arena->GetName().c_str(), arena->GetId(), arena->GetRating(), arena->GetType(), arena->GetType()); for (ArenaTeam::MemberList::iterator itr = arena->m_membersBegin(); itr != arena->m_membersEnd(); ++itr) - 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.c_str(), itr->Guid.ToString().c_str(), itr->PersonalRating, (arena->GetCaptain() == itr->Guid ? " - Captain" : "")); return true; } diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index 7c557055fd2..aef0b9a73bf 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -180,11 +180,11 @@ public: if (!handler->GetSession()) handler->PSendSysMessage(LANG_CHARACTER_DELETED_LIST_LINE_CONSOLE, - itr->guid.GetCounter(), itr->name.c_str(), itr->accountName.empty() ? "<Not existing>" : itr->accountName.c_str(), + itr->guid.ToString().c_str(), itr->name.c_str(), itr->accountName.empty() ? "<Not existing>" : itr->accountName.c_str(), itr->accountId, dateStr.c_str()); else handler->PSendSysMessage(LANG_CHARACTER_DELETED_LIST_LINE_CHAT, - itr->guid.GetCounter(), itr->name.c_str(), itr->accountName.empty() ? "<Not existing>" : itr->accountName.c_str(), + itr->guid.ToString().c_str(), itr->name.c_str(), itr->accountName.empty() ? "<Not existing>" : itr->accountName.c_str(), itr->accountId, dateStr.c_str()); } @@ -206,7 +206,7 @@ public: { if (delInfo.accountName.empty()) // account does not exist { - handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_ACCOUNT, delInfo.name.c_str(), delInfo.guid.GetCounter(), delInfo.accountId); + handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_ACCOUNT, delInfo.name.c_str(), delInfo.guid.ToString().c_str(), delInfo.accountId); return; } @@ -214,13 +214,13 @@ public: uint32 charcount = AccountMgr::GetCharactersCount(delInfo.accountId); if (charcount >= 10) { - handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_FULL, delInfo.name.c_str(), delInfo.guid.GetCounter(), delInfo.accountId); + handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_FULL, delInfo.name.c_str(), delInfo.guid.ToString().c_str(), delInfo.accountId); return; } if (!sCharacterCache->GetCharacterGuidByName(delInfo.name).IsEmpty()) { - handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_NAME, delInfo.name.c_str(), delInfo.guid.GetCounter(), delInfo.accountId); + handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_NAME, delInfo.name.c_str(), delInfo.guid.ToString().c_str(), delInfo.accountId); return; } @@ -378,7 +378,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).c_str(), player->GetGUID().ToString().c_str()); CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->setUInt16(0, uint16(AT_LOGIN_RENAME)); @@ -405,7 +405,7 @@ public: } else { - handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter()); + handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().ToString().c_str()); CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->setUInt16(0, static_cast<uint16>(AT_LOGIN_CUSTOMIZE)); stmt->setUInt32(1, player->GetGUID().GetCounter()); @@ -447,7 +447,7 @@ public: } else { - handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter()); + handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().ToString().c_str()); CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->setUInt16(0, uint16(AT_LOGIN_CHANGE_FACTION)); stmt->setUInt32(1, player->GetGUID().GetCounter()); @@ -471,7 +471,7 @@ public: } else { - handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter()); + handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().ToString().c_str()); CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->setUInt16(0, uint16(AT_LOGIN_CHANGE_RACE)); stmt->setUInt32(1, player->GetGUID().GetCounter()); @@ -749,7 +749,7 @@ public: AccountMgr::GetName(accountId, accountName); Player::DeleteFromDB(player, 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().c_str(), player.GetGUID().ToString().c_str(), accountName.c_str(), accountId); return true; } diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index b4331ce67bd..b71f164e23d 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -1157,19 +1157,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().c_str(), target->GetValuesCount()); return false; } if (value.holds_alternative<uint32>()) { target->SetUInt32Value(index, value.get<uint32>()); - handler->PSendSysMessage(LANG_SET_UINT_FIELD, target->GetGUID().GetCounter(), index, value.get<uint32>()); + handler->PSendSysMessage(LANG_SET_UINT_FIELD, target->GetGUID().ToString().c_str(), index, value.get<uint32>()); } else if (value.holds_alternative<float>()) { target->SetFloatValue(index, value.get<float>()); - handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, target->GetGUID().GetCounter(), index, value.get<float>()); + handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, target->GetGUID().ToString().c_str(), index, value.get<float>()); } return true; @@ -1189,19 +1189,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().c_str(), 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().c_str(), 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().c_str(), index, value); } return true; @@ -1211,7 +1211,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().c_str(), handler->GetPlayer()->GetValuesCount()); return false; } diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index 0012bec5156..7775ad5b543 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -308,7 +308,7 @@ public: Unit* owner = ObjectAccessor::GetUnit(*player, ownerGuid); if (!owner || !ownerGuid.IsPlayer()) { - handler->PSendSysMessage(LANG_COMMAND_DELOBJREFERCREATURE, ownerGuid.GetCounter(), spawnId); + handler->PSendSysMessage(LANG_COMMAND_DELOBJREFERCREATURE, *spawnId, ownerGuid.ToString().c_str()); handler->SetSentErrorMessage(true); return false; } diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp index 731521ef0d7..75c6c267a32 100644 --- a/src/server/scripts/Commands/cs_group.cpp +++ b/src/server/scripts/Commands/cs_group.cpp @@ -513,7 +513,7 @@ public: // Now we can print those informations for every single member of each group! handler->PSendSysMessage(LANG_GROUP_PLAYER_NAME_GUID, slot.name.c_str(), onlineState, - zoneName, phase, slot.guid.GetCounter(), flags.c_str(), + zoneName, phase, slot.guid.ToString().c_str(), flags.c_str(), lfg::GetRolesString(slot.roles).c_str()); } diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp index bd3403fa40e..9257acca172 100644 --- a/src/server/scripts/Commands/cs_guild.cpp +++ b/src/server/scripts/Commands/cs_guild.cpp @@ -281,7 +281,7 @@ public: 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.c_str(), guild->GetLeaderGUID().ToString().c_str()); // Guild Master // Format creation date char createdDateStr[20]; diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index e076acad15e..b7bc562053a 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -486,7 +486,7 @@ public: 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().c_str()); } for (uint16 i = 0; i < TOTAL_AURAS; ++i) @@ -546,7 +546,7 @@ public: uint32 countMail = fields[0].GetUInt64(); std::string nameLink = handler->playerLink(player->GetName()); - handler->PSendSysMessage(LANG_LIST_MAIL_HEADER, countMail, nameLink.c_str(), player->GetGUID().GetCounter()); + handler->PSendSysMessage(LANG_LIST_MAIL_HEADER, countMail, nameLink.c_str(), player->GetGUID().ToString().c_str()); handler->PSendSysMessage(LANG_ACCOUNT_LIST_BAR); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAIL_LIST_INFO); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index f6df2fdec40..7d784249cf6 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1840,7 +1840,7 @@ public: // Initiate output // Output I. LANG_PINFO_PLAYER - handler->PSendSysMessage(LANG_PINFO_PLAYER, target ? "" : handler->GetTrinityString(LANG_OFFLINE), nameLink.c_str(), lowguid); + handler->PSendSysMessage(LANG_PINFO_PLAYER, target ? "" : handler->GetTrinityString(LANG_OFFLINE), nameLink.c_str(), targetGuid.ToString().c_str()); // Output II. LANG_PINFO_GM_ACTIVE if character is gamemaster if (target && target->IsGameMaster()) diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 9b86dc7d576..c8421bc6edb 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -431,7 +431,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().c_str(), creature->GetName().c_str(), data_1, data_2, AIorScript.c_str()); return true; } diff --git a/src/server/scripts/World/action_ip_logger.cpp b/src/server/scripts/World/action_ip_logger.cpp index 2c3ac642795..f5e1f05569d 100644 --- a/src/server/scripts/World/action_ip_logger.cpp +++ b/src/server/scripts/World/action_ip_logger.cpp @@ -275,8 +275,6 @@ public: // Action IP Logger is only intialized if config is set up // Else, this script isn't loaded in the first place: We require no config check. - // We declare all the required variables - ObjectGuid::LowType characterGuid = guid.GetCounter(); // We have no access to any member function of Player* or WorldSession*. So use old-fashioned way. uint32 realmId = realm.Id.Realm; // Query playerGuid/accountId, as we only have characterGuid std::string systemNote = "ERROR"; // "ERROR" is a placeholder here. We change it later. @@ -302,7 +300,7 @@ public: LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ALDL_IP_LOGGING); stmt->setUInt32(0, playerGuid); - stmt->setUInt64(1, characterGuid); + stmt->setUInt64(1, guid.GetCounter()); stmt->setUInt32(2, realmId); stmt->setUInt8(3, aType); stmt->setUInt32(4, playerGuid); |
