AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
item_captured_frog Class Reference
Inheritance diagram for item_captured_frog:
ItemScript ScriptObject

Public Member Functions

 item_captured_frog ()
 
bool OnUse (Player *player, Item *item, SpellCastTargets const &) override
 
- Public Member Functions inherited from ItemScript
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 ()
 

Additional Inherited Members

- Protected Member Functions inherited from ItemScript
 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

◆ item_captured_frog()

item_captured_frog::item_captured_frog ( )
inline
176: ItemScript("item_captured_frog") { }
Definition: ItemScript.h:24

Member Function Documentation

◆ OnUse()

bool item_captured_frog::OnUse ( Player player,
Item item,
SpellCastTargets const &   
)
inlineoverridevirtual

Reimplemented from ItemScript.

179 {
181 {
183 return false;
184 else
185 player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, nullptr);
186 }
187 else
188 player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr);
189 return true;
190 }
@ NPC_VANIRAS_SENTRY_TOTEM
Definition: item_scripts.cpp:170
@ QUEST_THE_PERFECT_SPIES
Definition: item_scripts.cpp:169
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:103
@ EQUIP_ERR_OUT_OF_RANGE
Definition: Item.h:72
@ EQUIP_ERR_CANT_DO_RIGHT_NOW
Definition: Item.h:86
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2457
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1429
void SendEquipError(InventoryResult msg, Item *pItem, Item *pItem2=nullptr, uint32 itemid=0)
Definition: PlayerStorage.cpp:4021

References EQUIP_ERR_CANT_DO_RIGHT_NOW, EQUIP_ERR_OUT_OF_RANGE, WorldObject::FindNearestCreature(), Player::GetQuestStatus(), NPC_VANIRAS_SENTRY_TOTEM, QUEST_STATUS_INCOMPLETE, QUEST_THE_PERFECT_SPIES, and Player::SendEquipError().