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

#include "ItemScript.h"

Inheritance diagram for ItemScript:
ScriptObject item_captured_frog item_disgusting_jar item_generic_limit_chance_above_60 item_incendiary_explosives item_mysterious_egg item_only_for_flight item_petrov_cluster_bombs

Public Member Functions

bool IsDatabaseBound () const override
 
virtual bool OnQuestAccept (Player *, Item *, Quest const *)
 
virtual bool OnUse (Player *, Item *, SpellCastTargets const &)
 
virtual bool OnRemove (Player *, Item *)
 
virtual bool OnCastItemCombatSpell (Player *, Unit *, SpellInfo const *, Item *)
 
virtual bool OnExpire (Player *, ItemTemplate const *)
 
virtual void OnGossipSelect (Player *, Item *, uint32, uint32)
 
virtual void OnGossipSelectCode (Player *, Item *, uint32, uint32, const char *)
 
- 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

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

Detailed Description

Constructor & Destructor Documentation

◆ ItemScript()

ItemScript::ItemScript ( const char *  name)
protected
151 :
152 ScriptObject(name)
153{
155}
static void AddScript(TScript *const script, std::vector< uint16 > enabledHooks={})
Definition: ScriptMgr.h:737
Definition: ScriptObject.h:44

References ScriptRegistry< TScript >::AddScript().

Member Function Documentation

◆ IsDatabaseBound()

bool ItemScript::IsDatabaseBound ( ) const
inlineoverridevirtual

Reimplemented from ScriptObject.

29{ return true; }

◆ OnCastItemCombatSpell()

virtual bool ItemScript::OnCastItemCombatSpell ( Player ,
Unit ,
SpellInfo const *  ,
Item  
)
inlinevirtual

Reimplemented in item_generic_limit_chance_above_60.

41{ return true; }

◆ OnExpire()

virtual bool ItemScript::OnExpire ( Player ,
ItemTemplate const *   
)
inlinevirtual

Reimplemented in item_mysterious_egg, and item_disgusting_jar.

44{ return false; }

◆ OnGossipSelect()

virtual void ItemScript::OnGossipSelect ( Player ,
Item ,
uint32  ,
uint32   
)
inlinevirtual
47{ }

◆ OnGossipSelectCode()

virtual void ItemScript::OnGossipSelectCode ( Player ,
Item ,
uint32  ,
uint32  ,
const char *   
)
inlinevirtual
50{ }

◆ OnQuestAccept()

virtual bool ItemScript::OnQuestAccept ( Player ,
Item ,
Quest const *   
)
inlinevirtual
32{ return false; }

◆ OnRemove()

virtual bool ItemScript::OnRemove ( Player ,
Item  
)
inlinevirtual
38{ return false; }

◆ OnUse()

virtual bool ItemScript::OnUse ( Player ,
Item ,
SpellCastTargets const &   
)
inlinevirtual