From fee65bfa1e7c2e9fcfc7db9d8b084c7c40728f0b Mon Sep 17 00:00:00 2001 From: TerraByte Date: Sun, 6 Apr 2025 23:03:24 -0500 Subject: [PATCH] Update aoe_loot.h --- mod-aoe-loot/src/aoe_loot.h | 46 ++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/mod-aoe-loot/src/aoe_loot.h b/mod-aoe-loot/src/aoe_loot.h index 9b714d8..2b1e8f0 100644 --- a/mod-aoe-loot/src/aoe_loot.h +++ b/mod-aoe-loot/src/aoe_loot.h @@ -3,9 +3,20 @@ #include "ScriptMgr.h" #include "Config.h" +#include "ServerScript.h" #include "Chat.h" #include "Player.h" +#include "Item.h" #include "ScriptedGossip.h" +#include "ChatCommand.h" +#include "ChatCommandArgs.h" +#include "AccountMgr.h" +#include +#include +#include +#include + +using namespace Acore::ChatCommands; enum AoeLootString { @@ -13,26 +24,33 @@ enum AoeLootString AOE_ITEM_IN_THE_MAIL }; -class AOELootPlayer : public PlayerScript -{ -public: - AOELootPlayer() : PlayerScript("AOELootPlayer") { } - - void OnPlayerLogin(Player* player) override; -}; - class AOELootServer : public ServerScript { public: - AOELootServer() : ServerScript("AOELootServer") { } + AOELootServer() : ServerScript("AOELootServer") {} bool CanPacketReceive(WorldSession* session, WorldPacket& packet) override; }; -void AddSC_AoeLoot() +class AOELootPlayer : public PlayerScript { - new AOELootPlayer(); - new AOELootServer(); -} +public: + AOELootPlayer() : PlayerScript("AOELootPlayer") {} -#endif //MODULE_AOELOOT_H \ No newline at end of file + void OnPlayerLogin(Player* player) override; + +}; + +class AoeLootCommandScript : public CommandScript +{ +public: + AoeLootCommandScript() : CommandScript("AoeLootCommandScript") {} + ChatCommandTable GetCommands() const override; + + static bool HandleStartAoeLootCommand(ChatHandler* handler, Optional args); +}; + +void AddSC_AoeLoot(); + + +#endif //MODULE_AOELOOT_H