AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
npc_locksmith Class Reference
Inheritance diagram for npc_locksmith:
CreatureScript ScriptObject UpdatableScript< Creature >

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
bool IsDatabaseBound () const override
 
virtual bool OnGossipHello (Player *, Creature *)
 
virtual bool OnGossipSelect (Player *, Creature *, uint32, uint32)
 
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 OnQuestComplete (Player *, Creature *, Quest const *)
 
virtual bool OnQuestReward (Player *, Creature *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, Creature *)
 
virtual CreatureAIGetAI (Creature *) const
 
virtual void OnFfaPvpStateUpdate (Creature *, bool)
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
uint16 GetTotalAvailableHooks ()
 
- 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 ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 
- Protected Member Functions inherited from UpdatableScript< Creature >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_locksmith()

npc_locksmith::npc_locksmith ( )
inline
1913: CreatureScript("npc_locksmith") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from CreatureScript.

1916 {
1917 // Skeleton Key - Scholomance
1919 !player->HasItemCount(ITEM_SKELETON_KEY, 1, true))
1921
1922 // Arcatraz Key
1925
1926 // Shatered Halls Key
1928 !player->HasItemCount(ITEM_SHATTERED_HALLS_KEY, 1, true))
1930
1931 // Searing Gorge Key
1932 if (player->GetQuestRewardStatus(QUEST_AT_LAST) && !player->HasItemCount(ITEM_SEARING_GORGE, 1, true))
1934
1935 // Shadowforge Key
1938
1939 // Eye of Haramad
1942
1943 // Master's Key
1946
1947 // Violet Hold Key
1950
1951 // Essence-Infused Moonstone
1954
1955 SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
1956
1957 return true;
1958 }
@ ITEM_VIOLET_HOLD_KEY
Definition: npcs_special.cpp:1898
@ ITEM_SHADOWFORGE_KEY
Definition: npcs_special.cpp:1883
@ QUEST_CONTAINMENT
Definition: npcs_special.cpp:1897
@ QUEST_RETURN_TO_KHAGDAR
Definition: npcs_special.cpp:1892
@ QUEST_THE_KEY_TO_SCHOLOMANCE_H
Definition: npcs_special.cpp:1861
@ QUEST_HOTTER_THAN_HELL_H
Definition: npcs_special.cpp:1872
@ QUEST_HOW_TO_BRAKE_IN_TO_THE_ARCATRAZ
Definition: npcs_special.cpp:1866
@ ITEM_THE_MASTERS_KEY
Definition: npcs_special.cpp:1893
@ QUEST_DARK_IRON_LEGACY
Definition: npcs_special.cpp:1882
@ QUEST_THE_EYE_OF_HARAMAD
Definition: npcs_special.cpp:1887
@ ITEM_SEARING_GORGE
Definition: npcs_special.cpp:1878
@ QUEST_AT_LAST
Definition: npcs_special.cpp:1877
@ ITEM_ESSENCE_INFUSED_MOONSTONE
Definition: npcs_special.cpp:1903
@ QUEST_THE_KEY_TO_SCHOLOMANCE_A
Definition: npcs_special.cpp:1860
@ GOSSIP_MENU_LOCKSMITH
Definition: npcs_special.cpp:1907
@ QUEST_ETERNAL_VIGILANCE
Definition: npcs_special.cpp:1902
@ ITEM_SKELETON_KEY
Definition: npcs_special.cpp:1862
@ ITEM_SHATTERED_HALLS_KEY
Definition: npcs_special.cpp:1873
@ ITEM_ARCATRAZ_KEY
Definition: npcs_special.cpp:1867
@ QUEST_HOTTER_THAN_HELL_A
Definition: npcs_special.cpp:1871
@ ITEM_EYE_OF_HARAMAD
Definition: npcs_special.cpp:1888
void SendGossipMenuFor(Player *player, uint32 npcTextID, ObjectGuid const guid)
Definition: ScriptedGossip.cpp:45
void AddGossipItemFor(Player *player, uint32 icon, std::string const &text, uint32 sender, uint32 action)
Definition: ScriptedGossip.cpp:28
@ GOSSIP_SENDER_MAIN
Definition: ScriptedGossip.h:70
@ GOSSIP_ACTION_INFO_DEF
Definition: ScriptedGossip.h:68
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
bool GetQuestRewardStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1414
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
Definition: PlayerStorage.cpp:655
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition: PlayerGossip.cpp:404

