AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
GlobalScript Class Reference

#include "GlobalScript.h"

Inheritance diagram for GlobalScript:
ScriptObject

Public Member Functions

virtual void OnItemDelFromDB (CharacterDatabaseTransaction, ObjectGuid::LowType)
 
virtual void OnMirrorImageDisplayItem (Item const *, uint32 &)
 
virtual void OnAfterRefCount (Player const *, LootStoreItem *, Loot &, bool, uint16, uint32 &, LootStore const &)
 
virtual void OnAfterCalculateLootGroupAmount (Player const *, Loot &, uint16, uint32 &, LootStore const &)
 
virtual void OnBeforeDropAddItem (Player const *, Loot &, bool, uint16, LootStoreItem *, LootStore const &)
 
virtual bool OnItemRoll (Player const *, LootStoreItem const *, float &, Loot &, LootStore const &)
 
virtual bool OnBeforeLootEqualChanced (Player const *, std::list< LootStoreItem * >, Loot &, LootStore const &)
 
virtual void OnInitializeLockedDungeons (Player *, uint8 &, uint32 &, lfg::LFGDungeonData const *)
 
virtual void OnAfterInitializeLockedDungeons (Player *)
 
virtual void OnBeforeUpdateArenaPoints (ArenaTeam *, std::map< ObjectGuid, uint32 > &)
 
virtual void OnAfterUpdateEncounterState (Map *, EncounterCreditType, uint32, Unit *, Difficulty, std::list< DungeonEncounter const * > const *, uint32, bool)
 
virtual void OnBeforeWorldObjectSetPhaseMask (WorldObject const *, uint32 &, uint32 &, bool &, bool &)
 
virtual bool OnIsAffectedBySpellModCheck (SpellInfo const *, SpellInfo const *, SpellModifier const *)
 
virtual bool OnSpellHealingBonusTakenNegativeModifiers (Unit const *, Unit const *, SpellInfo const *, float &)
 
virtual void OnLoadSpellCustomAttr (SpellInfo *)
 
virtual bool OnAllowedForPlayerLootCheck (Player const *, ObjectGuid)
 
virtual bool OnAllowedToLootContainerCheck (Player const *, ObjectGuid)
 
virtual void OnInstanceIdRemoved (uint32)
 
virtual void OnBeforeSetBossState (uint32, EncounterState, EncounterState, Map *)
 
virtual void AfterInstanceGameObjectCreate (Map *, GameObject *)
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
uint16 GetTotalAvailableHooks ()
 

Protected Member Functions

 GlobalScript (const char *name, std::vector< uint16 > enabledHooks=std::vector< uint16 >())
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ GlobalScript()

GlobalScript::GlobalScript ( const char *  name,
std::vector< uint16 enabledHooks = std::vector<uint16>() 
)
protected
149{
150 // If empty - enable all available hooks.
151 if (enabledHooks.empty())
152 for (uint16 i = 0; i < GLOBALHOOK_END; ++i)
153 enabledHooks.emplace_back(i);
154
155 ScriptRegistry<GlobalScript>::AddScript(this, std::move(enabledHooks));
156}
std::uint16_t uint16
Definition: Define.h:108
@ GLOBALHOOK_END
Definition: GlobalScript.h:49
static void AddScript(TScript *const script, std::vector< uint16 > enabledHooks={})
Definition: ScriptMgr.h:737
Definition: ScriptObject.h:44

References ScriptRegistry< TScript >::AddScript(), and GLOBALHOOK_END.

Member Function Documentation

◆ AfterInstanceGameObjectCreate()

virtual void GlobalScript::AfterInstanceGameObjectCreate ( Map ,
GameObject  
)
inlinevirtual
103{ }

◆ OnAfterCalculateLootGroupAmount()

virtual void GlobalScript::OnAfterCalculateLootGroupAmount ( Player const *  ,
Loot ,
uint16  ,
uint32 ,
LootStore const &   
)
inlinevirtual
65{ }

◆ OnAfterInitializeLockedDungeons()

