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

Public Member Functions

 item_nether_wraith_beacon ()
 
bool OnUse (Player *player, 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_nether_wraith_beacon::item_nether_wraith_beacon ( )
inline
91 : ItemScript("item_nether_wraith_beacon") { }
ItemScript(const char *name)
Definition: ScriptMgr.cpp:1580

Member Function Documentation

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

Reimplemented from ItemScript.

94  {
95  if (player->GetQuestStatus(10832) == QUEST_STATUS_INCOMPLETE)
96  {
97  if (Creature* nether = player->SummonCreature(22408, player->GetPositionX(), player->GetPositionY()+20, player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
98  nether->AI()->AttackStart(player);
99 
100  if (Creature* nether = player->SummonCreature(22408, player->GetPositionX(), player->GetPositionY()-20, player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
101  nether->AI()->AttackStart(player);
102  }
103  return false;
104  }
Definition: Creature.h:467
Definition: Object.h:56
Definition: QuestDef.h:113
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346

+ Here is the call graph for this function:


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