TrinityCore
Loading...
Searching...
No Matches
npc_professions.cpp File Reference
#include "ScriptMgr.h"
#include "GameObjectAI.h"
#include "Item.h"
#include "Log.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "SpellInfo.h"
#include "SpellMgr.h"
#include "WorldSession.h"
+ Include dependency graph for npc_professions.cpp:

Go to the source code of this file.

Classes

class  npc_prof_blacksmith
 
struct  npc_prof_blacksmith::npc_prof_blacksmithAI
 
class  npc_engineering_tele_trinket
 
struct  npc_engineering_tele_trinket::npc_engineering_tele_trinketAI
 
class  go_soothsaying_for_dummies
 
struct  go_soothsaying_for_dummies::go_soothsaying_for_dummiesAI
 
class  npc_prof_leather
 
struct  npc_prof_leather::npc_prof_leatherAI
 
class  npc_prof_tailor
 
struct  npc_prof_tailor::npc_prof_tailorAI
 
class  npc_prof_alchemy
 
struct  npc_prof_alchemy::npc_prof_alchemyAI
 

Macros

#define GOSSIP_SENDER_LEARN   50
 
#define GOSSIP_SENDER_UNLEARN   51
 
#define GOSSIP_SENDER_CHECK   52
 

Enumerations

enum  Gossips {
  GOSSIP_SPELLFIRE = 8531 , GOSSIP_MOONCLOTH = 8530 , GOSSIP_SHADOWEAVE = 8532 , GOSSIP_DRAGON1 = 3067 ,
  GOSSIP_DRAGON2 = 3068 , GOSSIP_ELEMENTAL1 = 3070 , GOSSIP_ELEMENTAL2 = 3069 , GOSSIP_TRIBAL1 = 3072 ,
  GOSSIP_TRIBAL2 = 3071 , GOSSIP_SMITHOMNI1 = 3182 , GOSSIP_SMITHOMNI2 = 3187 , GOSSIP_WEAPON1 = 3201 ,
  GOSSIP_WEAPON2 = 3202 , GOSSIP_ARMOR1 = 597 , GOSSIP_ARMOR2 = 3203 , GOSSIP_HAMMER = 6090 ,
  GOSSIP_AXE = 6089 , GOSSIP_SWORD = 6091 , GOSSIP_TRANSMUTE = 8542 , GOSSIP_ELIXIR = 8540 ,
  GOSSIP_POTION = 7571 , GOSSIP_ZAP = 6092 , GOSSIP_JHORDY = 6094 , GOSSIP_KABLAM = 8308 ,
  GOSSIP_SMILES = 8306 , GOSSIP_LEARN = 1 , GOSSIP_UNLEARN = 2
}
 
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_UNLEARN_GOBLIN = 68334 ,
  S_UNLEARN_GNOMISH = 68333 , 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
}
 
enum  SpecializationTrainers {
  N_TRAINER_SMITHOMNI1 = 11145 , N_TRAINER_SMITHOMNI2 = 11176 , N_TRAINER_WEAPON1 = 11146 , N_TRAINER_WEAPON2 = 11178 ,
  N_TRAINER_ARMOR1 = 5164 , N_TRAINER_ARMOR2 = 11177 , N_TRAINER_HAMMER = 11191 , N_TRAINER_AXE = 11192 ,
  N_TRAINER_SWORD = 11193 , N_TRAINER_DRAGON1 = 7866 , N_TRAINER_DRAGON2 = 7867 , N_TRAINER_ELEMENTAL1 = 7868 ,
  N_TRAINER_ELEMENTAL2 = 7869 , N_TRAINER_TRIBAL1 = 7870 , N_TRAINER_TRIBAL2 = 7871 , N_TRAINER_SPELLFIRE = 22213 ,
  N_TRAINER_MOONCLOTH = 22208 , N_TRAINER_SHADOWEAVE = 22212 , N_TRAINER_TRANSMUTE = 22427 , N_TRAINER_ELIXIR = 19052 ,
  N_TRAINER_POTION = 17909
}
 
enum  ProfessionQuest { Q_MASTER_TRANSMUTE = 10899 , Q_MASTER_ELIXIR = 10902 , Q_MASTER_POTION = 10897 }
 
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  SoothsayingForDummies {
  GOSSIP_ID = 7058 , OPTION_UNLEARN_GNOMISH = 0 , OPTION_UNLEARN_GOBLIN = 1 , OPTION_LEARN_GNOMISH = 2 ,
  OPTION_LEARN_GOBLIN = 3 , OPTION_LEARN_DRAGONSCALE = 4 , OPTION_LEARN_ELEMENTAL = 5 , OPTION_LEARN_TRIBAL = 6
}
 

Functions

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

Macro Definition Documentation

◆ GOSSIP_SENDER_CHECK

