882 {
884 std::string gossipItem;
885 bool canLearn = false;
886
888 {
890 {
893 if (canLearn)
895 break;
898 if (canLearn)
900 break;
903 if (canLearn)
905 break;
908 if (canLearn)
910 break;
911 }
912 }
913
914 if (canLearn)
916
917 SendGossipMenuFor(player, npcTextId ? npcTextId : player->GetGossipTextId(creature), creature->GetGUID());
918 return true;
919 }
std::uint32_t uint32
Definition Define.h:107
@ GOSSIP_ICON_CHAT
Definition GossipDef.h:61
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_ACTION_INFO_DEF
Definition ScriptedGossip.h:68
uint32 GetEntry() const
Definition Object.h:116
bool HasSkill(uint32 skill) const
Definition Player.cpp:5436
bool CanLearn(Player *player, uint32 textId, uint32 altTextId, uint32 skillValue, uint32 reqSpellId, uint32 spellId, uint32 &npcTextId)
Definition npc_professions.cpp:867
@ S_GNOMISH
Definition npc_professions.cpp:139
@ S_GOBLIN
Definition npc_professions.cpp:138
#define GOSSIP_ITEM_KABLAM
Definition npc_professions.cpp:860
@ NPC_SMILES
Definition npc_professions.cpp:845
@ SPELL_TO_GADGET
Definition npc_professions.cpp:853
@ NPC_ZAP
Definition npc_professions.cpp:842
@ NPC_JHORDY
Definition npc_professions.cpp:843
@ SPELL_TO_EVERLOOK
Definition npc_professions.cpp:852
@ SPELL_TO_AREA52
Definition npc_professions.cpp:854
@ SPELL_TO_TOSHLEY
Definition npc_professions.cpp:855
@ NPC_KABLAM
Definition npc_professions.cpp:844
#define GOSSIP_ITEM_ZAP
Definition npc_professions.cpp:858
#define GOSSIP_ITEM_JHORDY
Definition npc_professions.cpp:859