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

Public Member Functions

 npc_erozion ()
 
bool OnGossipSelect (Player *player, Creature *creature, uint32, uint32 action) override
 
bool OnGossipHello (Player *player, Creature *creature) override
 
- Public Member Functions inherited from CreatureScript
virtual bool OnDummyEffect (Unit *, uint32, SpellEffIndex, Creature *)
 
virtual bool OnGossipSelectCode (Player *, Creature *, uint32, uint32, const char *)
 
virtual bool OnQuestAccept (Player *, Creature *, Quest const *)
 
virtual bool OnQuestSelect (Player *, Creature *, Quest const *)
 
virtual bool OnQuestReward (Player *, Creature *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, Creature *)
 
virtual CreatureAIGetAI (Creature *) const
 
- Public Member Functions inherited from UnitScript
virtual void OnHeal (Unit *, Unit *, uint32 &)
 
virtual void OnDamage (Unit *, Unit *, uint32 &)
 
virtual void ModifyPeriodicDamageAurasTick (Unit *, Unit *, uint32 &)
 
virtual void ModifyMeleeDamage (Unit *, Unit *, uint32 &)
 
virtual void ModifySpellDamageTaken (Unit *, Unit *, int32 &)
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 
- Public Member Functions inherited from UpdatableScript< Creature >
virtual void OnUpdate (Creature *, uint32)
 

Additional Inherited Members

- Protected Member Functions inherited from CreatureScript
 CreatureScript (const char *name)
 
- Protected Member Functions inherited from UnitScript
 UnitScript (const char *name, bool addToScripts=true)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()
 
- Protected Member Functions inherited from UpdatableScript< Creature >
 UpdatableScript ()
 
virtual ~UpdatableScript ()
 

Constructor & Destructor Documentation

npc_erozion::npc_erozion ( )
inline
57 : CreatureScript("npc_erozion") { }
CreatureScript(const char *name)
Definition: ScriptMgr.cpp:1586

Member Function Documentation

bool npc_erozion::OnGossipHello ( Player player,
Creature creature 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

80  {
81  if (creature->IsQuestGiver())
82  player->PrepareQuestMenu(creature->GetGUID());
83 
84  InstanceScript* instance = creature->GetInstanceScript();
85  if (instance->GetData(TYPE_BARREL_DIVERSION) != DONE && !player->HasItemCount(ITEM_ENTRY_BOMBS))
87 
88  if (player->GetQuestStatus(QUEST_ENTRY_RETURN) == QUEST_STATUS_COMPLETE)
90 
91  player->SEND_GOSSIP_MENU(9778, creature->GetGUID());
92 
93  return true;
94  }
Definition: QuestDef.h:111
Definition: ScriptedGossip.h:71
#define GOSSIP_HELLO_EROZION2
Definition: old_hillsbrad.cpp:48
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51
Definition: inflate.h:49
bool IsQuestGiver() const
Definition: Unit.h:1566
#define GOSSIP_HELLO_EROZION1
Definition: old_hillsbrad.cpp:47
Definition: old_hillsbrad.cpp:44
Definition: old_hillsbrad.cpp:45
Definition: ScriptedGossip.h:73
Definition: old_hillsbrad.h:26
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: GossipDef.h:59
Definition: InstanceScript.h:141

+ Here is the call graph for this function:

bool npc_erozion::OnGossipSelect ( Player player,
Creature creature,
uint32  ,
uint32  action 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

60  {
61  player->PlayerTalkClass->ClearMenus();
62  if (action == GOSSIP_ACTION_INFO_DEF+1)
63  {
64  ItemPosCountVec dest;
65  uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_ENTRY_BOMBS, 1);
66  if (msg == EQUIP_ERR_OK)
67  {
68  player->StoreNewItem(dest, ITEM_ENTRY_BOMBS, true);
69  }
70  player->SEND_GOSSIP_MENU(9515, creature->GetGUID());
71  }
72  if (action == GOSSIP_ACTION_INFO_DEF+2)
73  {
74  player->CLOSE_GOSSIP_MENU();
75  }
76  return true;
77  }
Definition: Unit.h:379
Definition: ScriptedGossip.h:71
Definition: Item.h:48
Definition: Unit.h:378
Definition: old_hillsbrad.cpp:45
ObjectGuid const & GetGUID() const
Definition: Object.h:105
uint8_t uint8
Definition: Define.h:152

+ Here is the call graph for this function:


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