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

Public Member Functions

 npc_locksmith ()
 
bool OnGossipHello (Player *player, Creature *creature) override
 
bool OnGossipSelect (Player *player, 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_locksmith::npc_locksmith ( )
inline
1799 : CreatureScript("npc_locksmith") { }
CreatureScript(const char *name)
Definition: ScriptMgr.cpp:1586

Member Function Documentation

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

Reimplemented from CreatureScript.

1802  {
1803  // Arcatraz Key
1804  if (player->GetQuestRewardStatus(QUEST_HOW_TO_BRAKE_IN_TO_THE_ARCATRAZ) && !player->HasItemCount(ITEM_ARCATRAZ_KEY, 1, true))
1806 
1807  // Shadowforge Key
1808  if (player->GetQuestRewardStatus(QUEST_DARK_IRON_LEGACY) && !player->HasItemCount(ITEM_SHADOWFORGE_KEY, 1, true))
1810 
1811  // Skeleton Key
1812  if ((player->GetQuestRewardStatus(QUEST_THE_KEY_TO_SCHOLOMANCE_A) || player->GetQuestRewardStatus(QUEST_THE_KEY_TO_SCHOLOMANCE_H)) &&
1813  !player->HasItemCount(ITEM_SKELETON_KEY, 1, true))
1815 
1816  // Shatered Halls Key
1817  if ((player->GetQuestRewardStatus(QUEST_HOTTER_THAN_HELL_A) || player->GetQuestRewardStatus(QUEST_HOTTER_THAN_HELL_H)) &&
1818  !player->HasItemCount(ITEM_SHATTERED_HALLS_KEY, 1, true))
1820 
1821  // Master's Key
1822  if (player->GetQuestRewardStatus(QUEST_RETURN_TO_KHAGDAR) && !player->HasItemCount(ITEM_THE_MASTERS_KEY, 1, true))
1824 
1825  // Violet Hold Key
1826  if (player->GetQuestRewardStatus(QUEST_CONTAINMENT) && !player->HasItemCount(ITEM_VIOLET_HOLD_KEY, 1, true))
1828 
1829  // Essence-Infused Moonstone
1830  if (player->GetQuestRewardStatus(QUEST_ETERNAL_VIGILANCE) && !player->HasItemCount(ITEM_ESSENCE_INFUSED_MOONSTONE, 1, true))
1832 
1833  // Key to the Focusing Iris
1834  if (player->GetQuestRewardStatus(QUEST_KEY_TO_THE_FOCUSING_IRIS) && !player->HasItemCount(ITEM_KEY_TO_THE_FOCUSING_IRIS, 1, true))
1836 
1837  // Heroic Key to the Focusing Iris
1838  if (player->GetQuestRewardStatus(QUEST_HC_KEY_TO_THE_FOCUSING_IRIS) && !player->HasItemCount(ITEM_HC_KEY_TO_THE_FOCUSING_IRIS, 1, true))
1840 
1841  player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
1842 
1843  return true;
1844  }
Definition: npcs_special.cpp:1759
Definition: npcs_special.cpp:1772
#define GOSSIP_LOST_ARCATRAZ_KEY
Definition: npcs_special.cpp:1786
Definition: ScriptedGossip.h:71
Definition: npcs_special.cpp:1755
#define GOSSIP_LOST_SHATTERED_HALLS_KEY
Definition: npcs_special.cpp:1789
Definition: npcs_special.cpp:1763
#define GOSSIP_LOST_VIOLET_HOLD_KEY
Definition: npcs_special.cpp:1791
#define GOSSIP_LOST_HC_KEY_TO_THE_FOCUSING_IRIS
Definition: npcs_special.cpp:1794
Definition: npcs_special.cpp:1770
Definition: npcs_special.cpp:1774
Definition: npcs_special.cpp:1765
Definition: npcs_special.cpp:1775
#define GOSSIP_LOST_ESSENCE_INFUSED_MOONSTONE
Definition: npcs_special.cpp:1792
Definition: npcs_special.cpp:1756
Definition: npcs_special.cpp:1768
Definition: npcs_special.cpp:1764
Definition: npcs_special.cpp:1773
Definition: npcs_special.cpp:1757
#define GOSSIP_LOST_SHADOWFORGE_KEY
Definition: npcs_special.cpp:1787
Definition: npcs_special.cpp:1771
#define GOSSIP_LOST_THE_MASTERS_KEY
Definition: npcs_special.cpp:1790
Definition: ScriptedGossip.h:73
Definition: npcs_special.cpp:1769
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: npcs_special.cpp:1760
#define GOSSIP_LOST_KEY_TO_THE_FOCUSING_IRIS
Definition: npcs_special.cpp:1793
Definition: GossipDef.h:59
Definition: npcs_special.cpp:1758
Definition: npcs_special.cpp:1767
#define GOSSIP_LOST_SKELETON_KEY
Definition: npcs_special.cpp:1788
Definition: npcs_special.cpp:1761
Definition: npcs_special.cpp:1762

+ Here is the call graph for this function:

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

Reimplemented from CreatureScript.

1847  {
1848  player->PlayerTalkClass->ClearMenus();
1849  switch (action)
1850  {
1851  case GOSSIP_ACTION_INFO_DEF + 1:
1852  player->CLOSE_GOSSIP_MENU();
1853  player->CastSpell(player, SPELL_ARCATRAZ_KEY, false);
1854  break;
1855  case GOSSIP_ACTION_INFO_DEF + 2:
1856  player->CLOSE_GOSSIP_MENU();
1857  player->CastSpell(player, SPELL_SHADOWFORGE_KEY, false);
1858  break;
1859  case GOSSIP_ACTION_INFO_DEF + 3:
1860  player->CLOSE_GOSSIP_MENU();
1861  player->CastSpell(player, SPELL_SKELETON_KEY, false);
1862  break;
1863  case GOSSIP_ACTION_INFO_DEF + 4:
1864  player->CLOSE_GOSSIP_MENU();
1865  player->CastSpell(player, SPELL_SHATTERED_HALLS_KEY, false);
1866  break;
1867  case GOSSIP_ACTION_INFO_DEF + 5:
1868  player->CLOSE_GOSSIP_MENU();
1869  player->CastSpell(player, SPELL_THE_MASTERS_KEY, false);
1870  break;
1871  case GOSSIP_ACTION_INFO_DEF + 6:
1872  player->CLOSE_GOSSIP_MENU();
1873  player->CastSpell(player, SPELL_VIOLET_HOLD_KEY, false);
1874  break;
1875  case GOSSIP_ACTION_INFO_DEF + 7:
1876  player->CLOSE_GOSSIP_MENU();
1877  player->CastSpell(player, SPELL_ESSENCE_INFUSED_MOONSTONE, false);
1878  break;
1879  case GOSSIP_ACTION_INFO_DEF + 8:
1880  player->CLOSE_GOSSIP_MENU();
1881  player->AddItem(ITEM_KEY_TO_THE_FOCUSING_IRIS, 1);
1882  break;
1883  case GOSSIP_ACTION_INFO_DEF + 9:
1884  player->CLOSE_GOSSIP_MENU();
1885  player->AddItem(ITEM_HC_KEY_TO_THE_FOCUSING_IRIS, 1);
1886  break;
1887  }
1888  return true;
1889  }
Definition: npcs_special.cpp:1779
Definition: npcs_special.cpp:1782
Definition: npcs_special.cpp:1781
Definition: ScriptedGossip.h:71
Definition: npcs_special.cpp:1777
Definition: npcs_special.cpp:1774
Definition: npcs_special.cpp:1775
Definition: npcs_special.cpp:1783
Definition: npcs_special.cpp:1778
Definition: npcs_special.cpp:1780

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