#define GOSSIP_SENDER_CHECK   52

Definition at line 47 of file npc_professions.cpp.

◆ GOSSIP_SENDER_LEARN

#define GOSSIP_SENDER_LEARN   50

Definition at line 45 of file npc_professions.cpp.

◆ GOSSIP_SENDER_UNLEARN

#define GOSSIP_SENDER_UNLEARN   51

Definition at line 46 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 609 of file npc_professions.cpp.

◆ Gossips

enum Gossips
Enumerator
GOSSIP_SPELLFIRE 
GOSSIP_MOONCLOTH 
GOSSIP_SHADOWEAVE 
GOSSIP_DRAGON1 
GOSSIP_DRAGON2 
GOSSIP_ELEMENTAL1 
GOSSIP_ELEMENTAL2 
GOSSIP_TRIBAL1 
GOSSIP_TRIBAL2 
GOSSIP_SMITHOMNI1 
GOSSIP_SMITHOMNI2 
GOSSIP_WEAPON1 
GOSSIP_WEAPON2 
GOSSIP_ARMOR1 
GOSSIP_ARMOR2 
GOSSIP_HAMMER 
GOSSIP_AXE 
GOSSIP_SWORD 
GOSSIP_TRANSMUTE 
GOSSIP_ELIXIR 
GOSSIP_POTION 
GOSSIP_ZAP 
GOSSIP_JHORDY 
GOSSIP_KABLAM 
GOSSIP_SMILES 
GOSSIP_LEARN 
GOSSIP_UNLEARN 

Definition at line 53 of file npc_professions.cpp.

◆ ProfessionQuest

Enumerator
Q_MASTER_TRANSMUTE 
Q_MASTER_ELIXIR 
Q_MASTER_POTION 

Definition at line 198 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_UNLEARN_GOBLIN 
S_UNLEARN_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 87 of file npc_professions.cpp.

◆ SoothsayingForDummies

Enumerator
GOSSIP_ID 
OPTION_UNLEARN_GNOMISH 
OPTION_UNLEARN_GOBLIN 
OPTION_LEARN_GNOMISH 
OPTION_LEARN_GOBLIN 
OPTION_LEARN_DRAGONSCALE 
OPTION_LEARN_ELEMENTAL 
OPTION_LEARN_TRIBAL 

Definition at line 729 of file npc_professions.cpp.

◆ SpecializationTrainers

Enumerator
N_TRAINER_SMITHOMNI1 
N_TRAINER_SMITHOMNI2 
N_TRAINER_WEAPON1 
N_TRAINER_WEAPON2 
N_TRAINER_ARMOR1 
N_TRAINER_ARMOR2 
N_TRAINER_HAMMER 
N_TRAINER_AXE 
N_TRAINER_SWORD 
N_TRAINER_DRAGON1 
N_TRAINER_DRAGON2 
N_TRAINER_ELEMENTAL1 
N_TRAINER_ELEMENTAL2 
N_TRAINER_TRIBAL1 
N_TRAINER_TRIBAL2 
N_TRAINER_SPELLFIRE 
N_TRAINER_MOONCLOTH 
N_TRAINER_SHADOWEAVE 
N_TRAINER_TRANSMUTE 
N_TRAINER_ELIXIR 
N_TRAINER_POTION 

Definition at line 165 of file npc_professions.cpp.

Function Documentation

◆ AddSC_npc_professions()

void AddSC_npc_professions ( )

Definition at line 1120 of file npc_professions.cpp.

+ Here is the caller graph for this function:

◆ DoHighUnlearnCost()

int32 DoHighUnlearnCost ( Player )

Definition at line 214 of file npc_professions.cpp.

+ Here is the caller graph for this function:

◆ DoLearnCost()

int32 DoLearnCost ( Player )

Definition at line 209 of file npc_professions.cpp.

+ Here is the caller graph for this function:

◆ DoLowUnlearnCost()

int32 DoLowUnlearnCost ( Player player)

Definition at line 230 of file npc_professions.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoMedUnlearnCost()

int32 DoMedUnlearnCost ( Player player)

Definition at line 219 of file npc_professions.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EquippedOk()

bool EquippedOk ( Player player,
uint32  spellId 
)

Definition at line 255 of file npc_professions.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessCastaction()

void ProcessCastaction ( Player player,
Creature creature,
uint32  spellId,
uint32  triggeredSpellId,
int32  cost 
)

Definition at line 239 of file npc_professions.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessUnlearnAction()

void ProcessUnlearnAction ( Player player,
Creature creature,
uint32  spellId,
uint32  alternativeSpellId,
int32  cost 
)

Definition at line 396 of file npc_professions.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProfessionUnlearnSpells()

void ProfessionUnlearnSpells ( Player player,
uint32  type 
)

Definition at line 282 of file npc_professions.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: