TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
item_captured_frog Class Reference

Public Member Functions

 item_captured_frog ()
 
bool OnUse (Player *player, Item *item, SpellCastTargets const &) override
 
- Public Member Functions inherited from ItemScript
virtual bool OnDummyEffect (Unit *, uint32, SpellEffIndex, Item *)
 
virtual bool OnQuestAccept (Player *, Item *, Quest const *)
 
virtual bool OnExpire (Player *, ItemTemplate const *)
 
virtual bool OnRemove (Player *, Item *)
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 

Additional Inherited Members

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

Constructor & Destructor Documentation

item_captured_frog::item_captured_frog ( )
inline
396 : ItemScript("item_captured_frog") { }
ItemScript(const char *name)
Definition: ScriptMgr.cpp:1580

Member Function Documentation

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

Reimplemented from ItemScript.

399  {
400  if (player->GetQuestStatus(QUEST_THE_PERFECT_SPIES) == QUEST_STATUS_INCOMPLETE)
401  {
402  if (player->FindNearestCreature(NPC_VANIRAS_SENTRY_TOTEM, 10.0f))
403  return false;
404  else
405  player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, NULL);
406  }
407  else
408  player->SendEquipError(EQUIP_ERR_CLIENT_LOCKED_OUT, item, NULL);
409  return true;
410  }
Definition: item_scripts.cpp:390
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: Item.h:73
Definition: item_scripts.cpp:389
Definition: Item.h:87
Definition: QuestDef.h:113

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