diff options
author | Giacomo Pozzoni <giacomopoz@gmail.com> | 2019-02-15 20:29:14 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-11-23 22:54:24 +0100 |
commit | ed5ba915f1ec7dad8f4935b62b0ec2d202d26c1c (patch) | |
tree | 009470d881c58212f2fcf3b78d99a5c4bd524072 /src/server/game/Scripting/ScriptMgr.h | |
parent | 47adf2e4c8d90b2c0d2f7181dad9e0265dfb12cc (diff) |
Core/Scripts: Change PlayerScript and CreatureScript inheritance (#23048)
Remove UnitScript from PlayerScript and CreatureScript classes as that's how the original system that was PR'd worked, see https://github.com/TrinityCore/TrinityCore/pull/7867 for reference.
Please note these are used as global hooks and should really just invoke stateless functions.
If you need to hook methods from PlayerScript/CreatureScript and UnitScript, just define 2 different scripts (this is how the original system worked and how it was designed to work)
(cherry picked from commit 5b7ead65bb116195f4336934bcff830e1b2af5bb)
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.h')
-rw-r--r-- | src/server/game/Scripting/ScriptMgr.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 1ab7fc54478..5116d043ad9 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -393,7 +393,7 @@ class TC_GAME_API UnitScript : public ScriptObject { protected: - UnitScript(char const* name, bool addToScripts = true); + UnitScript(char const* name); public: // Called when a unit deals healing to another unit @@ -412,7 +412,7 @@ class TC_GAME_API UnitScript : public ScriptObject virtual void ModifySpellDamageTaken(Unit* /*target*/, Unit* /*attacker*/, int32& /*damage*/, SpellInfo const* /*spellInfo*/) { } }; -class TC_GAME_API CreatureScript : public UnitScript +class TC_GAME_API CreatureScript : public ScriptObject { protected: @@ -612,7 +612,7 @@ class TC_GAME_API AchievementCriteriaScript : public ScriptObject virtual bool OnCheck(Player* source, Unit* target) = 0; }; -class TC_GAME_API PlayerScript : public UnitScript +class TC_GAME_API PlayerScript : public ScriptObject { protected: |