Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
npc_professions.cpp File Reference
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "Player.h"
#include "SpellInfo.h"
#include "WorldSession.h"
Include dependency graph for npc_professions.cpp:

Go to the source code of this file.

Classes

class  npc_engineering_tele_trinket
class  npc_prof_alchemy
class  npc_prof_blacksmith
class  npc_prof_leather
class  npc_prof_tailor

Macros

#define BOX_UNLEARN_ALCHEMY_SPEC   "Do you really want to unlearn your alchemy specialty and lose all associated recipes? \n Cost: "
#define BOX_UNLEARN_ARMORORWEAPON   "Do you really want to unlearn your blacksmith specialty and lose all associated recipes? \n Cost: "
#define BOX_UNLEARN_LEATHER_SPEC   "Do you really want to unlearn your leatherworking specialty and lose all associated recipes? \n Cost: "
#define BOX_UNLEARN_TAILOR_SPEC   "Do you really want to unlearn your tailoring specialty and lose all associated recipes? \n Cost: "
#define BOX_UNLEARN_WEAPON_SPEC   "Do you really want to unlearn your weaponsmith specialty and lose all associated recipes? \n Cost: "
#define GOSSIP_ARMOR_LEARN   "Please teach me how to become a Armorsmith"
#define GOSSIP_ARMOR_UNLEARN   "I wish to unlearn the art of Armorsmithing"
#define GOSSIP_ITEM_JHORDY   "I must build a beacon for this marvelous device!"
#define GOSSIP_ITEM_KABLAM   "[PH] Unknown"
#define GOSSIP_ITEM_ZAP   "This Dimensional Imploder sounds dangerous! How can I make one?"
#define GOSSIP_LEARN_AXE   "Please teach me how to become a Axesmith, Kilram"
#define GOSSIP_LEARN_ELIXIR   "Please teach me how to become a Master of Elixirs, Lorokeem"
#define GOSSIP_LEARN_HAMMER   "Please teach me how to become a Hammersmith, Lilith"
#define GOSSIP_LEARN_MOONCLOTH   "Please teach me how to become a Mooncloth tailor"
#define GOSSIP_LEARN_POTION   "Please teach me how to become a Master of Potions, Lauranna"
#define GOSSIP_LEARN_SHADOWEAVE   "Please teach me how to become a Shadoweave tailor"
#define GOSSIP_LEARN_SPELLFIRE   "Please teach me how to become a Spellcloth tailor"
#define GOSSIP_LEARN_SWORD   "Please teach me how to become a Swordsmith, Seril"
#define GOSSIP_LEARN_TRANSMUTE   "Please teach me how to become a Master of Transmutations, Zarevhi"
#define GOSSIP_SENDER_CHECK   52
#define GOSSIP_SENDER_LEARN   50
#define GOSSIP_SENDER_UNLEARN   51
#define GOSSIP_UNLEARN_AXE   "I wish to unlearn Axesmithing"
#define GOSSIP_UNLEARN_DRAGON   "I wish to unlearn Dragonscale Leatherworking"
#define GOSSIP_UNLEARN_ELEMENTAL   "I wish to unlearn Elemental Leatherworking"
#define GOSSIP_UNLEARN_ELIXIR   "I wish to unlearn Elixir Mastery"
#define GOSSIP_UNLEARN_HAMMER   "I wish to unlearn Hammersmithing"
#define GOSSIP_UNLEARN_MOONCLOTH   "I wish to unlearn Mooncloth Tailoring"
#define GOSSIP_UNLEARN_POTION   "I wish to unlearn Potion Mastery"
#define GOSSIP_UNLEARN_SHADOWEAVE   "I wish to unlearn Shadoweave Tailoring"
#define GOSSIP_UNLEARN_SMITH_SPEC   "I wish to unlearn my blacksmith specialty"
#define GOSSIP_UNLEARN_SPELLFIRE   "I wish to unlearn Spellfire Tailoring"
#define GOSSIP_UNLEARN_SWORD   "I wish to unlearn Swordsmithing"
#define GOSSIP_UNLEARN_TRANSMUTE   "I wish to unlearn Transmutation Mastery"
#define GOSSIP_UNLEARN_TRIBAL   "I wish to unlearn Tribal Leatherworking"
#define GOSSIP_WEAPON_LEARN   "Please teach me how to become a Weaponsmith"
#define GOSSIP_WEAPON_UNLEARN   "I wish to unlearn the art of Weaponsmithing"
#define TALK_AXE_LEARN   "Ah, a seasoned veteran you once were. I know you are capable, you merely need to ask and I shall teach you the way of the axesmith."
#define TALK_AXE_UNLEARN   "Forgetting your Axesmithing skill is not something to do lightly. If you choose to abandon it you will forget all recipes that require Axesmithing to create!"
#define TALK_HAMMER_LEARN   "Ah, a seasoned veteran you once were. I know you are capable, you merely need to ask and I shall teach you the way of the hammersmith."
#define TALK_HAMMER_UNLEARN   "Forgetting your Hammersmithing skill is not something to do lightly. If you choose to abandon it you will forget all recipes that require Hammersmithing to create!"
#define TALK_MUST_UNLEARN_WEAPON   "You must forget your weapon type specialty before I can help you. Go to Everlook in Winterspring and seek help there."
#define TALK_SWORD_LEARN   "Ah, a seasoned veteran you once were. I know you are capable, you merely need to ask and I shall teach you the way of the swordsmith."
#define TALK_SWORD_UNLEARN   "Forgetting your Swordsmithing skill is not something to do lightly. If you choose to abandon it you will forget all recipes that require Swordsmithing to create!"

