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

Public Member Functions

 npcs_flanis_swiftwing_and_kagrosh ()
 
bool OnGossipSelect (Player *player, 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

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

Member Function Documentation

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

Reimplemented from CreatureScript.

639  {
640  if (player->GetQuestStatus(10583) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30658, 1, true))
641  player->ADD_GOSSIP_ITEM(0, GOSSIP_HSK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
642  if (player->GetQuestStatus(10601) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30659, 1, true))
643  player->ADD_GOSSIP_ITEM(0, GOSSIP_HSK2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
644 
645  player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
646 
647  return true;
648  }
Definition: ScriptedGossip.h:71
#define GOSSIP_HSK2
Definition: zone_shadowmoon_valley.cpp:605
#define GOSSIP_HSK1
Definition: zone_shadowmoon_valley.cpp:604
Definition: ScriptedGossip.h:73
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: QuestDef.h:113

+ Here is the call graph for this function:

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

Reimplemented from CreatureScript.

613  {
614  player->PlayerTalkClass->ClearMenus();
615  if (action == GOSSIP_ACTION_INFO_DEF+1)
616  {
617  ItemPosCountVec dest;
618  uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 30658, 1, NULL);
619  if (msg == EQUIP_ERR_OK)
620  {
621  player->StoreNewItem(dest, 30658, true);
622  player->PlayerTalkClass->ClearMenus();
623  }
624  }
625  if (action == GOSSIP_ACTION_INFO_DEF+2)
626  {
627  ItemPosCountVec dest;
628  uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 30659, 1, NULL);
629  if (msg == EQUIP_ERR_OK)
630  {
631  player->StoreNewItem(dest, 30659, true);
632  player->PlayerTalkClass->ClearMenus();
633  }
634  }
635  return true;
636  }
Definition: Unit.h:379
Definition: ScriptedGossip.h:71
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: Item.h:48
Definition: Unit.h:378
uint8_t uint8
Definition: Define.h:152

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