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

Public Member Functions

 item_trident_of_nazjan ()
 
bool OnUse (Player *player, Item *item, const SpellCastTargets &) 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_trident_of_nazjan::item_trident_of_nazjan ( )
inline
369 : ItemScript("item_Trident_of_Nazjan") { }
ItemScript(const char *name)
Definition: ScriptMgr.cpp:1580

Member Function Documentation

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

Reimplemented from ItemScript.

372  {
373  if (player->GetQuestStatus(QUEST_THE_EMISSARY) == QUEST_STATUS_INCOMPLETE)
374  {
375  if (Creature* pLeviroth = player->FindNearestCreature(NPC_LEVIROTH, 10.0f)) // spell range
376  {
377  pLeviroth->AI()->AttackStart(player);
378  return false;
379  } else
380  player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, NULL);
381  } else
382  player->SendEquipError(EQUIP_ERR_CLIENT_LOCKED_OUT, item, NULL);
383  return true;
384  }
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: Creature.h:467
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2443
Definition: Item.h:73
Definition: item_scripts.cpp:363
Definition: item_scripts.cpp:362
Definition: Item.h:87
Definition: QuestDef.h:113

+ Here is the call graph for this function:


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