References AddGossipItemFor(), Player::GetGossipTextId(), Object::GetGUID(), Player::GetQuestRewardStatus(), GOSSIP_ACTION_INFO_DEF, GOSSIP_MENU_LOCKSMITH, GOSSIP_SENDER_MAIN, Player::HasItemCount(), ITEM_ARCATRAZ_KEY, ITEM_ESSENCE_INFUSED_MOONSTONE, ITEM_EYE_OF_HARAMAD, ITEM_SEARING_GORGE, ITEM_SHADOWFORGE_KEY, ITEM_SHATTERED_HALLS_KEY, ITEM_SKELETON_KEY, ITEM_THE_MASTERS_KEY, ITEM_VIOLET_HOLD_KEY, QUEST_AT_LAST, QUEST_CONTAINMENT, QUEST_DARK_IRON_LEGACY, QUEST_ETERNAL_VIGILANCE, QUEST_HOTTER_THAN_HELL_A, QUEST_HOTTER_THAN_HELL_H, QUEST_HOW_TO_BRAKE_IN_TO_THE_ARCATRAZ, QUEST_RETURN_TO_KHAGDAR, QUEST_THE_EYE_OF_HARAMAD, QUEST_THE_KEY_TO_SCHOLOMANCE_A, QUEST_THE_KEY_TO_SCHOLOMANCE_H, and SendGossipMenuFor().

◆ OnGossipSelect()

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

Reimplemented from CreatureScript.

1961 {
1962 ClearGossipMenuFor(player);
1963 switch (action)
1964 {
1965 case GOSSIP_ACTION_INFO_DEF + 1:
1966 CloseGossipMenuFor(player);
1967 player->CastSpell(player, SPELL_SKELETON_KEY, false);
1968 break;
1969 case GOSSIP_ACTION_INFO_DEF + 2:
1970 CloseGossipMenuFor(player);
1971 player->CastSpell(player, SPELL_ARCATRAZ_KEY, false);
1972 break;
1973 case GOSSIP_ACTION_INFO_DEF + 3:
1974 CloseGossipMenuFor(player);
1975 player->CastSpell(player, SPELL_SHATTERED_HALLS_KEY, false);
1976 break;
1977 case GOSSIP_ACTION_INFO_DEF + 4:
1978 CloseGossipMenuFor(player);
1979 player->CastSpell(player, SPELL_SEARING_GORGE_KEY, false);
1980 break;
1981 case GOSSIP_ACTION_INFO_DEF + 5:
1982 CloseGossipMenuFor(player);
1983 player->CastSpell(player, SPELL_SHADOWFORGE_KEY, false);
1984 break;
1985 case GOSSIP_ACTION_INFO_DEF + 6:
1986 CloseGossipMenuFor(player);
1987 player->CastSpell(player, SPELL_EYE_OF_HARMAD, false);
1988 break;
1989 case GOSSIP_ACTION_INFO_DEF + 7:
1990 CloseGossipMenuFor(player);
1991 player->CastSpell(player, SPELL_THE_MASTERS_KEY, false);
1992 break;
1993 case GOSSIP_ACTION_INFO_DEF + 8:
1994 CloseGossipMenuFor(player);
1995 player->CastSpell(player, SPELL_VIOLET_HOLD_KEY, false);
1996 break;
1997 case GOSSIP_ACTION_INFO_DEF + 9:
1998 CloseGossipMenuFor(player);
1999 player->CastSpell(player, SPELL_ESSENCE_INFUSED_MOONSTONE, false);
2000 break;
2001 }
2002 return true;
2003 }
@ SPELL_EYE_OF_HARMAD
Definition: npcs_special.cpp:1889
@ SPELL_ESSENCE_INFUSED_MOONSTONE
Definition: npcs_special.cpp:1904
@ SPELL_SHATTERED_HALLS_KEY
Definition: npcs_special.cpp:1874
@ SPELL_THE_MASTERS_KEY
Definition: npcs_special.cpp:1894
@ SPELL_SEARING_GORGE_KEY
Definition: npcs_special.cpp:1879
@ SPELL_SHADOWFORGE_KEY
Definition: npcs_special.cpp:1884
@ SPELL_VIOLET_HOLD_KEY
Definition: npcs_special.cpp:1899
@ SPELL_ARCATRAZ_KEY
Definition: npcs_special.cpp:1868
@ SPELL_SKELETON_KEY
Definition: npcs_special.cpp:1863
void ClearGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:22
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1167

References Unit::CastSpell(), ClearGossipMenuFor(), CloseGossipMenuFor(), GOSSIP_ACTION_INFO_DEF, SPELL_ARCATRAZ_KEY, SPELL_ESSENCE_INFUSED_MOONSTONE, SPELL_EYE_OF_HARMAD, SPELL_SEARING_GORGE_KEY, SPELL_SHADOWFORGE_KEY, SPELL_SHATTERED_HALLS_KEY, SPELL_SKELETON_KEY, SPELL_THE_MASTERS_KEY, and SPELL_VIOLET_HOLD_KEY.