Enumerations

enum  EngineeringTrinkets {
  NPC_ZAP = 14742 , NPC_JHORDY = 14743 , NPC_KABLAM = 21493 , NPC_SMILES = 21494 ,
  SPELL_LEARN_TO_EVERLOOK = 23490 , SPELL_LEARN_TO_GADGET = 23491 , SPELL_LEARN_TO_AREA52 = 36956 , SPELL_LEARN_TO_TOSHLEY = 36957 ,
  SPELL_TO_EVERLOOK = 23486 , SPELL_TO_GADGET = 23489 , SPELL_TO_AREA52 = 36954 , SPELL_TO_TOSHLEY = 36955
}
enum  ProfessionSpells {
  S_WEAPON = 9787 , S_ARMOR = 9788 , S_HAMMER = 17040 , S_AXE = 17041 ,
  S_SWORD = 17039 , S_LEARN_WEAPON = 9789 , S_LEARN_ARMOR = 9790 , S_LEARN_HAMMER = 39099 ,
  S_LEARN_AXE = 39098 , S_LEARN_SWORD = 39097 , S_UNLEARN_WEAPON = 36436 , S_UNLEARN_ARMOR = 36435 ,
  S_UNLEARN_HAMMER = 36441 , S_UNLEARN_AXE = 36439 , S_UNLEARN_SWORD = 36438 , S_REP_ARMOR = 17451 ,
  S_REP_WEAPON = 17452 , REP_ARMOR = 46 , REP_WEAPON = 289 , REP_HAMMER = 569 ,
  REP_AXE = 570 , REP_SWORD = 571 , S_DRAGON = 10656 , S_ELEMENTAL = 10658 ,
  S_TRIBAL = 10660 , S_LEARN_DRAGON = 10657 , S_LEARN_ELEMENTAL = 10659 , S_LEARN_TRIBAL = 10661 ,
  S_UNLEARN_DRAGON = 36434 , S_UNLEARN_ELEMENTAL = 36328 , S_UNLEARN_TRIBAL = 36433 , S_GOBLIN = 20222 ,
  S_GNOMISH = 20219 , S_LEARN_GOBLIN = 20221 , S_LEARN_GNOMISH = 20220 , S_SPELLFIRE = 26797 ,
  S_MOONCLOTH = 26798 , S_SHADOWEAVE = 26801 , S_LEARN_SPELLFIRE = 26796 , S_LEARN_MOONCLOTH = 26799 ,
  S_LEARN_SHADOWEAVE = 26800 , S_UNLEARN_SPELLFIRE = 41299 , S_UNLEARN_MOONCLOTH = 41558 , S_UNLEARN_SHADOWEAVE = 41559 ,
  S_TRANSMUTE = 28672 , S_ELIXIR = 28677 , S_POTION = 28675 , S_LEARN_TRANSMUTE = 28674 ,
  S_LEARN_ELIXIR = 28678 , S_LEARN_POTION = 28676 , S_UNLEARN_TRANSMUTE = 41565 , S_UNLEARN_ELIXIR = 41564 ,
  S_UNLEARN_POTION = 41563
}

Functions

