TrinityCore
ItemScript Class Reference

#include <ScriptMgr.h>

+ Inheritance diagram for ItemScript:

Public Member Functions

 ~ItemScript ()
 
virtual bool OnQuestAccept (Player *player, Item *item, Quest const *quest)
 
virtual bool OnUse (Player *player, Item *item, SpellCastTargets const &targets, ObjectGuid castId)
 
virtual bool OnExpire (Player *player, ItemTemplate const *proto)
 
virtual bool OnRemove (Player *player, Item *item)
 
virtual bool OnCastItemCombatSpell (Player *player, Unit *victim, SpellInfo const *spellInfo, Item *item)
 
- Public Member Functions inherited from ScriptObject
 ScriptObject (ScriptObject const &right)=delete
 
 ScriptObject (ScriptObject &&right)=delete
 
ScriptObjectoperator= (ScriptObject const &right)=delete
 
ScriptObjectoperator= (ScriptObject &&right)=delete
 
std::string const & GetName () const
 

Protected Member Functions

 ItemScript (char const *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (char const *name)
 
virtual ~ScriptObject ()
 

Detailed Description

Definition at line 377 of file ScriptMgr.h.

Constructor & Destructor Documentation

◆ ItemScript()

ItemScript::ItemScript ( char const *  name)
explicitprotected

Definition at line 2585 of file ScriptMgr.cpp.

+ Here is the call graph for this function:

◆ ~ItemScript()

ItemScript::~ItemScript ( )
default

Member Function Documentation

◆ OnCastItemCombatSpell()

bool ItemScript::OnCastItemCombatSpell ( Player player,
Unit victim,
SpellInfo const *  spellInfo,
Item item 
)
virtual

Reimplemented in item_generic_limit_chance_above_60.

Definition at line 2613 of file ScriptMgr.cpp.

◆ OnExpire()

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

Reimplemented in item_mysterious_egg, and item_disgusting_jar.

Definition at line 2603 of file ScriptMgr.cpp.

◆ OnQuestAccept()

bool ItemScript::OnQuestAccept ( Player player,
Item item,
Quest const *  quest 
)
virtual

Definition at line 2593 of file ScriptMgr.cpp.

◆ OnRemove()

bool ItemScript::OnRemove ( Player player,
Item item 
)
virtual

Definition at line 2608 of file ScriptMgr.cpp.

◆ OnUse()

bool ItemScript::OnUse ( Player player,
Item item,
SpellCastTargets const &  targets,
ObjectGuid  castId 
)
virtual

The documentation for this class was generated from the following files: