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

#include "AllCreatureScript.h"

Inheritance diagram for AllCreatureScript:
ScriptObject

Public Member Functions

virtual void OnAllCreatureUpdate (Creature *, uint32)
 
virtual void OnBeforeCreatureSelectLevel (const CreatureTemplate *, Creature *, uint8 &)
 
virtual void Creature_SelectLevel (const CreatureTemplate *, Creature *)
 
virtual void OnCreatureAddWorld (Creature *)
 This hook runs after add creature in world. More...
 
virtual void OnCreatureRemoveWorld (Creature *)
 This hook runs after remove creature in world. More...
 
virtual void OnCreatureSaveToDB (Creature *)
 This hook runs after creature has been saved to DB. More...
 
virtual bool CanCreatureGossipHello (Player *, Creature *)
 This hook called when a player opens a gossip dialog with the creature. More...
 
virtual bool CanCreatureGossipSelect (Player *, Creature *, uint32, uint32)
 This hook called when a player selects a gossip item in the creature's gossip menu. More...
 
virtual bool CanCreatureGossipSelectCode (Player *, Creature *, uint32, uint32, const char *)
 This hook called when a player selects a gossip with a code in the creature's gossip menu. More...
 
virtual bool CanCreatureQuestAccept (Player *, Creature *, Quest const *)
 
virtual bool CanCreatureQuestReward (Player *, Creature *, Quest const *, uint32)
 
virtual CreatureAIGetCreatureAI (Creature *) const
 
virtual void OnFfaPvpStateUpdate (Creature *, bool)
 
- 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

 AllCreatureScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ AllCreatureScript()

AllCreatureScript::AllCreatureScript ( const char *  name)
protected
81 :
82 ScriptObject(name)
83{
85}
static void AddScript(TScript *const script, std::vector< uint16 > enabledHooks={})
Definition: ScriptMgr.h:738
Definition: ScriptObject.h:43

References ScriptRegistry< TScript >::AddScript().

Member Function Documentation

◆ CanCreatureGossipHello()

virtual bool AllCreatureScript::CanCreatureGossipHello ( Player ,
Creature  
)
inlinevirtual

This hook called when a player opens a gossip dialog with the creature.

Parameters
playerContains information about the Player
creatureContains information about the Creature
Returns
False if you want to continue, true if you want to disable
67{ return false; }

Referenced by ScriptMgr::OnGossipHello().

◆ CanCreatureGossipSelect()

virtual bool AllCreatureScript::CanCreatureGossipSelect ( Player ,
Creature ,
uint32  ,
uint32   
)
inlinevirtual

This hook called when a player selects a gossip item in the creature's gossip menu.

Parameters
playerContains information about the Player
creatureContains information about the Creature
senderContains information about the sender type
actionContains information about the action id
Returns
False if you want to continue, true if you want to disable
79{ return false; }

Referenced by ScriptMgr::OnGossipSelect().

◆ CanCreatureGossipSelectCode()

virtual bool AllCreatureScript::CanCreatureGossipSelectCode ( Player ,
Creature ,
uint32  ,
uint32  ,
const char *   
)
inlinevirtual

This hook called when a player selects a gossip with a code in the creature's gossip menu.

Parameters
playerContains information about the Player
creatureContains information about the Creature
senderContains information about the sender type
actionContains information about the action id
codeContains information about the code entered
Returns
True if you want to continue, false if you want to disable
92{ return false; }

Referenced by ScriptMgr::OnGossipSelectCode().

◆ CanCreatureQuestAccept()

virtual bool AllCreatureScript::CanCreatureQuestAccept ( Player ,
Creature ,
Quest const *   
)
inlinevirtual
95{ return false; }

Referenced by ScriptMgr::OnQuestAccept().

◆ CanCreatureQuestReward()

virtual bool AllCreatureScript::CanCreatureQuestReward ( Player ,
Creature ,
Quest const *  ,
uint32   
)
inlinevirtual
98{ return false; }

Referenced by ScriptMgr::OnQuestReward().

◆ Creature_SelectLevel()

virtual void AllCreatureScript::Creature_SelectLevel ( const CreatureTemplate ,
Creature  
)
inlinevirtual
36{ }

Referenced by ScriptMgr::Creature_SelectLevel().

◆ GetCreatureAI()

virtual CreatureAI * AllCreatureScript::GetCreatureAI ( Creature ) const
inlinevirtual
101{ return nullptr; }

Referenced by ScriptMgr::GetCreatureAI().

◆ OnAllCreatureUpdate()

virtual void AllCreatureScript::OnAllCreatureUpdate ( Creature ,
uint32   
)
inlinevirtual
30{ }

Referenced by ScriptMgr::OnCreatureUpdate().

◆ OnBeforeCreatureSelectLevel()

virtual void AllCreatureScript::OnBeforeCreatureSelectLevel ( const CreatureTemplate ,
Creature ,
uint8  
)
inlinevirtual

◆ OnCreatureAddWorld()

virtual void AllCreatureScript::OnCreatureAddWorld ( Creature )
inlinevirtual

This hook runs after add creature in world.

Parameters
creatureContains information about the Creature
43{ }

Referenced by ScriptMgr::OnCreatureAddWorld().

◆ OnCreatureRemoveWorld()

virtual void AllCreatureScript::OnCreatureRemoveWorld ( Creature )
inlinevirtual

This hook runs after remove creature in world.

Parameters
creatureContains information about the Creature
50{ }

Referenced by ScriptMgr::OnCreatureRemoveWorld().

◆ OnCreatureSaveToDB()

virtual void AllCreatureScript::OnCreatureSaveToDB ( Creature )
inlinevirtual

This hook runs after creature has been saved to DB.

Parameters
creatureContains information about the Creature
57{ }

Referenced by ScriptMgr::OnCreatureSaveToDB().

◆ OnFfaPvpStateUpdate()

virtual void AllCreatureScript::OnFfaPvpStateUpdate ( Creature ,
bool   
)
inlinevirtual
104{}

Referenced by ScriptMgr::OnFfaPvpStateUpdate().