|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include "ScriptMgr.h"#include "ScriptedCreature.h"#include "ScriptedGossip.h"#include "Player.h"#include "SpellInfo.h"#include "WorldSession.h"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!" |
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) |
| #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().
| #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().
| #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().
| #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().
| #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().
| #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().
| #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().
| #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().
| #define GOSSIP_ITEM_KABLAM "[PH] Unknown" |
Definition at line 777 of file npc_professions.cpp.
Referenced by npc_engineering_tele_trinket::OnGossipHello().
| #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().
| #define GOSSIP_LEARN_AXE "Please teach me how to become a Axesmith, Kilram" |
Definition at line 71 of file npc_professions.cpp.
Referenced by npc_prof_blacksmith::OnGossipHello(), and npc_prof_blacksmith::SendConfirmLearn().
| #define GOSSIP_LEARN_ELIXIR "Please teach me how to become a Master of Elixirs, Lorokeem" |
Definition at line 56 of file npc_professions.cpp.
Referenced by npc_prof_alchemy::OnGossipHello(), and npc_prof_alchemy::SendConfirmLearn().
| #define GOSSIP_LEARN_HAMMER "Please teach me how to become a Hammersmith, Lilith" |
Definition at line 69 of file npc_professions.cpp.
Referenced by npc_prof_blacksmith::OnGossipHello(), and npc_prof_blacksmith::SendConfirmLearn().
| #define GOSSIP_LEARN_MOONCLOTH "Please teach me how to become a Mooncloth tailor" |
Definition at line 86 of file npc_professions.cpp.
Referenced by npc_prof_tailor::OnGossipHello(), and npc_prof_tailor::SendConfirmLearn().
| #define GOSSIP_LEARN_POTION "Please teach me how to become a Master of Potions, Lauranna" |
Definition at line 52 of file npc_professions.cpp.
Referenced by npc_prof_alchemy::OnGossipHello(), and npc_prof_alchemy::SendConfirmLearn().
| #define GOSSIP_LEARN_SHADOWEAVE "Please teach me how to become a Shadoweave tailor" |
Definition at line 88 of file npc_professions.cpp.
Referenced by npc_prof_tailor::OnGossipHello(), and npc_prof_tailor::SendConfirmLearn().
| #define GOSSIP_LEARN_SPELLFIRE "Please teach me how to become a Spellcloth tailor" |
Definition at line 84 of file npc_professions.cpp.
Referenced by npc_prof_tailor::OnGossipHello(), and npc_prof_tailor::SendConfirmLearn().
| #define GOSSIP_LEARN_SWORD "Please teach me how to become a Swordsmith, Seril" |
Definition at line 73 of file npc_professions.cpp.
Referenced by npc_prof_blacksmith::OnGossipHello(), and npc_prof_blacksmith::SendConfirmLearn().
| #define GOSSIP_LEARN_TRANSMUTE "Please teach me how to become a Master of Transmutations, Zarevhi" |
Definition at line 54 of file npc_professions.cpp.
Referenced by npc_prof_alchemy::OnGossipHello(), and npc_prof_alchemy::SendConfirmLearn().
| #define GOSSIP_SENDER_CHECK 52 |
Definition at line 46 of file npc_professions.cpp.
Referenced by npc_prof_alchemy::OnGossipSelect(), npc_prof_blacksmith::OnGossipSelect(), npc_prof_leather::OnGossipSelect(), npc_prof_tailor::OnGossipSelect(), npc_prof_alchemy::SendConfirmLearn(), npc_prof_blacksmith::SendConfirmLearn(), npc_prof_tailor::SendConfirmLearn(), npc_prof_alchemy::SendConfirmUnlearn(), npc_prof_blacksmith::SendConfirmUnlearn(), npc_prof_leather::SendConfirmUnlearn(), and npc_prof_tailor::SendConfirmUnlearn().
| #define GOSSIP_SENDER_LEARN 50 |
Definition at line 44 of file npc_professions.cpp.
Referenced by npc_prof_alchemy::OnGossipHello(), npc_prof_blacksmith::OnGossipHello(), npc_prof_tailor::OnGossipHello(), npc_prof_alchemy::OnGossipSelect(), npc_prof_blacksmith::OnGossipSelect(), and npc_prof_tailor::OnGossipSelect().
| #define GOSSIP_SENDER_UNLEARN 51 |
Definition at line 45 of file npc_professions.cpp.
Referenced by npc_prof_alchemy::OnGossipHello(), npc_prof_blacksmith::OnGossipHello(), npc_prof_leather::OnGossipHello(), npc_prof_tailor::OnGossipHello(), npc_prof_alchemy::OnGossipSelect(), npc_prof_blacksmith::OnGossipSelect(), npc_prof_leather::OnGossipSelect(), and npc_prof_tailor::OnGossipSelect().
| #define GOSSIP_UNLEARN_AXE "I wish to unlearn Axesmithing" |
Definition at line 72 of file npc_professions.cpp.
Referenced by npc_prof_blacksmith::OnGossipHello(), and npc_prof_blacksmith::SendConfirmUnlearn().
| #define GOSSIP_UNLEARN_DRAGON "I wish to unlearn Dragonscale Leatherworking" |
Definition at line 78 of file npc_professions.cpp.
Referenced by npc_prof_leather::OnGossipHello(), and npc_prof_leather::SendConfirmUnlearn().
| #define GOSSIP_UNLEARN_ELEMENTAL "I wish to unlearn Elemental Leatherworking" |
Definition at line 79 of file npc_professions.cpp.
Referenced by npc_prof_leather::OnGossipHello(), and npc_prof_leather::SendConfirmUnlearn().
| #define GOSSIP_UNLEARN_ELIXIR "I wish to unlearn Elixir Mastery" |
Definition at line 57 of file npc_professions.cpp.
Referenced by npc_prof_alchemy::OnGossipHello(), and npc_prof_alchemy::SendConfirmUnlearn().
| #define GOSSIP_UNLEARN_HAMMER "I wish to unlearn Hammersmithing" |
Definition at line 70 of file npc_professions.cpp.
Referenced by npc_prof_blacksmith::OnGossipHello(), and npc_prof_blacksmith::SendConfirmUnlearn().
| #define GOSSIP_UNLEARN_MOONCLOTH "I wish to unlearn Mooncloth Tailoring" |
Definition at line 87 of file npc_professions.cpp.
Referenced by npc_prof_tailor::OnGossipHello(), and npc_prof_tailor::SendConfirmUnlearn().
| #define GOSSIP_UNLEARN_POTION "I wish to unlearn Potion Mastery" |
Definition at line 53 of file npc_professions.cpp.
Referenced by npc_prof_alchemy::OnGossipHello(), and npc_prof_alchemy::SendConfirmUnlearn().
| #define GOSSIP_UNLEARN_SHADOWEAVE "I wish to unlearn Shadoweave Tailoring" |
Definition at line 89 of file npc_professions.cpp.
Referenced by npc_prof_tailor::OnGossipHello(), and npc_prof_tailor::SendConfirmUnlearn().
| #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().
| #define GOSSIP_UNLEARN_SPELLFIRE "I wish to unlearn Spellfire Tailoring" |
Definition at line 85 of file npc_professions.cpp.
Referenced by npc_prof_tailor::OnGossipHello(), and npc_prof_tailor::SendConfirmUnlearn().
| #define GOSSIP_UNLEARN_SWORD "I wish to unlearn Swordsmithing" |
Definition at line 74 of file npc_professions.cpp.
Referenced by npc_prof_blacksmith::OnGossipHello(), and npc_prof_blacksmith::SendConfirmUnlearn().
| #define GOSSIP_UNLEARN_TRANSMUTE "I wish to unlearn Transmutation Mastery" |
Definition at line 55 of file npc_professions.cpp.
Referenced by npc_prof_alchemy::OnGossipHello(), and npc_prof_alchemy::SendConfirmUnlearn().
| #define GOSSIP_UNLEARN_TRIBAL "I wish to unlearn Tribal Leatherworking" |
Definition at line 80 of file npc_professions.cpp.
Referenced by npc_prof_leather::OnGossipHello(), and npc_prof_leather::SendConfirmUnlearn().
| #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().
| #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().
| #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.
| #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.
| #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.
| #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.
| #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.
| #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.
| #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.
| enum EngineeringTrinkets |
Definition at line 757 of file npc_professions.cpp.
| enum ProfessionSpells |
Definition at line 96 of file npc_professions.cpp.
| void AddSC_npc_professions | ( | ) |
Definition at line 1151 of file npc_professions.cpp.
Referenced by AddWorldScripts().
Definition at line 177 of file npc_professions.cpp.
Referenced by npc_prof_alchemy::SendActionMenu(), npc_prof_tailor::SendActionMenu(), npc_prof_alchemy::SendConfirmUnlearn(), and npc_prof_tailor::SendConfirmUnlearn().
Definition at line 172 of file npc_professions.cpp.
Referenced by npc_prof_alchemy::SendActionMenu(), and npc_prof_tailor::SendActionMenu().
Definition at line 193 of file npc_professions.cpp.
References Unit::getLevel().
Referenced by npc_prof_blacksmith::SendActionMenu(), and npc_prof_blacksmith::SendConfirmUnlearn().
Definition at line 182 of file npc_professions.cpp.
References Unit::getLevel().
Referenced by npc_prof_blacksmith::SendActionMenu(), npc_prof_leather::SendActionMenu(), npc_prof_blacksmith::SendConfirmUnlearn(), and npc_prof_leather::SendConfirmUnlearn().
Definition at line 218 of file npc_professions.cpp.
References SpellInfo::Effects, EQUIPMENT_SLOT_END, EQUIPMENT_SLOT_START, Object::GetEntry(), Player::GetItemByPos(), Item::GetTemplate(), INVENTORY_SLOT_BAG_0, ItemTemplate::RequiredSpell, SF_LOG_DEBUG, sSpellMgr, and SpellEffectInfo::TriggerSpell.
Referenced by ProcessUnlearnAction().
| void ProcessCastaction | ( | Player * | player, |
| Creature * | creature, | ||
| uint32 | spellId, | ||
| uint32 | triggeredSpellId, | ||
| int32 | cost ) |
Definition at line 202 of file npc_professions.cpp.
References BUY_ERR_NOT_ENOUGHT_MONEY, Unit::CastSpell(), Object::GetObjectGUID(), Player::HasEnoughMoney(), Player::HasSpell(), Player::ModifyMoney(), and Player::SendBuyFailed().
Referenced by npc_prof_alchemy::SendActionMenu(), and npc_prof_tailor::SendActionMenu().
| void ProcessUnlearnAction | ( | Player * | player, |
| Creature * | creature, | ||
| uint32 | spellId, | ||
| uint32 | alternativeSpellId, | ||
| int32 | cost ) |
Definition at line 338 of file npc_professions.cpp.
References BUY_ERR_NOT_ENOUGHT_MONEY, Unit::CastSpell(), EQUIP_ERR_CLIENT_LOCKED_OUT, EquippedOk(), Object::GetObjectGUID(), Player::HasEnoughMoney(), Player::ModifyMoney(), ProfessionUnlearnSpells(), Player::SendBuyFailed(), and Player::SendEquipError().
Referenced by npc_prof_blacksmith::SendActionMenu(), npc_prof_leather::SendActionMenu(), and npc_prof_tailor::SendActionMenu().
Definition at line 245 of file npc_professions.cpp.
References Player::removeSpell(), S_UNLEARN_ARMOR, S_UNLEARN_AXE, S_UNLEARN_DRAGON, S_UNLEARN_ELEMENTAL, S_UNLEARN_HAMMER, S_UNLEARN_MOONCLOTH, S_UNLEARN_SHADOWEAVE, S_UNLEARN_SPELLFIRE, S_UNLEARN_SWORD, S_UNLEARN_TRIBAL, and S_UNLEARN_WEAPON.
Referenced by ProcessUnlearnAction().