void AddSC_npc_professions ()
int32 DoHighUnlearnCost (Player *)
int32 DoLearnCost (Player *)
int32 DoLowUnlearnCost (Player *player)
int32 DoMedUnlearnCost (Player *player)
bool EquippedOk (Player *player, uint32 spellId)
void ProcessCastaction (Player *player, Creature *creature, uint32 spellId, uint32 triggeredSpellId, int32 cost)
void ProcessUnlearnAction (Player *player, Creature *creature, uint32 spellId, uint32 alternativeSpellId, int32 cost)
void ProfessionUnlearnSpells (Player *player, uint32 type)

Macro Definition Documentation

◆ BOX_UNLEARN_ALCHEMY_SPEC

#define BOX_UNLEARN_ALCHEMY_SPEC   "Do you really want to unlearn your alchemy specialty and lose all associated recipes? \n Cost: "

Definition at line 59 of file npc_professions.cpp.

Referenced by npc_prof_alchemy::SendConfirmUnlearn().

◆ BOX_UNLEARN_ARMORORWEAPON

#define BOX_UNLEARN_ARMORORWEAPON   "Do you really want to unlearn your blacksmith specialty and lose all associated recipes? \n Cost: "

Definition at line 67 of file npc_professions.cpp.

Referenced by npc_prof_blacksmith::SendConfirmUnlearn().

◆ BOX_UNLEARN_LEATHER_SPEC

#define BOX_UNLEARN_LEATHER_SPEC   "Do you really want to unlearn your leatherworking specialty and lose all associated recipes? \n Cost: "

Definition at line 82 of file npc_professions.cpp.

Referenced by npc_prof_leather::SendConfirmUnlearn().

◆ BOX_UNLEARN_TAILOR_SPEC

#define BOX_UNLEARN_TAILOR_SPEC   "Do you really want to unlearn your tailoring specialty and lose all associated recipes? \n Cost: "

Definition at line 91 of file npc_professions.cpp.

Referenced by npc_prof_tailor::SendConfirmUnlearn().

◆ BOX_UNLEARN_WEAPON_SPEC

#define BOX_UNLEARN_WEAPON_SPEC   "Do you really want to unlearn your weaponsmith specialty and lose all associated recipes? \n Cost: "

Definition at line 76 of file npc_professions.cpp.

Referenced by npc_prof_blacksmith::SendConfirmUnlearn().

◆ GOSSIP_ARMOR_LEARN

#define GOSSIP_ARMOR_LEARN   "Please teach me how to become a Armorsmith"

Definition at line 63 of file npc_professions.cpp.

Referenced by npc_prof_blacksmith::OnGossipHello().

◆ GOSSIP_ARMOR_UNLEARN

#define GOSSIP_ARMOR_UNLEARN   "I wish to unlearn the art of Armorsmithing"

Definition at line 64 of file npc_professions.cpp.

Referenced by npc_prof_blacksmith::OnGossipHello().

◆ GOSSIP_ITEM_JHORDY

#define GOSSIP_ITEM_JHORDY   "I must build a beacon for this marvelous device!"

Definition at line 776 of file npc_professions.cpp.

Referenced by npc_engineering_tele_trinket::OnGossipHello().

◆ GOSSIP_ITEM_KABLAM

#define GOSSIP_ITEM_KABLAM   "[PH] Unknown"

Definition at line 777 of file npc_professions.cpp.

Referenced by npc_engineering_tele_trinket::OnGossipHello().

◆ GOSSIP_ITEM_ZAP

#define GOSSIP_ITEM_ZAP   "This Dimensional Imploder sounds dangerous! How can I make one?"

Definition at line 775 of file npc_professions.cpp.

Referenced by npc_engineering_tele_trinket::OnGossipHello().

◆ GOSSIP_LEARN_AXE

#define GOSSIP_LEARN_AXE   "Please teach me how to become a Axesmith, Kilram"

◆ GOSSIP_LEARN_ELIXIR

#define GOSSIP_LEARN_ELIXIR   "Please teach me how to become a Master of Elixirs, Lorokeem"

◆ GOSSIP_LEARN_HAMMER

#define GOSSIP_LEARN_HAMMER   "Please teach me how to become a Hammersmith, Lilith"

◆ GOSSIP_LEARN_MOONCLOTH

#define GOSSIP_LEARN_MOONCLOTH   "Please teach me how to become a Mooncloth tailor"

◆ GOSSIP_LEARN_POTION

