aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/3.3.5/2017_10_29_14_world.sql112
-rw-r--r--src/server/scripts/World/npc_professions.cpp221
2 files changed, 115 insertions, 218 deletions
diff --git a/sql/updates/world/3.3.5/2017_10_29_14_world.sql b/sql/updates/world/3.3.5/2017_10_29_14_world.sql
new file mode 100644
index 00000000000..f1dbc242b69
--- /dev/null
+++ b/sql/updates/world/3.3.5/2017_10_29_14_world.sql
@@ -0,0 +1,112 @@
+--
+SET @TEXTID := 11074;
+DELETE FROM `npc_text` WHERE `ID`=@TEXTID;
+INSERT INTO `npc_text` (`ID`, `text0_1`, `BroadcastTextID0`) VALUES
+(@TEXTID, "Forgetting your skill in Potion Mastery is not something to do lightly.$B$BAre you absolutely sure?", 21870);
+
+SET @MENUID := 21402; -- Need 3
+DELETE FROM `gossip_menu` WHERE `MenuID` BETWEEN @MENUID AND @MENUID+2;
+INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES
+(@MENUID, 11076, 0), -- Transmutation
+(@MENUID+1, 11075, 0), -- Elixir
+(@MENUID+2, @TEXTID, 0); -- Potion
+
+DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (8542, @MENUID, 8540, @MENUID+1, 7571, @MENUID+2);
+INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
+(8542, 0, 0, "I wish to unlearn Transmutation Mastery.", 21876, 1, 1, @MENUID, 0, 0, 0, "", 0, 0),
+(8542, 1, 0, "I've trained as an alchemist once again. I wish to specialize in transmutations.", 20292, 1, 1, 0, 0, 0, 0, "", 0, 0),
+(@MENUID, 0, 0, "I've made up my mind. Make me forget my alchemy mastery!", 21873, 1, 1, 0, 0, 0, 1500000, "Forgetting your knowledge is an expensive endeavor. Are you willing to pay the cost?", 21569, 0),
+(8540, 0, 0, "I wish to unlearn Elixir Mastery.", 21875, 1, 1, @MENUID+1, 0, 0, 0, "", 0, 0),
+(8540, 1, 0, "I've trained as an alchemist once again. I wish to specialize in elixirs.", 20289, 1, 1, 0, 0, 0, 0, "", 0, 0),
+(@MENUID+1, 0, 0, "I've made up my mind. Make me forget my alchemy mastery!", 21873, 1, 1, 0, 0, 0, 1500000, "Forgetting your knowledge is an expensive endeavor. Are you willing to pay the cost?", 21569, 0),
+(7571, 0, 0, "I wish to unlearn Potion Mastery.", 21874, 1, 1, @MENUID+2, 0, 0, 0, "", 0, 0),
+(7571, 1, 0, "I've trained as an alchemist once again. I wish to specialize in potions.", 20287, 1, 1, 0, 0, 0, 0, "", 0, 0),
+(@MENUID+2, 0, 0, "I've made up my mind. Make me forget my alchemy mastery!", 21873, 1, 1, 0, 0, 0, 1500000, "Forgetting your knowledge is an expensive endeavor. Are you willing to pay the cost?", 21569, 0);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (8542, 8540, 7571);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+-- Unlearn Transmutation
+(15, 8542, 0, 0, 0, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"),
+(15, 8542, 0, 0, 0, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"),
+(15, 8542, 0, 0, 0, 25, 0, 28672, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' learned"),
+-- Learn Transmutation
+(15, 8542, 1, 0, 0, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"),
+(15, 8542, 1, 0, 0, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"),
+(15, 8542, 1, 0, 0, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"),
+(15, 8542, 1, 0, 0, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"),
+(15, 8542, 1, 0, 0, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"),
+(15, 8542, 1, 0, 0, 8, 0, 10899, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Transmutation' rewarded OR"),
+(15, 8542, 1, 0, 1, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"),
+(15, 8542, 1, 0, 1, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"),
+(15, 8542, 1, 0, 1, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"),
+(15, 8542, 1, 0, 1, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"),
+(15, 8542, 1, 0, 1, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"),
+(15, 8542, 1, 0, 1, 8, 0, 10902, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Elixirs' rewarded OR"),
+(15, 8542, 1, 0, 2, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"),
+(15, 8542, 1, 0, 2, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"),
+(15, 8542, 1, 0, 2, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"),
+(15, 8542, 1, 0, 2, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"),
+(15, 8542, 1, 0, 2, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"),
+(15, 8542, 1, 0, 2, 8, 0, 10897, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Potions' rewarded"),
+-- Unlearn Elixir
+(15, 8540, 0, 0, 0, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"),
+(15, 8540, 0, 0, 0, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"),
+(15, 8540, 0, 0, 0, 25, 0, 28677, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' learned"),
+-- Learn Elixir
+(15, 8540, 1, 0, 0, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"),
+(15, 8540, 1, 0, 0, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"),
+(15, 8540, 1, 0, 0, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"),
+(15, 8540, 1, 0, 0, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"),
+(15, 8540, 1, 0, 0, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"),
+(15, 8540, 1, 0, 0, 8, 0, 10899, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Transmutation' rewarded OR"),
+(15, 8540, 1, 0, 1, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"),
+(15, 8540, 1, 0, 1, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"),
+(15, 8540, 1, 0, 1, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"),
+(15, 8540, 1, 0, 1, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"),
+(15, 8540, 1, 0, 1, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"),
+(15, 8540, 1, 0, 1, 8, 0, 10902, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Elixirs' rewarded OR"),
+(15, 8540, 1, 0, 2, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"),
+(15, 8540, 1, 0, 2, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"),
+(15, 8540, 1, 0, 2, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"),
+(15, 8540, 1, 0, 2, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"),
+(15, 8540, 1, 0, 2, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"),
+(15, 8540, 1, 0, 2, 8, 0, 10897, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Potions' rewarded"),
+-- Unlearn Potion
+(15, 7571, 0, 0, 0, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"),
+(15, 7571, 0, 0, 0, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"),
+(15, 7571, 0, 0, 0, 25, 0, 28675, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' learned"),
+-- Learn Potion
+(15, 7571, 1, 0, 0, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"),
+(15, 7571, 1, 0, 0, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"),
+(15, 7571, 1, 0, 0, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"),
+(15, 7571, 1, 0, 0, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"),
+(15, 7571, 1, 0, 0, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"),
+(15, 7571, 1, 0, 0, 8, 0, 10899, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Transmutation' rewarded OR"),
+(15, 7571, 1, 0, 1, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"),
+(15, 7571, 1, 0, 1, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"),
+(15, 7571, 1, 0, 1, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"),
+(15, 7571, 1, 0, 1, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"),
+(15, 7571, 1, 0, 1, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"),
+(15, 7571, 1, 0, 1, 8, 0, 10902, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Elixirs' rewarded OR"),
+(15, 7571, 1, 0, 2, 27, 0, 68, 3, 0, 0, 0, 0, "", "Gossip option requires level 68 or higher"),
+(15, 7571, 1, 0, 2, 7, 0, 171, 350, 0, 0, 0, 0, "", "Gossip option requires an Alchemy skill of 350 or higher"),
+(15, 7571, 1, 0, 2, 25, 0, 28672, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Transmutation Master' NOT learned"),
+(15, 7571, 1, 0, 2, 25, 0, 28677, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Elixir Master' NOT learned"),
+(15, 7571, 1, 0, 2, 25, 0, 28675, 0, 0, 1, 0, 0, "", "Gossip option requires player to have the spell 'Potion Master' NOT learned"),
+(15, 7571, 1, 0, 2, 8, 0, 10897, 0, 0, 0, 0, 0, "", "Gossip option requires player to have the quest 'Master of Potions' rewarded");
+
+UPDATE `creature_template` SET `AIName`="SmartAI", `ScriptName`="" WHERE `entry` IN (22427, 19052, 17909);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (22427, 19052, 17909) AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(22427, 0, 0, 1, 62, 0, 100, 0, @MENUID, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Zarevhi - On Gossip Option 0 Selected - Close Gossip"),
+(22427, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 41565, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Zarevhi - On Gossip Option 0 Selected - Cast 'Unlearn Transmutation Mastery'"),
+(22427, 0, 2, 3, 62, 0, 100, 0, 8542, 1, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Zarevhi - On Gossip Option 1 Selected - Close Gossip"),
+(22427, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 85, 28674, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Zarevhi - On Gossip Option 1 Selected - Invoker Cast 'Transmutation Master'"),
+(19052, 0, 0, 1, 62, 0, 100, 0, @MENUID+1, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lorokeem - On Gossip Option 0 Selected - Close Gossip"),
+(19052, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 41564, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lorokeem - On Gossip Option 0 Selected - Cast 'Unlearn Elixir Mastery'"),
+(19052, 0, 2, 3, 62, 0, 100, 0, 8540, 1, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lorokeem - On Gossip Option 1 Selected - Close Gossip"),
+(19052, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 85, 28678, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lorokeem - On Gossip Option 1 Selected - Invoker Cast 'Elixir Master'"),
+(17909, 0, 0, 1, 62, 0, 100, 0, @MENUID+2, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lauranna Thar'well - On Gossip Option 0 Selected - Close Gossip"),
+(17909, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 41563, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lauranna Thar'well - On Gossip Option 0 Selected - Cast 'Unlearn Potion Mastery'"),
+(17909, 0, 2, 3, 62, 0, 100, 0, 7571, 1, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lauranna Thar'well - On Gossip Option 1 Selected - Close Gossip"),
+(17909, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 85, 28676, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Lauranna Thar'well - On Gossip Option 1 Selected - Invoker Cast 'Potion Master'");
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 9f1df957784..b68722b7ff8 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -64,15 +64,6 @@ A few notes for future developement:
# gossip item and box texts
###*/
-#define GOSSIP_LEARN_POTION "Please teach me how to become a Master of Potions, Lauranna"
-#define GOSSIP_UNLEARN_POTION "I wish to unlearn Potion Mastery"
-#define GOSSIP_LEARN_TRANSMUTE "Please teach me how to become a Master of Transmutations, Zarevhi"
-#define GOSSIP_UNLEARN_TRANSMUTE "I wish to unlearn Transmutation Mastery"
-#define GOSSIP_LEARN_ELIXIR "Please teach me how to become a Master of Elixirs, Lorokeem"
-#define GOSSIP_UNLEARN_ELIXIR "I wish to unlearn Elixir Mastery"
-
-#define BOX_UNLEARN_ALCHEMY_SPEC "Do you really want to unlearn your alchemy specialty and lose all associated recipes? \n Cost: "
-
#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 GOSSIP_ARMOR_LEARN "Please teach me how to become a Armorsmith"
@@ -168,19 +159,7 @@ enum ProfessionSpells
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,
+ S_UNLEARN_SHADOWEAVE = 41559
};
/*###
@@ -188,11 +167,6 @@ enum ProfessionSpells
###*/
enum SpecializationTrainers
{
- /* Alchemy */
- N_TRAINER_TRANSMUTE = 22427, // Zarevhi
- N_TRAINER_ELIXIR = 19052, // Lorokeem
- N_TRAINER_POTION = 17909, // Lauranna Thar'well
-
/* Blacksmithing */
N_TRAINER_SMITHOMNI1 = 11145, // Myolor Sunderfury
N_TRAINER_SMITHOMNI2 = 11176, // Krathok Moltenfist
@@ -219,26 +193,15 @@ enum SpecializationTrainers
};
/*###
-# specialization quests
-###*/
-enum SpecializationQuests
-{
- /* Alchemy */
- Q_MASTER_TRANSMUTE = 10899,
- Q_MASTER_ELIXIR = 10902,
- Q_MASTER_POTION = 10897,
-};
-
-/*###
# formulas to calculate unlearning cost
###*/
-int32 DoLearnCost(Player* /*player*/) //tailor, alchemy
+int32 DoLearnCost(Player* /*player*/) //tailor
{
return 200000;
}
-int32 DoHighUnlearnCost(Player* /*player*/) //tailor, alchemy
+int32 DoHighUnlearnCost(Player* /*player*/) //tailor
{
return 1500000;
}
@@ -441,183 +404,6 @@ void ProcessUnlearnAction(Player* player, Creature* creature, uint32 spellId, ui
}
/*###
-# start menues alchemy
-###*/
-
-class npc_prof_alchemy : public CreatureScript
-{
-public:
- npc_prof_alchemy() : CreatureScript("npc_prof_alchemy") { }
-
- struct npc_prof_alchemyAI : public ScriptedAI
- {
- npc_prof_alchemyAI(Creature* creature) : ScriptedAI(creature) { }
-
- inline bool HasAlchemySpell(Player* player)
- {
- return (player->HasSpell(S_TRANSMUTE) || player->HasSpell(S_ELIXIR) || player->HasSpell(S_POTION));
- }
-
- bool GossipHello(Player* player) override
- {
- if (me->IsQuestGiver())
- player->PrepareQuestMenu(me->GetGUID());
-
- if (me->IsVendor())
- AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
-
- if (me->IsTrainer())
- AddGossipItemFor(player, GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
-
- if (player->HasSkill(SKILL_ALCHEMY) && player->GetBaseSkillValue(SKILL_ALCHEMY) >= 350 && player->getLevel() > 67)
- {
- if (player->GetQuestRewardStatus(Q_MASTER_TRANSMUTE) || player->GetQuestRewardStatus(Q_MASTER_ELIXIR) || player->GetQuestRewardStatus(Q_MASTER_POTION))
- {
- switch (me->GetEntry())
- {
- case N_TRAINER_TRANSMUTE: //Zarevhi
- if (!HasAlchemySpell(player))
- AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 1);
- if (player->HasSpell(S_TRANSMUTE))
- AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4);
- break;
- case N_TRAINER_ELIXIR: //Lorokeem
- if (!HasAlchemySpell(player))
- AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 2);
- if (player->HasSpell(S_ELIXIR))
- AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 5);
- break;
- case N_TRAINER_POTION: //Lauranna Thar'well
- if (!HasAlchemySpell(player))
- AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 3);
- if (player->HasSpell(S_POTION))
- AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 6);
- break;
- }
- }
- }
-
- SendGossipMenuFor(player, player->GetGossipTextId(me), me->GetGUID());
- return true;
- }
-
- void SendActionMenu(Player* player, uint32 action)
- {
- switch (action)
- {
- case GOSSIP_ACTION_TRADE:
- player->GetSession()->SendListInventory(me->GetGUID());
- break;
- case GOSSIP_ACTION_TRAIN:
- player->GetSession()->SendTrainerList(me->GetGUID());
- break;
- //Learn Alchemy
- case GOSSIP_ACTION_INFO_DEF + 1:
- ProcessCastaction(player, me, S_TRANSMUTE, S_LEARN_TRANSMUTE, DoLearnCost(player));
- break;
- case GOSSIP_ACTION_INFO_DEF + 2:
- ProcessCastaction(player, me, S_ELIXIR, S_LEARN_ELIXIR, DoLearnCost(player));
- break;
- case GOSSIP_ACTION_INFO_DEF + 3:
- ProcessCastaction(player, me, S_POTION, S_LEARN_POTION, DoLearnCost(player));
- break;
- //Unlearn Alchemy
- case GOSSIP_ACTION_INFO_DEF + 4:
- ProcessCastaction(player, me, 0, S_UNLEARN_TRANSMUTE, DoHighUnlearnCost(player));
- break;
- case GOSSIP_ACTION_INFO_DEF + 5:
- ProcessCastaction(player, me, 0, S_UNLEARN_ELIXIR, DoHighUnlearnCost(player));
- break;
- case GOSSIP_ACTION_INFO_DEF + 6:
- ProcessCastaction(player, me, 0, S_UNLEARN_POTION, DoHighUnlearnCost(player));
- break;
- }
- }
-
- void SendConfirmLearn(Player* player, uint32 action)
- {
- if (action)
- {
- switch (me->GetEntry())
- {
- case N_TRAINER_TRANSMUTE:
- AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, action);
- //unknown textID ()
- SendGossipMenuFor(player, player->GetGossipTextId(me), me->GetGUID());
- break;
- case N_TRAINER_ELIXIR:
- AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_CHECK, action);
- //unknown textID ()
- SendGossipMenuFor(player, player->GetGossipTextId(me), me->GetGUID());
- break;
- case N_TRAINER_POTION:
- AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_CHECK, action);
- //unknown textID ()
- SendGossipMenuFor(player, player->GetGossipTextId(me), me->GetGUID());
- break;
- }
- }
- }
-
- void SendConfirmUnlearn(Player* player, uint32 action)
- {
- if (action)
- {
- switch (me->GetEntry())
- {
- case N_TRAINER_TRANSMUTE:
- AddGossipItemFor(player, 0, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(player), false);
- //unknown textID ()
- SendGossipMenuFor(player, player->GetGossipTextId(me), me->GetGUID());
- break;
- case N_TRAINER_ELIXIR:
- AddGossipItemFor(player, 0, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(player), false);
- //unknown textID ()
- SendGossipMenuFor(player, player->GetGossipTextId(me), me->GetGUID());
- break;
- case N_TRAINER_POTION:
- AddGossipItemFor(player, 0, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_CHECK, action, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(player), false);
- //unknown textID ()
- SendGossipMenuFor(player, player->GetGossipTextId(me), me->GetGUID());
- break;
- }
- }
- }
-
- bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
- {
- uint32 const sender = player->PlayerTalkClass->GetGossipOptionSender(gossipListId);
- uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
- ClearGossipMenuFor(player);
- switch (sender)
- {
- case GOSSIP_SENDER_MAIN:
- SendActionMenu(player, action);
- break;
-
- case GOSSIP_SENDER_LEARN:
- SendConfirmLearn(player, action);
- break;
-
- case GOSSIP_SENDER_UNLEARN:
- SendConfirmUnlearn(player, action);
- break;
-
- case GOSSIP_SENDER_CHECK:
- SendActionMenu(player, action);
- break;
- }
- return true;
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_prof_alchemyAI(creature);
- }
-};
-
-/*###
# start menues blacksmith
###*/
@@ -1365,7 +1151,6 @@ public:
void AddSC_npc_professions()
{
- new npc_prof_alchemy();
new npc_prof_blacksmith();
new npc_engineering_tele_trinket();
new go_soothsaying_for_dummies();