mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
Core/Scripts: Add SpellSC and new hook OnCalcMaxDuration
This commit is contained in:
@@ -1061,6 +1061,21 @@ public:
|
||||
virtual void OnBattlegroundAddPlayer(Battleground* /*bg*/, Player* /*player*/) { }
|
||||
};
|
||||
|
||||
class SpellSC : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
SpellSC(const char* name);
|
||||
|
||||
public:
|
||||
|
||||
bool IsDatabaseBound() const { return false; }
|
||||
|
||||
// Calculate max duration in applying aura
|
||||
virtual void OnCalcMaxDuration(Aura const* /*aura*/, int32& /*maxDuration*/) { }
|
||||
|
||||
};
|
||||
|
||||
// this class can be used to be extended by Modules
|
||||
// creating their own custom hooks inside module itself
|
||||
class ModuleScript : public ScriptObject
|
||||
@@ -1387,6 +1402,10 @@ class ScriptMgr
|
||||
void OnBattlegroundUpdate(Battleground* bg, uint32 diff);
|
||||
void OnBattlegroundAddPlayer(Battleground* bg, Player* player);
|
||||
|
||||
public: /* SpellSC */
|
||||
|
||||
void OnCalcMaxDuration(Aura const* aura, int32& maxDuration);
|
||||
|
||||
private:
|
||||
|
||||
uint32 _scriptCount;
|
||||
|
||||
Reference in New Issue
Block a user