#define GOSSIP_LEARN_POTION   "Please teach me how to become a Master of Potions, Lauranna"

◆ GOSSIP_LEARN_SHADOWEAVE

#define GOSSIP_LEARN_SHADOWEAVE   "Please teach me how to become a Shadoweave tailor"

◆ GOSSIP_LEARN_SPELLFIRE

#define GOSSIP_LEARN_SPELLFIRE   "Please teach me how to become a Spellcloth tailor"

◆ GOSSIP_LEARN_SWORD

#define GOSSIP_LEARN_SWORD   "Please teach me how to become a Swordsmith, Seril"

◆ GOSSIP_LEARN_TRANSMUTE

#define GOSSIP_LEARN_TRANSMUTE   "Please teach me how to become a Master of Transmutations, Zarevhi"

◆ GOSSIP_SENDER_CHECK

◆ GOSSIP_SENDER_LEARN

◆ GOSSIP_SENDER_UNLEARN

◆ GOSSIP_UNLEARN_AXE

#define GOSSIP_UNLEARN_AXE   "I wish to unlearn Axesmithing"

◆ GOSSIP_UNLEARN_DRAGON

#define GOSSIP_UNLEARN_DRAGON   "I wish to unlearn Dragonscale Leatherworking"

◆ GOSSIP_UNLEARN_ELEMENTAL

#define GOSSIP_UNLEARN_ELEMENTAL   "I wish to unlearn Elemental Leatherworking"

◆ GOSSIP_UNLEARN_ELIXIR

#define GOSSIP_UNLEARN_ELIXIR   "I wish to unlearn Elixir Mastery"

◆ GOSSIP_UNLEARN_HAMMER

#define GOSSIP_UNLEARN_HAMMER   "I wish to unlearn Hammersmithing"

◆ GOSSIP_UNLEARN_MOONCLOTH

#define GOSSIP_UNLEARN_MOONCLOTH   "I wish to unlearn Mooncloth Tailoring"

◆ GOSSIP_UNLEARN_POTION

#define GOSSIP_UNLEARN_POTION   "I wish to unlearn Potion Mastery"

◆ GOSSIP_UNLEARN_SHADOWEAVE

#define GOSSIP_UNLEARN_SHADOWEAVE   "I wish to unlearn Shadoweave Tailoring"

◆ GOSSIP_UNLEARN_SMITH_SPEC

#define GOSSIP_UNLEARN_SMITH_SPEC   "I wish to unlearn my blacksmith specialty"

Definition at line 66 of file npc_professions.cpp.

Referenced by npc_prof_blacksmith::SendConfirmUnlearn().

◆ GOSSIP_UNLEARN_SPELLFIRE

#define GOSSIP_UNLEARN_SPELLFIRE   "I wish to unlearn Spellfire Tailoring"

◆ GOSSIP_UNLEARN_SWORD

#define GOSSIP_UNLEARN_SWORD   "I wish to unlearn Swordsmithing"

◆ GOSSIP_UNLEARN_TRANSMUTE

#define GOSSIP_UNLEARN_TRANSMUTE   "I wish to unlearn Transmutation Mastery"

◆ GOSSIP_UNLEARN_TRIBAL

#define GOSSIP_UNLEARN_TRIBAL   "I wish to unlearn Tribal Leatherworking"

◆ GOSSIP_WEAPON_LEARN

#define GOSSIP_WEAPON_LEARN   "Please teach me how to become a Weaponsmith"

Definition at line 61 of file npc_professions.cpp.

Referenced by npc_prof_blacksmith::OnGossipHello().

◆ GOSSIP_WEAPON_UNLEARN

#define GOSSIP_WEAPON_UNLEARN   "I wish to unlearn the art of Weaponsmithing"

Definition at line 62 of file npc_professions.cpp.

Referenced by npc_prof_blacksmith::OnGossipHello().

◆ TALK_AXE_LEARN

#define TALK_AXE_LEARN   "Ah, a seasoned veteran you once were. I know you are capable, you merely need to ask and I shall teach you the way of the axesmith."

Definition at line 33 of file npc_professions.cpp.

◆ TALK_AXE_UNLEARN

#define TALK_AXE_UNLEARN   "Forgetting your Axesmithing skill is not something to do lightly. If you choose to abandon it you will forget all recipes that require Axesmithing to create!"

Definition at line 37 of file npc_professions.cpp.

◆ TALK_HAMMER_LEARN

