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

Classes

struct  npc_announcer_toc5AI
 

Public Member Functions

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

Member Function Documentation

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

Reimplemented from CreatureScript.

452  {
453  return GetInstanceAI<npc_announcer_toc5AI>(creature);
454  }
bool npc_announcer_toc5::OnGossipHello ( Player player,
Creature creature 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

457  {
458  InstanceScript* instance = creature->GetInstanceScript();
459 
460  if (instance &&
461  ((instance->GetData(BOSS_GRAND_CHAMPIONS) == DONE &&
462  instance->GetData(BOSS_BLACK_KNIGHT) == DONE &&
463  instance->GetData(BOSS_ARGENT_CHALLENGE_E) == DONE) ||
464  instance->GetData(BOSS_ARGENT_CHALLENGE_P) == DONE))
465  return false;
466 
467  if (instance &&
468  instance->GetData(BOSS_GRAND_CHAMPIONS) == NOT_STARTED &&
471  instance->GetData(BOSS_BLACK_KNIGHT) == NOT_STARTED)
473  else if (instance)
475 
476  player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
477 
478  return true;
479  }
Definition: ScriptedGossip.h:71
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51
Definition: inflate.h:49
#define GOSSIP_START_EVENT2
Definition: trial_of_the_champion.cpp:49
Definition: trial_of_the_champion.h:26
#define GOSSIP_START_EVENT1
Definition: trial_of_the_champion.cpp:48
Definition: trial_of_the_champion.h:27
Definition: trial_of_the_champion.h:28
Definition: InstanceScript.h:58
Definition: ScriptedGossip.h:73
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: trial_of_the_champion.h:29
Definition: GossipDef.h:59
Definition: InstanceScript.h:141

+ Here is the call graph for this function:

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

Reimplemented from CreatureScript.

482  {
483  player->PlayerTalkClass->ClearMenus();
484  if (action == GOSSIP_ACTION_INFO_DEF+1)
485  {
486  player->CLOSE_GOSSIP_MENU();
487  ENSURE_AI(npc_announcer_toc5::npc_announcer_toc5AI, creature->AI())->StartEncounter();
488  }
489 
490  return true;
491  }
Definition: ScriptedGossip.h:71
#define ENSURE_AI(a, b)
Definition: ScriptedCreature.h:29
CreatureAI * AI() const
Definition: Creature.h:525
Definition: trial_of_the_champion.cpp:64

+ Here is the call graph for this function:


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