From 139e6d63623e34f8d7585cce9d6de4d8e195456c Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sat, 20 Jul 2024 00:43:08 +0200 Subject: [PATCH 01/23] fix(DB/Creature): Ormus the Penitent (#19444) * fix(DB/Creature): Ormus the Penitent * Update rev_1721400804205047100.sql --- .../rev_1721400804205047100.sql | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1721400804205047100.sql diff --git a/data/sql/updates/pending_db_world/rev_1721400804205047100.sql b/data/sql/updates/pending_db_world/rev_1721400804205047100.sql new file mode 100644 index 00000000000000..7160d17cc5eeb9 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1721400804205047100.sql @@ -0,0 +1,24 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 10996 AND `SourceEntry` = 6 AND `ConditionTypeOrReference` IN (2,8); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 10996, 6, 0, 1, 2, 0, 50375, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Courage\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50376, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Vengeance\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50377, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Destruction\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50378, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Wisdom\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50384, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Greater Destruction\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50386, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Greater Wisdom\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50387, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Greater Vengeance\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50388, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Greater Courage\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50397, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Unmatched Destruction\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50398, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Endless Destruction\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50399, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Unmatched Wisdom\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50400, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Endless Wisdom\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50401, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Unmatched Vengeance\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50402, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Endless Vengeance\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50403, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Unmatched Courage\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 50404, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Endless Courage\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 52569, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Might\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 52570, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Greater Might\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 52571, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Unmatched Might\' AND'), +(15, 10996, 6, 0, 1, 2, 0, 52572, 1, 1, 1, 0, 0, '', 'Show Gossip Option 6 if player does not have item \'Ashen Band of Endless Might\' AND'), +(15, 10996, 6, 0, 1, 8, 0, 24815, 0, 0, 0, 0, 0, '', 'Show Gossip Option 6 if Quest \'Choose your path\' is rewarded'); From dace083a6299d3cfd23ae977ac267d122f10eb92 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 19 Jul 2024 22:44:00 +0000 Subject: [PATCH 02/23] chore(DB): import pending files Referenced commit(s): 139e6d63623e34f8d7585cce9d6de4d8e195456c --- .../rev_1721400804205047100.sql => db_world/2024_07_19_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1721400804205047100.sql => db_world/2024_07_19_03.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1721400804205047100.sql b/data/sql/updates/db_world/2024_07_19_03.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1721400804205047100.sql rename to data/sql/updates/db_world/2024_07_19_03.sql index 7160d17cc5eeb9..5b28322bd9ac32 100644 --- a/data/sql/updates/pending_db_world/rev_1721400804205047100.sql +++ b/data/sql/updates/db_world/2024_07_19_03.sql @@ -1,3 +1,4 @@ +-- DB update 2024_07_19_02 -> 2024_07_19_03 -- DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 10996 AND `SourceEntry` = 6 AND `ConditionTypeOrReference` IN (2,8); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES From 5c09a3194e09e4c1c6a752a8648f50ee342e1157 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sat, 20 Jul 2024 02:54:47 +0200 Subject: [PATCH 03/23] fix(Core/Config): Allow `#` outside of comments (#19447) --- src/common/Configuration/Config.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp index d8665593ca4b7e..8dcb65b15535b6 100644 --- a/src/common/Configuration/Config.cpp +++ b/src/common/Configuration/Config.cpp @@ -144,29 +144,17 @@ namespace // read line error if (!in.good() && !in.eof()) - { throw ConfigException(Acore::StringFormatFmt("> Config::LoadFile: Failure to read line number {} in file '{}'", lineNumber, file)); - } // remove whitespace in line line = Acore::String::Trim(line, in.getloc()); if (line.empty()) - { continue; - } - // comments + // comments and headers if (line[0] == '#' || line[0] == '[') - { continue; - } - - size_t found = line.find_first_of('#'); - if (found != std::string::npos) - { - line = line.substr(0, found); - } auto const equal_pos = line.find('='); @@ -183,9 +171,7 @@ namespace // Skip if 2+ same options in one config file if (IsDuplicateOption(entry)) - { continue; - } // Add to temp container fileConfigs.emplace(entry, value); From 21f86d1c3c0d48ca8f31c6d6f29005fe492a9a2e Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sat, 20 Jul 2024 07:41:01 +0200 Subject: [PATCH 04/23] chore(Core/Misc): Remove deprecated code (#19413) * Config - Deprecated for 3 years * ChatCommand - Deprecated for 2 years * getLevel() - Deprecated for 2 years * SendGlobalText - Deprecated for 8 years + --- src/common/Configuration/Config.cpp | 24 ----------- src/common/Configuration/Config.h | 20 ---------- .../game/Chat/ChatCommands/ChatCommand.h | 13 ------ .../game/Entities/Creature/GossipDef.cpp | 2 +- src/server/game/Entities/Unit/Unit.h | 4 +- src/server/game/World/IWorld.h | 1 - src/server/game/World/World.cpp | 18 --------- src/server/game/World/World.h | 1 - src/server/scripts/Commands/cs_account.cpp | 40 +++++++++---------- src/server/scripts/Commands/cs_ban.cpp | 36 ++++++++--------- src/server/scripts/Commands/cs_learn.cpp | 8 ++-- src/server/scripts/Commands/cs_wp.cpp | 16 ++++---- src/test/mocks/WorldMock.h | 1 - 13 files changed, 52 insertions(+), 132 deletions(-) diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp index 8dcb65b15535b6..0cd69584d3cb59 100644 --- a/src/common/Configuration/Config.cpp +++ b/src/common/Configuration/Config.cpp @@ -649,30 +649,6 @@ bool ConfigMgr::LoadModulesConfigs(bool isReload /*= false*/, bool isNeedPrintIn return true; } -/// @deprecated DO NOT USE - use GetOption instead. -std::string ConfigMgr::GetStringDefault(std::string const& name, const std::string& def, bool showLogs /*= true*/) -{ - return GetOption(name, def, showLogs); -} - -/// @deprecated DO NOT USE - use GetOption instead. -bool ConfigMgr::GetBoolDefault(std::string const& name, bool def, bool showLogs /*= true*/) -{ - return GetOption(name, def, showLogs); -} - -/// @deprecated DO NOT USE - use GetOption instead. -int ConfigMgr::GetIntDefault(std::string const& name, int def, bool showLogs /*= true*/) -{ - return GetOption(name, def, showLogs); -} - -/// @deprecated DO NOT USE - use GetOption instead. -float ConfigMgr::GetFloatDefault(std::string const& name, float def, bool showLogs /*= true*/) -{ - return GetOption(name, def, showLogs); -} - #define TEMPLATE_CONFIG_OPTION(__typename) \ template __typename ConfigMgr::GetOption<__typename>(std::string const& name, __typename const& def, bool showLogs /*= true*/) const; diff --git a/src/common/Configuration/Config.h b/src/common/Configuration/Config.h index db7410e05e407b..c7708290e78030 100644 --- a/src/common/Configuration/Config.h +++ b/src/common/Configuration/Config.h @@ -50,26 +50,6 @@ class ConfigMgr template T GetOption(std::string const& name, T const& def, bool showLogs = true) const; - /* - * Deprecated geters. This geters will be deleted - */ - - [[deprecated("Use GetOption instead")]] - std::string GetStringDefault(std::string const& name, const std::string& def, bool showLogs = true); - - [[deprecated("Use GetOption instead")]] - bool GetBoolDefault(std::string const& name, bool def, bool showLogs = true); - - [[deprecated("Use GetOption instead")]] - int GetIntDefault(std::string const& name, int def, bool showLogs = true); - - [[deprecated("Use GetOption instead")]] - float GetFloatDefault(std::string const& name, float def, bool showLogs = true); - - /* - * End deprecated geters - */ - bool isDryRun() { return dryRun; } void setDryRun(bool mode) { dryRun = mode; } diff --git a/src/server/game/Chat/ChatCommands/ChatCommand.h b/src/server/game/Chat/ChatCommands/ChatCommand.h index 2351b1b032f0c7..4f51206be8d67d 100644 --- a/src/server/game/Chat/ChatCommands/ChatCommand.h +++ b/src/server/game/Chat/ChatCommands/ChatCommand.h @@ -248,19 +248,6 @@ namespace Acore::ChatCommands ChatCommandBuilder(char const* name, std::vector const& subCommands) : _name{ ASSERT_NOTNULL(name) }, _data{ std::in_place_type, subCommands } { } - [[deprecated("char const* parameters to command handlers are deprecated; convert this to a typed argument handler instead")]] - ChatCommandBuilder(char const* name, bool(&handler)(ChatHandler*, char const*), uint32 securityLevel, Acore::ChatCommands::Console allowConsole) - : ChatCommandBuilder(name, handler, AcoreStrings(), securityLevel, allowConsole) { } - - template - [[deprecated("you are using the old-style command format; convert this to the new format ({ name, handler (not a pointer!), permission, Console::(Yes/No) })")]] - ChatCommandBuilder(char const* name, uint32 securityLevel, bool console, TypedHandler* handler, char const*) - : ChatCommandBuilder(name, *handler, AcoreStrings(), securityLevel, static_cast(console)) { } - - [[deprecated("you are using the old-style command format; convert this to the new format ({ name, subCommands })")]] - ChatCommandBuilder(char const* name, uint32, bool, std::nullptr_t, char const*, std::vector const& sub) - : ChatCommandBuilder(name, sub) { } - private: std::string_view _name; std::variant _data; diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp index 012e5599df19c4..077ef5d5e8bf5f 100644 --- a/src/server/game/Entities/Creature/GossipDef.cpp +++ b/src/server/game/Entities/Creature/GossipDef.cpp @@ -451,7 +451,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, ObjectGuid npcGU uint32 moneyRew = 0; Player* player = _session->GetPlayer(); - if (player && (player->getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(player))) + if (player && (player->GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(player))) { moneyRew = quest->GetRewMoneyMaxLevel(); } diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 106a35eed1bab9..ad9d7d74bacf30 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1506,9 +1506,7 @@ class Unit : public WorldObject [[nodiscard]] bool IsTotem() const { return m_unitTypeMask & UNIT_MASK_TOTEM; } [[nodiscard]] bool IsVehicle() const { return m_unitTypeMask & UNIT_MASK_VEHICLE; } - /// @deprecated Use GetLevel() instead! - [[nodiscard]] uint8 getLevel() const { return uint8(GetUInt32Value(UNIT_FIELD_LEVEL)); } - [[nodiscard]] uint8 GetLevel() const { return getLevel(); } + [[nodiscard]] uint8 GetLevel() const { return uint8(GetUInt32Value(UNIT_FIELD_LEVEL)); } uint8 getLevelForTarget(WorldObject const* /*target*/) const override { return GetLevel(); } void SetLevel(uint8 lvl, bool showLevelChange = true); [[nodiscard]] uint8 getRace(bool original = false) const; diff --git a/src/server/game/World/IWorld.h b/src/server/game/World/IWorld.h index 8f91452fef9e34..77ab6738819f2b 100644 --- a/src/server/game/World/IWorld.h +++ b/src/server/game/World/IWorld.h @@ -567,7 +567,6 @@ class IWorld virtual void LoadConfigSettings(bool reload = false) = 0; virtual void SendWorldText(uint32 string_id, ...) = 0; virtual void SendWorldTextOptional(uint32 string_id, uint32 flag, ...) = 0; - virtual void SendGlobalText(const char* text, WorldSession* self) = 0; virtual void SendGMText(uint32 string_id, ...) = 0; virtual void SendGlobalMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) = 0; virtual void SendGlobalGMMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) = 0; diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 0cc06171e054db..55b5c3877e6ab8 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -2649,24 +2649,6 @@ void World::SendGMText(uint32 string_id, ...) va_end(ap); } -/// @deprecated only for debug purpose. Send a System Message to all players (except self if mentioned) -void World::SendGlobalText(const char* text, WorldSession* self) -{ - WorldPacket data; - - // need copy to prevent corruption by strtok call in LineFromMessage original string - char* buf = strdup(text); - char* pos = buf; - - while (char* line = ChatHandler::LineFromMessage(pos)) - { - ChatHandler::BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, nullptr, nullptr, line); - SendGlobalMessage(&data, self); - } - - free(buf); -} - /// Send a packet to all players (or players selected team) in the zone (except self if mentioned) bool World::SendZoneMessage(uint32 zone, WorldPacket const* packet, WorldSession* self, TeamId teamId) { diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index 375562a74e3309..3968dbd8f5488f 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -239,7 +239,6 @@ class World: public IWorld void LoadConfigSettings(bool reload = false) override; void SendWorldText(uint32 string_id, ...) override; - void SendGlobalText(const char* text, WorldSession* self) override; void SendGMText(uint32 string_id, ...) override; void SendGlobalMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) override; void SendGlobalGMMessage(WorldPacket const* packet, WorldSession* self = nullptr, TeamId teamId = TEAM_NEUTRAL) override; diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 3187e6a7419073..922ea5cb1ef4d7 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -52,46 +52,46 @@ class account_commandscript : public CommandScript { static ChatCommandTable accountSetCommandTable = { - { "addon", SEC_GAMEMASTER, true, &HandleAccountSetAddonCommand, "" }, - { "gmlevel", SEC_CONSOLE, true, &HandleAccountSetGmLevelCommand, "" }, - { "password", SEC_CONSOLE, true, &HandleAccountSetPasswordCommand, "" }, - { "2fa", SEC_PLAYER, true, &HandleAccountSet2FACommand, "" } + { "addon", HandleAccountSetAddonCommand, SEC_GAMEMASTER, Console::Yes }, + { "gmlevel", HandleAccountSetGmLevelCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "password", HandleAccountSetPasswordCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "2fa", HandleAccountSet2FACommand, SEC_PLAYER, Console::Yes } }; static ChatCommandTable accountLockCommandTable { - { "country", SEC_PLAYER, true, &HandleAccountLockCountryCommand, "" }, - { "ip", SEC_PLAYER, true, &HandleAccountLockIpCommand, "" } + { "country", HandleAccountLockCountryCommand, SEC_PLAYER, Console::Yes }, + { "ip", HandleAccountLockIpCommand, SEC_PLAYER, Console::Yes } }; static ChatCommandTable account2faCommandTable { - { "setup", SEC_PLAYER, false, &HandleAccount2FASetupCommand, "" }, - { "remove", SEC_PLAYER, false, &HandleAccount2FARemoveCommand, "" }, + { "setup", HandleAccount2FASetupCommand, SEC_PLAYER, Console::No }, + { "remove", HandleAccount2FARemoveCommand, SEC_PLAYER, Console::No } }; static ChatCommandTable accountRemoveCommandTable { - { "country", SEC_ADMINISTRATOR, true, &HandleAccountRemoveLockCountryCommand, "" } + { "country", HandleAccountRemoveLockCountryCommand, SEC_ADMINISTRATOR, Console::Yes }, }; static ChatCommandTable accountCommandTable = { - { "2fa", SEC_PLAYER, true, nullptr, "", account2faCommandTable }, - { "addon", SEC_MODERATOR, false, &HandleAccountAddonCommand, "" }, - { "create", SEC_CONSOLE, true, &HandleAccountCreateCommand, "" }, - { "delete", SEC_CONSOLE, true, &HandleAccountDeleteCommand, "" }, - { "onlinelist", SEC_CONSOLE, true, &HandleAccountOnlineListCommand, "" }, - { "lock", SEC_PLAYER, false, nullptr, "", accountLockCommandTable }, - { "set", SEC_ADMINISTRATOR, true, nullptr, "", accountSetCommandTable }, - { "password", SEC_PLAYER, false, &HandleAccountPasswordCommand, "" }, - { "remove", SEC_ADMINISTRATOR, true, nullptr, "", accountRemoveCommandTable }, - { "", SEC_PLAYER, false, &HandleAccountCommand, "" } + { "2fa", account2faCommandTable }, + { "addon", HandleAccountAddonCommand, SEC_MODERATOR, Console::No }, + { "create", HandleAccountCreateCommand, SEC_CONSOLE, Console::Yes }, + { "delete", HandleAccountDeleteCommand, SEC_CONSOLE, Console::Yes }, + { "onlinelist", HandleAccountOnlineListCommand, SEC_CONSOLE, Console::Yes }, + { "lock", accountLockCommandTable }, + { "set", accountSetCommandTable }, + { "password", HandleAccountPasswordCommand, SEC_PLAYER, Console::No }, + { "remove", accountRemoveCommandTable }, + { "", HandleAccountCommand, SEC_PLAYER, Console::No } }; static ChatCommandTable commandTable = { - { "account", SEC_PLAYER, true, nullptr, "", accountCommandTable } + { "account", accountCommandTable } }; return commandTable; diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp index 4bdec3f6cb596a..a17880f23d2ff8 100644 --- a/src/server/scripts/Commands/cs_ban.cpp +++ b/src/server/scripts/Commands/cs_ban.cpp @@ -56,40 +56,40 @@ class ban_commandscript : public CommandScript { static ChatCommandTable unbanCommandTable = { - { "account", SEC_ADMINISTRATOR, true, &HandleUnBanAccountCommand, "" }, - { "character", SEC_ADMINISTRATOR, true, &HandleUnBanCharacterCommand, "" }, - { "playeraccount", SEC_ADMINISTRATOR, true, &HandleUnBanAccountByCharCommand, "" }, - { "ip", SEC_ADMINISTRATOR, true, &HandleUnBanIPCommand, "" } + { "account", HandleUnBanAccountCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "character", HandleUnBanCharacterCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "playeraccount", HandleUnBanAccountByCharCommand, SEC_ADMINISTRATOR, Console::Yes }, + { "ip", HandleUnBanIPCommand, SEC_ADMINISTRATOR, Console::Yes } }; static ChatCommandTable banlistCommandTable = { - { "account", SEC_GAMEMASTER, true, &HandleBanListAccountCommand, "" }, - { "character", SEC_GAMEMASTER, true, &HandleBanListCharacterCommand, "" }, - { "ip", SEC_GAMEMASTER, true, &HandleBanListIPCommand, "" } + { "account", HandleBanListAccountCommand, SEC_GAMEMASTER, Console::Yes }, + { "character", HandleBanListCharacterCommand, SEC_GAMEMASTER, Console::Yes }, + { "ip", HandleBanListIPCommand, SEC_GAMEMASTER, Console::Yes } }; static ChatCommandTable baninfoCommandTable = { - { "account", SEC_GAMEMASTER, true, &HandleBanInfoAccountCommand, "" }, - { "character", SEC_GAMEMASTER, true, &HandleBanInfoCharacterCommand, "" }, - { "ip", SEC_GAMEMASTER, true, &HandleBanInfoIPCommand, "" } + { "account", HandleBanInfoAccountCommand, SEC_GAMEMASTER, Console::Yes }, + { "character", HandleBanInfoCharacterCommand, SEC_GAMEMASTER, Console::Yes }, + { "ip", HandleBanInfoIPCommand, SEC_GAMEMASTER, Console::Yes } }; static ChatCommandTable banCommandTable = { - { "account", SEC_GAMEMASTER, true, &HandleBanAccountCommand, "" }, - { "character", SEC_GAMEMASTER, true, &HandleBanCharacterCommand, "" }, - { "playeraccount", SEC_GAMEMASTER, true, &HandleBanAccountByCharCommand, "" }, - { "ip", SEC_GAMEMASTER, true, &HandleBanIPCommand, "" } + { "account", HandleBanAccountCommand, SEC_GAMEMASTER, Console::Yes }, + { "character", HandleBanCharacterCommand, SEC_GAMEMASTER, Console::Yes }, + { "playeraccount",HandleBanAccountByCharCommand, SEC_GAMEMASTER, Console::Yes }, + { "ip", HandleBanIPCommand, SEC_GAMEMASTER, Console::Yes } }; static ChatCommandTable commandTable = { - { "ban", SEC_GAMEMASTER, true, nullptr, "", banCommandTable }, - { "baninfo", SEC_GAMEMASTER, true, nullptr, "", baninfoCommandTable }, - { "banlist", SEC_GAMEMASTER, true, nullptr, "", banlistCommandTable }, - { "unban", SEC_ADMINISTRATOR, true, nullptr, "", unbanCommandTable } + { "ban", banCommandTable }, + { "baninfo", baninfoCommandTable }, + { "banlist", banlistCommandTable }, + { "unban", unbanCommandTable } }; return commandTable; diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 6664a294de8767..08c29492d08315 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -50,7 +50,7 @@ class learn_commandscript : public CommandScript static ChatCommandTable learnAllCommandTable = { - { "my", learnAllMyCommandTable }, + { "my", learnAllMyCommandTable }, { "gm", HandleLearnAllGMCommand, SEC_GAMEMASTER, Console::No }, { "crafts", HandleLearnAllCraftsCommand, SEC_GAMEMASTER, Console::No }, { "default", HandleLearnAllDefaultCommand, SEC_GAMEMASTER, Console::No }, @@ -60,14 +60,14 @@ class learn_commandscript : public CommandScript static ChatCommandTable learnCommandTable = { - { "all", learnAllCommandTable }, + { "all", learnAllCommandTable }, { "", HandleLearnCommand, SEC_GAMEMASTER, Console::No } }; static ChatCommandTable commandTable = { - { "learn", learnCommandTable }, - { "unlearn", HandleUnLearnCommand, SEC_GAMEMASTER, Console::No } + { "learn", learnCommandTable }, + { "unlearn", HandleUnLearnCommand, SEC_GAMEMASTER, Console::No } }; return commandTable; } diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp index fa77beb3af2e15..2200d5683b7e44 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -42,17 +42,17 @@ class wp_commandscript : public CommandScript { static ChatCommandTable wpCommandTable = { - { "add", SEC_ADMINISTRATOR, false, &HandleWpAddCommand, "" }, - { "event", SEC_ADMINISTRATOR, false, &HandleWpEventCommand, "" }, - { "load", SEC_ADMINISTRATOR, false, &HandleWpLoadCommand, "" }, - { "modify", SEC_ADMINISTRATOR, false, &HandleWpModifyCommand, "" }, - { "unload", SEC_ADMINISTRATOR, false, &HandleWpUnLoadCommand, "" }, - { "reload", SEC_ADMINISTRATOR, false, &HandleWpReloadCommand, "" }, - { "show", SEC_ADMINISTRATOR, false, &HandleWpShowCommand, "" } + { "add", HandleWpAddCommand, SEC_ADMINISTRATOR, Console::No }, + { "event", HandleWpEventCommand, SEC_ADMINISTRATOR, Console::No }, + { "load", HandleWpLoadCommand, SEC_ADMINISTRATOR, Console::No }, + { "modify", HandleWpModifyCommand, SEC_ADMINISTRATOR, Console::No }, + { "unload", HandleWpUnLoadCommand, SEC_ADMINISTRATOR, Console::No }, + { "reload", HandleWpReloadCommand, SEC_ADMINISTRATOR, Console::No }, + { "show", HandleWpShowCommand, SEC_ADMINISTRATOR, Console::No } }; static ChatCommandTable commandTable = { - { "wp", SEC_ADMINISTRATOR, false, nullptr, "", wpCommandTable } + { "wp", wpCommandTable } }; return commandTable; } diff --git a/src/test/mocks/WorldMock.h b/src/test/mocks/WorldMock.h index 26a29463bcd9aa..3ac4d571dbde0c 100644 --- a/src/test/mocks/WorldMock.h +++ b/src/test/mocks/WorldMock.h @@ -74,7 +74,6 @@ class WorldMock: public IWorld MOCK_METHOD(void, LoadConfigSettings, (bool reload), ()); void SendWorldText(uint32 string_id, ...) override {} void SendWorldTextOptional(uint32 string_id, uint32 flag, ...) override {} - MOCK_METHOD(void, SendGlobalText, (const char* text, WorldSession* self), ()); void SendGMText(uint32 string_id, ...) override {} MOCK_METHOD(void, SendGlobalMessage, (WorldPacket const* packet, WorldSession* self, TeamId teamId), ()); MOCK_METHOD(void, SendGlobalGMMessage, (WorldPacket const* packet, WorldSession* self, TeamId teamId), ()); From b9136e060d4e7543e41ee8d6b76035ef1d45b4b8 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sat, 20 Jul 2024 20:27:08 +0200 Subject: [PATCH 05/23] fix(CI): tools (#19453) * fix(CI): tools * Update tools_build.yml * I dont think this is neccessary. Let's see if CI agrees with me --- .github/actions/linux-build/action.yml | 11 +++--- .github/workflows/tools_build.yml | 46 +++++++++----------------- 2 files changed, 21 insertions(+), 36 deletions(-) diff --git a/.github/actions/linux-build/action.yml b/.github/actions/linux-build/action.yml index 7218239cc23a49..132cfc9fa4aa31 100644 --- a/.github/actions/linux-build/action.yml +++ b/.github/actions/linux-build/action.yml @@ -16,6 +16,11 @@ inputs: description: Flag to install modules or not required: true type: boolean + tools: + default: none + description: Flag to enable tools build + required: false + type: string pch: default: false description: Flag to enable or disable PCH @@ -94,7 +99,7 @@ runs: cmake "$GITHUB_WORKSPACE" \ -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/env/dist" \ -DAPPS_BUILD="all" \ - -DTOOLS_BUILD="all" \ + -DTOOLS_BUILD=${{ inputs.tools }} \ -DSCRIPTS="static" \ -DMODULES="static" \ -DWITH_WARNINGS="ON" \ @@ -144,10 +149,6 @@ runs: shell: bash run: sudo systemctl start mysql.service - - name: run dbimport - shell: bash - run: env/dist/bin/dbimport - - name: Dry run authserver shell: bash run: timeout 5m env/dist/bin/authserver --dry-run diff --git a/.github/workflows/tools_build.yml b/.github/workflows/tools_build.yml index 99c69c2c473884..91dd7c4dccdd3b 100644 --- a/.github/workflows/tools_build.yml +++ b/.github/workflows/tools_build.yml @@ -12,40 +12,24 @@ concurrency: jobs: build: strategy: - fail-fast: false + fail-fast: true matrix: - # the result of the matrix will be the combination of all attributes, so we get os*compiler builds - os: [ubuntu-24.04] - compiler: [clang] + include: + - os: ubuntu-24.04 + compiler: + CC: clang-18 + CXX: clang++-18 runs-on: ${{ matrix.os }} - name: ${{ matrix.os }}-${{ matrix.compiler }} - env: - COMPILER: ${{ matrix.compiler }} + name: ${{ matrix.os }}-${{ matrix.compiler.CC }} if: | - github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft - && ( - contains(github.event.pull_request.labels.*.name, 'run-build') - || github.event.label.name == 'run-build' - ) + github.repository == 'azerothcore/azerothcore-wotlk' + && !github.event.pull_request.draft + && (github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build') steps: - uses: actions/checkout@v4 - - name: Cache - uses: actions/cache@v4 - env: - cache-name: cache-tools + - uses: ./.github/actions/linux-build with: - path: var/ccache - key: ${{ env.cache-name }}-${{ matrix.os }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.sha }} - restore-keys: | - ${{ env.cache-name }}-${{ matrix.os }}-${{ matrix.compiler }}-${{ github.ref }}- - ${{ env.cache-name }}-${{ matrix.os }}-${{ matrix.compiler }}- - ${{ env.cache-name }}-${{ matrix.os }}- - - name: Configure OS - run: source ./acore.sh install-deps - env: - CONTINUOUS_INTEGRATION: true - - name: Create conf/config.sh - run: source ./apps/ci/ci-conf-tools.sh - - name: Build - run: source ./apps/ci/ci-compile.sh - + CC: ${{ matrix.compiler.CC }} + CXX: ${{ matrix.compiler.CXX }} + tools: all + pch: false From 618f97bee6aa74e6cf9ba7a82f4c91a25861e56e Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 20 Jul 2024 21:53:00 +0300 Subject: [PATCH 06/23] feat(Core/Unit): Enable/Disable Daze config (#19454) * daze * bruh * bruhx2 --- src/server/apps/worldserver/worldserver.conf.dist | 7 +++++++ src/server/game/Entities/Unit/Unit.cpp | 6 ++++-- src/server/game/World/IWorld.h | 1 + src/server/game/World/World.cpp | 2 ++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index 883885e3a0e708..32c4606a4182f5 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -4413,6 +4413,13 @@ DailyRBGArenaPoints.MinLevel = 71 MunchingBlizzlike.Enabled = 1 +# +# Daze.Enabled +# Description: Enable or disable the chance for mob melee attacks to daze the victim. +# Default: 1 - (Blizzlike) + +Daze.Enabled = 1 + # ################################################################################################### diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 0fdb6dfdd092f1..8771dc1965d1c1 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1915,8 +1915,10 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss) if (Probability > 40.0f) Probability = 40.0f; - if (roll_chance_f(std::max(0.0f, Probability))) - CastSpell(victim, 1604, true); + // Daze application + if (sWorld->getBoolConfig(CONFIG_ENABLE_DAZE)) + if (roll_chance_f(std::max(0.0f, Probability))) + CastSpell(victim, 1604, true); } if (GetTypeId() == TYPEID_PLAYER) diff --git a/src/server/game/World/IWorld.h b/src/server/game/World/IWorld.h index 77ab6738819f2b..cec7b45486854a 100644 --- a/src/server/game/World/IWorld.h +++ b/src/server/game/World/IWorld.h @@ -186,6 +186,7 @@ enum WorldBoolConfigs CONFIG_STRICT_NAMES_PROFANITY, CONFIG_ALLOWS_RANK_MOD_FOR_PET_HEALTH, CONFIG_MUNCHING_BLIZZLIKE, + CONFIG_ENABLE_DAZE, BOOL_CONFIG_VALUE_COUNT }; diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 55b5c3877e6ab8..b42d97fe36dd6b 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1284,6 +1284,8 @@ void World::LoadConfigSettings(bool reload) _bool_configs[CONFIG_MUNCHING_BLIZZLIKE] = sConfigMgr->GetOption("MunchingBlizzlike.Enabled", true); + _bool_configs[CONFIG_ENABLE_DAZE] = sConfigMgr->GetOption("Daze.Enabled", true); + _int_configs[CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD] = sConfigMgr->GetOption("DailyRBGArenaPoints.MinLevel", 71); _int_configs[CONFIG_AUCTION_HOUSE_SEARCH_TIMEOUT] = sConfigMgr->GetOption("AuctionHouse.SearchTimeout", 1000); From 1e6d0e74d95ef8df194bd443eb4b6c4e136cb210 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 20 Jul 2024 21:42:48 -0300 Subject: [PATCH 07/23] =?UTF-8?q?fix(DB/Spells):=20Mortal=20Wound=20and=20?= =?UTF-8?q?Sunder=20Armor=20stack=20from=20different=20ca=E2=80=A6=20(#194?= =?UTF-8?q?55)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(DB/Spells): Mortal Wound and Sunder Armor stack from different casters --- .../sql/updates/pending_db_world/rev_1721515391969215900.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1721515391969215900.sql diff --git a/data/sql/updates/pending_db_world/rev_1721515391969215900.sql b/data/sql/updates/pending_db_world/rev_1721515391969215900.sql new file mode 100644 index 00000000000000..0a1ccca5768d70 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1721515391969215900.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `spell_custom_attr` WHERE `spell_id` IN (25646, 13444); +INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES +(25646, 4194304), +(13444, 4194304); From 724d33bd7311b45bc9b6ddb4b348863269d1668a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 21 Jul 2024 00:43:36 +0000 Subject: [PATCH 08/23] chore(DB): import pending files Referenced commit(s): 1e6d0e74d95ef8df194bd443eb4b6c4e136cb210 --- .../rev_1721515391969215900.sql => db_world/2024_07_21_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1721515391969215900.sql => db_world/2024_07_21_00.sql} (79%) diff --git a/data/sql/updates/pending_db_world/rev_1721515391969215900.sql b/data/sql/updates/db_world/2024_07_21_00.sql similarity index 79% rename from data/sql/updates/pending_db_world/rev_1721515391969215900.sql rename to data/sql/updates/db_world/2024_07_21_00.sql index 0a1ccca5768d70..d62f77632fd5f3 100644 --- a/data/sql/updates/pending_db_world/rev_1721515391969215900.sql +++ b/data/sql/updates/db_world/2024_07_21_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_07_19_03 -> 2024_07_21_00 -- DELETE FROM `spell_custom_attr` WHERE `spell_id` IN (25646, 13444); INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES From 393d9a598781ecb567ca6b315fcba976cd7ff696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesco=20Borz=C3=AC?= Date: Mon, 22 Jul 2024 00:15:20 +0200 Subject: [PATCH 09/23] refactor(Scripts/Outland): remove unused imports (#19461) --- .../Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp | 1 + .../ShadowLabyrinth/instance_shadow_labyrinth.cpp | 1 + .../Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h | 2 -- src/server/scripts/Outland/BlackTemple/black_temple.h | 6 ------ src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp | 1 + src/server/scripts/Outland/BlackTemple/boss_illidan.cpp | 4 ++++ .../scripts/Outland/BlackTemple/boss_mother_shahraz.cpp | 3 +++ .../scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp | 3 +++ .../scripts/Outland/BlackTemple/boss_shade_of_akama.cpp | 5 +++++ .../scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp | 5 +++++ .../scripts/Outland/BlackTemple/boss_warlord_najentus.cpp | 1 + src/server/scripts/Outland/BlackTemple/illidari_council.cpp | 3 +++ .../scripts/Outland/BlackTemple/instance_black_temple.cpp | 3 +++ .../SerpentShrine/boss_fathomlord_karathress.cpp | 2 ++ .../SerpentShrine/boss_hydross_the_unstable.cpp | 1 + .../CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp | 1 + .../SerpentShrine/boss_leotheras_the_blind.cpp | 3 +++ .../CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp | 3 +++ .../SerpentShrine/boss_morogrim_tidewalker.cpp | 1 + .../SerpentShrine/instance_serpent_shrine.cpp | 2 ++ .../CoilfangReservoir/SerpentShrine/serpent_shrine.h | 5 ----- .../Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp | 1 - .../Outland/CoilfangReservoir/SteamVault/steam_vault.h | 1 - src/server/scripts/Outland/GruulsLair/boss_gruul.cpp | 1 + src/server/scripts/Outland/GruulsLair/gruuls_lair.h | 2 -- .../HellfireRamparts/boss_vazruden_the_herald.cpp | 1 + .../HellfireRamparts/boss_watchkeeper_gargolmar.cpp | 1 + .../HellfireCitadel/HellfireRamparts/hellfire_ramparts.h | 1 - .../HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp | 1 + .../HellfireCitadel/MagtheridonsLair/magtheridons_lair.h | 2 -- .../HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp | 1 + .../HellfireCitadel/ShatteredHalls/shattered_halls.h | 2 -- src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp | 3 +++ .../scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp | 2 ++ .../scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp | 3 ++- .../scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp | 1 + src/server/scripts/Outland/TempestKeep/Eye/the_eye.h | 4 ---- .../TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp | 2 ++ src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h | 4 ---- .../scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp | 2 ++ src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h | 3 --- .../Outland/TempestKeep/botanica/instance_the_botanica.cpp | 1 + .../scripts/Outland/TempestKeep/botanica/the_botanica.h | 1 - src/server/scripts/Outland/zone_blades_edge_mountains.cpp | 1 - src/server/scripts/Outland/zone_nagrand.cpp | 1 - 45 files changed, 61 insertions(+), 37 deletions(-) diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp index 54888d53e53bb6..91efd32be2ff81 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp @@ -20,6 +20,7 @@ #include "SpellInfo.h" #include "SpellScriptLoader.h" #include "shadow_labyrinth.h" +#include "SpellScript.h" enum Spells { diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp index 93c2be52134043..1f1a99d59b2278 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp @@ -19,6 +19,7 @@ #include "InstanceScript.h" #include "SpellScriptLoader.h" #include "shadow_labyrinth.h" +#include "SpellScript.h" DoorData const doorData[] = { diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h index e6e77bdd860a69..4a6d94af5a096b 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h @@ -18,10 +18,8 @@ #ifndef DEF_SHADOW_LABYRINTH_H #define DEF_SHADOW_LABYRINTH_H -#include "CreatureAI.h" #include "CreatureAIImpl.h" #include "GridNotifiers.h" -#include "SpellScript.h" #define ShadowLabyrinthScriptName "instance_shadow_labyrinth" diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.h b/src/server/scripts/Outland/BlackTemple/black_temple.h index e4febfe055d2f6..4b88eff2798bec 100644 --- a/src/server/scripts/Outland/BlackTemple/black_temple.h +++ b/src/server/scripts/Outland/BlackTemple/black_temple.h @@ -19,12 +19,6 @@ #define BLACK_TEMPLE_H_ #include "CreatureAIImpl.h" -#include "GridNotifiers.h" -#include "PassiveAI.h" -#include "Player.h" -#include "ScriptedGossip.h" -#include "SpellAuraEffects.h" -#include "SpellScript.h" #define DataHeader "BT" diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp index e5fecceb40e755..4fb630a651ea9d 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 9d930d21a26294..4c26f09ab65f1a 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -20,6 +20,10 @@ #include "ScriptedEscortAI.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "Player.h" +#include "ScriptedGossip.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp index c0e99e6ad08ee7..3706fd21174289 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp @@ -19,6 +19,9 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "GridNotifiers.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index 8054df37c3e10f..741082b65a4582 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -20,6 +20,9 @@ #include "Spell.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "Player.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp index d33abd52adb657..da4f9f9f0ed10c 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp @@ -19,6 +19,11 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "PassiveAI.h" +#include "ScriptedGossip.h" +#include "SpellAuras.h" +#include "SpellInfo.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp index 7a0f4a48f6e9d8..dca4b7e26e7700 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp @@ -19,6 +19,11 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "PassiveAI.h" +#include "Player.h" +#include "SpellAuraEffects.h" +#include "SpellAuras.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp index 101122b560717a..90c2538f563fa7 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "SpellScript.h" enum Yells { diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp index c7be8416db1bbd..93e559147c37bc 100644 --- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp @@ -19,6 +19,9 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "Player.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index c6c519d9410b9b..2e0f7db8919269 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -20,6 +20,9 @@ #include "InstanceScript.h" #include "SpellScriptLoader.h" #include "black_temple.h" +#include "SpellAuraEffects.h" +#include "SpellAuras.h" +#include "SpellScript.h" DoorData const doorData[] = { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index 667b83773bed61..f3c966b330cb3a 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -20,6 +20,8 @@ #include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "serpent_shrine.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Talk { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp index 1423cc94917722..ca70ae838972b7 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "serpent_shrine.h" +#include "SpellScript.h" enum Talk { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index 2f48c13380dd87..9cc9fadaf8fdf0 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -22,6 +22,7 @@ #include "SpellScriptLoader.h" #include "WorldSession.h" #include "serpent_shrine.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index 92c75da7f97363..c632d961c6e1fa 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -17,11 +17,14 @@ #include "CreatureGroups.h" #include "CreatureScript.h" +#include "GridNotifiers.h" #include "Player.h" #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "serpent_shrine.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Talk { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index ea7d032e4fea27..08bdae70afd4f9 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -17,9 +17,12 @@ #include "CreatureScript.h" #include "GameObjectScript.h" +#include "Player.h" #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "serpent_shrine.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Spells { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp index 54b5d154a58e21..2494acf59d4589 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "serpent_shrine.h" +#include "SpellScript.h" enum Yells { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp index 54ee662b55c8a5..59ca24665d28ce 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -23,6 +23,8 @@ #include "SpellScriptLoader.h" #include "TemporarySummon.h" #include "serpent_shrine.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" DoorData const doorData[] = { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h index 8453d8e3707a2a..4a1d5e27654d6c 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h @@ -18,12 +18,7 @@ #ifndef DEF_SERPENT_SHRINE_H #define DEF_SERPENT_SHRINE_H -#include "CreatureAI.h" #include "CreatureAIImpl.h" -#include "GridNotifiers.h" -#include "Player.h" -#include "SpellAuraEffects.h" -#include "SpellScript.h" #define DataHeader "SS" diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp index 940f369553d909..265c3fef9bc15b 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp @@ -27,7 +27,6 @@ #include "Map.h" #include "MotionMaster.h" #include "ObjectAccessor.h" -#include "PassiveAI.h" #include "Player.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h index af2e2c4270d8f7..3eeaf32668ec4b 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h @@ -19,7 +19,6 @@ #define DEF_STEAM_VAULT_H #include "CreatureAIImpl.h" -#include "PassiveAI.h" #define DataHeaders "SV" diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp index 773ec71d3832c2..8a0357ab07aeb6 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp @@ -21,6 +21,7 @@ #include "SpellScript.h" #include "SpellScriptLoader.h" #include "gruuls_lair.h" +#include "SpellAuraEffects.h" enum Yells { diff --git a/src/server/scripts/Outland/GruulsLair/gruuls_lair.h b/src/server/scripts/Outland/GruulsLair/gruuls_lair.h index 91244e4af727a7..5aacb769f1c400 100644 --- a/src/server/scripts/Outland/GruulsLair/gruuls_lair.h +++ b/src/server/scripts/Outland/GruulsLair/gruuls_lair.h @@ -18,9 +18,7 @@ #ifndef GRUULS_LAIR_H_ #define GRUULS_LAIR_H_ -#include "CreatureAI.h" #include "CreatureAIImpl.h" -#include "SpellAuraEffects.h" #define DataHeader "GL" diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index e47c1165787835..ec612ddfd3e63d 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -20,6 +20,7 @@ #include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "hellfire_ramparts.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp index ea4a66c1e9bb7e..26728de3596be0 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "hellfire_ramparts.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h index 0f610988075e05..95a8512c3a0e3a 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h @@ -19,7 +19,6 @@ #define DEF_RAMPARTS_H #include "CreatureAIImpl.h" -#include "SpellScript.h" #define DataHeader "HR" #define HellfireRampartsScriptName "instance_hellfire_ramparts" diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index 09183cc5d9eb15..37b3a95b159e9e 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -23,6 +23,7 @@ #include "SpellScriptLoader.h" #include "TaskScheduler.h" #include "magtheridons_lair.h" +#include "SpellScript.h" enum Yells { diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h index 4e28280165f672..b9a6341d7610d6 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h @@ -19,8 +19,6 @@ #define DEF_MAGTHERIDONS_LAIR_H #include "CreatureAIImpl.h" -#include "SpellScript.h" - #define DataHeader "ML" #define MagtheridonsLairScriptName "instance_magtheridons_lair" diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp index bcdc684436a2d7..e5723aee5a68ac 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp @@ -21,6 +21,7 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "shattered_halls.h" +#include "SpellScript.h" enum Texts { diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h index 07c31a3ba2a583..9001522a8f9167 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h @@ -19,8 +19,6 @@ #define DEF_SHATTERED_H #include "CreatureAIImpl.h" -#include "PassiveAI.h" -#include "SpellScript.h" #define ShatteredHallsLairScriptName "instance_shattered_halls" diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index 7e17bbf6677334..f028ac61fcdb54 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -23,6 +23,9 @@ #include "the_eye.h" #include +#include "Player.h" +#include "SpellScript.h" + enum Spells { SPELL_BERSERK = 45078, diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index 3ca2ffeb852b58..dc1b9a02cc81de 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -17,6 +17,8 @@ #include "CreatureScript.h" #include "ScriptedCreature.h" +#include "SpellAuras.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "the_eye.h" diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index 0de1b41ea7c424..303e091afd14c4 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -16,8 +16,9 @@ */ #include "CreatureScript.h" -#include "Opcodes.h" +#include "GridNotifiers.h" #include "ScriptedCreature.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "WorldPacket.h" #include "the_eye.h" diff --git a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp index 4da9dbc14c1244..354e45c41481a4 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp @@ -17,6 +17,7 @@ #include "InstanceMapScript.h" #include "InstanceScript.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "the_eye.h" diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h index ad911b563189d1..d480f7f8431d62 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h +++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h @@ -19,10 +19,6 @@ #define DEF_THE_EYE_H #include "CreatureAIImpl.h" -#include "GridNotifiers.h" -#include "Player.h" -#include "SpellAuraEffects.h" -#include "SpellScript.h" #define DataHeader "TE" diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp index c4adf42158f9a0..99a367c1cb6566 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "mechanar.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h b/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h index 4f3f8567b9bc06..9d3e3074a78f83 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h @@ -18,11 +18,7 @@ #ifndef DEF_MECHANAR_H #define DEF_MECHANAR_H -#include "CreatureAI.h" #include "CreatureAIImpl.h" -#include "Player.h" -#include "SpellAuraEffects.h" -#include "SpellScript.h" #define DataHeader "MR" diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp index 1fabae4404d84b..f9f5dad491dfae 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp @@ -17,7 +17,9 @@ #include "arcatraz.h" #include "CreatureScript.h" +#include "Player.h" #include "ScriptedCreature.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" enum MillhouseSays diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h index a95acaf31c28ce..9c0cb31eed2c6c 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h @@ -18,10 +18,7 @@ #ifndef ARCATRAZ_H #define ARCATRAZ_H -#include "CreatureAI.h" #include "CreatureAIImpl.h" -#include "Player.h" -#include "SpellScript.h" #define DataHeader "AZ" diff --git a/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp b/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp index 02c20d600798dd..082a918e9674fd 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp @@ -19,6 +19,7 @@ #include "GameTime.h" #include "InstanceMapScript.h" #include "InstanceScript.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "the_botanica.h" diff --git a/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h b/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h index 44d4e44a820a03..af44f970de0999 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h +++ b/src/server/scripts/Outland/TempestKeep/botanica/the_botanica.h @@ -19,7 +19,6 @@ #define DEF_THE_BOTANICA_H #include "CreatureAIImpl.h" -#include "SpellScript.h" #define TheBotanicaScriptName "instance_the_botanica" diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp index e3fa09e7ed47ad..9f549e2b72a3da 100644 --- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp @@ -23,7 +23,6 @@ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" -#include "SpellAuras.h" #include "SpellInfo.h" #include "SpellScript.h" #include "SpellScriptLoader.h" diff --git a/src/server/scripts/Outland/zone_nagrand.cpp b/src/server/scripts/Outland/zone_nagrand.cpp index 1439b72f877be4..c7d83bc7aadede 100644 --- a/src/server/scripts/Outland/zone_nagrand.cpp +++ b/src/server/scripts/Outland/zone_nagrand.cpp @@ -20,7 +20,6 @@ #include "Player.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" -#include "ScriptedGossip.h" #include "SpellInfo.h" /* ScriptData SDName: Nagrand From e592fdd24896d1c5ef065ea253c626bf1f98559a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesco=20Borz=C3=AC?= Date: Mon, 22 Jul 2024 21:20:41 +0200 Subject: [PATCH 10/23] refactor(Scripts/misc): remove unused imports (#19458) --- src/server/scripts/Events/midsummer.cpp | 1 - src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp | 1 - src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp | 1 - src/server/scripts/Pet/pet_priest.cpp | 1 - src/server/scripts/Spells/spell_quest.cpp | 1 - src/server/scripts/Spells/spell_shaman.cpp | 1 - src/server/scripts/World/achievement_scripts.cpp | 1 - src/server/scripts/World/areatrigger_scripts.cpp | 2 -- src/server/scripts/World/chat_log.cpp | 1 - src/server/scripts/World/guards.cpp | 1 - src/server/scripts/World/npc_stave_of_ancients.h | 1 - src/server/scripts/World/player_scripts.cpp | 1 - 12 files changed, 13 deletions(-) diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index 4873b3ce41a485..57e669047e6aff 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -22,7 +22,6 @@ #include "Player.h" #include "PlayerScript.h" #include "ScriptedCreature.h" -#include "ScriptedGossip.h" #include "Spell.h" #include "SpellAuras.h" #include "SpellScript.h" diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp index 83eec57e20e593..34a66aa3745530 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp @@ -16,7 +16,6 @@ */ #include "OutdoorPvPEP.h" -#include "CreatureScript.h" #include "GameGraveyard.h" #include "GameObject.h" #include "Language.h" diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp index 9906fa10c2a6b7..fcd2141069afe4 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPGH.cpp @@ -16,7 +16,6 @@ */ #include "OutdoorPvPGH.h" -#include "CreatureScript.h" #include "GameEventMgr.h" #include "MapMgr.h" #include "OutdoorPvPMgr.h" diff --git a/src/server/scripts/Pet/pet_priest.cpp b/src/server/scripts/Pet/pet_priest.cpp index 41a77a49e90cd3..43ce08fbd41aad 100644 --- a/src/server/scripts/Pet/pet_priest.cpp +++ b/src/server/scripts/Pet/pet_priest.cpp @@ -21,7 +21,6 @@ */ #include "CreatureScript.h" -#include "PassiveAI.h" #include "PetAI.h" #include "ScriptedCreature.h" #include "TotemAI.h" diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index c2bfac4ebf6f2a..7519981de4bb2b 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -22,7 +22,6 @@ #include "MapMgr.h" #include "ScriptedCreature.h" #include "SpellAuraEffects.h" -#include "SpellAuras.h" #include "SpellScript.h" #include "SpellScriptLoader.h" #include "Vehicle.h" diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 5ca5f32b27a5cc..415f609fe161ea 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -21,7 +21,6 @@ #include "SpellMgr.h" #include "SpellScript.h" #include "SpellScriptLoader.h" -#include "TemporarySummon.h" #include "Unit.h" /* * Scripts for spells with SPELLFAMILY_SHAMAN and SPELLFAMILY_GENERIC spells used by shaman players. diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp index 36be187d141f5b..bdcba3df3774bb 100644 --- a/src/server/scripts/World/achievement_scripts.cpp +++ b/src/server/scripts/World/achievement_scripts.cpp @@ -23,7 +23,6 @@ #include "BattlegroundWS.h" #include "Creature.h" #include "Player.h" -#include "Vehicle.h" class achievement_resilient_victory : public AchievementCriteriaScript { diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index d6c79ad49cd52c..541bebaa849bb7 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -16,11 +16,9 @@ */ #include "AreaTriggerScript.h" -#include "CreatureScript.h" #include "GameTime.h" #include "Player.h" #include "ScriptedCreature.h" -#include "SpellMgr.h" /* ScriptData SDName: Areatrigger_Scripts SD%Complete: 100 diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp index 9dc05ab0d96f44..b58ee8117403f5 100644 --- a/src/server/scripts/World/chat_log.cpp +++ b/src/server/scripts/World/chat_log.cpp @@ -16,7 +16,6 @@ */ #include "Channel.h" -#include "CreatureScript.h" #include "Group.h" #include "Guild.h" #include "Log.h" diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp index b9384dc63467aa..6e483cba2b4b42 100644 --- a/src/server/scripts/World/guards.cpp +++ b/src/server/scripts/World/guards.cpp @@ -32,7 +32,6 @@ EndContentData */ #include "GuardAI.h" #include "Player.h" #include "ScriptedCreature.h" -#include "SpellInfo.h" enum GuardShattrath { diff --git a/src/server/scripts/World/npc_stave_of_ancients.h b/src/server/scripts/World/npc_stave_of_ancients.h index fcdc51ef7ac96c..f517218f6cc467 100644 --- a/src/server/scripts/World/npc_stave_of_ancients.h +++ b/src/server/scripts/World/npc_stave_of_ancients.h @@ -18,7 +18,6 @@ #ifndef NPC_STAVE_OF_ANCIENTS_H #define NPC_STAVE_OF_ANCIENTS_H -#include "CreatureScript.h" #include "ScriptedCreature.h" enum Common diff --git a/src/server/scripts/World/player_scripts.cpp b/src/server/scripts/World/player_scripts.cpp index 89e62c023c25a2..845c96c2bbec8f 100644 --- a/src/server/scripts/World/player_scripts.cpp +++ b/src/server/scripts/World/player_scripts.cpp @@ -15,7 +15,6 @@ * with this program. If not, see . */ -#include "CreatureScript.h" #include "Player.h" #include "PlayerScript.h" From e8bd391505ff1fca9801e7d986e09a60c03c9446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesco=20Borz=C3=AC?= Date: Tue, 23 Jul 2024 13:56:46 +0200 Subject: [PATCH 11/23] refactor(Scripts/EasternKingdoms): remove unused imports (#19457) --- .../BlackwingLair/boss_broodlord_lashlayer.cpp | 1 - .../BlackrockMountain/BlackwingLair/boss_chromaggus.cpp | 1 - .../EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp | 1 - src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp | 1 - .../MagistersTerrace/boss_felblood_kaelthas.cpp | 4 +++- .../EasternKingdoms/MagistersTerrace/magisters_terrace.h | 3 --- .../ShadowfangKeep/instance_shadowfang_keep.cpp | 2 ++ .../scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h | 2 -- src/server/scripts/EasternKingdoms/Stratholme/stratholme.h | 2 -- .../scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp | 4 ++++ .../EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp | 2 ++ .../scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp | 2 ++ .../scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp | 2 ++ .../scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp | 3 +++ .../scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp | 4 +++- .../SunwellPlateau/instance_sunwell_plateau.cpp | 1 + .../scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h | 4 ---- src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp | 1 - src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp | 1 - src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp | 1 - src/server/scripts/EasternKingdoms/zone_undercity.cpp | 1 - 21 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp index 3a50ba724f36e4..558e0ba47790ce 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp @@ -19,7 +19,6 @@ #include "GameObject.h" #include "GameObjectAI.h" #include "GameObjectScript.h" -#include "InstanceMapScript.h" #include "InstanceScript.h" #include "ScriptedCreature.h" #include "SpellScript.h" diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp index d948c11139ecd3..19fac9d23de4aa 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp @@ -19,7 +19,6 @@ #include "GameObject.h" #include "GameObjectAI.h" #include "GameObjectScript.h" -#include "InstanceMapScript.h" #include "InstanceScript.h" #include "Map.h" #include "Player.h" diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index 4ce157d35a86ed..4530fcb95862e3 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -16,7 +16,6 @@ */ #include "CreatureScript.h" -#include "PassiveAI.h" #include "ScriptedCreature.h" #include "SpellInfo.h" #include "karazhan.h" diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index 35c4804981bec8..4e93c8c46c9594 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -23,7 +23,6 @@ #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" -#include "SpellAuras.h" #include "SpellScript.h" #include "SpellScriptLoader.h" /* ScriptData diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp index 9a0ac2d6b1b717..a66568bf58b484 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp @@ -16,10 +16,12 @@ */ #include "CreatureScript.h" -#include "Opcodes.h" #include "ScriptedCreature.h" #include "SpellScriptLoader.h" #include "magisters_terrace.h" +#include "MapReference.h" +#include "Player.h" +#include "SpellScript.h" enum Says { diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h index e985711ac913f4..f914a1d919d09d 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h @@ -18,10 +18,7 @@ #ifndef DEF_MAGISTERS_TERRACE_H #define DEF_MAGISTERS_TERRACE_H -#include "CreatureAI.h" #include "CreatureAIImpl.h" -#include "Player.h" -#include "SpellScript.h" #define DataHeader "MT" #define MTScriptName "instance_magisters_terrace" diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index 6d7a62b31b59d5..3ce654c6d94d19 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -20,6 +20,8 @@ #include "SpellScriptLoader.h" #include "TemporarySummon.h" #include "shadowfang_keep.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" enum Spells { diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h index 3d106f8feeee9a..9639c9afc7c2f8 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h @@ -19,8 +19,6 @@ #define DEF_SHADOWFANG_H #include "CreatureAIImpl.h" -#include "SpellAuraEffects.h" -#include "SpellScript.h" #define DataHeader "SK" #define ShadowfangKeepScriptName "instance_shadowfang_keep" diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h index c5f2ad4792970a..d1200e3268e239 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h @@ -18,8 +18,6 @@ #ifndef DEF_STRATHOLME_H #define DEF_STRATHOLME_H -#include "SpellAuras.h" - #define DataHeader "STR" #define StratholmeScriptName "instance_stratholme" diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index 93e69d5b76d4a8..f0c132850f781b 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -17,7 +17,11 @@ #include "AreaTriggerScript.h" #include "CreatureScript.h" +#include "MapReference.h" +#include "PassiveAI.h" +#include "Player.h" #include "ScriptedCreature.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "WorldSession.h" #include "sunwell_plateau.h" diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index 046eba5c7f5a71..f58a12ad3d3b3a 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -17,8 +17,10 @@ #include "AreaTriggerScript.h" #include "CreatureScript.h" +#include "Player.h" #include "ScriptedCreature.h" #include "SpellInfo.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "sunwell_plateau.h" diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index eb0ef5752ddba9..141391888454f9 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -19,7 +19,9 @@ #include "CellImpl.h" #include "CreatureScript.h" #include "GridNotifiers.h" +#include "PassiveAI.h" #include "ScriptedCreature.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "sunwell_plateau.h" diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index bc7bbd98a2a798..306e758c9c0500 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -18,6 +18,8 @@ #include "CreatureScript.h" #include "Player.h" #include "ScriptedCreature.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "WorldSession.h" #include "sunwell_plateau.h" diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index d3618e091e0ef7..ba31822e992f69 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -18,7 +18,10 @@ #include "CreatureScript.h" #include "CreatureTextMgr.h" #include "MoveSplineInit.h" +#include "PassiveAI.h" #include "ScriptedCreature.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "sunwell_plateau.h" diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index 4a317f7cb1807f..1205691d335bd0 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -16,9 +16,11 @@ */ #include "CreatureScript.h" +#include "PassiveAI.h" #include "Player.h" #include "ScriptedCreature.h" -#include "SpellInfo.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "sunwell_plateau.h" diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index fe5c2ea40ac7d5..66a5a8926e9b70 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -18,6 +18,7 @@ #include "InstanceMapScript.h" #include "InstanceScript.h" #include "Player.h" +#include "SpellScript.h" #include "SpellScriptLoader.h" #include "sunwell_plateau.h" diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h index 1eb558cb623db9..d9a3af6302982c 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h @@ -19,10 +19,6 @@ #define SUNWELL_PLATEAU_H #include "CreatureAIImpl.h" -#include "PassiveAI.h" -#include "Player.h" -#include "SpellAuraEffects.h" -#include "SpellScript.h" #define DataHeader "SWP" diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index 25f92a7e84d79f..84fcd4a2add947 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -25,7 +25,6 @@ SDComment: Missing timer for Call Lightning and Sound ID's EndScriptData */ #include "Cell.h" -#include "CellImpl.h" #include "CreatureScript.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp index 091bff795a025b..eecf1418037e1f 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp @@ -17,7 +17,6 @@ #include "CreatureScript.h" #include "ScriptedCreature.h" -#include "Spell.h" #include "zulgurub.h" /* diff --git a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp index 5a4ec3eba58e90..244d503b7d8dc4 100644 --- a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp +++ b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp @@ -34,7 +34,6 @@ EndContentData */ #include "Player.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" -#include "ScriptedGossip.h" /*###### ## npc_lord_gregor_lescovar diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp index 41e93d9cc3b3c6..d9495faf4d40ca 100644 --- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp +++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp @@ -35,7 +35,6 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "ScriptedGossip.h" #include "SpellAuraEffects.h" -#include "SpellAuras.h" #include "SpellScript.h" #include "SpellScriptLoader.h" From c68f2342fc6f989dee81146ff56c6c34f5592b9e Mon Sep 17 00:00:00 2001 From: daobashun <49193927+fangshun2004@users.noreply.github.com> Date: Wed, 24 Jul 2024 04:08:48 +0800 Subject: [PATCH 12/23] fix(DB/Creature): Implement Apprentice Morlann RP Event (#19044) * add Apprentice Morlann talk * Modify emoticons * fix error * Update rev_1718007800531434000.sql * Update data/sql/updates/pending_db_world/rev_1718007800531434000.sql --------- Co-authored-by: Gultask <100873791+Gultask@users.noreply.github.com> --- .../rev_1718007800531434000.sql | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1718007800531434000.sql diff --git a/data/sql/updates/pending_db_world/rev_1718007800531434000.sql b/data/sql/updates/pending_db_world/rev_1718007800531434000.sql new file mode 100644 index 00000000000000..a4df8f54d0d147 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1718007800531434000.sql @@ -0,0 +1,34 @@ +UPDATE `creature` SET `MovementType` = 2 WHERE `id1` = 23600 AND `guid` = 18604; + +DELETE FROM `creature_addon` WHERE (`guid` IN (18604)); +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(18604, 186040, 0, 0, 1, 0, 0, NULL); + +DELETE FROM `waypoint_data` WHERE `id` = 186040; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(186040, 1, -4044.12, -3393.59, 38.1363, NULL, 6000), -- 1s, Talk 0, 5s, Talk 1 +(186040, 2, -4044.21, -3394.23, 38.3905, NULL, 0), +(186040, 3, -4042.96, -3396.48, 38.3905, NULL, 0), +(186040, 4, -4041.71, -3397.23, 38.3905, NULL, 0), +(186040, 5, -4040.8, -3396.88, 38.1447, NULL, 16000), -- 2s, Emote 16, 6s, Talk 2, 6s, Garion Talk 0 +(186040, 6, -4043.67, -3395.27, 38.1634, NULL, 0), +(186040, 7, -4043.67, -3395.27, 38.1634, 3.87463, 240000); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 23600; + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 23600); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(23600, 0, 0, 0, 108, 0, 100, 0, 1, 0, 0, 0, 0, 0, 80, 2360000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Apprentice Morlann - On Point 1 of Path Any Reached - Run Script'), +(23600, 0, 1, 0, 108, 0, 100, 0, 5, 0, 0, 0, 0, 0, 80, 2360001, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Apprentice Morlann - On Point 5 of Path Any Reached - Run Script'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` IN (2360000, 2360001)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(2360000, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Apprentice Morlann - Actionlist - Say Line 0'), +(2360000, 9, 1, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Apprentice Morlann - Actionlist - Say Line 1'), + +(2360001, 9, 0, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 5, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Apprentice Morlann - Actionlist - Play Emote 16'), +(2360001, 9, 1, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Apprentice Morlann - Actionlist - Say Line 2'), +(2360001, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 23601, 0, 0, 0, 0, 0, 0, 0, 'Apprentice Morlann - Actionlist - Say Line 0 (Apprentice Garion)'); + +DELETE FROM `waypoint_scripts` WHERE `id` IN (1007, 1008) AND `guid` IN (648, 649); + From b95ca43c35a74758050d88317cbde5e8d2c7e02d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 23 Jul 2024 20:09:39 +0000 Subject: [PATCH 13/23] chore(DB): import pending files Referenced commit(s): c68f2342fc6f989dee81146ff56c6c34f5592b9e --- .../rev_1718007800531434000.sql => db_world/2024_07_23_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1718007800531434000.sql => db_world/2024_07_23_00.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1718007800531434000.sql b/data/sql/updates/db_world/2024_07_23_00.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1718007800531434000.sql rename to data/sql/updates/db_world/2024_07_23_00.sql index a4df8f54d0d147..e3b4f68fa8a7d5 100644 --- a/data/sql/updates/pending_db_world/rev_1718007800531434000.sql +++ b/data/sql/updates/db_world/2024_07_23_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_07_21_00 -> 2024_07_23_00 UPDATE `creature` SET `MovementType` = 2 WHERE `id1` = 23600 AND `guid` = 18604; DELETE FROM `creature_addon` WHERE (`guid` IN (18604)); From dd8bc51603484235612f14c3df1ec0beaa923119 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:20:56 -0300 Subject: [PATCH 14/23] fix(DB/Creature): Illidan taunt immunity (#19464) --- data/sql/updates/pending_db_world/rev_1721705202781499700.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1721705202781499700.sql diff --git a/data/sql/updates/pending_db_world/rev_1721705202781499700.sql b/data/sql/updates/pending_db_world/rev_1721705202781499700.sql new file mode 100644 index 00000000000000..a1894f797bd474 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1721705202781499700.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE `entry` = 22917; From e79c89aeb126a5fe8a467e3435a7e1923785d12d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 23 Jul 2024 20:21:45 +0000 Subject: [PATCH 15/23] chore(DB): import pending files Referenced commit(s): dd8bc51603484235612f14c3df1ec0beaa923119 --- .../rev_1721705202781499700.sql => db_world/2024_07_23_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1721705202781499700.sql => db_world/2024_07_23_01.sql} (67%) diff --git a/data/sql/updates/pending_db_world/rev_1721705202781499700.sql b/data/sql/updates/db_world/2024_07_23_01.sql similarity index 67% rename from data/sql/updates/pending_db_world/rev_1721705202781499700.sql rename to data/sql/updates/db_world/2024_07_23_01.sql index a1894f797bd474..b0e9ce12c10c37 100644 --- a/data/sql/updates/pending_db_world/rev_1721705202781499700.sql +++ b/data/sql/updates/db_world/2024_07_23_01.sql @@ -1,2 +1,3 @@ +-- DB update 2024_07_23_00 -> 2024_07_23_01 -- UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE `entry` = 22917; From 3fbded8f6bdaae1ec6897dae34afdab36b124899 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Tue, 23 Jul 2024 23:48:46 +0200 Subject: [PATCH 16/23] refactor(Core/Chat): PSendSysMessage to `fmt` (#19449) * refactor(Core/Chat): PSendSysMessage to `fmt` --- .../rev_1721436522058676600.sql | 204 ++++++++++++++++++ .../game/ArenaSpectator/ArenaSpectator.cpp | 2 +- .../game/Battlegrounds/BattlegroundQueue.cpp | 4 +- src/server/game/Chat/Channels/Channel.cpp | 4 +- src/server/game/Chat/Chat.cpp | 7 +- src/server/game/Chat/Chat.h | 7 +- .../game/Chat/ChatCommands/ChatCommand.cpp | 32 +-- .../Chat/ChatCommands/ChatCommandArgs.cpp | 2 +- .../game/Chat/ChatCommands/ChatCommandArgs.h | 6 +- .../Chat/ChatCommands/ChatCommandHelpers.h | 2 +- .../Chat/ChatCommands/ChatCommandTags.cpp | 8 +- .../game/Chat/ChatCommands/ChatCommandTags.h | 2 +- src/server/game/Entities/Player/Player.cpp | 4 +- .../game/Entities/Player/PlayerStorage.cpp | 22 +- src/server/game/Globals/ObjectMgr.cpp | 2 +- src/server/game/Guilds/Guild.cpp | 2 +- src/server/game/Handlers/CharacterHandler.cpp | 6 +- src/server/game/Handlers/MiscHandler.cpp | 6 +- src/server/scripts/Commands/cs_account.cpp | 32 +-- src/server/scripts/Commands/cs_arena.cpp | 28 +-- src/server/scripts/Commands/cs_ban.cpp | 78 +++---- src/server/scripts/Commands/cs_cache.cpp | 8 +- src/server/scripts/Commands/cs_character.cpp | 90 ++++---- src/server/scripts/Commands/cs_cheat.cpp | 16 +- src/server/scripts/Commands/cs_debug.cpp | 108 +++++----- src/server/scripts/Commands/cs_deserter.cpp | 16 +- src/server/scripts/Commands/cs_disable.cpp | 8 +- src/server/scripts/Commands/cs_event.cpp | 18 +- src/server/scripts/Commands/cs_gear.cpp | 18 +- src/server/scripts/Commands/cs_gm.cpp | 10 +- src/server/scripts/Commands/cs_gobject.cpp | 32 +-- src/server/scripts/Commands/cs_group.cpp | 8 +- src/server/scripts/Commands/cs_guild.cpp | 8 +- src/server/scripts/Commands/cs_instance.cpp | 18 +- src/server/scripts/Commands/cs_item.cpp | 2 +- src/server/scripts/Commands/cs_learn.cpp | 2 +- src/server/scripts/Commands/cs_lfg.cpp | 10 +- src/server/scripts/Commands/cs_list.cpp | 28 +-- src/server/scripts/Commands/cs_lookup.cpp | 60 +++--- src/server/scripts/Commands/cs_message.cpp | 2 +- src/server/scripts/Commands/cs_misc.cpp | 140 ++++++------ src/server/scripts/Commands/cs_mmaps.cpp | 40 ++-- src/server/scripts/Commands/cs_modify.cpp | 58 ++--- src/server/scripts/Commands/cs_npc.cpp | 34 +-- src/server/scripts/Commands/cs_pet.cpp | 6 +- src/server/scripts/Commands/cs_quest.cpp | 8 +- src/server/scripts/Commands/cs_reset.cpp | 22 +- src/server/scripts/Commands/cs_send.cpp | 8 +- src/server/scripts/Commands/cs_server.cpp | 66 +++--- src/server/scripts/Commands/cs_tele.cpp | 12 +- src/server/scripts/Commands/cs_ticket.cpp | 6 +- src/server/scripts/Commands/cs_wp.cpp | 68 +++--- 52 files changed, 802 insertions(+), 588 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1721436522058676600.sql diff --git a/data/sql/updates/pending_db_world/rev_1721436522058676600.sql b/data/sql/updates/pending_db_world/rev_1721436522058676600.sql new file mode 100644 index 00000000000000..46e12d0cee3ee9 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1721436522058676600.sql @@ -0,0 +1,204 @@ +-- +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%s', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%u', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%i', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%f', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%d', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%c', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%x', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%2.2f', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%.*s', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%3d', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%4d', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%5d', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%20s', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%19s', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%16s', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%12s', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%15s', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%-10s', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%6u', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%8u', '{}'); +UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%10u', '{}'); + +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%s', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%u', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%i', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%f', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%d', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%c', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%x', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%2.2f', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%.*s', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%3d', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%4d', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%5d', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%20s', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%19s', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%16s', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%12s', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%15s', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%-10s', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%6u', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%8u', '{}'); +UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%10u', '{}'); + +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%s', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%u', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%i', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%f', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%d', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%c', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%x', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%2.2f', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%.*s', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%3d', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%4d', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%5d', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%20s', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%19s', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%16s', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%12s', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%15s', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%-10s', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%6u', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%8u', '{}'); +UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%10u', '{}'); + +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%s', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%u', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%i', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%f', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%d', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%c', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%x', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%2.2f', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%.*s', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%3d', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%4d', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%5d', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%20s', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%19s', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%16s', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%12s', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%15s', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%-10s', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%6u', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%8u', '{}'); +UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%10u', '{}'); + +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%s', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%u', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%i', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%f', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%d', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%c', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%x', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%2.2f', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%.*s', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%3d', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%4d', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%5d', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%20s', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%19s', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%16s', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%12s', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%15s', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%-10s', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%6u', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%8u', '{}'); +UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%10u', '{}'); + +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%s', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%u', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%i', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%f', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%d', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%c', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%x', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%2.2f', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%.*s', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%3d', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%4d', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%5d', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%20s', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%19s', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%16s', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%12s', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%15s', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%-10s', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%6u', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%8u', '{}'); +UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%10u', '{}'); + +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%s', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%u', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%i', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%f', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%d', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%c', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%x', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%2.2f', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%.*s', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%3d', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%4d', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%5d', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%20s', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%19s', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%16s', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%12s', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%15s', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%-10s', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%6u', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%8u', '{}'); +UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%10u', '{}'); + +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%s', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%u', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%i', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%f', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%d', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%c', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%x', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%2.2f', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%.*s', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%3d', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%4d', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%5d', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%20s', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%19s', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%16s', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%12s', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%15s', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%-10s', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%6u', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%8u', '{}'); +UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%10u', '{}'); + +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%s', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%u', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%i', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%f', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%d', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%c', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%x', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%2.2f', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%.*s', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%3d', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%4d', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%5d', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%20s', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%19s', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%16s', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%12s', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%15s', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%-10s', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%6u', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%8u', '{}'); +UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%10u', '{}'); + +-- Only case I found that got broke. Due to these being sent to the client via WorldPacket +DELETE FROM `acore_string` WHERE `entry` IN (6613,6615); +INSERT INTO `acore_string` (`entry`, `content_default`, `locale_koKR`, `locale_frFR`, `locale_deDE`, `locale_zhCN`, `locale_zhTW`, `locale_esES`, `locale_esMX`, `locale_ruRU`) VALUES +(6613, '|cfff00000[GM Announcement]: %s|r', NULL, NULL, '|cfff00000[GM Ankündigung von [%s]]: %s|r', '|cfff00000[管理员公告]: %s|r', NULL, NULL, NULL, NULL), +(6615, '|cffffff00[|c1f40af20GM Announce by|r |cffff0000%s|cffffff00]:|r %s|r', NULL, NULL, '|cffffff00[|c1f40af20GM Ankündigung von|r |cffff0000%s|cffffff00]:|r %s|r', '|cffffff00[|c1f40af20管理员广播|r |cffff0000%s|cffffff00]:|r %s|r', NULL, NULL, NULL, NULL); diff --git a/src/server/game/ArenaSpectator/ArenaSpectator.cpp b/src/server/game/ArenaSpectator/ArenaSpectator.cpp index 0f5e11c35ab427..049f2fcdcaa77a 100644 --- a/src/server/game/ArenaSpectator/ArenaSpectator.cpp +++ b/src/server/game/ArenaSpectator/ArenaSpectator.cpp @@ -156,7 +156,7 @@ bool ArenaSpectator::HandleSpectatorSpectateCommand(ChatHandler* handler, std::s { handler->PSendSysMessage("To spectate, please fix the following:"); for (std::list::const_iterator itr = errors.begin(); itr != errors.end(); ++itr) - handler->PSendSysMessage("- %s", (*itr).c_str()); + handler->PSendSysMessage("- {}", (*itr)); return true; } diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index f0d4fe2b5c1e09..e0b77a01a62b71 100644 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -1057,7 +1057,7 @@ void BattlegroundQueue::SendMessageBGQueue(Player* leader, Battleground* bg, PvP // Show queue status to player only (when joining battleground queue or Arena and arena world announcer is disabled) if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY)) { - ChatHandler(leader->GetSession()).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName.c_str(), q_min_level, q_max_level, + ChatHandler(leader->GetSession()).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName, q_min_level, q_max_level, qAlliance, (MinPlayers > qAlliance) ? MinPlayers - qAlliance : (uint32)0, qHorde, (MinPlayers > qHorde) ? MinPlayers - qHorde : (uint32)0); } @@ -1119,7 +1119,7 @@ void BattlegroundQueue::SendJoinMessageArenaQueue(Player* leader, GroupQueueInfo if (sWorld->getBoolConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_PLAYERONLY)) { ChatHandler(leader->GetSession()).PSendSysMessage(LANG_ARENA_QUEUE_ANNOUNCE_SELF, - bgName, arenatype.c_str(), q_min_level, q_max_level, qPlayers, playersNeed - qPlayers); + bgName, arenatype, q_min_level, q_max_level, qPlayers, playersNeed - qPlayers); } else { diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp index 6dbe456661109b..73b0a5e149ae10 100644 --- a/src/server/game/Chat/Channels/Channel.cpp +++ b/src/server/game/Chat/Channels/Channel.cpp @@ -213,7 +213,7 @@ void Channel::JoinChannel(Player* player, std::string const& pass) playersStore[guid] = pinfo; if (_channelRights.joinMessage.length()) - ChatHandler(player->GetSession()).PSendSysMessage("%s", _channelRights.joinMessage.c_str()); + ChatHandler(player->GetSession()).PSendSysMessage("{}", _channelRights.joinMessage); WorldPacket data; MakeYouJoined(&data); @@ -364,7 +364,7 @@ void Channel::KickOrBan(Player const* player, std::string const& badname, bool b } else { - ChatHandler(player->GetSession()).PSendSysMessage("Character %s has other faction!", badname.c_str()); + ChatHandler(player->GetSession()).PSendSysMessage("Character {} has other faction!", badname); return; } } diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 57836678c4e567..fcd405fa9d0581 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -150,6 +150,11 @@ void ChatHandler::SendSysMessage(uint32 entry) SendSysMessage(GetAcoreString(entry)); } +void ChatHandler::PSendSysMessage(std::string_view str, bool escapeCharacters) +{ + SendSysMessage(str, escapeCharacters); +} + void ChatHandler::SendErrorMessage(uint32 entry) { SendSysMessage(entry); @@ -172,7 +177,7 @@ bool ChatHandler::_ParseCommands(std::string_view text) return false; // Send error message for GMs - SendErrorMessage(LANG_CMD_INVALID, STRING_VIEW_FMT_ARG(text)); + SendErrorMessage(LANG_CMD_INVALID, text); return true; } diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h index c4873f2cc7d86e..acb6760db66cc6 100644 --- a/src/server/game/Chat/Chat.h +++ b/src/server/game/Chat/Chat.h @@ -55,23 +55,24 @@ class AC_GAME_API ChatHandler virtual void SendSysMessage(std::string_view str, bool escapeCharacters = false); void SendSysMessage(uint32 entry); + void PSendSysMessage(std::string_view str, bool escapeCharacters = false); template void PSendSysMessage(char const* fmt, Args&&... args) { - SendSysMessage(Acore::StringFormat(fmt, std::forward(args)...).c_str()); + SendSysMessage(Acore::StringFormatFmt(fmt, std::forward(args)...)); } template void PSendSysMessage(uint32 entry, Args&&... args) { - SendSysMessage(PGetParseString(entry, std::forward(args)...).c_str()); + SendSysMessage(PGetParseString(entry, std::forward(args)...)); } template std::string PGetParseString(uint32 entry, Args&&... args) const { - return Acore::StringFormat(GetAcoreString(entry), std::forward(args)...); + return Acore::StringFormatFmt(GetAcoreString(entry), std::forward(args)...); } void SendErrorMessage(uint32 entry); diff --git a/src/server/game/Chat/ChatCommands/ChatCommand.cpp b/src/server/game/Chat/ChatCommands/ChatCommand.cpp index 9a68a213c42ab1..4ff2c34fbc6e78 100644 --- a/src/server/game/Chat/ChatCommands/ChatCommand.cpp +++ b/src/server/game/Chat/ChatCommands/ChatCommand.cpp @@ -198,8 +198,8 @@ void Acore::Impl::ChatCommands::ChatCommandNode::SendCommandHelp(ChatHandler& ha handler.SendSysMessage(std::get(_help)); else { - handler.PSendSysMessage(LANG_CMD_HELP_GENERIC, STRING_VIEW_FMT_ARG(_name)); - handler.PSendSysMessage(LANG_CMD_NO_HELP_AVAILABLE, STRING_VIEW_FMT_ARG(_name)); + handler.PSendSysMessage(LANG_CMD_HELP_GENERIC, _name); + handler.PSendSysMessage(LANG_CMD_NO_HELP_AVAILABLE, _name); } } @@ -218,14 +218,14 @@ void Acore::Impl::ChatCommands::ChatCommandNode::SendCommandHelp(ChatHandler& ha { if (!hasInvoker) { - handler.PSendSysMessage(LANG_CMD_HELP_GENERIC, STRING_VIEW_FMT_ARG(_name)); + handler.PSendSysMessage(LANG_CMD_HELP_GENERIC, _name); } handler.SendSysMessage(LANG_SUBCMDS_LIST); header = true; } - handler.PSendSysMessage(subCommandHasSubCommand ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, STRING_VIEW_FMT_ARG(it->second._name)); + handler.PSendSysMessage(subCommandHasSubCommand ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, it->second._name); } } @@ -301,14 +301,14 @@ namespace Acore::Impl::ChatCommands if (it2) { /* there are multiple matching subcommands - print possibilities and return */ if (cmd) - handler.PSendSysMessage(LANG_SUBCMD_AMBIGUOUS, STRING_VIEW_FMT_ARG(cmd->_name), COMMAND_DELIMITER, STRING_VIEW_FMT_ARG(token)); + handler.PSendSysMessage(LANG_SUBCMD_AMBIGUOUS, cmd->_name, COMMAND_DELIMITER, token); else - handler.PSendSysMessage(LANG_CMD_AMBIGUOUS, STRING_VIEW_FMT_ARG(token)); + handler.PSendSysMessage(LANG_CMD_AMBIGUOUS, token); - handler.PSendSysMessage(it1->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, STRING_VIEW_FMT_ARG(it1->first)); + handler.PSendSysMessage(it1->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, it1->first); do { - handler.PSendSysMessage(it2->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, STRING_VIEW_FMT_ARG(it2->first)); + handler.PSendSysMessage(it2->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, it2->first); } while (++it2); return true; @@ -359,10 +359,10 @@ namespace Acore::Impl::ChatCommands if (cmd) { cmd->SendCommandHelp(handler); - handler.PSendSysMessage(LANG_SUBCMD_INVALID, STRING_VIEW_FMT_ARG(cmd->_name), COMMAND_DELIMITER, STRING_VIEW_FMT_ARG(token)); + handler.PSendSysMessage(LANG_SUBCMD_INVALID, cmd->_name, COMMAND_DELIMITER, token); } else - handler.PSendSysMessage(LANG_CMD_INVALID, STRING_VIEW_FMT_ARG(token)); + handler.PSendSysMessage(LANG_CMD_INVALID, token); return; } @@ -374,14 +374,14 @@ namespace Acore::Impl::ChatCommands if (it2) { /* there are multiple matching subcommands - print possibilities and return */ if (cmd) - handler.PSendSysMessage(LANG_SUBCMD_AMBIGUOUS, STRING_VIEW_FMT_ARG(cmd->_name), COMMAND_DELIMITER, STRING_VIEW_FMT_ARG(token)); + handler.PSendSysMessage(LANG_SUBCMD_AMBIGUOUS, cmd->_name, COMMAND_DELIMITER, token); else - handler.PSendSysMessage(LANG_CMD_AMBIGUOUS, STRING_VIEW_FMT_ARG(token)); + handler.PSendSysMessage(LANG_CMD_AMBIGUOUS, token); - handler.PSendSysMessage(it1->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, STRING_VIEW_FMT_ARG(it1->first)); + handler.PSendSysMessage(it1->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, it1->first); do { - handler.PSendSysMessage(it2->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, STRING_VIEW_FMT_ARG(it2->first)); + handler.PSendSysMessage(it2->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, it2->first); } while (++it2); return; @@ -402,11 +402,11 @@ namespace Acore::Impl::ChatCommands handler.SendSysMessage(LANG_AVAILABLE_CMDS); do { - handler.PSendSysMessage(it->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, STRING_VIEW_FMT_ARG(it->second._name)); + handler.PSendSysMessage(it->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, it->second._name); } while (++it); } else - handler.PSendSysMessage(LANG_CMD_INVALID, STRING_VIEW_FMT_ARG(cmdStr)); + handler.PSendSysMessage(LANG_CMD_INVALID, cmdStr); } /*static*/ std::vector Acore::Impl::ChatCommands::ChatCommandNode::GetAutoCompletionsFor(ChatHandler const& handler, std::string_view cmdStr) diff --git a/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp b/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp index 44d77f93353d6c..da32757e694cd4 100644 --- a/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp +++ b/src/server/game/Chat/ChatCommands/ChatCommandArgs.cpp @@ -63,7 +63,7 @@ ChatCommandResult Acore::Impl::ChatCommands::ArgInfo::TryConsum if (val.holds_alternative>()) return FormatAcoreString(handler, LANG_CMDPARSER_GAME_TELE_ID_NO_EXIST, static_cast(std::get>(val))); else - return FormatAcoreString(handler, LANG_CMDPARSER_GAME_TELE_NO_EXIST, STRING_VIEW_FMT_ARG(std::get(val))); + return FormatAcoreString(handler, LANG_CMDPARSER_GAME_TELE_NO_EXIST, std::get(val)); } struct ItemTemplateVisitor diff --git a/src/server/game/Chat/ChatCommands/ChatCommandArgs.h b/src/server/game/Chat/ChatCommands/ChatCommandArgs.h index 6b75e2355bc4bf..d151dcc2706d38 100644 --- a/src/server/game/Chat/ChatCommands/ChatCommandArgs.h +++ b/src/server/game/Chat/ChatCommands/ChatCommandArgs.h @@ -62,12 +62,12 @@ namespace Acore::Impl::ChatCommands if (Optional v = StringTo(token, 0)) val = *v; else - return FormatAcoreString(handler, LANG_CMDPARSER_STRING_VALUE_INVALID, STRING_VIEW_FMT_ARG(token), GetTypeName().c_str()); + return FormatAcoreString(handler, LANG_CMDPARSER_STRING_VALUE_INVALID, token, GetTypeName()); if constexpr (std::is_floating_point_v) { if (!std::isfinite(val)) - return FormatAcoreString(handler, LANG_CMDPARSER_STRING_VALUE_INVALID, STRING_VIEW_FMT_ARG(token), GetTypeName().c_str()); + return FormatAcoreString(handler, LANG_CMDPARSER_STRING_VALUE_INVALID, token, GetTypeName()); } return tail; @@ -200,7 +200,7 @@ namespace Acore::Impl::ChatCommands } if (next1) - return FormatAcoreString(handler, LANG_CMDPARSER_STRING_VALUE_INVALID, STRING_VIEW_FMT_ARG(strVal), GetTypeName().c_str()); + return FormatAcoreString(handler, LANG_CMDPARSER_STRING_VALUE_INVALID, strVal, GetTypeName()); else return next1; } diff --git a/src/server/game/Chat/ChatCommands/ChatCommandHelpers.h b/src/server/game/Chat/ChatCommands/ChatCommandHelpers.h index 6ead5173162bb2..dac07038d9e190 100644 --- a/src/server/game/Chat/ChatCommands/ChatCommandHelpers.h +++ b/src/server/game/Chat/ChatCommands/ChatCommandHelpers.h @@ -125,7 +125,7 @@ namespace Acore::Impl::ChatCommands template std::string FormatAcoreString(ChatHandler const* handler, AcoreStrings which, Ts&&... args) { - return Acore::StringFormat(GetAcoreString(handler, which), std::forward(args)...); + return Acore::StringFormatFmt(GetAcoreString(handler, which), std::forward(args)...); } } diff --git a/src/server/game/Chat/ChatCommands/ChatCommandTags.cpp b/src/server/game/Chat/ChatCommands/ChatCommandTags.cpp index 40fcc277ce23bd..e9510e2f9b4541 100644 --- a/src/server/game/Chat/ChatCommands/ChatCommandTags.cpp +++ b/src/server/game/Chat/ChatCommands/ChatCommandTags.cpp @@ -77,7 +77,7 @@ ChatCommandResult Acore::ChatCommands::AccountIdentifier::TryConsume(ChatHandler // try parsing as account id instead Optional id = Acore::StringTo(text, 10); if (!id) - return FormatAcoreString(handler, LANG_CMDPARSER_ACCOUNT_NAME_NO_EXIST, STRING_VIEW_FMT_ARG(_name)); + return FormatAcoreString(handler, LANG_CMDPARSER_ACCOUNT_NAME_NO_EXIST, _name); _id = *id; @@ -104,7 +104,7 @@ ChatCommandResult Acore::ChatCommands::PlayerIdentifier::TryConsume(ChatHandler } else if (!sCharacterCache->GetCharacterNameByGuid(_guid, _name)) { - return FormatAcoreString(handler, LANG_CMDPARSER_CHAR_GUID_NO_EXIST, _guid.ToString().c_str()); + return FormatAcoreString(handler, LANG_CMDPARSER_CHAR_GUID_NO_EXIST, _guid.ToString()); } return next; @@ -117,7 +117,7 @@ ChatCommandResult Acore::ChatCommands::PlayerIdentifier::TryConsume(ChatHandler _name.assign(val.get()); if (!normalizePlayerName(_name)) - return FormatAcoreString(handler, LANG_CMDPARSER_CHAR_NAME_INVALID, STRING_VIEW_FMT_ARG(_name)); + return FormatAcoreString(handler, LANG_CMDPARSER_CHAR_NAME_INVALID, _name); if ((_player = ObjectAccessor::FindPlayerByName(_name))) { @@ -125,7 +125,7 @@ ChatCommandResult Acore::ChatCommands::PlayerIdentifier::TryConsume(ChatHandler } else if (!(_guid = sCharacterCache->GetCharacterGuidByName(_name))) { - return FormatAcoreString(handler, LANG_CMDPARSER_CHAR_NAME_NO_EXIST, STRING_VIEW_FMT_ARG(_name)); + return FormatAcoreString(handler, LANG_CMDPARSER_CHAR_NAME_NO_EXIST, _name); } return next; diff --git a/src/server/game/Chat/ChatCommands/ChatCommandTags.h b/src/server/game/Chat/ChatCommands/ChatCommandTags.h index bea015ef490672..bfc61504f36c30 100644 --- a/src/server/game/Chat/ChatCommands/ChatCommandTags.h +++ b/src/server/game/Chat/ChatCommands/ChatCommandTags.h @@ -101,7 +101,7 @@ namespace Acore::ChatCommands return tail; start = args.substr(0, _string.length() + remainingToken.length()); } - return Acore::Impl::ChatCommands::FormatAcoreString(handler, LANG_CMDPARSER_EXACT_SEQ_MISMATCH, STRING_VIEW_FMT_ARG(_string), STRING_VIEW_FMT_ARG(start)); + return Acore::Impl::ChatCommands::FormatAcoreString(handler, LANG_CMDPARSER_EXACT_SEQ_MISMATCH, _string, start); } private: diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index aeec7a93486675..0b643923b36d48 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -9393,11 +9393,11 @@ void Player::Whisper(std::string_view text, Language language, Player* target, b // announce afk or dnd message if (target->isAFK()) { - ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_AFK, target->GetName().c_str(), target->autoReplyMsg.c_str()); + ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_AFK, target->GetName(), target->autoReplyMsg); } else if (target->isDND()) { - ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_DND, target->GetName().c_str(), target->autoReplyMsg.c_str()); + ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_DND, target->GetName(), target->autoReplyMsg); } } diff --git a/src/server/game/Entities/Player/PlayerStorage.cpp b/src/server/game/Entities/Player/PlayerStorage.cpp index 65671e9a6038ef..f350b3e9af3ac8 100644 --- a/src/server/game/Entities/Player/PlayerStorage.cpp +++ b/src/server/game/Entities/Player/PlayerStorage.cpp @@ -6640,11 +6640,11 @@ void Player::PrettyPrintRequirementsQuestList(const std::vectornote.empty()) { - ChatHandler(GetSession()).PSendSysMessage(" - %s", stream.str().c_str()); + ChatHandler(GetSession()).PSendSysMessage(" - {}", stream.str()); } else { - ChatHandler(GetSession()).PSendSysMessage(" - %s %s %s", stream.str().c_str(), sObjectMgr->GetAcoreString(LANG_ACCESS_REQUIREMENT_NOTE, loc_idx), missingReq->note.c_str()); + ChatHandler(GetSession()).PSendSysMessage(" - {} {} {}", stream.str(), sObjectMgr->GetAcoreString(LANG_ACCESS_REQUIREMENT_NOTE, loc_idx), missingReq->note); } } } @@ -6673,11 +6673,11 @@ void Player::PrettyPrintRequirementsAchievementsList(const std::vectornote.empty()) { - ChatHandler(GetSession()).PSendSysMessage(" - %s", stream.str().c_str()); + ChatHandler(GetSession()).PSendSysMessage(" - {}", stream.str()); } else { - ChatHandler(GetSession()).PSendSysMessage(" - %s %s %s", stream.str().c_str(), sObjectMgr->GetAcoreString(LANG_ACCESS_REQUIREMENT_NOTE, loc_idx), missingReq->note.c_str()); + ChatHandler(GetSession()).PSendSysMessage(" - {} {} {}", stream.str(), sObjectMgr->GetAcoreString(LANG_ACCESS_REQUIREMENT_NOTE, loc_idx), missingReq->note); } } } @@ -6711,11 +6711,11 @@ void Player::PrettyPrintRequirementsItemsList(const std::vectornote.empty()) { - ChatHandler(GetSession()).PSendSysMessage(" - %s", stream.str().c_str()); + ChatHandler(GetSession()).PSendSysMessage(" - {}", stream.str()); } else { - ChatHandler(GetSession()).PSendSysMessage(" - %s %s %s", stream.str().c_str(), sObjectMgr->GetAcoreString(LANG_ACCESS_REQUIREMENT_NOTE, loc_idx), missingReq->note.c_str()); + ChatHandler(GetSession()).PSendSysMessage(" - {} {} {}", stream.str(), sObjectMgr->GetAcoreString(LANG_ACCESS_REQUIREMENT_NOTE, loc_idx), missingReq->note); } } } @@ -6860,11 +6860,11 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map //Blizzlike method of printing out the requirements if (missingPlayerQuests.size() && !missingPlayerQuests[0]->note.empty()) { - ChatHandler(GetSession()).PSendSysMessage("%s", missingPlayerQuests[0]->note.c_str()); + ChatHandler(GetSession()).PSendSysMessage("{}", missingPlayerQuests[0]->note); } else if (missingLeaderQuests.size() && !missingLeaderQuests[0]->note.empty()) { - ChatHandler(GetSession()).PSendSysMessage("%s", missingLeaderQuests[0]->note.c_str()); + ChatHandler(GetSession()).PSendSysMessage("{}", missingLeaderQuests[0]->note); } else if (mapDiff->hasErrorMessage) { @@ -6902,7 +6902,7 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map } if (missingLeaderQuests.size()) { - ChatHandler(GetSession()).PSendSysMessage(LANG_ACCESS_REQUIREMENT_LEADER_COMPLETE_QUESTS, leaderName.c_str()); + ChatHandler(GetSession()).PSendSysMessage(LANG_ACCESS_REQUIREMENT_LEADER_COMPLETE_QUESTS, leaderName); PrettyPrintRequirementsQuestList(missingLeaderQuests); errorAlreadyPrinted = true; } @@ -6915,7 +6915,7 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map } if (missingLeaderAchievements.size()) { - ChatHandler(GetSession()).PSendSysMessage(LANG_ACCESS_REQUIREMENT_LEADER_COMPLETE_ACHIEVEMENTS, leaderName.c_str()); + ChatHandler(GetSession()).PSendSysMessage(LANG_ACCESS_REQUIREMENT_LEADER_COMPLETE_ACHIEVEMENTS, leaderName); PrettyPrintRequirementsAchievementsList(missingLeaderAchievements); errorAlreadyPrinted = true; } @@ -6929,7 +6929,7 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map if (missingLeaderItems.size()) { - ChatHandler(GetSession()).PSendSysMessage(LANG_ACCESS_REQUIREMENT_LEADER_OBTAIN_ITEMS, leaderName.c_str()); + ChatHandler(GetSession()).PSendSysMessage(LANG_ACCESS_REQUIREMENT_LEADER_OBTAIN_ITEMS, leaderName); PrettyPrintRequirementsItemsList(missingLeaderItems); errorAlreadyPrinted = true; } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index cd00e46b3e33de..458dfcfc3ceb61 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -9348,7 +9348,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max if (maxcount > 0 && incrtime == 0) { if (player) - ChatHandler(player->GetSession()).PSendSysMessage("MaxCount != 0 (%u) but IncrTime == 0", maxcount); + ChatHandler(player->GetSession()).PSendSysMessage("MaxCount != 0 ({}) but IncrTime == 0", maxcount); else LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` has `maxcount` ({}) for item {} of vendor (Entry: {}) but `incrtime`=0, ignore", maxcount, item_id, vendor_entry); return false; diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index eee35454164c78..d42c1313d953ed 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -1447,7 +1447,7 @@ void Guild::HandleInviteMember(WorldSession* session, std::string const& name) uint32 memberLimit = sConfigMgr->GetOption("Guild.MemberLimit", 0); if (memberLimit > 0 && player->GetGuild()->GetMemberCount() >= memberLimit) { - ChatHandler(player->GetSession()).PSendSysMessage("Your guild has reached the maximum amount of members (%u). You cannot send another invite until the guild member count is lower.", memberLimit); + ChatHandler(player->GetSession()).PSendSysMessage("Your guild has reached the maximum amount of members ({}). You cannot send another invite until the guild member count is lower.", memberLimit); SendCommandResult(session, GUILD_COMMAND_INVITE, ERR_GUILD_INTERNAL, name); return; } diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index ad8ddbbce5e426..6c503243cea85f 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -831,7 +831,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder) // send server info if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1) - chH.PSendSysMessage("%s", GitRevision::GetFullVersion()); + chH.PSendSysMessage("{}", GitRevision::GetFullVersion()); } if (uint32 guildId = sCharacterCache->GetCharacterGuildIdByGuid(pCurrChar->GetGUID())) @@ -879,7 +879,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder) // send new char string if not empty if (!sWorld->GetNewCharString().empty()) - chH.PSendSysMessage("%s", sWorld->GetNewCharString().c_str()); + chH.PSendSysMessage("{}", sWorld->GetNewCharString()); } } @@ -1150,7 +1150,7 @@ void WorldSession::HandlePlayerLoginToCharInWorld(Player* pCurrChar) // send server info if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1) - chH.PSendSysMessage("%s", GitRevision::GetFullVersion()); + chH.PSendSysMessage("{}", GitRevision::GetFullVersion()); LOG_DEBUG("network.opcode", "WORLD: Sent server info"); } diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index c93b0c1b6c9ee9..bbdf138b1d2d7b 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -610,7 +610,7 @@ void WorldSession::HandleCharacterAuraFrozen(PreparedQueryResult result) { Field* fields = result->Fetch(); std::string player = fields[0].Get(); - handler.PSendSysMessage(LANG_COMMAND_FROZEN_PLAYERS, player.c_str()); + handler.PSendSysMessage(LANG_COMMAND_FROZEN_PLAYERS, player); } while (result->NextRow()); } @@ -1402,11 +1402,11 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recv_data) switch (group->GetDifficultyChangePreventionReason()) { case DIFFICULTY_PREVENTION_CHANGE_BOSS_KILLED: - ChatHandler(this).PSendSysMessage("Raid was in combat recently and may not change difficulty again for %u sec.", preventionTime); + ChatHandler(this).PSendSysMessage("Raid was in combat recently and may not change difficulty again for {} sec.", preventionTime); break; case DIFFICULTY_PREVENTION_CHANGE_RECENTLY_CHANGED: default: - ChatHandler(this).PSendSysMessage("Raid difficulty has changed recently, and may not change again for %u sec.", preventionTime); + ChatHandler(this).PSendSysMessage("Raid difficulty has changed recently, and may not change again for {} sec.", preventionTime); break; } diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 922ea5cb1ef4d7..94d3893d668164 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -348,7 +348,7 @@ class account_commandscript : public CommandScript 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 @@ class account_commandscript : public CommandScript { Field* fieldsLogin = resultLogin->Fetch(); handler->PSendSysMessage(LANG_ACCOUNT_LIST_LINE, - fieldsLogin[0].Get().c_str(), name.c_str(), fieldsLogin[1].Get().c_str(), + fieldsLogin[0].Get(), name, fieldsLogin[1].Get(), fieldsDB[2].Get(), fieldsDB[3].Get(), fieldsLogin[3].Get(), fieldsLogin[2].Get()); } 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 @@ class account_commandscript : public CommandScript 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 @@ class account_commandscript : public CommandScript 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 @@ class account_commandscript : public CommandScript 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 @@ class account_commandscript : public CommandScript 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 @@ class account_commandscript : public CommandScript 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 @@ class account_commandscript : public CommandScript 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 @@ class account_commandscript : public CommandScript 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 @@ class account_commandscript : public CommandScript 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 @@ class account_commandscript : public CommandScript 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); diff --git a/src/server/scripts/Commands/cs_arena.cpp b/src/server/scripts/Commands/cs_arena.cpp index 3531d62def78e0..b556238e28385a 100644 --- a/src/server/scripts/Commands/cs_arena.cpp +++ b/src/server/scripts/Commands/cs_arena.cpp @@ -58,7 +58,7 @@ class arena_commandscript : public CommandScript { 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 @@ class arena_commandscript : public CommandScript 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 @@ class arena_commandscript : public CommandScript } 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 @@ class arena_commandscript : public CommandScript delete(arena); - handler->PSendSysMessage(LANG_ARENA_DISBAND, name.c_str(), teamId); + handler->PSendSysMessage(LANG_ARENA_DISBAND, name, teamId); return true; } @@ -119,13 +119,13 @@ class arena_commandscript : public CommandScript 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 @@ class arena_commandscript : public CommandScript 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 @@ class arena_commandscript : public CommandScript 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 @@ class arena_commandscript : public CommandScript 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 @@ class arena_commandscript : public CommandScript 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 @@ class arena_commandscript : public CommandScript { 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 @@ class arena_commandscript : public CommandScript } 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; } diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp index a17880f23d2ff8..92d4a3683e15af 100644 --- a/src/server/scripts/Commands/cs_ban.cpp +++ b/src/server/scripts/Commands/cs_ban.cpp @@ -131,17 +131,17 @@ class ban_commandscript : public CommandScript 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 @@ class ban_commandscript : public CommandScript 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 @@ class ban_commandscript : public CommandScript 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 @@ class ban_commandscript : public CommandScript 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 @@ class ban_commandscript : public CommandScript 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 @@ class ban_commandscript : public CommandScript bool permanent = (fields[1].Get() == uint64(0)); std::string banTime = permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].Get(), true); handler->PSendSysMessage(LANG_BANINFO_HISTORYENTRY, - fields[0].Get().c_str(), banTime.c_str(), active ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO), fields[4].Get().c_str(), fields[5].Get().c_str()); + fields[0].Get(), banTime, active ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO), fields[4].Get(), fields[5].Get()); } while (result->NextRow()); return true; @@ -338,11 +338,11 @@ class ban_commandscript : public CommandScript 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 @@ class ban_commandscript : public CommandScript bool permanent = (fields[1].Get() == uint32(0)); std::string banTime = permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].Get(), true); handler->PSendSysMessage(LANG_BANINFO_HISTORYENTRY, - fields[0].Get().c_str(), banTime.c_str(), active ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO), fields[4].Get().c_str(), fields[5].Get().c_str()); + fields[0].Get(), banTime, active ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO), fields[4].Get(), fields[5].Get()); } while (result->NextRow()); return true; @@ -391,8 +391,8 @@ class ban_commandscript : public CommandScript Field* fields = result->Fetch(); bool permanent = fields[6].Get() == 1; handler->PSendSysMessage(LANG_BANINFO_IPENTRY, - fields[0].Get().c_str(), fields[1].Get().c_str(), permanent ? handler->GetAcoreString(LANG_BANINFO_NEVER) : fields[2].Get().c_str(), - permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[3].Get(), true).c_str(), fields[4].Get().c_str(), fields[5].Get().c_str()); + fields[0].Get(), fields[1].Get(), permanent ? handler->GetAcoreString(LANG_BANINFO_NEVER) : fields[2].Get(), + permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[3].Get(), true), fields[4].Get(), fields[5].Get()); return true; } @@ -444,7 +444,7 @@ class ban_commandscript : public CommandScript if (banResult) { Field* fields2 = banResult->Fetch(); - handler->PSendSysMessage("%s", fields2[0].Get().c_str()); + handler->PSendSysMessage("%s", fields2[0].Get()); } } while (result->NextRow()); } @@ -481,16 +481,16 @@ class ban_commandscript : public CommandScript if (fields2[0].Get() == fields2[1].Get()) { 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().c_str(), fields2[3].Get().c_str()); + accountName, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min, + fields2[2].Get(), fields2[3].Get()); } else { tm tmUnban = Acore::Time::TimeBreakdown(fields2[1].Get()); 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().c_str(), fields2[3].Get().c_str()); + fields2[2].Get(), fields2[3].Get()); } } while (banInfo->NextRow()); } @@ -534,7 +534,7 @@ class ban_commandscript : public CommandScript PreparedQueryResult banResult = CharacterDatabase.Query(stmt2); if (banResult) - handler->PSendSysMessage("%s", (*banResult)[0].Get().c_str()); + handler->PSendSysMessage("%s", (*banResult)[0].Get()); } while (result->NextRow()); } // Console wide output @@ -565,16 +565,16 @@ class ban_commandscript : public CommandScript if (banFields[0].Get() == banFields[1].Get()) { 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().c_str(), banFields[3].Get().c_str()); + char_name, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min, + banFields[2].Get(), banFields[3].Get()); } else { tm tmUnban = Acore::Time::TimeBreakdown(banFields[1].Get()); 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().c_str(), banFields[3].Get().c_str()); + banFields[2].Get(), banFields[3].Get()); } } while (banInfo->NextRow()); } @@ -621,7 +621,7 @@ class ban_commandscript : public CommandScript do { Field* fields = result->Fetch(); - handler->PSendSysMessage("%s", fields[0].Get().c_str()); + handler->PSendSysMessage("%s", fields[0].Get()); } while (result->NextRow()); } // Console wide output @@ -638,16 +638,16 @@ class ban_commandscript : public CommandScript if (fields[1].Get() == fields[2].Get()) { handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|", - fields[0].Get().c_str(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min, - fields[3].Get().c_str(), fields[4].Get().c_str()); + fields[0].Get(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min, + fields[3].Get(), fields[4].Get()); } else { tm tmUnban = Acore::Time::TimeBreakdown(fields[2].Get()); handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|", - fields[0].Get().c_str(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min, + fields[0].Get(), 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().c_str(), fields[4].Get().c_str()); + fields[3].Get(), fields[4].Get()); } } while (result->NextRow()); @@ -714,7 +714,7 @@ class ban_commandscript : public CommandScript 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 @@ class ban_commandscript : public CommandScript { 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; diff --git a/src/server/scripts/Commands/cs_cache.cpp b/src/server/scripts/Commands/cs_cache.cpp index d32ba257502fa9..396f4dd0b6105f 100644 --- a/src/server/scripts/Commands/cs_cache.cpp +++ b/src/server/scripts/Commands/cs_cache.cpp @@ -65,8 +65,8 @@ class cache_commandscript : public CommandScript 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 @@ class cache_commandscript : public CommandScript } 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 @@ class cache_commandscript : public CommandScript 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; } diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index e04c969040e963..44d14e6e6d94aa 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -188,12 +188,12 @@ class character_commandscript : public CommandScript if (!handler->GetSession()) handler->PSendSysMessage(LANG_CHARACTER_DELETED_LIST_LINE_CONSOLE, - itr->lowGuid, itr->name.c_str(), itr->accountName.empty() ? "" : itr->accountName.c_str(), - itr->accountId, dateStr.c_str()); + itr->lowGuid, itr->name, itr->accountName.empty() ? "" : itr->accountName, + itr->accountId, dateStr); else handler->PSendSysMessage(LANG_CHARACTER_DELETED_LIST_LINE_CHAT, - itr->lowGuid, itr->name.c_str(), itr->accountName.empty() ? "" : itr->accountName.c_str(), - itr->accountId, dateStr.c_str()); + itr->lowGuid, itr->name, itr->accountName.empty() ? "" : itr->accountName, + itr->accountId, dateStr); } if (!handler->GetSession()) @@ -214,7 +214,7 @@ class character_commandscript : public CommandScript { 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript // 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript 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(AT_LOGIN_CUSTOMIZE)); stmt->SetData(1, player->GetGUID().GetCounter()); @@ -489,12 +489,12 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript 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 @@ class character_commandscript : public CommandScript { 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()) diff --git a/src/server/scripts/Commands/cs_cheat.cpp b/src/server/scripts/Commands/cs_cheat.cpp index 5b6eadd471bba0..340176e1960e77 100644 --- a/src/server/scripts/Commands/cs_cheat.cpp +++ b/src/server/scripts/Commands/cs_cheat.cpp @@ -185,16 +185,16 @@ class cheat_commandscript : public CommandScript 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 @@ class cheat_commandscript : public CommandScript 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) diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 612537c8f08b26..286282bd3d7cd8 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -127,14 +127,14 @@ class debug_commandscript : public CommandScript // Dump camera locations if (std::vector 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript 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()) { target->SetUInt32Value(index, value.get()); - 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()) { target->SetFloatValue(index, value.get()); - handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, target->GetGUID().GetCounter(), static_cast(index), uint32(value)); + handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, target->GetGUID().ToString(), static_cast(index), uint32(value)); } return true; @@ -1085,19 +1085,19 @@ class debug_commandscript : public CommandScript 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 @@ class debug_commandscript : public CommandScript { 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 @@ class debug_commandscript : public CommandScript { 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 @@ class debug_commandscript : public CommandScript 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()), uint64(map->GetObjectsStore().Size()), @@ -1338,7 +1338,7 @@ class debug_commandscript : public CommandScript 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) diff --git a/src/server/scripts/Commands/cs_deserter.cpp b/src/server/scripts/Commands/cs_deserter.cpp index b8b0d05f0a508e..0daf4eab135cf7 100644 --- a/src/server/scripts/Commands/cs_deserter.cpp +++ b/src/server/scripts/Commands/cs_deserter.cpp @@ -162,7 +162,7 @@ class deserter_commandscript : public CommandScript 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 @@ class deserter_commandscript : public CommandScript 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 @@ class deserter_commandscript : public CommandScript 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 @@ class deserter_commandscript : public CommandScript 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 @@ class deserter_commandscript : public CommandScript 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; } diff --git a/src/server/scripts/Commands/cs_disable.cpp b/src/server/scripts/Commands/cs_disable.cpp index b48ae4fbc40a6b..43972cfa42dbb2 100644 --- a/src/server/scripts/Commands/cs_disable.cpp +++ b/src/server/scripts/Commands/cs_disable.cpp @@ -147,7 +147,7 @@ class disable_commandscript : public CommandScript 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 @@ class disable_commandscript : public CommandScript 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 @@ class disable_commandscript : public CommandScript 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 @@ class disable_commandscript : public CommandScript 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; } diff --git a/src/server/scripts/Commands/cs_event.cpp b/src/server/scripts/Commands/cs_event.cpp index bda903f7da28cd..45dffdd7ec4cda 100644 --- a/src/server/scripts/Commands/cs_event.cpp +++ b/src/server/scripts/Commands/cs_event.cpp @@ -69,11 +69,11 @@ class event_commandscript : public CommandScript 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 @@ class event_commandscript : public CommandScript 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 @@ class event_commandscript : public CommandScript 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 @@ class event_commandscript : public CommandScript 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; } diff --git a/src/server/scripts/Commands/cs_gear.cpp b/src/server/scripts/Commands/cs_gear.cpp index 9753997fe24a6d..5304ac8661fdaa 100644 --- a/src/server/scripts/Commands/cs_gear.cpp +++ b/src/server/scripts/Commands/cs_gear.cpp @@ -67,11 +67,11 @@ class gear_commandscript : public CommandScript 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 @@ class gear_commandscript : public CommandScript 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 @@ class gear_commandscript : public CommandScript uint32 SpellPower = fields[8].Get(); uint32 Resilience = fields[9].Get(); - 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); } } diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp index c49cf4c67010f0..bb64f0114c82ca 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -107,7 +107,7 @@ class gm_commandscript : public CommandScript 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 @@ class gm_commandscript : public CommandScript 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 @@ class gm_commandscript : public CommandScript 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("========================"); } diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index 3eab21a3570488..b3f9fa95961c1b 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -140,7 +140,7 @@ class gobject_commandscript : public CommandScript /// @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 @@ class gobject_commandscript : public CommandScript 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 @@ class gobject_commandscript : public CommandScript 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 @@ class gobject_commandscript : public CommandScript 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 @@ class gobject_commandscript : public CommandScript 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 @@ class gobject_commandscript : public CommandScript 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 @@ class gobject_commandscript : public CommandScript 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 @@ class gobject_commandscript : public CommandScript 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 @@ class gobject_commandscript : public CommandScript { object->SendCustomAnim(*objectState); } - handler->PSendSysMessage("Set gobject type %d state %u", objectType, *objectState); + handler->PSendSysMessage("Set gobject type {} state {}", objectType, *objectState); return true; } diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp index 62abe21ae59bbb..ed32701f217957 100644 --- a/src/server/scripts/Commands/cs_group.cpp +++ b/src/server/scripts/Commands/cs_group.cpp @@ -156,7 +156,7 @@ class group_commandscript : public CommandScript { 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 @@ class group_commandscript : public CommandScript 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 @@ class group_commandscript : public CommandScript 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 @@ class group_commandscript : public CommandScript if (!groupTarget) { - handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, target->GetName().c_str()); + handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, target->GetName()); return true; } diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp index 8b1e6182cc88ba..4b1e106bf19ce2 100644 --- a/src/server/scripts/Commands/cs_guild.cpp +++ b/src/server/scripts/Commands/cs_guild.cpp @@ -239,11 +239,11 @@ class guild_commandscript : public CommandScript 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 @@ class guild_commandscript : public CommandScript 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; } }; diff --git a/src/server/scripts/Commands/cs_instance.cpp b/src/server/scripts/Commands/cs_instance.cpp index 37d1d66e71884f..cd6836372110f2 100644 --- a/src/server/scripts/Commands/cs_instance.cpp +++ b/src/server/scripts/Commands/cs_instance.cpp @@ -74,13 +74,13 @@ class instance_commandscript : public CommandScript 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 @@ class instance_commandscript : public CommandScript 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 @@ class instance_commandscript : public CommandScript } } - handler->PSendSysMessage("instances unbound: %d", counter); + handler->PSendSysMessage("instances unbound: {}", counter); return true; } @@ -131,13 +131,13 @@ class instance_commandscript : public CommandScript { 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 @@ class instance_commandscript : public CommandScript 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 @@ class instance_commandscript : public CommandScript 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; } }; diff --git a/src/server/scripts/Commands/cs_item.cpp b/src/server/scripts/Commands/cs_item.cpp index 1557398adc7cf4..eb59f7675bf384 100644 --- a/src/server/scripts/Commands/cs_item.cpp +++ b/src/server/scripts/Commands/cs_item.cpp @@ -114,7 +114,7 @@ class item_commandscript : public CommandScript 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; } diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 08c29492d08315..dd759a7f9b6e59 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -303,7 +303,7 @@ class learn_commandscript : public CommandScript 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; } diff --git a/src/server/scripts/Commands/cs_lfg.cpp b/src/server/scripts/Commands/cs_lfg.cpp index 5e809cafabf007..e984dbb6514b6f 100644 --- a/src/server/scripts/Commands/cs_lfg.cpp +++ b/src/server/scripts/Commands/cs_lfg.cpp @@ -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 @@ class lfg_commandscript : public CommandScript 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()); diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index caeb7c2e18e996..9702616f247054 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -124,9 +124,9 @@ class list_commandscript : public CommandScript for (std::unordered_multimap::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 @@ class list_commandscript : public CommandScript 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 @@ class list_commandscript : public CommandScript 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 @@ class list_commandscript : public CommandScript 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 @@ class list_commandscript : public CommandScript 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 @@ class list_commandscript : public CommandScript 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 @@ class list_commandscript : public CommandScript for (std::unordered_multimap::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 @@ class list_commandscript : public CommandScript 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 @@ class list_commandscript : public CommandScript 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) diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 20cf780e716826..d64065bcceaa88 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -211,11 +211,11 @@ class lookup_commandscript : public CommandScript 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 @@ class lookup_commandscript : public CommandScript 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 @@ class lookup_commandscript : public CommandScript 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 @@ class lookup_commandscript : public CommandScript 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 @@ class lookup_commandscript : public CommandScript 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 @@ class lookup_commandscript : public CommandScript // 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 @@ class lookup_commandscript : public CommandScript 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 @@ class lookup_commandscript : public CommandScript 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 @@ class lookup_commandscript : public CommandScript 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 @@ class lookup_commandscript : public CommandScript 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 @@ class lookup_commandscript : public CommandScript // 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 @@ class lookup_commandscript : public CommandScript // 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 @@ class lookup_commandscript : public CommandScript } 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 @@ class lookup_commandscript : public CommandScript 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 @@ class lookup_commandscript : public CommandScript 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; diff --git a/src/server/scripts/Commands/cs_message.cpp b/src/server/scripts/Commands/cs_message.cpp index 3c4cd5b4c792bd..104c162777bf87 100644 --- a/src/server/scripts/Commands/cs_message.cpp +++ b/src/server/scripts/Commands/cs_message.cpp @@ -87,7 +87,7 @@ class message_commandscript : public CommandScript 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; } diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 17820f31b5f642..41e1168faca29b 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -357,43 +357,43 @@ class misc_commandscript : public CommandScript 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 @@ class misc_commandscript : public CommandScript // 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 @@ class misc_commandscript : public CommandScript // 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 @@ class misc_commandscript : public CommandScript // 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 @@ class misc_commandscript : public CommandScript } } - 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 @@ class misc_commandscript : public CommandScript 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 @@ class misc_commandscript : public CommandScript if (targetPlayer->IsBeingTeleported()) { - handler->SendErrorMessage(LANG_IS_TELEPORTED, nameLink.c_str()); + handler->SendErrorMessage(LANG_IS_TELEPORTED, nameLink); return false; } @@ -906,15 +906,15 @@ class misc_commandscript : public CommandScript (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 @@ class misc_commandscript : public CommandScript 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 @@ class misc_commandscript : public CommandScript if (!group) { - handler->SendErrorMessage(LANG_NOT_IN_GROUP, nameLink.c_str()); + handler->SendErrorMessage(LANG_NOT_IN_GROUP, nameLink); return false; } @@ -1020,7 +1020,7 @@ class misc_commandscript : public CommandScript if (player->IsBeingTeleported()) { - handler->SendErrorMessage(LANG_IS_TELEPORTED, plNameLink.c_str()); + handler->SendErrorMessage(LANG_IS_TELEPORTED, plNameLink); return false; } @@ -1031,15 +1031,15 @@ class misc_commandscript : public CommandScript 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 @@ class misc_commandscript : public CommandScript return false; } - handler->PSendSysMessage(LANG_OBJECT_GUID, guid.ToString().c_str()); + handler->PSendSysMessage(LANG_OBJECT_GUID, guid.ToString()); return true; } @@ -1199,7 +1199,7 @@ class misc_commandscript : public CommandScript if (!spell) { target->RemoveAllSpellCooldown(); - handler->PSendSysMessage(LANG_REMOVEALL_COOLDOWN, nameLink.c_str()); + handler->PSendSysMessage(LANG_REMOVEALL_COOLDOWN, nameLink); } else { @@ -1210,7 +1210,7 @@ class misc_commandscript : public CommandScript } 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 @@ class misc_commandscript : public CommandScript 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 @@ class misc_commandscript : public CommandScript } 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 @@ class misc_commandscript : public CommandScript 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 @@ class misc_commandscript : public CommandScript 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 @@ class misc_commandscript : public CommandScript 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 @@ class misc_commandscript : public CommandScript // add the skill to the player's book with step 1 (which is the first rank, in most cases something // like 'Apprentice '. 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 @@ class misc_commandscript : public CommandScript // 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 @@ class misc_commandscript : public CommandScript // 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 @@ class misc_commandscript : public CommandScript 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 @@ class misc_commandscript : public CommandScript // 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 @@ class misc_commandscript : public CommandScript 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 @@ class misc_commandscript : public CommandScript for (HashMapHolder::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 @@ class misc_commandscript : public CommandScript 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 @@ class misc_commandscript : public CommandScript { 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 @@ class misc_commandscript : public CommandScript do { Field* fields = result->Fetch(); - handler->PSendSysMessage(LANG_COMMAND_MUTEHISTORY_OUTPUT, Acore::Time::TimeToHumanReadable(Seconds(fields[0].Get())).c_str(), fields[1].Get(), fields[2].Get().c_str(), fields[3].Get().c_str()); + handler->PSendSysMessage(LANG_COMMAND_MUTEHISTORY_OUTPUT, Acore::Time::TimeToHumanReadable(Seconds(fields[0].Get())), fields[1].Get(), fields[2].Get(), fields[3].Get()); } while (result->NextRow()); return true; @@ -2608,7 +2608,7 @@ class misc_commandscript : public CommandScript 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 @@ class misc_commandscript : public CommandScript } 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 @@ class misc_commandscript : public CommandScript } 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 @@ class misc_commandscript : public CommandScript 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 @@ class misc_commandscript : public CommandScript } 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 @@ class misc_commandscript : public CommandScript 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 @@ class misc_commandscript : public CommandScript 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; } diff --git a/src/server/scripts/Commands/cs_mmaps.cpp b/src/server/scripts/Commands/cs_mmaps.cpp index 9e72cfc7008783..dba16fab48b3ed 100644 --- a/src/server/scripts/Commands/cs_mmaps.cpp +++ b/src/server/scripts/Commands/cs_mmaps.cpp @@ -105,17 +105,17 @@ class mmaps_commandscript : public CommandScript 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 @@ class mmaps_commandscript : public CommandScript 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 @@ class mmaps_commandscript : public CommandScript 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 @@ class mmaps_commandscript : public CommandScript { 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 @@ class mmaps_commandscript : public CommandScript 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 @@ class mmaps_commandscript : public CommandScript //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 @@ class mmaps_commandscript : public CommandScript } 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 @@ class mmaps_commandscript : public CommandScript 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 @@ class mmaps_commandscript : public CommandScript } 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; } diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 302c09a9638929..a34e82fe5a5d7a 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -94,11 +94,11 @@ class modify_commandscript : public CommandScript { if (Player* player = target->ToPlayer()) { - handler->PSendSysMessage(resourceMessage, std::forward(args)..., handler->GetNameLink(player).c_str()); + handler->PSendSysMessage(resourceMessage, std::forward(args)..., handler->GetNameLink(player)); if (handler->needReportToTarget(player)) { - ChatHandler(player->GetSession()).PSendSysMessage(resourceReportMessage, handler->GetNameLink().c_str(), std::forward(args)...); + ChatHandler(player->GetSession()).PSendSysMessage(resourceReportMessage, handler->GetNameLink(), std::forward(args)...); } } } @@ -135,11 +135,11 @@ class modify_commandscript : public CommandScript 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 @@ class modify_commandscript : public CommandScript 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 @@ class modify_commandscript : public CommandScript 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 @@ class modify_commandscript : public CommandScript 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 @@ class modify_commandscript : public CommandScript 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 @@ class modify_commandscript : public CommandScript 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 @@ class modify_commandscript : public CommandScript 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 @@ class modify_commandscript : public CommandScript 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 @@ class modify_commandscript : public CommandScript 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 @@ class modify_commandscript : public CommandScript 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 @@ class modify_commandscript : public CommandScript 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 @@ class modify_commandscript : public CommandScript 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 @@ class modify_commandscript : public CommandScript 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 @@ class modify_commandscript : public CommandScript 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 @@ class modify_commandscript : public CommandScript 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; diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index c0dff09ec2ca02..c06d9a3d94155c 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -289,7 +289,7 @@ class npc_commandscript : public CommandScript 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 @@ class npc_commandscript : public CommandScript 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 @@ class npc_commandscript : public CommandScript 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 @@ class npc_commandscript : public CommandScript // 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 @@ class npc_commandscript : public CommandScript 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 @@ class npc_commandscript : public CommandScript 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 @@ class npc_commandscript : public CommandScript 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 @@ class npc_commandscript : public CommandScript 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 @@ class npc_commandscript : public CommandScript // 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 @@ class npc_commandscript : public CommandScript 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 @@ class npc_commandscript : public CommandScript 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 @@ class npc_commandscript : public CommandScript 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 @@ class npc_commandscript : public CommandScript 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 @@ class npc_commandscript : public CommandScript 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; } }; diff --git a/src/server/scripts/Commands/cs_pet.cpp b/src/server/scripts/Commands/cs_pet.cpp index 30937d5ca85cdb..afd83c1a6ddefe 100644 --- a/src/server/scripts/Commands/cs_pet.cpp +++ b/src/server/scripts/Commands/cs_pet.cpp @@ -108,19 +108,19 @@ class pet_commandscript : public CommandScript 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; } diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index f02f34d02ebd1c..1434f2e6b48e85 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -126,7 +126,7 @@ class quest_commandscript : public CommandScript 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 @@ class quest_commandscript : public CommandScript 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 @@ class quest_commandscript : public CommandScript 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 @@ class quest_commandscript : public CommandScript 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; } diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index cdd32ada0dcdc9..26bf8109d36dc8 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -196,7 +196,7 @@ class reset_commandscript : public CommandScript 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 @@ class reset_commandscript : public CommandScript 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 @@ class reset_commandscript : public CommandScript 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 @@ class reset_commandscript : public CommandScript 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 @@ class reset_commandscript : public CommandScript 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 @@ class reset_commandscript : public CommandScript 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 @@ class reset_commandscript : public CommandScript 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 @@ class reset_commandscript : public CommandScript 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 @@ class reset_commandscript : public CommandScript 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 @@ class reset_commandscript : public CommandScript 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 @@ class reset_commandscript : public CommandScript 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, diff --git a/src/server/scripts/Commands/cs_send.cpp b/src/server/scripts/Commands/cs_send.cpp index cc2bd9c352fbbc..3645370aecd3f5 100644 --- a/src/server/scripts/Commands/cs_send.cpp +++ b/src/server/scripts/Commands/cs_send.cpp @@ -133,7 +133,7 @@ class send_commandscript : public CommandScript 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 @@ class send_commandscript : public CommandScript 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 @@ class send_commandscript : public CommandScript 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 @@ class send_commandscript : public CommandScript 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; } }; diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp index 34a74babe58e28..5a45f3245e5c62 100644 --- a/src/server/scripts/Commands/cs_server.cpp +++ b/src/server/scripts/Commands/cs_server.cpp @@ -123,22 +123,22 @@ class server_commandscript : public CommandScript 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 @@ class server_commandscript : public CommandScript 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 @@ class server_commandscript : public CommandScript 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 @@ class server_commandscript : public CommandScript 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 @@ class server_commandscript : public CommandScript 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 @@ class server_commandscript : public CommandScript lwdb = fields[0].Get(); } - 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 @@ class server_commandscript : public CommandScript 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("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("Connected players: {}. Characters in world: {}. Queue: {}.", activeSessionCount, playerCount, queuedSessionCount); + + 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; } diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp index 01cfd6f753cb3a..259fd89ad71a3d 100644 --- a/src/server/scripts/Commands/cs_tele.cpp +++ b/src/server/scripts/Commands/cs_tele.cpp @@ -134,9 +134,9 @@ class tele_commandscript : public CommandScript 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 @@ class tele_commandscript : public CommandScript 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 @@ class tele_commandscript : public CommandScript 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()) diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp index 2eb69c7b3c289a..bef6f6f13ad612 100644 --- a/src/server/scripts/Commands/cs_ticket.cpp +++ b/src/server/scripts/Commands/cs_ticket.cpp @@ -109,7 +109,7 @@ class ticket_commandscript : public CommandScript 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 @@ class ticket_commandscript : public CommandScript 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 @@ class ticket_commandscript : public CommandScript 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; } }; diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp index 2200d5683b7e44..2d5b9b23e5b39a 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -101,7 +101,7 @@ class wp_commandscript : public CommandScript uint32 maxpathid = result->Fetch()->Get(); pathid = maxpathid + 1; - handler->PSendSysMessage("%s%s|r", "|cff00ff00", "New path started."); + handler->PSendSysMessage("{}{}|r", "|cff00ff00", "New path started."); } } else @@ -112,7 +112,7 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript { 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript a10 = fields[8].Get(); a11 = fields[9].Get(); - 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript uint32 ev_id = fields[4].Get(); uint32 ev_chance = fields[5].Get(); - 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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 @@ class wp_commandscript : public CommandScript 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); From fade5b1b3d4bc5c57aeee3e337d9212765637d74 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 23 Jul 2024 21:49:35 +0000 Subject: [PATCH 17/23] chore(DB): import pending files Referenced commit(s): 3fbded8f6bdaae1ec6897dae34afdab36b124899 --- .../rev_1721436522058676600.sql => db_world/2024_07_23_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1721436522058676600.sql => db_world/2024_07_23_02.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1721436522058676600.sql b/data/sql/updates/db_world/2024_07_23_02.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1721436522058676600.sql rename to data/sql/updates/db_world/2024_07_23_02.sql index 46e12d0cee3ee9..94eaa02b5f0e3f 100644 --- a/data/sql/updates/pending_db_world/rev_1721436522058676600.sql +++ b/data/sql/updates/db_world/2024_07_23_02.sql @@ -1,3 +1,4 @@ +-- DB update 2024_07_23_01 -> 2024_07_23_02 -- UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%s', '{}'); UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%u', '{}'); From 0e1afaa768477ac360a87d77b198f86618795a95 Mon Sep 17 00:00:00 2001 From: Mike Delago <32778141+michaeldelago@users.noreply.github.com> Date: Tue, 23 Jul 2024 20:27:36 -0400 Subject: [PATCH 18/23] debloat(apps): remove unneeded script (#19466) remove unneeded script --- apps/account-create/.formatter.exs | 7 -- apps/account-create/Dockerfile | 10 --- apps/account-create/README.md | 102 ---------------------- apps/account-create/account.exs | 134 ----------------------------- apps/account-create/srp.exs | 59 ------------- 5 files changed, 312 deletions(-) delete mode 100644 apps/account-create/.formatter.exs delete mode 100644 apps/account-create/Dockerfile delete mode 100644 apps/account-create/README.md delete mode 100644 apps/account-create/account.exs delete mode 100644 apps/account-create/srp.exs diff --git a/apps/account-create/.formatter.exs b/apps/account-create/.formatter.exs deleted file mode 100644 index 921beec593b340..00000000000000 --- a/apps/account-create/.formatter.exs +++ /dev/null @@ -1,7 +0,0 @@ -# Used by "mix format" -[ - inputs: [ - ".formatter.exs", - "account.exs" - ] -] diff --git a/apps/account-create/Dockerfile b/apps/account-create/Dockerfile deleted file mode 100644 index 4a2537bbfcdd4f..00000000000000 --- a/apps/account-create/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM elixir:1.14-slim - -RUN mix local.hex --force && \ - mix local.rebar --force - -COPY account.exs /account.exs -COPY srp.exs /srp.exs -RUN chmod +x /account.exs - -CMD /account.exs diff --git a/apps/account-create/README.md b/apps/account-create/README.md deleted file mode 100644 index 37380e519c595c..00000000000000 --- a/apps/account-create/README.md +++ /dev/null @@ -1,102 +0,0 @@ -# Account.exs - -Simple script to create an account for AzerothCore - -This script allows a server admin to create a user automatically when after the `dbimport` tool runs, without needed to open up the `worldserver` console. - -## How To Use - -### Pre-requisites - -- MySQL is running -- The authserver database (`acore_auth`, typically) has a table named `account` - -### Running - -```bash -$ elixir account.exs -``` - -### Configuration - -This script reads from environment variables in order to control which account it creates and the MySQL server it's communicating with - - -- `ACORE_USERNAME` Username for account, default "admin" -- `ACORE_PASSWORD` Password for account, default "admin" -- `ACORE_GM_LEVEL` GM Level for account, default 3 -- `MYSQL_DATABASE` Database name, default "acore_auth" -- `MYSQL_USERNAME` MySQL username, default "root" -- `MYSQL_PASSWORD` MySQL password, default "password" -- `MYSQL_PORT` MySQL Port, default 3306 -- `MYSQL_HOST` MySQL Host, default "localhost" - -To use these environment variables, execute the script like so: - -```bash -$ MYSQL_HOST=mysql \ - MYSQL_PASSWORD="fourthehoard" \ - ACORE_USERNAME=drekthar \ - ACORE_PASSWORD=securepass22 \ - elixir account.exs -``` - -This can also be used in a loop. Consider this csv file: - -```csv -user,pass,gm_level -admin,adminpass,2 -soapuser,soappass,3 -mainuser,userpass,0 -``` - -You can then loop over this csv file, and manage users like so: - -```bash -$ while IFS=, read -r user pass gm; do - ACORE_USERNAME=$user \ - ACORE_PASSWORD=$pass \ - GM_LEVEL=$gm \ - elixir account.exs - done <<< $(tail -n '+2' users.csv) -``` - -### Docker - -Running and building with docker is simple: - -```bash -$ docker build -t acore/account-create . -$ docker run \ - -e MYSQL_HOST=mysql \ - -v mix_cache:/root/.cache/mix/installs \ - acore/account-create -``` - -Note that the `MYSQL_HOST` is required to be set with the docker container, as the default setting targets `localhost`. - -### docker-compose - -A simple way to integrate this into a docker-compose file. - -This is why I wrote this script - an automatic way to have an admin account idempotently created on startup of the server. - -```yaml -services: - account-create: - image: acore/account-create:${DOCKER_IMAGE_TAG:-master} - build: - context: apps/account-create/ - dockerfile: apps/account-create/Dockerfile - environment: - MYSQL_HOST: ac-database - MYSQL_PASSWORD: ${DOCKER_DB_ROOT_PASSWORD:-password} - ACORE_USERNAME: ${ACORE_ROOT_ADMIN_ACCOUNT:-admin} - ACORE_PASSWORD: ${ACORE_ROOT_ADMIN_PASSWORD:-password} - volumes: - - mix_cache:/root/.cache/mix/installs - profiles: [local, app, db-import-local] - depends_on: - ac-db-import: - condition: service_completed_successfully -``` diff --git a/apps/account-create/account.exs b/apps/account-create/account.exs deleted file mode 100644 index c3443025c29c6f..00000000000000 --- a/apps/account-create/account.exs +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/env elixir -# Execute this Elixir script with the below command -# -# $ ACORE_USERNAME=foo ACORE_PASSWORD=barbaz123 elixir account.exs -# -# Set environment variables for basic configuration -# -# ACORE_USERNAME - Username for account, default "admin" -# ACORE_PASSWORD - Password for account, default "admin" -# ACORE_GM_LEVEL - GM level for account -# MYSQL_DATABASE - Database name, default "acore_auth" -# MYSQL_USERNAME - MySQL username, default "root" -# MYSQL_PASSWORD - MySQL password, default "password" -# MYSQL_PORT - MySQL Port, default 3306 -# MYSQL_HOST - MySQL Host, default "localhost" - -# Install remote dependencies -[ - {:myxql, "~> 0.6.0"} -] -|> Mix.install() - -# Start the logger -Application.start(:logger) -require Logger - -# Constants -default_credential = "admin" -default_gm_level = "3" -account_access_comment = "Managed via account-create script" - -# Import srp functions -Code.require_file("srp.exs", Path.absname(__DIR__)) - -# Assume operator provided a "human-readable" name. -# The database stores usernames in all caps -username_lower = - System.get_env("ACORE_USERNAME", default_credential) - |> tap(&Logger.info("Account to create: #{&1}")) - -username = String.upcase(username_lower) - -password = System.get_env("ACORE_PASSWORD", default_credential) - -gm_level = System.get_env("ACORE_GM_LEVEL", default_gm_level) |> String.to_integer() - -if Range.new(0, 3) |> Enum.member?(gm_level) |> Kernel.not do - Logger.info("Valid ACORE_GM_LEVEL values are 0, 1, 2, and 3. The given value was: #{gm_level}.") -end - -{:ok, pid} = - MyXQL.start_link( - protocol: :tcp, - database: System.get_env("MYSQL_DATABASE", "acore_auth"), - username: System.get_env("MYSQL_USERNAME", "root"), - password: System.get_env("MYSQL_PASSWORD", "password"), - port: System.get_env("MYSQL_PORT", "3306") |> String.to_integer(), - hostname: System.get_env("MYSQL_HOST", "localhost") - ) - -Logger.info("MySQL connection created") - -Logger.info("Checking database for user #{username_lower}") - -# Check if user already exists in database -{:ok, result} = MyXQL.query(pid, "SELECT salt FROM account WHERE username=?", [username]) - -%{salt: salt, verifier: verifier} = - case result do - %{rows: [[salt | _] | _]} -> - Logger.info("Salt for #{username_lower} found in database") - # re-use the salt if the user exists in database - Srp.generate_stored_values(username, password, salt) - _ -> - Logger.info("Salt not found in database for #{username_lower}. Generating a new one") - Srp.generate_stored_values(username, password) - end - -Logger.info("New salt and verifier generated") - -# Insert values into DB, replacing the verifier if the user already exists -result = - MyXQL.query( - pid, - """ - INSERT INTO account - (`username`, `salt`, `verifier`) - VALUES - (?, ?, ?) - ON DUPLICATE KEY UPDATE verifier=? - """, - [username, salt, verifier, verifier] - ) - -case result do - {:error, %{message: message}} -> - File.write("fail.log", message) - - Logger.info( - "Account #{username_lower} failed to create. You can check the error message at fail.log." - ) - - exit({:shutdown, 1}) - - # if num_rows changed and last_insert_id == 0, it means the verifier matched. No change necessary - {:ok, %{num_rows: 1, last_insert_id: 0}} -> - Logger.info( - "Account #{username_lower} doesn't need to have its' password changed. You should be able to log in with that account" - ) - - {:ok, %{num_rows: 1}} -> - Logger.info( - "Account #{username_lower} has been created. You should now be able to login with that account" - ) - - {:ok, %{num_rows: 2}} -> - Logger.info( - "Account #{username_lower} has had its' password reset. You should now be able to login with that account" - ) -end - -# Set GM level to configured value -{:ok, _} = - MyXQL.query( - pid, - """ - INSERT INTO account_access - (`id`, `gmlevel`, `comment`) - VALUES - ((SELECT id FROM account WHERE username=?), ?, ?) - ON DUPLICATE KEY UPDATE gmlevel=?, comment=? - """, [username, gm_level, account_access_comment, gm_level, account_access_comment]) - -Logger.info("GM Level for #{username_lower} set to #{gm_level}") diff --git a/apps/account-create/srp.exs b/apps/account-create/srp.exs deleted file mode 100644 index 987a6eeb998a55..00000000000000 --- a/apps/account-create/srp.exs +++ /dev/null @@ -1,59 +0,0 @@ -defmodule Srp do - # Constants required in WoW's SRP6 implementation - @n <<137, 75, 100, 94, 137, 225, 83, 91, 189, 173, 91, 139, 41, 6, 80, 83, 8, 1, 177, 142, 191, - 191, 94, 143, 171, 60, 130, 135, 42, 62, 155, 183>> - @g <<7>> - @field_length 32 - - # Wrapper function - def generate_stored_values(username, password, salt \\ "") do - default_state() - |> generate_salt(salt) - |> calculate_x(username, password) - |> calculate_v() - end - - def default_state() do - %{n: @n, g: @g} - end - - # Generate salt if it's not defined - def generate_salt(state, "") do - salt = :crypto.strong_rand_bytes(32) - Map.merge(state, %{salt: salt}) - end - - # Don't generate salt if it's already defined - def generate_salt(state, salt) do - padded_salt = pad_binary(salt) - Map.merge(state, %{salt: padded_salt}) - end - - # Get h1 - def calculate_x(state, username, password) do - hash = :crypto.hash(:sha, String.upcase(username) <> ":" <> String.upcase(password)) - x = reverse(:crypto.hash(:sha, state.salt <> hash)) - Map.merge(state, %{x: x, username: username}) - end - - # Get h2 - def calculate_v(state) do - verifier = - :crypto.mod_pow(state.g, state.x, state.n) - |> reverse() - |> pad_binary() - - Map.merge(state, %{verifier: verifier}) - end - - defp pad_binary(blob) do - pad = @field_length - byte_size(blob) - <> - end - - defp reverse(binary) do - binary - |> :binary.decode_unsigned(:big) - |> :binary.encode_unsigned(:little) - end -end From be256e7a78e28ea2599ed83fb029af4bdffd1338 Mon Sep 17 00:00:00 2001 From: Tereneckla Date: Wed, 24 Jul 2024 14:00:07 +0000 Subject: [PATCH 19/23] fix(scripts/HyjalSummit): Make Doomfire Spirit move away from Archimonde at first (#19467) Update boss_archimonde.cpp --- .../CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index c24a63ec186657..5988514aafb218 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -400,7 +400,7 @@ struct boss_archimonde : public BossAI float angle = 2 * M_PI * rand() / RAND_MAX; float x = me->GetPositionX() + DOOMFIRE_OFFSET * cos(angle); float y = me->GetPositionY() + DOOMFIRE_OFFSET * sin(angle); - Position spiritPosition = Position(x, y, me->GetPositionZ()); + Position spiritPosition = Position(x, y, me->GetPositionZ(), angle); Position doomfirePosition = Position(x, y, me->GetPositionZ()); if (Creature* doomfireSpirit = me->SummonCreature(CREATURE_DOOMFIRE_SPIRIT, spiritPosition, TEMPSUMMON_TIMED_DESPAWN, 27000)) { From 7c68ba51e714355a1a8a1629ee8a24fdc09fe738 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Thu, 25 Jul 2024 23:40:54 +0200 Subject: [PATCH 20/23] fix(Scripts/Commands): serv info (#19478) --- src/server/scripts/Commands/cs_server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp index 5a45f3245e5c62..dc9ee029f92a5e 100644 --- a/src/server/scripts/Commands/cs_server.cpp +++ b/src/server/scripts/Commands/cs_server.cpp @@ -271,7 +271,7 @@ class server_commandscript : public CommandScript 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("Update time diff: {}ms. Last {} 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", From 6c97e45e87cfec63364d9521833f9bcb7bf39f0a Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Thu, 25 Jul 2024 19:50:15 -0400 Subject: [PATCH 21/23] fix(Scripts/HyjalSummit): Adjust Doomfire Spirit movement logic. (#19469) * Init. Co-Authored-By: Tereneckla * Simplify code, add comment. * Adjust scenario in which distance fails at all ranges. * Remove unused variable. * Account for deviation with distance check. Co-Authored-By: Tereneckla * f Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> * Rewrite with initial teleport. * Whitespace? * Update function type. * Drop Doomfire spawn timer. Verified with le sniff. Teehee. --------- Co-authored-by: Tereneckla Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- .../BattleForMountHyjal/boss_archimonde.cpp | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 5988514aafb218..e1399873db370f 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -145,32 +145,35 @@ struct npc_doomfire_spirit : public ScriptedAI { npc_doomfire_spirit(Creature* creature) : ScriptedAI(creature){ } - float const turnConstant = 0.785402f; - float fAngle = urand(0, M_PI * 2); + float const turnConstant = 0.785402f; // 45 degree turns, verified with sniffs void Reset() override { - scheduler.CancelAll(); - ScheduleTimedEvent(0s, [&] { - float nextOrientation = Position::NormalizeOrientation(me->GetOrientation() + irand(-1, 1) * turnConstant); - Position pos = GetFirstRandomAngleCollisionPosition(8.f, nextOrientation); // both orientation and distance verified with sniffs - me->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), nextOrientation); - }, 1600ms); + ScheduleUniqueTimedEvent(10ms, [&] { + TryTeleportInDirection(1.f, M_PI, 1.f, true); //turns around and teleports 1 unit on spawn, assuming same logic as later teleports applies - fAngle = urand(0, M_PI * 2); + ScheduleTimedEvent(10ms, [&] { + float angle = irand(-1, 1) * turnConstant; + TryTeleportInDirection(8.f, angle, 2.f, false); + }, 1600ms); + },1); } - Position GetFirstRandomAngleCollisionPosition(float dist, float angle) + void TryTeleportInDirection(float dist, float angle, float step, bool alwaysturn) { Position pos; - for (uint32 i = 0; i < 10; ++i) + while (dist >= 0) { pos = me->WorldObject::GetFirstCollisionPosition(dist, angle); - if (me->GetDistance(pos) > dist * 0.8f) // if at least 80% distance, good enough + if (fabsf(dist - me->GetExactDist2d(pos)) < 0.001) // Account for small deviation break; - angle += (M_PI / 5); // else try slightly different angle + dist -= step; // Distance drops with each unsuccessful attempt } - return pos; + + if (dist || alwaysturn) + me->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), Position::NormalizeOrientation(me->GetOrientation() + angle)); + else // Orientation does not change if not moving, verified with sniffs + me->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), me->GetOrientation()); } void UpdateAI(uint32 diff) override @@ -268,10 +271,10 @@ struct boss_archimonde : public BossAI Talk(SAY_AIR_BURST); DoCastRandomTarget(SPELL_AIR_BURST); }, 25s, 40s); - ScheduleTimedEvent(25s, 35s, [&] + ScheduleTimedEvent(8s, [&] { DoCastDoomFire(); - }, 20s); + }, 8s); ScheduleTimedEvent(25s, 35s, [&] { DoCastRandomTarget(SPELL_GRIP_OF_THE_LEGION); @@ -400,7 +403,7 @@ struct boss_archimonde : public BossAI float angle = 2 * M_PI * rand() / RAND_MAX; float x = me->GetPositionX() + DOOMFIRE_OFFSET * cos(angle); float y = me->GetPositionY() + DOOMFIRE_OFFSET * sin(angle); - Position spiritPosition = Position(x, y, me->GetPositionZ(), angle); + Position spiritPosition = Position(x, y, me->GetPositionZ(), Position::NormalizeOrientation(angle + M_PI)); //spirit faces archimonde on spawn Position doomfirePosition = Position(x, y, me->GetPositionZ()); if (Creature* doomfireSpirit = me->SummonCreature(CREATURE_DOOMFIRE_SPIRIT, spiritPosition, TEMPSUMMON_TIMED_DESPAWN, 27000)) { From bc23a7a3d861e9fe82224b3907e98fdbcc96baed Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Thu, 25 Jul 2024 20:51:50 -0300 Subject: [PATCH 22/23] fix(DB/Gameobject): Pool Ragveil and Flamecap together in Zangarmarsh (#19470) ragveil-flame-cap --- .../rev_1721773806947945700.sql | 679 ++++++++++++++++++ 1 file changed, 679 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1721773806947945700.sql diff --git a/data/sql/updates/pending_db_world/rev_1721773806947945700.sql b/data/sql/updates/pending_db_world/rev_1721773806947945700.sql new file mode 100644 index 00000000000000..81e782b8dafb31 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1721773806947945700.sql @@ -0,0 +1,679 @@ +-- Delete all pools +DELETE FROM `pool_template` WHERE `entry` IN (8085, 8086, 8087) AND `description` LIKE 'Zangarmarsh%'; +DELETE FROM `pool_gameobject` WHERE `guid` IN (21,1801,2730,16819,16820,16824,16825,16828,16829,16831,16836,16837,16839,16840,16841,16843,16847,16848,16850,16851,17172,17177,17178,17185,17665,17779,17844,20364,20944,21553,21554,22442,23956,23957,23959,23961,23962,23963,23964,23965,23968,23969,28313,28316,30408,30417,30544,32744,32824,33835,40534,40535,40536,40537,40538,40539,40578,40583,40584,40586,40587,40588,40590,40592,40593,40594,40596,40597,40598,40599,40600,40601,40602,40603,40604,40605,40607,40608,42178,42215,42217,42218,42226,42227,42236,42237,42240,42242,42245,42246,42247,42296,42346,42430,61290,61291,61304,61305,61312,61313,61315,61316,64802,64804,64805,64806,64807,64808,64810,64846,64847,64848,64849,64850,64851,64852,85916,85917,85918,85919,85920,87045,87125,87126,87127,87128,87398,87399,100198,101758,101759) AND `pool_entry` IN (8085, 8086, 8087) AND `description` LIKE '%Zangarmarsh%'; + +-- Turn all into Ragveil +UPDATE `gameobject` SET `id` = 183043 WHERE `guid` IN (21,1801,2730,16819,16820,16824,16825,16828,16829,16831,16836,16837,16839,16840,16841,16843,16847,16848,16850,16851,17172,17177,17178,17185,17665,17779,17844,20364,20944,21553,21554,23956,23957,23959,23961,23962,23963,23964,23965,23968,23969,28313,28316,30408,30417,30544,32744,32824,33835,40534,40535,40536,40537,40538,40539,40578,40583,40584,40586,40587,40588,40590,40592,40593,40594,40596,40597,40598,40599,40600,40601,40602,40603,40604,40605,40607,40608,42178,42215,42217,42218,42226,42227,42236,42237,42240,42242,42245,42246,42247,42296,42346,42430,61290,61291,61304,61305,61312,61313,61315,61316,64802,64804,64805,64806,64807,64808,64810,64846,64847,64848,64849,64850,64851,64852,85916,85917,85918,85919,85920,87045,87125,87126,87127,87128,87398,87399,100198,101758,101759) AND `id` = 181276 AND `map` = 530 AND `zoneId` = 3521; + +SET @OGUID := 2893; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID AND @OGUID+129 AND `id` = 181276 AND `map` = 530 AND `zoneId` = 3521; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `state`) VALUES +(@OGUID+0 , 181276, 530, 3521, -107.806, 7915.09, 21.2482, 2.79253, 0, 0, 0.984808, 0.173648, 900, 1), +(@OGUID+1 , 181276, 530, 3521, 426.372, 7143.61, 23.2572, -0.663223, 0, 0, 0, 1, 900, 1), +(@OGUID+2 , 181276, 530, 3521, 907.398, 5773.45, 10.7675, -1.58825, 0, 0, 0.71325, -0.700909, 900, 1), +(@OGUID+3 , 181276, 530, 3521, 366.143, 8161.63, 23.1978, -0.628317, 0, 0, 0, 1, 900, 1), +(@OGUID+4 , 181276, 530, 3521, -593.064, 5314.64, 22.9118, -0.575957, 0, 0, 0, 1, 900, 1), +(@OGUID+5 , 181276, 530, 3521, -448.393, 5388.17, 22.3863, 0.837757, 0, 0, 0, 1, 900, 1), +(@OGUID+6 , 181276, 530, 3521, 58.6755, 5531.17, 23.8776, -1.37881, 0, 0, 0, 1, 900, 1), +(@OGUID+7 , 181276, 530, 3521, 698.649, 7816.91, 22.2145, -2.56563, 0, 0, 0, 1, 900, 1), +(@OGUID+8 , 181276, 530, 3521, 919.076, 7500.88, 22.2466, 1.74533, 0, 0, 0, 1, 900, 1), +(@OGUID+9 , 181276, 530, 3521, 154.377, 8310.03, 23.5881, -0.366518, 0, 0, 0, 1, 900, 1), +(@OGUID+10 , 181276, 530, 3521, 402.496, 8050.45, 24.0536, -1.46608, 0, 0, 0, 1, 900, 1), +(@OGUID+11 , 181276, 530, 3521, -228.201, 5812.67, 23.5458, -1.69297, 0, 0, 0, 1, 900, 1), +(@OGUID+12 , 181276, 530, 3521, 248.869, 5376.13, 22.2604, -0.855211, 0, 0, 0, 1, 900, 1), +(@OGUID+13 , 181276, 530, 3521, 705.322, 5845.69, 27.0197, -0.104719, 0, 0, 0, 1, 900, 1), +(@OGUID+14 , 181276, 530, 3521, 611.324, 5518.14, -1.16461, -1.79769, 0, 0, 0, 1, 900, 1), +(@OGUID+15 , 181276, 530, 3521, 458.682, 5300.45, -1.45927, -1.5708, 0, 0, 0, 1, 900, 1), +(@OGUID+16 , 181276, 530, 3521, -211.253, 6958.59, 20.9092, -1.43117, 0, 0, 0, 1, 900, 1), +(@OGUID+17 , 181276, 530, 3521, -193.153, 7896.41, 20.4815, 2.19912, 0, 0, 0, 1, 900, 1), +(@OGUID+18 , 181276, 530, 3521, -1027.54, 5276.3, 22.8396, 1.76278, 0, 0, 0, 1, 900, 1), +(@OGUID+19 , 181276, 530, 3521, 42.8332, 7622.71, 23.872, 0, 0, 0, 0, 1, 900, 1), +(@OGUID+20 , 181276, 530, 3521, 235.551, 5897.5, 22.0829, 1.78023, 0, 0, 0, 1, 900, 1), +(@OGUID+21 , 181276, 530, 3521, 204.353, 8169.52, 23.3274, 0.401425, 0, 0, 0, 1, 900, 1), +(@OGUID+22 , 181276, 530, 3521, 541.682, 5959.59, 22.2652, 2.1293, 0, 0, 0, 1, 900, 1), +(@OGUID+23 , 181276, 530, 3521, 568.935, 7617.03, 21.8145, 2.30383, 0, 0, 0, 1, 900, 1), +(@OGUID+24 , 181276, 530, 3521, -83.7279, 8736.5, 20.927, -1.79769, 0, 0, 0, 1, 900, 1), +(@OGUID+25 , 181276, 530, 3521, 1000.79, 8098.37, 22.8685, -2.47837, 0, 0, 0, 1, 900, 1), +(@OGUID+26 , 181276, 530, 3521, -87.9494, 8452.43, 22.1782, 0.191985, 0, 0, 0, 1, 900, 1), +(@OGUID+27 , 181276, 530, 3521, -894.192, 5466.5, 22.4142, -1.90241, 0, 0, 0.814116, -0.580703, 900, 1), +(@OGUID+28 , 181276, 530, 3521, -784.561, 5929.42, 23.2148, -3.00197, 0, 0, 0.997564, -0.069756, 900, 1), +(@OGUID+29 , 181276, 530, 3521, 863.5, 7637.16, 22.8081, -2.02458, 0, 0, 0.848048, -0.529919, 900, 1), +(@OGUID+30 , 181276, 530, 3521, 6.31912, 8596.54, 22.0617, -2.87979, 0, 0, 0.991445, -0.130526, 900, 1), +(@OGUID+31 , 181276, 530, 3521, 657.941, 6443.58, 21.3223, 2.33874, 0, 0, 0.920505, 0.390731, 900, 1), +(@OGUID+32 , 181276, 530, 3521, 785.26, 6723.05, 20.0622, 1.79769, 0, 0, 0.782608, 0.622515, 900, 1), +(@OGUID+33 , 181276, 530, 3521, 755.452, 7906.58, 23.3914, 0, 0, 0, 0, 1, 900, 1), +(@OGUID+34 , 181276, 530, 3521, 978.896, 8378.65, 23.2019, -0.733038, 0, 0, 0.358368, -0.93358, 900, 1), +(@OGUID+35 , 181276, 530, 3521, 558.517, 8079.06, 23.1242, -1.72788, 0, 0, 0.760406, -0.649448, 900, 1), +(@OGUID+36 , 181276, 530, 3521, 1029.5, 8594.19, 23.766, -2.67035, 0, 0, 0.97237, -0.233445, 900, 1), +(@OGUID+37 , 181276, 530, 3521, 916.977, 8606.69, 22.5519, -2.04204, 0, 0, 0.85264, -0.522498, 900, 1), +(@OGUID+38 , 181276, 530, 3521, 742.956, 8687.42, 15.1519, -2.61799, 0, 0, 0.965926, -0.258819, 900, 1), +(@OGUID+39 , 181276, 530, 3521, -131.107, 8814.37, 24.3029, -2.1293, 0, 0, 0.87462, -0.48481, 900, 1), +(@OGUID+40 , 181276, 530, 3521, 522.205, 6323.62, 22.5429, -3.10669, 0, 0, 0.999848, -0.017452, 900, 1), +(@OGUID+41 , 181276, 530, 3521, -292.536, 5995.26, 24.0665, -1.62316, 0, 0, 0.725374, -0.688354, 900, 1), +(@OGUID+42 , 181276, 530, 3521, -492.669, 5920.06, 24.1321, -1.88496, 0, 0, 0.809017, -0.587785, 900, 1), +(@OGUID+43 , 181276, 530, 3521, -147.499, 5645.65, 22.4478, -0.506145, 0, 0, 0.25038, -0.968148, 900, 1), +(@OGUID+44 , 181276, 530, 3521, -608.048, 5877.87, 22.5833, -1.51844, 0, 0, 0.688354, -0.725374, 900, 1), +(@OGUID+45 , 181276, 530, 3521, 610.609, 6015.39, 23.009, 2.82743, 0, 0, 0.987688, 0.156434, 900, 1), +(@OGUID+46 , 181276, 530, 3521, 845.668, 8114.97, 22.6411, 2.54818, 0, 0, 0.956305, 0.292372, 900, 1), +(@OGUID+47 , 181276, 530, 3521, 1358.66, 8558.92, 21.8467, 2.04204, 0, 0, 0.85264, 0.522499, 900, 1), +(@OGUID+48 , 181276, 530, 3521, 220.082, 7667.34, 23.1641, -1.15192, 0, 0, 0.544639, -0.838671, 900, 1), +(@OGUID+49 , 181276, 530, 3521, -202.466, 7536.72, 22.0793, -1.46608, 0, 0, 0, 1, 900, 1), +(@OGUID+50 , 181276, 530, 3521, 695.266, 5437.31, -24.5709, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+51 , 181276, 530, 3521, 904.501, 5418.78, 10.0337, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+52 , 181276, 530, 3521, 536.714, 5436.1, -3.00072, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+53 , 181276, 530, 3521, 565.942, 7985.94, 21.6704, -0.680679, 0, 0, 0, 1, 900, 1), +(@OGUID+54 , 181276, 530, 3521, 325.04, 5720.3, 22.4669, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+55 , 181276, 530, 3521, 1030.67, 8727.31, 5.33556, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+56 , 181276, 530, 3521, 309.43, 5341.78, 22.8067, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+57 , 181276, 530, 3521, 541.504, 5192.18, 3.11218, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+58 , 181276, 530, 3521, 725.806, 5508.13, -1.81071, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+59 , 181276, 530, 3521, 824.051, 5370.86, -0.944571, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+60 , 181276, 530, 3521, 561.567, 5624.54, 18.8166, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+61 , 181276, 530, 3521, 538.579, 5322.72, -24.1594, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+62 , 181276, 530, 3521, 475.503, 5950.67, 22.8493, 0.628317, 0, 0, 0, 1, 900, 1), +(@OGUID+63 , 181276, 530, 3521, 695.183, 5439.76, -23.4568, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+64 , 181276, 530, 3521, 314.989, 7734.13, 23.2506, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+65 , 181276, 530, 3521, 114.665, 8606.88, 22.2169, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+66 , 181276, 530, 3521, -139.498, 8998.17, 22.8894, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+67 , 181276, 530, 3521, 325.983, 5721.31, 22.6486, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+68 , 181276, 530, 3521, 758.05, 5651.15, 23.09, -0.855211, 0, 0, 0, 1, 900, 1), +(@OGUID+69 , 181276, 530, 3521, 836.484, 5675.57, 24.7045, -3.05433, 0, 0, 0, 1, 900, 1), +(@OGUID+70 , 181276, 530, 3521, 888.652, 5313.54, 19.8773, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+71 , 181276, 530, 3521, 709.53, 5259.44, -0.880973, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+72 , 181276, 530, 3521, 818.973, 5240.57, 22.035, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+73 , 181276, 530, 3521, 607.469, 5870.84, 22.6128, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+74 , 181276, 530, 3521, -392.144, 6500.78, 21.553, 2.54818, 0, 0, 0, 1, 900, 1), +(@OGUID+75 , 181276, 530, 3521, -178.382, 6021.08, 22.5117, -1.93732, 0, 0, 0, 1, 900, 1), +(@OGUID+76 , 181276, 530, 3521, 907, 5103.25, 4.49501, 0, 0, 0, 0, 0, 900, 1), +(@OGUID+77 , 181276, 530, 3521, 1188.05, 8168.69, 18.8799, -1.8326, 0, 0, 0.793353, -0.608761, 900, 1), +(@OGUID+78 , 181276, 530, 3521, -605.749, 5951.51, 23.5616, 1.37881, 0, 0, 0.636078, 0.771625, 900, 1), +(@OGUID+79 , 181276, 530, 3521, 284.933, 5611.94, 22.0877, -0.139626, 0, 0, 0.069756, -0.997564, 900, 1), +(@OGUID+80 , 181276, 530, 3521, -951.221, 5807.52, 23.667, -2.60054, 0, 0, 0.96363, -0.267238, 900, 1), +(@OGUID+81 , 181276, 530, 3521, -199.007, 8808.49, 18.9701, -0.174533, 0, 0, 0.087156, -0.996195, 900, 1), +(@OGUID+82 , 181276, 530, 3521, -105.131, 6214.17, 23.1972, -1.6057, 0, 0, 0.71934, -0.694658, 900, 1), +(@OGUID+83 , 181276, 530, 3521, 461.855, 8882.34, 24.9468, -2.47837, 0, 0, 0.945519, -0.325568, 900, 1), +(@OGUID+84 , 181276, 530, 3521, 877.305, 8450.06, 22.5711, 2.67035, 0, 0, 0.97237, 0.233445, 900, 1), +(@OGUID+85 , 181276, 530, 3521, 649.884, 6260.28, 22.6139, 2.19912, 0, 0, 0.891007, 0.453991, 900, 1), +(@OGUID+86 , 181276, 530, 3521, 46.313, 8195.37, 21.7059, 3.01942, 0, 0, 0.998135, 0.061049, 900, 1), +(@OGUID+87 , 181276, 530, 3521, -82.9322, 6096.68, 22.4811, -2.44346, 0, 0, 0.939693, -0.34202, 900, 1), +(@OGUID+88 , 181276, 530, 3521, 794.91, 5743.58, 25.9671, 1.41372, 0, 0, 0.649448, 0.760406, 900, 1), +(@OGUID+89 , 181276, 530, 3521, 285.785, 8202.79, 22.0712, 0.122173, 0, 0, 0.061049, 0.998135, 900, 1), +(@OGUID+90 , 181276, 530, 3521, -429.242, 5742.36, 22.3847, -0.139626, 0, 0, 0.069756, -0.997564, 900, 1), +(@OGUID+91 , 181276, 530, 3521, -421.48, 5542.46, 21.4294, -2.82743, 0, 0, 0.987688, -0.156434, 900, 1), +(@OGUID+92 , 181276, 530, 3521, 382.046, 5566.41, 23.3098, -1.29154, 0, 0, 0.601815, -0.798635, 900, 1), +(@OGUID+93 , 181276, 530, 3521, 52.3694, 5605.33, 22.2926, -2.60053, 0, 0, 0, 1, 900, 1), +(@OGUID+94 , 181276, 530, 3521, -892.03, 5322.57, 18.6208, -1.74533, 0, 0, 0, 1, 900, 1), +(@OGUID+95 , 181276, 530, 3521, 117.451, 7830.41, 21.6144, -1.93731, 0, 0, 0, 1, 900, 1), +(@OGUID+96 , 181276, 530, 3521, -666.829, 5724.52, 20.9599, -2.28638, 0, 0, 0, 1, 900, 1), +(@OGUID+97 , 181276, 530, 3521, 761.521, 7509.73, 22.9588, 2.44346, 0, 0, 0, 1, 900, 1), +(@OGUID+98 , 181276, 530, 3521, -91.9377, 7280.53, 22.9762, 1.79769, 0, 0, 0, 1, 900, 1), +(@OGUID+99 , 181276, 530, 3521, 986.909, 7558.14, 23.5988, -2.32129, 0, 0, 0, 1, 900, 1), +(@OGUID+100, 181276, 530, 3521, -252.617, 6198.28, 23.9543, -2.28638, 0, 0, 0, 1, 900, 1), +(@OGUID+101, 181276, 530, 3521, 243.617, 7459.68, 23.4179, -2.35619, 0, 0, 0, 1, 900, 1), +(@OGUID+102, 181276, 530, 3521, 536.559, 5434.35, -3.38172, 1.71042, 0, 0, 0, 1, 900, 1), +(@OGUID+103, 181276, 530, 3521, 1003.67, 7841.74, 23.5655, 2.40855, 0, 0, 0, 1, 900, 1), +(@OGUID+104, 181276, 530, 3521, -328.464, 6013.14, 22.2611, 1.69297, 0, 0, 0, 1, 900, 1), +(@OGUID+105, 181276, 530, 3521, -718.884, 5976.53, 24.4484, 2.75761, 0, 0, 0, 1, 900, 1), +(@OGUID+106, 181276, 530, 3521, -147.011, 7711.9, 23.4578, -0.052359, 0, 0, 0, 1, 900, 1), +(@OGUID+107, 181276, 530, 3521, 62.2853, 8524.45, 21.7028, 1.0821, 0, 0, 0, 1, 900, 1), +(@OGUID+108, 181276, 530, 3521, 1232.02, 8670.86, 19.2138, 0.261798, 0, 0, 0, 1, 900, 1), +(@OGUID+109, 181276, 530, 3521, -519.313, 6152.96, 22.3494, 1.76278, 0, 0, 0, 1, 900, 1), +(@OGUID+110, 181276, 530, 3521, 502.554, 7910.94, 22.9019, 1.8675, 0, 0, 0, 1, 900, 1), +(@OGUID+111, 181276, 530, 3521, -375.677, 6728.37, 22.3378, 2.28638, 0, 0, 0, 1, 900, 1), +(@OGUID+112, 181276, 530, 3521, 512.408, 5850.85, 23.8378, -1.32645, 0, 0, 0, 1, 900, 1), +(@OGUID+113, 181276, 530, 3521, 393.008, 5888.21, 22.3804, 2.47837, 0, 0, 0, 1, 900, 1), +(@OGUID+114, 181276, 530, 3521, -91.6731, 5906.3, 22.4416, -2.91469, 0, 0, 0, 1, 900, 1), +(@OGUID+115, 181276, 530, 3521, 565.138, 7758.17, 23.9002, 1.5708, 0, 0, 0, 1, 900, 1), +(@OGUID+116, 181276, 530, 3521, -815.432, 5197.01, 19.116, -1.44862, 0, 0, 0, 1, 900, 1), +(@OGUID+117, 181276, 530, 3521, -516.086, 5520.76, 23.8181, -0.523598, 0, 0, 0, 1, 900, 1), +(@OGUID+118, 181276, 530, 3521, -201.136, 8703.23, 20.4438, -0.506145, 0, 0, 0, 1, 900, 1), +(@OGUID+119, 181276, 530, 3521, -753.006, 5149.84, 21.7425, 2.23402, 0, 0, 0, 1, 900, 1), +(@OGUID+120, 181276, 530, 3521, 185.444, 5653.2, 23.4787, 0.418879, 0, 0, 0, 1, 900, 1), +(@OGUID+121, 181276, 530, 3521, 693.756, 8193.58, 23.2953, 1.32645, 0, 0, 0, 1, 900, 1), +(@OGUID+122, 181276, 530, 3521, -316.197, 8583.64, 20.1746, 1.36136, 0, 0, 0, 1, 900, 1), +(@OGUID+123, 181276, 530, 3521, -274.252, 7682.1, 21.2547, -0.837757, 0, 0, 0, 1, 900, 1), +(@OGUID+124, 181276, 530, 3521, 1140.83, 8699.95, 18.7153, -2.49582, 0, 0, 0, 1, 900, 1), +(@OGUID+125, 181276, 530, 3521, -987.62, 5225.53, 22.5514, 0.226892, 0, 0, 0, 1, 900, 1), +(@OGUID+126, 181276, 530, 3521, -942.452, 5153.56, 23.3949, -0.314158, 0, 0, 0, 1, 900, 1), +(@OGUID+127, 181276, 530, 3521, 627.611, 5326.46, -25.0848, 2.21657, 0, 0, 0, 0, 900, 1), +(@OGUID+128, 181276, 530, 3521, 781.369, 6494.62, 20.8706, -1.18682, 0, 0, 0, 0, 900, 1), +(@OGUID+129, 181276, 530, 3521, 349.258, 7530.48, 22.6831, 1.79769, 0, 0, 0.782608, 0.622515, 900, 1); + +SET @POOL_ENTRY := 16202; +DELETE FROM `pool_gameobject` WHERE `pool_entry` BETWEEN @POOL_ENTRY AND @POOL_ENTRY+129 AND `guid` IN (21,1801,2730,16819,16820,16824,16825,16828,16829,16831,16836,16837,16839,16840,16841,16843,16847,16848,16850,16851,17172,17177,17178,17185,17665,17779,17844,20364,20944,21553,21554,22442,23956,23957,23959,23961,23962,23963,23964,23965,23968,23969,28313,28316,30408,30417,30544,32744,32824,33835,40534,40535,40536,40537,40538,40539,40578,40583,40584,40586,40587,40588,40590,40592,40593,40594,40596,40597,40598,40599,40600,40601,40602,40603,40604,40605,40607,40608,42178,42215,42217,42218,42226,42227,42236,42237,42240,42242,42245,42246,42247,42296,42346,42430,61290,61291,61304,61305,61312,61313,61315,61316,64802,64804,64805,64806,64807,64808,64810,64846,64847,64848,64849,64850,64851,64852,85916,85917,85918,85919,85920,87045,87125,87126,87127,87128,87398,87399,100198,101758,101759); +DELETE FROM `pool_gameobject` WHERE `pool_entry` BETWEEN @POOL_ENTRY AND @POOL_ENTRY+129 AND `guid` BETWEEN @OGUID AND @OGUID+129; +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(21 , @POOL_ENTRY+0 , 0, 'Zangarmarsh - Ragveil'), +(1801 , @POOL_ENTRY+1 , 0, 'Zangarmarsh - Ragveil'), +(2730 , @POOL_ENTRY+2 , 0, 'Zangarmarsh - Ragveil'), +(16819 , @POOL_ENTRY+3 , 0, 'Zangarmarsh - Ragveil'), +(16820 , @POOL_ENTRY+4 , 0, 'Zangarmarsh - Ragveil'), +(16824 , @POOL_ENTRY+5 , 0, 'Zangarmarsh - Ragveil'), +(16825 , @POOL_ENTRY+6 , 0, 'Zangarmarsh - Ragveil'), +(16828 , @POOL_ENTRY+7 , 0, 'Zangarmarsh - Ragveil'), +(16829 , @POOL_ENTRY+8 , 0, 'Zangarmarsh - Ragveil'), +(16831 , @POOL_ENTRY+9 , 0, 'Zangarmarsh - Ragveil'), +(16836 , @POOL_ENTRY+10 , 0, 'Zangarmarsh - Ragveil'), +(16837 , @POOL_ENTRY+11 , 0, 'Zangarmarsh - Ragveil'), +(16839 , @POOL_ENTRY+12 , 0, 'Zangarmarsh - Ragveil'), +(16840 , @POOL_ENTRY+13 , 0, 'Zangarmarsh - Ragveil'), +(16841 , @POOL_ENTRY+14 , 0, 'Zangarmarsh - Ragveil'), +(16843 , @POOL_ENTRY+15 , 0, 'Zangarmarsh - Ragveil'), +(16847 , @POOL_ENTRY+16 , 0, 'Zangarmarsh - Ragveil'), +(16848 , @POOL_ENTRY+17 , 0, 'Zangarmarsh - Ragveil'), +(16850 , @POOL_ENTRY+18 , 0, 'Zangarmarsh - Ragveil'), +(16851 , @POOL_ENTRY+19 , 0, 'Zangarmarsh - Ragveil'), +(17172 , @POOL_ENTRY+20 , 0, 'Zangarmarsh - Ragveil'), +(17177 , @POOL_ENTRY+21 , 0, 'Zangarmarsh - Ragveil'), +(17178 , @POOL_ENTRY+22 , 0, 'Zangarmarsh - Ragveil'), +(17185 , @POOL_ENTRY+23 , 0, 'Zangarmarsh - Ragveil'), +(17665 , @POOL_ENTRY+24 , 0, 'Zangarmarsh - Ragveil'), +(17779 , @POOL_ENTRY+25 , 0, 'Zangarmarsh - Ragveil'), +(17844 , @POOL_ENTRY+26 , 0, 'Zangarmarsh - Ragveil'), +(20364 , @POOL_ENTRY+27 , 0, 'Zangarmarsh - Ragveil'), +(20944 , @POOL_ENTRY+28 , 0, 'Zangarmarsh - Ragveil'), +(21553 , @POOL_ENTRY+29 , 0, 'Zangarmarsh - Ragveil'), +(21554 , @POOL_ENTRY+30 , 0, 'Zangarmarsh - Ragveil'), +(23956 , @POOL_ENTRY+31 , 0, 'Zangarmarsh - Ragveil'), +(23957 , @POOL_ENTRY+32 , 0, 'Zangarmarsh - Ragveil'), +(23959 , @POOL_ENTRY+33 , 0, 'Zangarmarsh - Ragveil'), +(23961 , @POOL_ENTRY+34 , 0, 'Zangarmarsh - Ragveil'), +(23962 , @POOL_ENTRY+35 , 0, 'Zangarmarsh - Ragveil'), +(23963 , @POOL_ENTRY+36 , 0, 'Zangarmarsh - Ragveil'), +(23964 , @POOL_ENTRY+37 , 0, 'Zangarmarsh - Ragveil'), +(23965 , @POOL_ENTRY+38 , 0, 'Zangarmarsh - Ragveil'), +(23968 , @POOL_ENTRY+39 , 0, 'Zangarmarsh - Ragveil'), +(23969 , @POOL_ENTRY+40 , 0, 'Zangarmarsh - Ragveil'), +(28313 , @POOL_ENTRY+41 , 0, 'Zangarmarsh - Ragveil'), +(28316 , @POOL_ENTRY+42 , 0, 'Zangarmarsh - Ragveil'), +(30408 , @POOL_ENTRY+43 , 0, 'Zangarmarsh - Ragveil'), +(30417 , @POOL_ENTRY+44 , 0, 'Zangarmarsh - Ragveil'), +(30544 , @POOL_ENTRY+45 , 0, 'Zangarmarsh - Ragveil'), +(32744 , @POOL_ENTRY+46 , 0, 'Zangarmarsh - Ragveil'), +(32824 , @POOL_ENTRY+47 , 0, 'Zangarmarsh - Ragveil'), +(33835 , @POOL_ENTRY+48 , 0, 'Zangarmarsh - Ragveil'), +(40534 , @POOL_ENTRY+49 , 0, 'Zangarmarsh - Ragveil'), +(40535 , @POOL_ENTRY+50 , 0, 'Zangarmarsh - Ragveil'), +(40536 , @POOL_ENTRY+51 , 0, 'Zangarmarsh - Ragveil'), +(40537 , @POOL_ENTRY+52 , 0, 'Zangarmarsh - Ragveil'), +(40538 , @POOL_ENTRY+53 , 0, 'Zangarmarsh - Ragveil'), +(40539 , @POOL_ENTRY+54 , 0, 'Zangarmarsh - Ragveil'), +(40578 , @POOL_ENTRY+55 , 0, 'Zangarmarsh - Ragveil'), +(40583 , @POOL_ENTRY+56 , 0, 'Zangarmarsh - Ragveil'), +(40584 , @POOL_ENTRY+57 , 0, 'Zangarmarsh - Ragveil'), +(40586 , @POOL_ENTRY+58 , 0, 'Zangarmarsh - Ragveil'), +(40587 , @POOL_ENTRY+59 , 0, 'Zangarmarsh - Ragveil'), +(40588 , @POOL_ENTRY+60 , 0, 'Zangarmarsh - Ragveil'), +(40590 , @POOL_ENTRY+61 , 0, 'Zangarmarsh - Ragveil'), +(40592 , @POOL_ENTRY+62 , 0, 'Zangarmarsh - Ragveil'), +(40593 , @POOL_ENTRY+63 , 0, 'Zangarmarsh - Ragveil'), +(40594 , @POOL_ENTRY+64 , 0, 'Zangarmarsh - Ragveil'), +(40596 , @POOL_ENTRY+65 , 0, 'Zangarmarsh - Ragveil'), +(40597 , @POOL_ENTRY+66 , 0, 'Zangarmarsh - Ragveil'), +(40598 , @POOL_ENTRY+67 , 0, 'Zangarmarsh - Ragveil'), +(40599 , @POOL_ENTRY+68 , 0, 'Zangarmarsh - Ragveil'), +(40600 , @POOL_ENTRY+69 , 0, 'Zangarmarsh - Ragveil'), +(40601 , @POOL_ENTRY+70 , 0, 'Zangarmarsh - Ragveil'), +(40602 , @POOL_ENTRY+71 , 0, 'Zangarmarsh - Ragveil'), +(40603 , @POOL_ENTRY+72 , 0, 'Zangarmarsh - Ragveil'), +(40604 , @POOL_ENTRY+73 , 0, 'Zangarmarsh - Ragveil'), +(40605 , @POOL_ENTRY+74 , 0, 'Zangarmarsh - Ragveil'), +(40607 , @POOL_ENTRY+75 , 0, 'Zangarmarsh - Ragveil'), +(40608 , @POOL_ENTRY+76 , 0, 'Zangarmarsh - Ragveil'), +(42178 , @POOL_ENTRY+77 , 0, 'Zangarmarsh - Ragveil'), +(42215 , @POOL_ENTRY+78 , 0, 'Zangarmarsh - Ragveil'), +(42217 , @POOL_ENTRY+79 , 0, 'Zangarmarsh - Ragveil'), +(42218 , @POOL_ENTRY+80 , 0, 'Zangarmarsh - Ragveil'), +(42226 , @POOL_ENTRY+81 , 0, 'Zangarmarsh - Ragveil'), +(42227 , @POOL_ENTRY+82 , 0, 'Zangarmarsh - Ragveil'), +(42236 , @POOL_ENTRY+83 , 0, 'Zangarmarsh - Ragveil'), +(42237 , @POOL_ENTRY+84 , 0, 'Zangarmarsh - Ragveil'), +(42240 , @POOL_ENTRY+85 , 0, 'Zangarmarsh - Ragveil'), +(42242 , @POOL_ENTRY+86 , 0, 'Zangarmarsh - Ragveil'), +(42245 , @POOL_ENTRY+87 , 0, 'Zangarmarsh - Ragveil'), +(42246 , @POOL_ENTRY+88 , 0, 'Zangarmarsh - Ragveil'), +(42247 , @POOL_ENTRY+89 , 0, 'Zangarmarsh - Ragveil'), +(42296 , @POOL_ENTRY+90 , 0, 'Zangarmarsh - Ragveil'), +(42346 , @POOL_ENTRY+91 , 0, 'Zangarmarsh - Ragveil'), +(42430 , @POOL_ENTRY+92 , 0, 'Zangarmarsh - Ragveil'), +(61290 , @POOL_ENTRY+93 , 0, 'Zangarmarsh - Ragveil'), +(61291 , @POOL_ENTRY+94 , 0, 'Zangarmarsh - Ragveil'), +(61304 , @POOL_ENTRY+95 , 0, 'Zangarmarsh - Ragveil'), +(61305 , @POOL_ENTRY+96 , 0, 'Zangarmarsh - Ragveil'), +(61312 , @POOL_ENTRY+97 , 0, 'Zangarmarsh - Ragveil'), +(61313 , @POOL_ENTRY+98 , 0, 'Zangarmarsh - Ragveil'), +(61315 , @POOL_ENTRY+99 , 0, 'Zangarmarsh - Ragveil'), +(61316 , @POOL_ENTRY+100, 0, 'Zangarmarsh - Ragveil'), +(64802 , @POOL_ENTRY+101, 0, 'Zangarmarsh - Ragveil'), +(64804 , @POOL_ENTRY+102, 0, 'Zangarmarsh - Ragveil'), +(64805 , @POOL_ENTRY+103, 0, 'Zangarmarsh - Ragveil'), +(64806 , @POOL_ENTRY+104, 0, 'Zangarmarsh - Ragveil'), +(64807 , @POOL_ENTRY+105, 0, 'Zangarmarsh - Ragveil'), +(64808 , @POOL_ENTRY+106, 0, 'Zangarmarsh - Ragveil'), +(64810 , @POOL_ENTRY+107, 0, 'Zangarmarsh - Ragveil'), +(64846 , @POOL_ENTRY+108, 0, 'Zangarmarsh - Ragveil'), +(64847 , @POOL_ENTRY+109, 0, 'Zangarmarsh - Ragveil'), +(64848 , @POOL_ENTRY+110, 0, 'Zangarmarsh - Ragveil'), +(64849 , @POOL_ENTRY+111, 0, 'Zangarmarsh - Ragveil'), +(64850 , @POOL_ENTRY+112, 0, 'Zangarmarsh - Ragveil'), +(64851 , @POOL_ENTRY+113, 0, 'Zangarmarsh - Ragveil'), +(64852 , @POOL_ENTRY+114, 0, 'Zangarmarsh - Ragveil'), +(85916 , @POOL_ENTRY+115, 0, 'Zangarmarsh - Ragveil'), +(85917 , @POOL_ENTRY+116, 0, 'Zangarmarsh - Ragveil'), +(85918 , @POOL_ENTRY+117, 0, 'Zangarmarsh - Ragveil'), +(85919 , @POOL_ENTRY+118, 0, 'Zangarmarsh - Ragveil'), +(85920 , @POOL_ENTRY+119, 0, 'Zangarmarsh - Ragveil'), +(87045 , @POOL_ENTRY+120, 0, 'Zangarmarsh - Ragveil'), +(87125 , @POOL_ENTRY+121, 0, 'Zangarmarsh - Ragveil'), +(87126 , @POOL_ENTRY+122, 0, 'Zangarmarsh - Ragveil'), +(87127 , @POOL_ENTRY+123, 0, 'Zangarmarsh - Ragveil'), +(87128 , @POOL_ENTRY+124, 0, 'Zangarmarsh - Ragveil'), +(87398 , @POOL_ENTRY+125, 0, 'Zangarmarsh - Ragveil'), +(87399 , @POOL_ENTRY+126, 0, 'Zangarmarsh - Ragveil'), +(100198, @POOL_ENTRY+127, 0, 'Zangarmarsh - Ragveil'), +(101758, @POOL_ENTRY+128, 0, 'Zangarmarsh - Ragveil'), +(101759, @POOL_ENTRY+129, 0, 'Zangarmarsh - Ragveil'), + +(@OGUID+0 , @POOL_ENTRY+0 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+1 , @POOL_ENTRY+1 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+2 , @POOL_ENTRY+2 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+3 , @POOL_ENTRY+3 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+4 , @POOL_ENTRY+4 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+5 , @POOL_ENTRY+5 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+6 , @POOL_ENTRY+6 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+7 , @POOL_ENTRY+7 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+8 , @POOL_ENTRY+8 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+9 , @POOL_ENTRY+9 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+10 , @POOL_ENTRY+10 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+11 , @POOL_ENTRY+11 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+12 , @POOL_ENTRY+12 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+13 , @POOL_ENTRY+13 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+14 , @POOL_ENTRY+14 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+15 , @POOL_ENTRY+15 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+16 , @POOL_ENTRY+16 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+17 , @POOL_ENTRY+17 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+18 , @POOL_ENTRY+18 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+19 , @POOL_ENTRY+19 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+20 , @POOL_ENTRY+20 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+21 , @POOL_ENTRY+21 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+22 , @POOL_ENTRY+22 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+23 , @POOL_ENTRY+23 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+24 , @POOL_ENTRY+24 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+25 , @POOL_ENTRY+25 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+26 , @POOL_ENTRY+26 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+27 , @POOL_ENTRY+27 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+28 , @POOL_ENTRY+28 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+29 , @POOL_ENTRY+29 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+30 , @POOL_ENTRY+30 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+31 , @POOL_ENTRY+31 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+32 , @POOL_ENTRY+32 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+33 , @POOL_ENTRY+33 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+34 , @POOL_ENTRY+34 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+35 , @POOL_ENTRY+35 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+36 , @POOL_ENTRY+36 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+37 , @POOL_ENTRY+37 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+38 , @POOL_ENTRY+38 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+39 , @POOL_ENTRY+39 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+40 , @POOL_ENTRY+40 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+41 , @POOL_ENTRY+41 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+42 , @POOL_ENTRY+42 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+43 , @POOL_ENTRY+43 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+44 , @POOL_ENTRY+44 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+45 , @POOL_ENTRY+45 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+46 , @POOL_ENTRY+46 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+47 , @POOL_ENTRY+47 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+48 , @POOL_ENTRY+48 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+49 , @POOL_ENTRY+49 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+50 , @POOL_ENTRY+50 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+51 , @POOL_ENTRY+51 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+52 , @POOL_ENTRY+52 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+53 , @POOL_ENTRY+53 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+54 , @POOL_ENTRY+54 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+55 , @POOL_ENTRY+55 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+56 , @POOL_ENTRY+56 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+57 , @POOL_ENTRY+57 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+58 , @POOL_ENTRY+58 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+59 , @POOL_ENTRY+59 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+60 , @POOL_ENTRY+60 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+61 , @POOL_ENTRY+61 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+62 , @POOL_ENTRY+62 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+63 , @POOL_ENTRY+63 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+64 , @POOL_ENTRY+64 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+65 , @POOL_ENTRY+65 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+66 , @POOL_ENTRY+66 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+67 , @POOL_ENTRY+67 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+68 , @POOL_ENTRY+68 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+69 , @POOL_ENTRY+69 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+70 , @POOL_ENTRY+70 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+71 , @POOL_ENTRY+71 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+72 , @POOL_ENTRY+72 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+73 , @POOL_ENTRY+73 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+74 , @POOL_ENTRY+74 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+75 , @POOL_ENTRY+75 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+76 , @POOL_ENTRY+76 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+77 , @POOL_ENTRY+77 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+78 , @POOL_ENTRY+78 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+79 , @POOL_ENTRY+79 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+80 , @POOL_ENTRY+80 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+81 , @POOL_ENTRY+81 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+82 , @POOL_ENTRY+82 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+83 , @POOL_ENTRY+83 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+84 , @POOL_ENTRY+84 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+85 , @POOL_ENTRY+85 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+86 , @POOL_ENTRY+86 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+87 , @POOL_ENTRY+87 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+88 , @POOL_ENTRY+88 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+89 , @POOL_ENTRY+89 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+90 , @POOL_ENTRY+90 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+91 , @POOL_ENTRY+91 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+92 , @POOL_ENTRY+92 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+93 , @POOL_ENTRY+93 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+94 , @POOL_ENTRY+94 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+95 , @POOL_ENTRY+95 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+96 , @POOL_ENTRY+96 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+97 , @POOL_ENTRY+97 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+98 , @POOL_ENTRY+98 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+99 , @POOL_ENTRY+99 , 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+100, @POOL_ENTRY+100, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+101, @POOL_ENTRY+101, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+102, @POOL_ENTRY+102, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+103, @POOL_ENTRY+103, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+104, @POOL_ENTRY+104, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+105, @POOL_ENTRY+105, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+106, @POOL_ENTRY+106, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+107, @POOL_ENTRY+107, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+108, @POOL_ENTRY+108, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+109, @POOL_ENTRY+109, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+110, @POOL_ENTRY+110, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+111, @POOL_ENTRY+111, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+112, @POOL_ENTRY+112, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+113, @POOL_ENTRY+113, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+114, @POOL_ENTRY+114, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+115, @POOL_ENTRY+115, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+116, @POOL_ENTRY+116, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+117, @POOL_ENTRY+117, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+118, @POOL_ENTRY+118, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+119, @POOL_ENTRY+119, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+120, @POOL_ENTRY+120, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+121, @POOL_ENTRY+121, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+122, @POOL_ENTRY+122, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+123, @POOL_ENTRY+123, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+124, @POOL_ENTRY+124, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+125, @POOL_ENTRY+125, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+126, @POOL_ENTRY+126, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+127, @POOL_ENTRY+127, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+128, @POOL_ENTRY+128, 10, 'Zangarmarsh - Flame Cap'), +(@OGUID+129, @POOL_ENTRY+129, 10, 'Zangarmarsh - Flame Cap'); + +DELETE FROM `pool_template` WHERE `entry` BETWEEN @POOL_ENTRY AND @POOL_ENTRY+129 AND `description` = 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'; +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@POOL_ENTRY+0 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+1 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+2 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+3 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+4 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+5 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+6 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+7 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+8 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+9 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+10 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+11 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+12 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+13 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+14 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+15 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+16 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+17 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+18 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+19 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+20 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+21 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+22 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+23 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+24 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+25 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+26 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+27 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+28 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+29 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+30 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+31 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+32 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+33 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+34 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+35 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+36 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+37 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+38 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+39 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+40 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+41 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+42 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+43 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+44 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+45 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+46 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+47 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+48 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+49 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+50 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+51 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+52 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+53 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+54 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+55 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+56 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+57 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+58 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+59 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+60 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+61 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+62 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+63 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+64 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+65 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+66 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+67 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+68 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+69 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+70 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+71 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+72 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+73 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+74 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+75 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+76 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+77 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+78 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+79 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+80 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+81 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+82 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+83 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+84 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+85 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+86 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+87 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+88 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+89 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+90 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+91 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+92 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+93 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+94 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+95 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+96 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+97 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+98 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+99 , 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+100, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+101, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+102, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+103, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+104, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+105, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+106, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+107, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+108, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+109, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+110, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+111, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+112, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+113, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+114, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+115, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+116, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+117, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+118, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+119, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+120, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+121, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+122, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+123, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+124, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+125, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+126, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+127, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+128, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'), +(@POOL_ENTRY+129, 1, 'Zangarmarsh - Herb Pool - Ragveil / Flame Cap'); + +DELETE FROM `pool_pool` WHERE `pool_id` BETWEEN @POOL_ENTRY AND @POOL_ENTRY+129 AND `description` LIKE '%Zangarmarsh%'; +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`) VALUES +-- East +(16204, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16206, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16207, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16208, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16213, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16214, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16215, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16216, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16217, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16220, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16222, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16224, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16229, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16230, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16233, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16234, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16242, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16243, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16244, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16245, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16246, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16247, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16252, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16253, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16254, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16256, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16258, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16259, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16260, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16261, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16262, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16263, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16264, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16265, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16269, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16270, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16271, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16272, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16273, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16274, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16275, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16276, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16277, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16278, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16280, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16281, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16282, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16284, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16287, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16289, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16290, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16292, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16293, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16294, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16295, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16296, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16298, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16302, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16304, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16306, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16307, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16311, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16313, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16314, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16315, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16316, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16318, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16319, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16321, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16322, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16327, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16328, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16329, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(16330, 8085, 0, 'Zangarmarsh - Ragveil / Flame Cap - East'), +-- West +(16202, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16203, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16205, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16209, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16210, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16211, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16212, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16218, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16219, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16221, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16223, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16225, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16226, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16227, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16228, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16231, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16232, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16235, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16236, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16237, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16238, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16239, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16240, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16241, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16248, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16249, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16250, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16251, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16255, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16257, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16266, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16267, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16268, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16279, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16283, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16285, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16286, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16288, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16291, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16297, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16299, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16300, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16301, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16303, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16305, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16308, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16309, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16310, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16312, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16317, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16320, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16323, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16324, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16325, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16326, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'), +(16331, 8086, 0, 'Zangarmarsh - Ragveil / Flame Cap - West'); + +DELETE FROM `pool_template` WHERE `entry` IN (8085, 8086); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(8085, 18, 'Zangarmarsh - Ragveil / Flame Cap - East'), +(8086, 18, 'Zangarmarsh - Ragveil / Flame Cap - West'); From 17d61664fd6afa07847c033ea828216bfee6c062 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 25 Jul 2024 23:52:41 +0000 Subject: [PATCH 23/23] chore(DB): import pending files Referenced commit(s): bc23a7a3d861e9fe82224b3907e98fdbcc96baed --- .../rev_1721773806947945700.sql => db_world/2024_07_25_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1721773806947945700.sql => db_world/2024_07_25_00.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1721773806947945700.sql b/data/sql/updates/db_world/2024_07_25_00.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1721773806947945700.sql rename to data/sql/updates/db_world/2024_07_25_00.sql index 81e782b8dafb31..fe5894b76beb62 100644 --- a/data/sql/updates/pending_db_world/rev_1721773806947945700.sql +++ b/data/sql/updates/db_world/2024_07_25_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_07_23_02 -> 2024_07_25_00 -- Delete all pools DELETE FROM `pool_template` WHERE `entry` IN (8085, 8086, 8087) AND `description` LIKE 'Zangarmarsh%'; DELETE FROM `pool_gameobject` WHERE `guid` IN (21,1801,2730,16819,16820,16824,16825,16828,16829,16831,16836,16837,16839,16840,16841,16843,16847,16848,16850,16851,17172,17177,17178,17185,17665,17779,17844,20364,20944,21553,21554,22442,23956,23957,23959,23961,23962,23963,23964,23965,23968,23969,28313,28316,30408,30417,30544,32744,32824,33835,40534,40535,40536,40537,40538,40539,40578,40583,40584,40586,40587,40588,40590,40592,40593,40594,40596,40597,40598,40599,40600,40601,40602,40603,40604,40605,40607,40608,42178,42215,42217,42218,42226,42227,42236,42237,42240,42242,42245,42246,42247,42296,42346,42430,61290,61291,61304,61305,61312,61313,61315,61316,64802,64804,64805,64806,64807,64808,64810,64846,64847,64848,64849,64850,64851,64852,85916,85917,85918,85919,85920,87045,87125,87126,87127,87128,87398,87399,100198,101758,101759) AND `pool_entry` IN (8085, 8086, 8087) AND `description` LIKE '%Zangarmarsh%';