virtual void GlobalScript::OnAfterInitializeLockedDungeons ( Player )
inlinevirtual
70{ }

◆ OnAfterRefCount()

virtual void GlobalScript::OnAfterRefCount ( Player const *  ,
LootStoreItem ,
Loot ,
bool  ,
uint16  ,
uint32 ,
LootStore const &   
)
inlinevirtual
64{ }

◆ OnAfterUpdateEncounterState()

virtual void GlobalScript::OnAfterUpdateEncounterState ( Map ,
EncounterCreditType  ,
uint32  ,
Unit ,
Difficulty  ,
std::list< DungeonEncounter const * > const *  ,
uint32  ,
bool   
)
inlinevirtual
76{ }

◆ OnAllowedForPlayerLootCheck()

virtual bool GlobalScript::OnAllowedForPlayerLootCheck ( Player const *  ,
ObjectGuid   
)
inlinevirtual
91{ return false; };

◆ OnAllowedToLootContainerCheck()

virtual bool GlobalScript::OnAllowedToLootContainerCheck ( Player const *  ,
ObjectGuid   
)
inlinevirtual
94{ return false; };

◆ OnBeforeDropAddItem()

virtual void GlobalScript::OnBeforeDropAddItem ( Player const *  ,
Loot ,
bool  ,
uint16  ,
LootStoreItem ,
LootStore const &   
)
inlinevirtual
66{ }

◆ OnBeforeLootEqualChanced()

virtual bool GlobalScript::OnBeforeLootEqualChanced ( Player const *  ,
std::list< LootStoreItem * >  ,
Loot ,
LootStore const &   
)
inlinevirtual
68{ return true; }

◆ OnBeforeSetBossState()

virtual void GlobalScript::OnBeforeSetBossState ( uint32  ,
EncounterState  ,
EncounterState  ,
Map  
)
inlinevirtual
100{ }

◆ OnBeforeUpdateArenaPoints()

virtual void GlobalScript::OnBeforeUpdateArenaPoints ( ArenaTeam ,
std::map< ObjectGuid, uint32 > &   
)
inlinevirtual
73{ }

◆ OnBeforeWorldObjectSetPhaseMask()

virtual void GlobalScript::OnBeforeWorldObjectSetPhaseMask ( WorldObject const *  ,
uint32 ,
uint32 ,
bool &  ,
bool &   
)
inlinevirtual
79{ }

◆ OnInitializeLockedDungeons()

virtual void GlobalScript::OnInitializeLockedDungeons ( Player ,
uint8 ,
uint32 ,
lfg::LFGDungeonData const *   
)
inlinevirtual
69{ }

◆ OnInstanceIdRemoved()

virtual void GlobalScript::OnInstanceIdRemoved ( uint32  )
inlinevirtual
97{ }

◆ OnIsAffectedBySpellModCheck()

virtual bool GlobalScript::OnIsAffectedBySpellModCheck ( SpellInfo const *  ,
SpellInfo const *  ,
SpellModifier const *   
)
inlinevirtual
82{ return true; };

◆ OnItemDelFromDB()

virtual void GlobalScript::OnItemDelFromDB ( CharacterDatabaseTransaction  ,
ObjectGuid::LowType   
)
inlinevirtual
60{ }

◆ OnItemRoll()

virtual bool GlobalScript::OnItemRoll ( Player const *  ,
LootStoreItem const *  ,
float &  ,
Loot ,
LootStore const &   
)
inlinevirtual
67{ return true; };

◆ OnLoadSpellCustomAttr()

virtual void GlobalScript::OnLoadSpellCustomAttr ( SpellInfo )
inlinevirtual
88{ }

◆ OnMirrorImageDisplayItem()

virtual void GlobalScript::OnMirrorImageDisplayItem ( Item const *  ,
uint32  
)
inlinevirtual
61{ }

◆ OnSpellHealingBonusTakenNegativeModifiers()

virtual bool GlobalScript::OnSpellHealingBonusTakenNegativeModifiers ( Unit const *  ,
Unit const *  ,
SpellInfo const *  ,
float &   
)
inlinevirtual
85{ return false; };