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

Public Member Functions

 npc_pet_trainer ()
 
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 *)
 
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_pet_trainer::npc_pet_trainer ( )
inline
1704 : CreatureScript("npc_pet_trainer") { }
CreatureScript(const char *name)
Definition: ScriptMgr.cpp:1586

Member Function Documentation

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

Reimplemented from CreatureScript.

1707  {
1708  if (creature->IsQuestGiver())
1709  player->PrepareQuestMenu(creature->GetGUID());
1710 
1711  if (player->getClass() == CLASS_HUNTER)
1712  {
1714  if (player->GetPet() && player->GetPet()->getPetType() == HUNTER_PET)
1716 
1717  player->PlayerTalkClass->SendGossipMenu(TEXT_ISHUNTER, creature->GetGUID());
1718  return true;
1719  }
1720  player->PlayerTalkClass->SendGossipMenu(TEXT_NOTHUNTER, creature->GetGUID());
1721  return true;
1722  }
Definition: ScriptedGossip.h:71
Definition: npcs_special.cpp:1691
Definition: PetDefines.h:25
bool IsQuestGiver() const
Definition: Unit.h:1566
#define GOSSIP_PET1
Definition: npcs_special.cpp:1697
Definition: npcs_special.cpp:1692
Definition: ScriptedGossip.h:73
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: GossipDef.h:59
Definition: SharedDefines.h:169
#define GOSSIP_PET2
Definition: npcs_special.cpp:1698

+ Here is the call graph for this function:

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

Reimplemented from CreatureScript.

1725  {
1726  player->PlayerTalkClass->ClearMenus();
1727  switch (action)
1728  {
1729  case GOSSIP_ACTION_INFO_DEF + 1:
1730  player->PlayerTalkClass->SendGossipMenu(TEXT_PETINFO, creature->GetGUID());
1731  break;
1732  case GOSSIP_ACTION_INFO_DEF + 2:
1733  {
1735  player->PlayerTalkClass->SendGossipMenu(TEXT_CONFIRM, creature->GetGUID());
1736  }
1737  break;
1738  case GOSSIP_ACTION_INFO_DEF + 3:
1739  {
1740  player->ResetPetTalents();
1741  player->CLOSE_GOSSIP_MENU();
1742  }
1743  break;
1744  }
1745  return true;
1746  }
Definition: ScriptedGossip.h:71
Definition: npcs_special.cpp:1693
#define GOSSIP_PET_CONFIRM
Definition: npcs_special.cpp:1699
Definition: ScriptedGossip.h:73
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: npcs_special.cpp:1694
Definition: GossipDef.h:59

+ Here is the call graph for this function:


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