diff options
| author | Walter Pagani <paganiwalter@gmail.com> | 2023-06-24 08:23:23 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-24 08:23:23 -0300 |
| commit | 7f9cdda17bf1acc026072ff9993fefa5a2ffdae7 (patch) | |
| tree | 9372247f4279f3e13b1993f68f8fdffa0dbcd6e5 /src/server/game/Scripting/ScriptMgr.h | |
| parent | bf8ba6898f0463c7c549e3c92668ea2fa5f7fd0a (diff) | |
chore(Core/ScriptMgr): Hooks used in mod-aoe-loot (#16589)
* Creating the necessary hooks for the loot aoe
* update hook
* Typing error
* Method name and add documentation
* codestyle
* Misc. fixes
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.h')
| -rw-r--r-- | src/server/game/Scripting/ScriptMgr.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 3a543c2c3a..e4fcd3f96e 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -1481,6 +1481,30 @@ public: virtual void AnticheatUpdateMovementInfo(Player* /*player*/, MovementInfo const& /*movementInfo*/) { } [[nodiscard]] virtual bool AnticheatHandleDoubleJump(Player* /*player*/, Unit* /*mover*/) { return true; } [[nodiscard]] virtual bool AnticheatCheckMovementInfo(Player* /*player*/, MovementInfo const& /*movementInfo*/, Unit* /*mover*/, bool /*jump*/) { return true; } + + /** + * @brief This hook is called, to avoid displaying the error message that the body has already been stripped + * + * @param player Contains information about the Player + * + * @return true Avoiding displaying the error message that the loot has already been taken. + */ + virtual bool CanSendErrorAlreadyLooted(Player* /*player*/) { return true; } + + /** + * @brief It is used when an item is taken from a creature. + * + * @param player Contains information about the Player + * + */ + virtual void OnAfterCreatureLoot(Player* /*player*/) { } + + /** + * @brief After a creature's money is taken + * + * @param player Contains information about the Player + */ + virtual void OnAfterCreatureLootMoney(Player* /*player*/) { } }; class AccountScript : public ScriptObject @@ -2406,6 +2430,9 @@ public: /* PlayerScript */ void OnPlayerEnterCombat(Player* player, Unit* enemy); void OnPlayerLeaveCombat(Player* player); void OnQuestAbandon(Player* player, uint32 questId); + bool CanSendErrorAlreadyLooted(Player* player); + void OnAfterCreatureLoot(Player* player); + void OnAfterCreatureLootMoney(Player* player); // Anti cheat void AnticheatSetSkipOnePacketForASH(Player* player, bool apply); |
