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

#include "MiscScript.h"

Inheritance diagram for MiscScript:
ScriptObject

Public Member Functions

bool IsDatabaseBound () const override
 
virtual void OnConstructObject (Object *)
 
virtual void OnDestructObject (Object *)
 
virtual void OnConstructPlayer (Player *)
 
virtual void OnDestructPlayer (Player *)
 
virtual void OnConstructGroup (Group *)
 
virtual void OnDestructGroup (Group *)
 
virtual void OnConstructInstanceSave (InstanceSave *)
 
virtual void OnDestructInstanceSave (InstanceSave *)
 
virtual void OnItemCreate (Item *, ItemTemplate const *, Player const *)
 
virtual bool CanApplySoulboundFlag (Item *, ItemTemplate const *)
 
virtual bool CanItemApplyEquipSpell (Player *, Item *)
 
virtual bool CanSendAuctionHello (WorldSession const *, ObjectGuid, Creature *)
 
virtual void ValidateSpellAtCastSpell (Player *, uint32 &, uint32 &, uint8 &, uint8 &)
 
virtual void ValidateSpellAtCastSpellResult (Player *, Unit *, Spell *, uint32, uint32)
 
virtual void OnAfterLootTemplateProcess (Loot *, LootTemplate const *, LootStore const &, Player *, bool, bool, uint16)
 
virtual void OnPlayerSetPhase (const AuraEffect *, AuraApplication const *, uint8, bool, uint32 &)
 
virtual void OnInstanceSave (InstanceSave *)
 
virtual void GetDialogStatus (Player *, Object *)
 This hook called before get Quest Dialog Status. More...
 
- 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

 MiscScript (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

◆ MiscScript()

MiscScript::MiscScript ( const char *  name,
std::vector< uint16 enabledHooks = std::vector<uint16>() 
)
protected
114{
115 // If empty - enable all available hooks.
116 if (enabledHooks.empty())
117 for (uint16 i = 0; i < MISCHOOK_END; ++i)
118 enabledHooks.emplace_back(i);
119
120 ScriptRegistry<MiscScript>::AddScript(this, std::move(enabledHooks));
121}
std::uint16_t uint16
Definition: Define.h:108
@ MISCHOOK_END
Definition: MiscScript.h:45
static void AddScript(TScript *const script, std::vector< uint16 > enabledHooks={})
Definition: ScriptMgr.h:737
Definition: ScriptObject.h:44

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

Member Function Documentation

◆ CanApplySoulboundFlag()

virtual bool MiscScript::CanApplySoulboundFlag ( Item ,
ItemTemplate const *   
)
inlinevirtual
74{ return true; }

◆ CanItemApplyEquipSpell()

virtual bool MiscScript::CanItemApplyEquipSpell ( Player ,
Item  
)
inlinevirtual
76{ return true; }

◆ CanSendAuctionHello()

virtual bool MiscScript::CanSendAuctionHello ( WorldSession const *  ,
ObjectGuid  ,
Creature  
)
inlinevirtual
78{ return true; }

◆ GetDialogStatus()

virtual void MiscScript::GetDialogStatus ( Player ,
Object  
)
inlinevirtual

This hook called before get Quest Dialog Status.

Parameters
playerContains information about the Player
questgiverContains information about the Object
96{ }

◆ IsDatabaseBound()

bool MiscScript::IsDatabaseBound ( ) const
inlineoverridevirtual

Reimplemented from ScriptObject.

54{ return false; }

◆ OnAfterLootTemplateProcess()

virtual void MiscScript::OnAfterLootTemplateProcess ( Loot ,
LootTemplate const *  ,
LootStore const &  ,
Player ,
bool  ,
bool  ,
uint16   
)
inlinevirtual
84{ }

◆ OnConstructGroup()

virtual void MiscScript::OnConstructGroup ( Group )
inlinevirtual
64{ }

◆ OnConstructInstanceSave()

virtual void MiscScript::OnConstructInstanceSave ( InstanceSave )
inlinevirtual
68{ }

◆ OnConstructObject()

virtual void MiscScript::OnConstructObject ( Object )
inlinevirtual
56{ }

◆ OnConstructPlayer()

virtual void MiscScript::OnConstructPlayer ( Player )
inlinevirtual
60{ }

◆ OnDestructGroup()

virtual void MiscScript::OnDestructGroup ( Group )
inlinevirtual
66{ }

◆ OnDestructInstanceSave()

virtual void MiscScript::OnDestructInstanceSave ( InstanceSave )
inlinevirtual
70{ }

◆ OnDestructObject()

virtual void MiscScript::OnDestructObject ( Object )
inlinevirtual
58{ }

◆ OnDestructPlayer()

virtual void MiscScript::OnDestructPlayer ( Player )
inlinevirtual
62{ }

◆ OnInstanceSave()

virtual void MiscScript::OnInstanceSave ( InstanceSave )
inlinevirtual
88{ }

◆ OnItemCreate()

virtual void MiscScript::OnItemCreate ( Item ,
ItemTemplate const *  ,
Player const *   
)
inlinevirtual
72{ }

◆ OnPlayerSetPhase()

virtual void MiscScript::OnPlayerSetPhase ( const AuraEffect ,
AuraApplication const *  ,
uint8  ,
bool  ,
uint32  
)
inlinevirtual
86{ }

◆ ValidateSpellAtCastSpell()

virtual void MiscScript::ValidateSpellAtCastSpell ( Player ,
uint32 ,
uint32 ,
uint8 ,
uint8  
)
inlinevirtual
80{ }

◆ ValidateSpellAtCastSpellResult()

virtual void MiscScript::ValidateSpellAtCastSpellResult ( Player ,
Unit ,
Spell ,
uint32  ,
uint32   
)
inlinevirtual
82{ }