diff --git a/sql/updates/world/2016_02_22_03_world.sql b/sql/updates/world/2016_02_22_03_world.sql new file mode 100644 index 00000000000..a0af29e6e5b --- /dev/null +++ b/sql/updates/world/2016_02_22_03_world.sql @@ -0,0 +1,7 @@ +-- +-- Spell removed in 4.3.4 +DELETE FROM `spell_script_names` WHERE `spell_id`=52916; +-- Use DBC values +UPDATE `spell_proc_event` SET `CustomChance`=0, `Cooldown`=0 WHERE `entry` IN (51698,51700,51701); +-- Remove no longer existing script +UPDATE `gameobject_template` SET `ScriptName`='' WHERE `entry`=177226; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index f9f91147e6a..0cebf955ef1 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -7095,7 +7095,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg target = victim; break; } - // Finish movies that add combo + // Finish moves that add combo case 14189: // Seal Fate (Netherblade set) case 14157: // Ruthlessness { diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 01c8c6efc6e..627026f8ca5 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -1083,7 +1083,7 @@ class spell_dru_swift_flight_passive : public SpellScriptLoader } }; -// -33943 - Flight Form +// 33943 - Flight Form (Shapeshift) class spell_dru_flight_form : public SpellScriptLoader { public: diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index 3c52633110c..685768d82de 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -52,6 +52,7 @@ enum RogueSpells SPELL_ROGUE_TRICKS_OF_THE_TRADE_PROC = 59628, SPELL_ROGUE_SERRATED_BLADES_R1 = 14171, SPELL_ROGUE_RUPTURE = 1943, + SPELL_ROGUE_HONOR_AMONG_THIEVES_TRIGGERED = 51699 }; enum RogueSpellIcons @@ -1008,6 +1009,58 @@ public: } }; +// -51698 - Honor Among Thieves +class spell_rog_honor_among_thieves : public SpellScriptLoader +{ + public: + spell_rog_honor_among_thieves() : SpellScriptLoader("spell_rog_honor_among_thieves") { } + + class spell_rog_honor_among_thieves_AuraScript : public AuraScript + { + PrepareAuraScript(spell_rog_honor_among_thieves_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_HONOR_AMONG_THIEVES_TRIGGERED)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& /*eventInfo*/) + { + Unit* caster = GetCaster(); + if (!caster) + return false; + + return !caster->GetSpellHistory()->HasCooldown(SPELL_ROGUE_HONOR_AMONG_THIEVES_TRIGGERED); + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) + { + PreventDefaultAction(); + + Unit* caster = GetCaster(); + if (!caster) + return; + + if (Player* player = caster->ToPlayer()) + if (Unit* target = ObjectAccessor::GetUnit(*player, player->GetTarget())) + caster->CastSpell(target, SPELL_ROGUE_HONOR_AMONG_THIEVES_TRIGGERED, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD), nullptr, aurEff); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_rog_honor_among_thieves_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_rog_honor_among_thieves_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_rog_honor_among_thieves_AuraScript(); + } +}; + void AddSC_rogue_spell_scripts() { new spell_rog_blade_flurry(); @@ -1028,4 +1081,5 @@ void AddSC_rogue_spell_scripts() new spell_rog_tricks_of_the_trade(); new spell_rog_tricks_of_the_trade_proc(); new spell_rog_serrated_blades(); + new spell_rog_honor_among_thieves(); } diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 9d41fabe1ef..6980ba6edfa 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -61,7 +61,8 @@ enum ShamanSpells SPELL_SHAMAN_TOTEM_EARTHBIND_TOTEM = 6474, SPELL_SHAMAN_TOTEM_EARTHEN_POWER = 59566, SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042, - SPELL_SHAMAN_TIDAL_WAVES = 53390 + SPELL_SHAMAN_TIDAL_WAVES = 53390, + SPELL_SHAMAN_TOTEMIC_MASTERY = 38437 }; enum ShamanSpellIcons @@ -1231,6 +1232,46 @@ class spell_sha_tidal_waves : public SpellScriptLoader } }; +// 38443 - Totemic Mastery (Tier 6 - 2P) +class spell_sha_totemic_mastery : public SpellScriptLoader +{ +public: + spell_sha_totemic_mastery() : SpellScriptLoader("spell_sha_totemic_mastery") { } + + class spell_sha_totemic_mastery_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_totemic_mastery_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_TOTEMIC_MASTERY)) + return false; + return true; + } + + void HandleDummy(AuraEffect const* /*aurEff*/) + { + Unit* target = GetTarget(); + for (uint8 i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i) + if (!target->m_SummonSlot[i]) + return; + + target->CastSpell(target, SPELL_SHAMAN_TOTEMIC_MASTERY, true); + PreventDefaultAction(); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_sha_totemic_mastery_AuraScript::HandleDummy, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_sha_totemic_mastery_AuraScript(); + } +}; + void AddSC_shaman_spell_scripts() { new spell_sha_ancestral_awakening(); @@ -1260,4 +1301,5 @@ void AddSC_shaman_spell_scripts() new spell_sha_telluric_currents(); new spell_sha_thunderstorm(); new spell_sha_tidal_waves(); + new spell_sha_totemic_mastery(); } diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index cc7e5c208c5..14ada18d54a 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -26,7 +26,6 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" -#include "GameObjectAI.h" #include "Player.h" #include "SpellInfo.h" #include "WorldSession.h" @@ -149,12 +148,6 @@ enum ProfessionSpells 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, @@ -378,27 +371,6 @@ void ProfessionUnlearnSpells(Player* player, uint32 type) player->RemoveSpell(36075); // Wildfeather Leggings player->RemoveSpell(36078); // Living Crystal Breastplate break; - case S_UNLEARN_GOBLIN: // S_UNLEARN_GOBLIN - player->RemoveSpell(30565); // Foreman's Enchanted Helmet - player->RemoveSpell(30566); // Foreman's Reinforced Helmet - player->RemoveSpell(30563); // Goblin Rocket Launcher - player->RemoveSpell(56514); // Global Thermal Sapper Charge - player->RemoveSpell(36954); // Dimensional Ripper - Area 52 - player->RemoveSpell(23486); // Dimensional Ripper - Everlook - player->RemoveSpell(23078); // Goblin Jumper Cables XL - player->RemoveSpell(72952); // Shatter Rounds - break; - case S_UNLEARN_GNOMISH: // S_UNLEARN_GNOMISH - player->RemoveSpell(30575); // Gnomish Battle Goggles - player->RemoveSpell(30574); // Gnomish Power Goggles - player->RemoveSpell(56473); // Gnomish X-Ray Specs - player->RemoveSpell(30569); // Gnomish Poultryizer - player->RemoveSpell(30563); // Ultrasafe Transporter - Toshley's Station - player->RemoveSpell(23489); // Ultrasafe Transporter - Gadgetzan - player->RemoveSpell(23129); // World Enlarger - player->RemoveSpell(23096); // Gnomish Alarm-o-Bot - player->RemoveSpell(72953); // Iceblade Arrow - break; case S_UNLEARN_SPELLFIRE: // S_UNLEARN_SPELLFIRE player->RemoveSpell(26752); // Spellfire Belt player->RemoveSpell(26753); // Spellfire Gloves @@ -946,76 +918,6 @@ public: } }; -// Object ID - 177226 -// Book "Soothsaying for dummies" -enum SoothsayingForDummies -{ - GOSSIP_ID = 7058, - - // Engineering - OPTION_UNLEARN_GNOMISH = 0, - OPTION_UNLEARN_GOBLIN = 1, - OPTION_LEARN_GNOMISH = 2, - OPTION_LEARN_GOBLIN = 3, - - // Leatherworking - OPTION_LEARN_DRAGONSCALE = 4, - OPTION_LEARN_ELEMENTAL = 5, - OPTION_LEARN_TRIBAL = 6 -}; - -class go_soothsaying_for_dummies : public GameObjectScript -{ - public: - go_soothsaying_for_dummies() : GameObjectScript("go_soothsaying_for_dummies") { } - - struct go_soothsaying_for_dummiesAI : public GameObjectAI - { - go_soothsaying_for_dummiesAI(GameObject* go) : GameObjectAI(go) { } - - bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override - { - if (menuId != GOSSIP_ID) - return false; - - switch (gossipListId) - { - case OPTION_UNLEARN_GNOMISH: - ProcessUnlearnAction(player, nullptr, S_UNLEARN_GNOMISH, 0, 0); // cost is handled by gossip code - break; - case OPTION_UNLEARN_GOBLIN: - ProcessUnlearnAction(player, nullptr, S_UNLEARN_GOBLIN, 0, 0); - break; - case OPTION_LEARN_GNOMISH: - player->CastSpell(player, S_LEARN_GNOMISH, true); - break; - case OPTION_LEARN_GOBLIN: - player->CastSpell(player, S_LEARN_GOBLIN, true); - break; - case OPTION_LEARN_DRAGONSCALE: - player->CastSpell(player, S_LEARN_DRAGON, true); - break; - case OPTION_LEARN_ELEMENTAL: - player->CastSpell(player, S_LEARN_ELEMENTAL, true); - break; - case OPTION_LEARN_TRIBAL: - player->CastSpell(player, S_LEARN_TRIBAL, true); - break; - default: - return false; - } - - player->CLOSE_GOSSIP_MENU(); - return true; // prevent further processing - } - }; - - GameObjectAI* GetAI(GameObject* go) const override - { - return new go_soothsaying_for_dummiesAI(go); - } -}; - /*### # start menues leatherworking ###*/ @@ -1305,7 +1207,6 @@ void AddSC_npc_professions() new npc_prof_alchemy(); new npc_prof_blacksmith(); new npc_engineering_tele_trinket(); - new go_soothsaying_for_dummies(); new npc_prof_leather(); new npc_prof_tailor(); }