#define TALK_HAMMER_LEARN   "Ah, a seasoned veteran you once were. I know you are capable, you merely need to ask and I shall teach you the way of the hammersmith."

Definition at line 32 of file npc_professions.cpp.

◆ TALK_HAMMER_UNLEARN

#define TALK_HAMMER_UNLEARN   "Forgetting your Hammersmithing skill is not something to do lightly. If you choose to abandon it you will forget all recipes that require Hammersmithing to create!"

Definition at line 36 of file npc_professions.cpp.

◆ TALK_MUST_UNLEARN_WEAPON

#define TALK_MUST_UNLEARN_WEAPON   "You must forget your weapon type specialty before I can help you. Go to Everlook in Winterspring and seek help there."

Definition at line 30 of file npc_professions.cpp.

◆ TALK_SWORD_LEARN

#define TALK_SWORD_LEARN   "Ah, a seasoned veteran you once were. I know you are capable, you merely need to ask and I shall teach you the way of the swordsmith."

Definition at line 34 of file npc_professions.cpp.

◆ TALK_SWORD_UNLEARN

#define TALK_SWORD_UNLEARN   "Forgetting your Swordsmithing skill is not something to do lightly. If you choose to abandon it you will forget all recipes that require Swordsmithing to create!"

Definition at line 38 of file npc_professions.cpp.

Enumeration Type Documentation

◆ EngineeringTrinkets

Enumerator
NPC_ZAP 
NPC_JHORDY 
NPC_KABLAM 
NPC_SMILES 
SPELL_LEARN_TO_EVERLOOK 
SPELL_LEARN_TO_GADGET 
SPELL_LEARN_TO_AREA52 
SPELL_LEARN_TO_TOSHLEY 
SPELL_TO_EVERLOOK 
SPELL_TO_GADGET 
SPELL_TO_AREA52 
SPELL_TO_TOSHLEY 

Definition at line 757 of file npc_professions.cpp.

◆ ProfessionSpells

Enumerator
S_WEAPON 
S_ARMOR 
S_HAMMER 
S_AXE 
S_SWORD 
S_LEARN_WEAPON 
S_LEARN_ARMOR 
S_LEARN_HAMMER 
S_LEARN_AXE 
S_LEARN_SWORD 
S_UNLEARN_WEAPON 
S_UNLEARN_ARMOR 
S_UNLEARN_HAMMER 
S_UNLEARN_AXE 
S_UNLEARN_SWORD 
S_REP_ARMOR 
S_REP_WEAPON 
REP_ARMOR 
REP_WEAPON 
REP_HAMMER 
REP_AXE 
REP_SWORD 
S_DRAGON 
S_ELEMENTAL 
S_TRIBAL 
S_LEARN_DRAGON 
S_LEARN_ELEMENTAL 
S_LEARN_TRIBAL 
S_UNLEARN_DRAGON 
S_UNLEARN_ELEMENTAL 
S_UNLEARN_TRIBAL 
S_GOBLIN 
S_GNOMISH 
S_LEARN_GOBLIN 
S_LEARN_GNOMISH 
S_SPELLFIRE 
S_MOONCLOTH 
S_SHADOWEAVE 
S_LEARN_SPELLFIRE 
S_LEARN_MOONCLOTH 
S_LEARN_SHADOWEAVE 
S_UNLEARN_SPELLFIRE 
S_UNLEARN_MOONCLOTH 
S_UNLEARN_SHADOWEAVE 
S_TRANSMUTE 
S_ELIXIR 
S_POTION 
S_LEARN_TRANSMUTE 
S_LEARN_ELIXIR 
S_LEARN_POTION 
S_UNLEARN_TRANSMUTE 
S_UNLEARN_ELIXIR 
S_UNLEARN_POTION 

Definition at line 96 of file npc_professions.cpp.

Function Documentation

◆ AddSC_npc_professions()

void AddSC_npc_professions ( )

Definition at line 1151 of file npc_professions.cpp.

Referenced by AddWorldScripts().

◆ DoHighUnlearnCost()

◆ DoLearnCost()

int32 DoLearnCost ( Player * )

◆ DoLowUnlearnCost()

int32 DoLowUnlearnCost ( Player * player)

◆ DoMedUnlearnCost()

◆ EquippedOk()

◆ ProcessCastaction()

◆ ProcessUnlearnAction()

◆ ProfessionUnlearnSpells()