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

Classes

struct  npc_sergeant_blyAI
 

Public Member Functions

 npc_sergeant_bly ()
 
bool OnGossipSelect (Player *player, Creature *creature, uint32, uint32 action) override
 
bool OnGossipHello (Player *player, Creature *creature) override
 
CreatureAIGetAI (Creature *creature) const 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 *)
 
- 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_sergeant_bly::npc_sergeant_bly ( )
inline
65 : CreatureScript("npc_sergeant_bly") { }
CreatureScript(const char *name)
Definition: ScriptMgr.cpp:1586

Member Function Documentation

CreatureAI* npc_sergeant_bly::GetAI ( Creature creature) const
inlineoverridevirtual

Reimplemented from CreatureScript.

99  {
100  return GetInstanceAI<npc_sergeant_blyAI>(creature);
101  }
bool npc_sergeant_bly::OnGossipHello ( Player player,
Creature creature 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

80  {
81  if (InstanceScript* instance = creature->GetInstanceScript())
82  {
83  if (instance->GetData(EVENT_PYRAMID) == PYRAMID_KILLED_ALL_TROLLS)
84  {
86  player->SEND_GOSSIP_MENU(1517, creature->GetGUID());
87  }
88  else
89  if (instance->GetData(EVENT_PYRAMID) == PYRAMID_NOT_STARTED)
90  player->SEND_GOSSIP_MENU(1515, creature->GetGUID());
91  else
92  player->SEND_GOSSIP_MENU(1516, creature->GetGUID());
93  return true;
94  }
95  return false;
96  }
Definition: ScriptedGossip.h:71
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
Definition: zulfarrak.h:54
Definition: zulfarrak.h:35
Definition: ScriptedGossip.h:73
ObjectGuid const & GetGUID() const
Definition: Object.h:105
#define GOSSIP_BLY
Definition: zulfarrak.cpp:60
Definition: GossipDef.h:59
Definition: InstanceScript.h:141
Definition: zulfarrak.h:46

+ Here is the call graph for this function:

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

Reimplemented from CreatureScript.

68  {
69  player->PlayerTalkClass->ClearMenus();
70  if (action == GOSSIP_ACTION_INFO_DEF+1)
71  {
72  player->CLOSE_GOSSIP_MENU();
73  ENSURE_AI(npc_sergeant_bly::npc_sergeant_blyAI, creature->AI())->PlayerGUID = player->GetGUID();
74  creature->AI()->DoAction(0);
75  }
76  return true;
77  }
Definition: ScriptedGossip.h:71
#define ENSURE_AI(a, b)
Definition: ScriptedCreature.h:29
CreatureAI * AI() const
Definition: Creature.h:525
virtual void DoAction(int32)
Definition: UnitAI.h:138
Definition: zulfarrak.cpp:103

+ Here is the call graph for this function:


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