diff options
author | Peter Keresztes Schmidt <carbenium@outlook.com> | 2020-08-17 22:04:44 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-02-02 21:17:51 +0100 |
commit | 37777ac6e84041df6ac1b10aca7ff930c4bdb782 (patch) | |
tree | c30e773ecd68b26af9277af35ab983dc6224622d | |
parent | 1c246cc980d2cdb96bab55dd64fccfd46cfd33e7 (diff) |
Scripts/Commands: Convert argument parsing of ahbot commands (PR #25264)
(cherry picked from commit 426513ec8e154df7c13ba98371513dd9f6d2cb9d)
6 files changed, 169 insertions, 110 deletions
diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBot.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBot.cpp index 403562c998c..45863e83727 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBot.cpp +++ b/src/server/game/AuctionHouseBot/AuctionHouseBot.cpp @@ -453,10 +453,10 @@ void AuctionHouseBot::SetItemsRatioForHouse(AuctionHouseType house, uint32 val) _seller->SetItemsRatioForHouse(house, val); } -void AuctionHouseBot::SetItemsAmount(uint32(&vals)[MAX_AUCTION_QUALITY]) +void AuctionHouseBot::SetItemsAmount(std::array<uint32, MAX_AUCTION_QUALITY> const& amounts) { if (_seller) - _seller->SetItemsAmount(vals); + _seller->SetItemsAmount(amounts); } void AuctionHouseBot::SetItemsAmountForQuality(AuctionQuality quality, uint32 val) @@ -471,16 +471,16 @@ void AuctionHouseBot::ReloadAllConfig() InitializeAgents(); } -void AuctionHouseBot::PrepareStatusInfos(AuctionHouseBotStatusInfo& statusInfo) +void AuctionHouseBot::PrepareStatusInfos(std::unordered_map<AuctionHouseType, AuctionHouseBotStatusInfoPerType>& statusInfo) { - for (uint32 i = 0; i < MAX_AUCTION_HOUSE_TYPE; ++i) + for (AuctionHouseType ahType : EnumUtils::Iterate<AuctionHouseType>()) { - statusInfo[i].ItemsCount = 0; + statusInfo[ahType].ItemsCount = 0; - for (int j = 0; j < MAX_AUCTION_QUALITY; ++j) - statusInfo[i].QualityInfo[j] = 0; + for (AuctionQuality quality : EnumUtils::Iterate<AuctionQuality>()) + statusInfo[ahType].QualityInfo[quality] = 0; - AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsById(AuctionHouseIds[i]); + AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsById(AuctionHouseIds[ahType]); for (auto itr = auctionHouse->GetAuctionsBegin(); itr != auctionHouse->GetAuctionsEnd(); ++itr) { AuctionPosting const& auction = itr->second; @@ -490,9 +490,9 @@ void AuctionHouseBot::PrepareStatusInfos(AuctionHouseBotStatusInfo& statusInfo) if (auction.Owner.IsEmpty() || sAuctionBotConfig->IsBotChar(auction.Owner)) // Add only ahbot items { if (prototype->GetQuality() < MAX_AUCTION_QUALITY) - ++statusInfo[i].QualityInfo[prototype->GetQuality()]; + ++statusInfo[ahType].QualityInfo[AuctionQuality(prototype->GetQuality())]; - statusInfo[i].ItemsCount += item->GetCount(); + statusInfo[ahType].ItemsCount += item->GetCount(); } } } diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBot.h b/src/server/game/AuctionHouseBot/AuctionHouseBot.h index 0ce9c86a427..d6d387467e5 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBot.h +++ b/src/server/game/AuctionHouseBot/AuctionHouseBot.h @@ -22,11 +22,14 @@ #include "ObjectGuid.h" #include "SharedDefines.h" #include <string> +#include <unordered_map> +#include <vector> class AuctionBotSeller; class AuctionBotBuyer; // shadow of ItemQualities with skipped ITEM_QUALITY_HEIRLOOM, anything after ITEM_QUALITY_ARTIFACT(6) in fact +// EnumUtils: DESCRIBE THIS enum AuctionQuality { AUCTION_QUALITY_GRAY = ITEM_QUALITY_POOR, @@ -40,6 +43,7 @@ enum AuctionQuality #define MAX_AUCTION_QUALITY 7 +// EnumUtils: DESCRIBE THIS enum AuctionHouseType { AUCTION_HOUSE_NEUTRAL = 0, @@ -275,11 +279,9 @@ public: struct AuctionHouseBotStatusInfoPerType { uint32 ItemsCount; - uint32 QualityInfo[MAX_AUCTION_QUALITY]; + std::unordered_map<AuctionQuality, uint32> QualityInfo; }; -typedef AuctionHouseBotStatusInfoPerType AuctionHouseBotStatusInfo[MAX_AUCTION_HOUSE_TYPE]; - // This class handle both Selling and Buying method // (holder of AuctionBotBuyer and AuctionBotSeller objects) class TC_GAME_API AuctionHouseBot @@ -299,12 +301,12 @@ public: // Followed method is mainly used by cs_ahbot.cpp for in-game/console command void SetItemsRatio(uint32 al, uint32 ho, uint32 ne); void SetItemsRatioForHouse(AuctionHouseType house, uint32 val); - void SetItemsAmount(uint32(&vals)[MAX_AUCTION_QUALITY]); + void SetItemsAmount(std::array<uint32, MAX_AUCTION_QUALITY> const& amounts); void SetItemsAmountForQuality(AuctionQuality quality, uint32 val); void ReloadAllConfig(); void Rebuild(bool all); - void PrepareStatusInfos(AuctionHouseBotStatusInfo& statusInfo); + void PrepareStatusInfos(std::unordered_map<AuctionHouseType, AuctionHouseBotStatusInfoPerType>& statusInfo); private: void InitializeAgents(); diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp index 18381c4d4b0..16c4f227083 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp +++ b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp @@ -771,15 +771,15 @@ void AuctionBotSeller::SetItemsRatioForHouse(AuctionHouseType house, uint32 val) LoadItemsQuantity(_houseConfig[house]); } -void AuctionBotSeller::SetItemsAmount(uint32(&vals)[MAX_AUCTION_QUALITY]) +void AuctionBotSeller::SetItemsAmount(std::array<uint32, MAX_AUCTION_QUALITY> const& amounts) { - sAuctionBotConfig->SetConfig(CONFIG_AHBOT_ITEM_GRAY_AMOUNT, vals[AUCTION_QUALITY_GRAY]); - sAuctionBotConfig->SetConfig(CONFIG_AHBOT_ITEM_WHITE_AMOUNT, vals[AUCTION_QUALITY_WHITE]); - sAuctionBotConfig->SetConfig(CONFIG_AHBOT_ITEM_GREEN_AMOUNT, vals[AUCTION_QUALITY_GREEN]); - sAuctionBotConfig->SetConfig(CONFIG_AHBOT_ITEM_BLUE_AMOUNT, vals[AUCTION_QUALITY_BLUE]); - sAuctionBotConfig->SetConfig(CONFIG_AHBOT_ITEM_PURPLE_AMOUNT, vals[AUCTION_QUALITY_PURPLE]); - sAuctionBotConfig->SetConfig(CONFIG_AHBOT_ITEM_ORANGE_AMOUNT, vals[AUCTION_QUALITY_ORANGE]); - sAuctionBotConfig->SetConfig(CONFIG_AHBOT_ITEM_YELLOW_AMOUNT, vals[AUCTION_QUALITY_YELLOW]); + sAuctionBotConfig->SetConfig(CONFIG_AHBOT_ITEM_GRAY_AMOUNT, amounts[AUCTION_QUALITY_GRAY]); + sAuctionBotConfig->SetConfig(CONFIG_AHBOT_ITEM_WHITE_AMOUNT, amounts[AUCTION_QUALITY_WHITE]); + sAuctionBotConfig->SetConfig(CONFIG_AHBOT_ITEM_GREEN_AMOUNT, amounts[AUCTION_QUALITY_GREEN]); + sAuctionBotConfig->SetConfig(CONFIG_AHBOT_ITEM_BLUE_AMOUNT, amounts[AUCTION_QUALITY_BLUE]); + sAuctionBotConfig->SetConfig(CONFIG_AHBOT_ITEM_PURPLE_AMOUNT, amounts[AUCTION_QUALITY_PURPLE]); + sAuctionBotConfig->SetConfig(CONFIG_AHBOT_ITEM_ORANGE_AMOUNT, amounts[AUCTION_QUALITY_ORANGE]); + sAuctionBotConfig->SetConfig(CONFIG_AHBOT_ITEM_YELLOW_AMOUNT, amounts[AUCTION_QUALITY_YELLOW]); for (int i = 0; i < MAX_AUCTION_HOUSE_TYPE; ++i) LoadItemsQuantity(_houseConfig[i]); diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.h b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.h index 29288c6fb3b..49f4387291d 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.h +++ b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.h @@ -130,7 +130,7 @@ public: void AddNewAuctions(SellerConfiguration& config); void SetItemsRatio(uint32 al, uint32 ho, uint32 ne); void SetItemsRatioForHouse(AuctionHouseType house, uint32 val); - void SetItemsAmount(uint32(&vals)[MAX_AUCTION_QUALITY]); + void SetItemsAmount(std::array<uint32, MAX_AUCTION_QUALITY> const& amounts); void SetItemsAmountForQuality(AuctionQuality quality, uint32 val); void LoadConfig(); diff --git a/src/server/game/AuctionHouseBot/enuminfo_AuctionHouseBot.cpp b/src/server/game/AuctionHouseBot/enuminfo_AuctionHouseBot.cpp new file mode 100644 index 00000000000..bdec8875922 --- /dev/null +++ b/src/server/game/AuctionHouseBot/enuminfo_AuctionHouseBot.cpp @@ -0,0 +1,96 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "AuctionHouseBot.h" +#include "Define.h" +#include "SmartEnum.h" +#include <stdexcept> + +namespace Trinity +{ +namespace Impl +{ + +/************************************************************************\ +|* data for enum 'AuctionQuality' in 'AuctionHouseBot.h' auto-generated *| +\************************************************************************/ +template <> +TC_API_EXPORT EnumText EnumUtils<AuctionQuality>::ToString(AuctionQuality value) +{ + switch (value) + { + case AUCTION_QUALITY_GRAY: return { "AUCTION_QUALITY_GRAY", "AUCTION_QUALITY_GRAY", "" }; + case AUCTION_QUALITY_WHITE: return { "AUCTION_QUALITY_WHITE", "AUCTION_QUALITY_WHITE", "" }; + case AUCTION_QUALITY_GREEN: return { "AUCTION_QUALITY_GREEN", "AUCTION_QUALITY_GREEN", "" }; + case AUCTION_QUALITY_BLUE: return { "AUCTION_QUALITY_BLUE", "AUCTION_QUALITY_BLUE", "" }; + case AUCTION_QUALITY_PURPLE: return { "AUCTION_QUALITY_PURPLE", "AUCTION_QUALITY_PURPLE", "" }; + case AUCTION_QUALITY_ORANGE: return { "AUCTION_QUALITY_ORANGE", "AUCTION_QUALITY_ORANGE", "" }; + case AUCTION_QUALITY_YELLOW: return { "AUCTION_QUALITY_YELLOW", "AUCTION_QUALITY_YELLOW", "" }; + default: throw std::out_of_range("value"); + } +} + +template <> +TC_API_EXPORT size_t EnumUtils<AuctionQuality>::Count() { return 7; } + +template <> +TC_API_EXPORT AuctionQuality EnumUtils<AuctionQuality>::FromIndex(size_t index) +{ + switch (index) + { + case 0: return AUCTION_QUALITY_GRAY; + case 1: return AUCTION_QUALITY_WHITE; + case 2: return AUCTION_QUALITY_GREEN; + case 3: return AUCTION_QUALITY_BLUE; + case 4: return AUCTION_QUALITY_PURPLE; + case 5: return AUCTION_QUALITY_ORANGE; + case 6: return AUCTION_QUALITY_YELLOW; + default: throw std::out_of_range("index"); + } +} + +/**************************************************************************\ +|* data for enum 'AuctionHouseType' in 'AuctionHouseBot.h' auto-generated *| +\**************************************************************************/ +template <> +TC_API_EXPORT EnumText EnumUtils<AuctionHouseType>::ToString(AuctionHouseType value) +{ + switch (value) + { + case AUCTION_HOUSE_NEUTRAL: return { "AUCTION_HOUSE_NEUTRAL", "AUCTION_HOUSE_NEUTRAL", "" }; + case AUCTION_HOUSE_ALLIANCE: return { "AUCTION_HOUSE_ALLIANCE", "AUCTION_HOUSE_ALLIANCE", "" }; + case AUCTION_HOUSE_HORDE: return { "AUCTION_HOUSE_HORDE", "AUCTION_HOUSE_HORDE", "" }; + default: throw std::out_of_range("value"); + } +} + +template <> +TC_API_EXPORT size_t EnumUtils<AuctionHouseType>::Count() { return 3; } + +template <> +TC_API_EXPORT AuctionHouseType EnumUtils<AuctionHouseType>::FromIndex(size_t index) +{ + switch (index) + { + case 0: return AUCTION_HOUSE_NEUTRAL; + case 1: return AUCTION_HOUSE_ALLIANCE; + case 2: return AUCTION_HOUSE_HORDE; + default: throw std::out_of_range("index"); + } +} +} +} diff --git a/src/server/scripts/Commands/cs_ahbot.cpp b/src/server/scripts/Commands/cs_ahbot.cpp index dcdfb27e013..bb932fdb0dc 100644 --- a/src/server/scripts/Commands/cs_ahbot.cpp +++ b/src/server/scripts/Commands/cs_ahbot.cpp @@ -21,13 +21,18 @@ #include "Language.h" #include "RBAC.h" -uint32 const ahbotQualityIds[MAX_AUCTION_QUALITY] = -{ - LANG_AHBOT_QUALITY_GRAY, LANG_AHBOT_QUALITY_WHITE, - LANG_AHBOT_QUALITY_GREEN, LANG_AHBOT_QUALITY_BLUE, - LANG_AHBOT_QUALITY_PURPLE, LANG_AHBOT_QUALITY_ORANGE, - LANG_AHBOT_QUALITY_YELLOW -}; +static std::unordered_map<AuctionQuality, uint32> const ahbotQualityLangIds = + { + { AUCTION_QUALITY_GRAY, LANG_AHBOT_QUALITY_GRAY }, + { AUCTION_QUALITY_WHITE, LANG_AHBOT_QUALITY_WHITE }, + { AUCTION_QUALITY_GREEN, LANG_AHBOT_QUALITY_GREEN }, + { AUCTION_QUALITY_BLUE, LANG_AHBOT_QUALITY_BLUE }, + { AUCTION_QUALITY_PURPLE, LANG_AHBOT_QUALITY_PURPLE }, + { AUCTION_QUALITY_ORANGE, LANG_AHBOT_QUALITY_ORANGE }, + { AUCTION_QUALITY_YELLOW, LANG_AHBOT_QUALITY_YELLOW } + }; + +using namespace Trinity::ChatCommands; class ahbot_commandscript : public CommandScript { @@ -73,103 +78,59 @@ public: return commandTable; } - static bool HandleAHBotItemsAmountCommand(ChatHandler* handler, char const* args) + static bool HandleAHBotItemsAmountCommand(ChatHandler* handler, std::array<uint32, MAX_AUCTION_QUALITY> items) { - uint32 qVals[MAX_AUCTION_QUALITY]; - char* arg = strtok((char*)args, " "); - for (int i = 0; i < MAX_AUCTION_QUALITY; ++i) - { - if (!arg) - return false; - qVals[i] = atoi(arg); - arg = strtok(nullptr, " "); - } + sAuctionBot->SetItemsAmount(items); - sAuctionBot->SetItemsAmount(qVals); - - for (int i = 0; i < MAX_AUCTION_QUALITY; ++i) - handler->PSendSysMessage(LANG_AHBOT_ITEMS_AMOUNT, handler->GetTrinityString(ahbotQualityIds[i]), sAuctionBotConfig->GetConfigItemQualityAmount(AuctionQuality(i))); + for (AuctionQuality quality : EnumUtils::Iterate<AuctionQuality>()) + handler->PSendSysMessage(LANG_AHBOT_ITEMS_AMOUNT, handler->GetTrinityString(ahbotQualityLangIds.at(quality)), sAuctionBotConfig->GetConfigItemQualityAmount(quality)); return true; } template <AuctionQuality Q> - static bool HandleAHBotItemsAmountQualityCommand(ChatHandler* handler, char const* args) + static bool HandleAHBotItemsAmountQualityCommand(ChatHandler* handler, uint32 amount) { - char* arg = strtok((char*)args, " "); - if (!arg) - return false; - uint32 qualityVal = atoi(arg); - - sAuctionBot->SetItemsAmountForQuality(Q, qualityVal); - handler->PSendSysMessage(LANG_AHBOT_ITEMS_AMOUNT, handler->GetTrinityString(ahbotQualityIds[Q]), + sAuctionBot->SetItemsAmountForQuality(Q, amount); + handler->PSendSysMessage(LANG_AHBOT_ITEMS_AMOUNT, handler->GetTrinityString(ahbotQualityLangIds.at(Q)), sAuctionBotConfig->GetConfigItemQualityAmount(Q)); return true; } - static bool HandleAHBotItemsRatioCommand(ChatHandler* handler, char const* args) + static bool HandleAHBotItemsRatioCommand(ChatHandler* handler, uint32 alliance, uint32 horde, uint32 neutral) { - uint32 rVal[MAX_AUCTION_QUALITY]; - char* arg = strtok((char*)args, " "); - for (int i = 0; i < MAX_AUCTION_QUALITY; ++i) - { - if (!arg) - return false; - rVal[i] = atoi(arg); - arg = strtok(nullptr, " "); - } + sAuctionBot->SetItemsRatio(alliance, horde, neutral); - sAuctionBot->SetItemsRatio(rVal[0], rVal[1], rVal[2]); - - for (int i = 0; i < MAX_AUCTION_HOUSE_TYPE; ++i) - handler->PSendSysMessage(LANG_AHBOT_ITEMS_RATIO, AuctionBotConfig::GetHouseTypeName(AuctionHouseType(i)), sAuctionBotConfig->GetConfigItemAmountRatio(AuctionHouseType(i))); + for (AuctionHouseType type : EnumUtils::Iterate<AuctionHouseType>()) + handler->PSendSysMessage(LANG_AHBOT_ITEMS_RATIO, AuctionBotConfig::GetHouseTypeName(type), sAuctionBotConfig->GetConfigItemAmountRatio(type)); return true; } template<AuctionHouseType H> - static bool HandleAHBotItemsRatioHouseCommand(ChatHandler* handler, char const* args) + static bool HandleAHBotItemsRatioHouseCommand(ChatHandler* handler, uint32 ratio) { - char* arg = strtok((char*)args, " "); - if (!arg) - return false; - uint32 ratioVal = atoi(arg); - - sAuctionBot->SetItemsRatioForHouse(H, ratioVal); + sAuctionBot->SetItemsRatioForHouse(H, ratio); handler->PSendSysMessage(LANG_AHBOT_ITEMS_RATIO, AuctionBotConfig::GetHouseTypeName(H), sAuctionBotConfig->GetConfigItemAmountRatio(H)); return true; } - static bool HandleAHBotRebuildCommand(ChatHandler* /*handler*/, char const* args) + static bool HandleAHBotRebuildCommand(ChatHandler* /*handler*/, Optional<ExactSequence<'a', 'l', 'l'>> all) { - char* arg = strtok((char*)args, " "); - - bool all = false; - if (arg && strcmp(arg, "all") == 0) - all = true; - - sAuctionBot->Rebuild(all); + sAuctionBot->Rebuild(all.has_value()); return true; } - static bool HandleAHBotReloadCommand(ChatHandler* handler, char const* /*args*/) + static bool HandleAHBotReloadCommand(ChatHandler* handler) { sAuctionBot->ReloadAllConfig(); handler->SendSysMessage(LANG_AHBOT_RELOAD_OK); return true; } - static bool HandleAHBotStatusCommand(ChatHandler* handler, char const* args) + static bool HandleAHBotStatusCommand(ChatHandler* handler, Optional<ExactSequence<'a', 'l', 'l'>> all) { - char* arg = strtok((char*)args, " "); - if (!arg) - return false; - - bool all = false; - if (strcmp(arg, "all") == 0) - all = true; - - AuctionHouseBotStatusInfo statusInfo; + std::unordered_map<AuctionHouseType, AuctionHouseBotStatusInfoPerType> statusInfo; sAuctionBot->PrepareStatusInfos(statusInfo); WorldSession* session = handler->GetSession(); @@ -212,12 +173,12 @@ public: else handler->SendSysMessage(LANG_AHBOT_STATUS_TITLE2_CHAT); - for (int i = 0; i < MAX_AUCTION_QUALITY; ++i) - handler->PSendSysMessage(fmtId, handler->GetTrinityString(ahbotQualityIds[i]), - statusInfo[AUCTION_HOUSE_ALLIANCE].QualityInfo[i], - statusInfo[AUCTION_HOUSE_HORDE].QualityInfo[i], - statusInfo[AUCTION_HOUSE_NEUTRAL].QualityInfo[i], - sAuctionBotConfig->GetConfigItemQualityAmount(AuctionQuality(i))); + for (AuctionQuality quality : EnumUtils::Iterate<AuctionQuality>()) + handler->PSendSysMessage(fmtId, handler->GetTrinityString(ahbotQualityLangIds.at(quality)), + statusInfo[AUCTION_HOUSE_ALLIANCE].QualityInfo.at(quality), + statusInfo[AUCTION_HOUSE_HORDE].QualityInfo.at(quality), + statusInfo[AUCTION_HOUSE_NEUTRAL].QualityInfo.at(quality), + sAuctionBotConfig->GetConfigItemQualityAmount(quality)); } if (!session) @@ -228,17 +189,17 @@ public: }; -template bool ahbot_commandscript::HandleAHBotItemsAmountQualityCommand<AUCTION_QUALITY_GRAY>(ChatHandler* handler, char const*); -template bool ahbot_commandscript::HandleAHBotItemsAmountQualityCommand<AUCTION_QUALITY_WHITE>(ChatHandler* handler, char const*); -template bool ahbot_commandscript::HandleAHBotItemsAmountQualityCommand<AUCTION_QUALITY_GREEN>(ChatHandler* handler, char const*); -template bool ahbot_commandscript::HandleAHBotItemsAmountQualityCommand<AUCTION_QUALITY_BLUE>(ChatHandler* handler, char const*); -template bool ahbot_commandscript::HandleAHBotItemsAmountQualityCommand<AUCTION_QUALITY_PURPLE>(ChatHandler* handler, char const*); -template bool ahbot_commandscript::HandleAHBotItemsAmountQualityCommand<AUCTION_QUALITY_ORANGE>(ChatHandler* handler, char const*); -template bool ahbot_commandscript::HandleAHBotItemsAmountQualityCommand<AUCTION_QUALITY_YELLOW>(ChatHandler* handler, char const*); - -template bool ahbot_commandscript::HandleAHBotItemsRatioHouseCommand<AUCTION_HOUSE_ALLIANCE>(ChatHandler* handler, char const*); -template bool ahbot_commandscript::HandleAHBotItemsRatioHouseCommand<AUCTION_HOUSE_HORDE>(ChatHandler* handler, char const*); -template bool ahbot_commandscript::HandleAHBotItemsRatioHouseCommand<AUCTION_HOUSE_NEUTRAL>(ChatHandler* handler, char const*); +template bool ahbot_commandscript::HandleAHBotItemsAmountQualityCommand<AUCTION_QUALITY_GRAY>(ChatHandler* handler, uint32 amount); +template bool ahbot_commandscript::HandleAHBotItemsAmountQualityCommand<AUCTION_QUALITY_WHITE>(ChatHandler* handler, uint32 amount); +template bool ahbot_commandscript::HandleAHBotItemsAmountQualityCommand<AUCTION_QUALITY_GREEN>(ChatHandler* handler, uint32 amount); +template bool ahbot_commandscript::HandleAHBotItemsAmountQualityCommand<AUCTION_QUALITY_BLUE>(ChatHandler* handler, uint32 amount); +template bool ahbot_commandscript::HandleAHBotItemsAmountQualityCommand<AUCTION_QUALITY_PURPLE>(ChatHandler* handler, uint32 amount); +template bool ahbot_commandscript::HandleAHBotItemsAmountQualityCommand<AUCTION_QUALITY_ORANGE>(ChatHandler* handler, uint32 amount); +template bool ahbot_commandscript::HandleAHBotItemsAmountQualityCommand<AUCTION_QUALITY_YELLOW>(ChatHandler* handler, uint32 amount); + +template bool ahbot_commandscript::HandleAHBotItemsRatioHouseCommand<AUCTION_HOUSE_ALLIANCE>(ChatHandler* handler, uint32 ratio); +template bool ahbot_commandscript::HandleAHBotItemsRatioHouseCommand<AUCTION_HOUSE_HORDE>(ChatHandler* handler, uint32 ratio); +template bool ahbot_commandscript::HandleAHBotItemsRatioHouseCommand<AUCTION_HOUSE_NEUTRAL>(ChatHandler* handler, uint32 ratio); void AddSC_ahbot_commandscript() { |