diff options
-rw-r--r-- | sql/updates/world/2016_01_03_00_world_335.sql | 4 | ||||
-rw-r--r-- | sql/updates/world/2016_01_03_01_world.sql | 26 | ||||
-rw-r--r-- | sql/updates/world/2016_01_03_02_world.sql | 9 | ||||
-rw-r--r-- | sql/updates/world/2016_01_03_03_world.sql | 10 | ||||
-rw-r--r-- | sql/updates/world/2016_01_03_04_world.sql | 1 | ||||
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuras.cpp | 10 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_druid.cpp | 109 |
7 files changed, 148 insertions, 21 deletions
diff --git a/sql/updates/world/2016_01_03_00_world_335.sql b/sql/updates/world/2016_01_03_00_world_335.sql new file mode 100644 index 00000000000..658b180a41a --- /dev/null +++ b/sql/updates/world/2016_01_03_00_world_335.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_dru_bear_form_passive'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(1178,'spell_dru_bear_form_passive'), +(9635,'spell_dru_bear_form_passive'); diff --git a/sql/updates/world/2016_01_03_01_world.sql b/sql/updates/world/2016_01_03_01_world.sql new file mode 100644 index 00000000000..3ddb56a9c72 --- /dev/null +++ b/sql/updates/world/2016_01_03_01_world.sql @@ -0,0 +1,26 @@ +-- +-- Sergeant Kan'ren, Wretched Captive and Novice Ranger SAI +SET @Sergeant := 16924; +SET @Captive := 16916; +SET @Ranger := 16923; + +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry` in (@Sergeant, @Captive, @Ranger); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@Sergeant, @Ranger, @Captive) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Sergeant*100 AND `source_type`=9; +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 +(@Sergeant,0,0,0,1,0,100,0,60000,100000,100000,120000,80,@Sergeant*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sergeant Kan'ren - Out of Combat - Action list"), +(@Sergeant*100,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sergeant Kan'ren - Action list - Say Line 0"), +(@Sergeant*100,9,1,0,0,0,100,0,5000,5000,0,0,5,18,0,0,0,0,0,19,@Captive,10,0,0,0,0,0,"Sergeant Kan'ren - Action list - Captive Play Emote 18"), +(@Sergeant*100,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,19,@Captive,10,0,0,0,0,0,"Sergeant Kan'ren - Action list - Captive Say Line 0"), +(@Sergeant*100,9,3,0,0,0,100,0,8000,8000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sergeant Kan'ren - Action list - Say Line 1"), +(@Captive,0,0,0,1,0,100,0,14000,14000,14000,14000,5,20,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wretched Captive - Out of Combat - Play Emote 20"), +(@Ranger,0,0,0,1,0,100,0,50000,70000,70000,80000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Ranger - Out of Combat - Say text"); + +UPDATE `creature` SET `movementtype`=0 WHERE `guid`=58691; +UPDATE `creature_addon` SET `path_id`=0 WHERE `guid`=58691; +DELETE FROM `waypoint_data` WHERE `id`=586910; +DELETE FROM `waypoint_scripts` WHERE `id` IN (66, 67, 68, 69, 70); + +DELETE FROM `creature_text` WHERE `entry`=@Ranger; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextID`) VALUES +(@Ranger,0,0, 'I might just have to go hunting for that Wretched beast now that there''s a bounty on his head.',12,1,100,0,0,0, 'Ranger', 12832); diff --git a/sql/updates/world/2016_01_03_02_world.sql b/sql/updates/world/2016_01_03_02_world.sql new file mode 100644 index 00000000000..79eba012e41 --- /dev/null +++ b/sql/updates/world/2016_01_03_02_world.sql @@ -0,0 +1,9 @@ +-- Issue #16168 +-- Orbaz Bloodbane: Fix incorrect creature texts +-- By: dr-j +UPDATE `creature_text` SET `BroadcastTextId`=31961 WHERE `entry`=31283 AND `groupid`=1 AND `id`=0; +UPDATE `creature_text` SET `BroadcastTextId`=31962 WHERE `entry`=31283 AND `groupid`=2 AND `id`=0; +UPDATE `creature_text` SET `BroadcastTextId`=31963 WHERE `entry`=31283 AND `groupid`=3 AND `id`=0; +UPDATE `creature_text` SET `BroadcastTextId`=31966 WHERE `entry`=31283 AND `groupid`=4 AND `id`=0; +UPDATE `creature_text` SET `BroadcastTextId`=31967 WHERE `entry`=31283 AND `groupid`=5 AND `id`=0; +UPDATE `creature_text` SET `BroadcastTextId`=31964 WHERE `entry`=31283 AND `groupid`=6 AND `id`=0; diff --git a/sql/updates/world/2016_01_03_03_world.sql b/sql/updates/world/2016_01_03_03_world.sql new file mode 100644 index 00000000000..1b1766ee557 --- /dev/null +++ b/sql/updates/world/2016_01_03_03_world.sql @@ -0,0 +1,10 @@ +-- Betrayal (Drakuru) fixes: +-- Fix "Blight Fog" cast behavior +-- Fix "Throw Blight Crystal" cast timing +-- By: dr-j +UPDATE `smart_scripts` SET `event_param2`=7500, `event_param3`=10000, `event_param4`=20000 WHERE `entryorguid`=28998 AND `source_type`=0 AND `id`=5 AND `link`=0; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=28998 AND `source_type`=0 AND `id` in(13,14); +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 +(28998, 0, 13, 0, 0, 0, 100, 0, 0, 0, 60000, 60000, 28, 54104, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overlord Drakuru - IC - Remove Aura (Blight Fog'), +(28998, 0, 14, 0, 0, 0, 100, 0, 45000, 45000, 60000, 60000, 11, 54104, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overlord Drakuru - IC - Cast Blight Fog'); diff --git a/sql/updates/world/2016_01_03_04_world.sql b/sql/updates/world/2016_01_03_04_world.sql new file mode 100644 index 00000000000..ffe8eb07fd5 --- /dev/null +++ b/sql/updates/world/2016_01_03_04_world.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `faction`=2109 WHERE `entry`=30012; diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 648bc5d6919..1b7e0f1ea0d 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1596,16 +1596,6 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b // mods at aura apply or remove switch (GetSpellInfo()->SpellFamilyName) { - case SPELLFAMILY_DRUID: - // Enrage - if ((GetSpellInfo()->SpellFamilyFlags[0] & 0x80000) && GetSpellInfo()->SpellIconID == 961) - { - if (target->HasAura(70726)) // Item - Druid T10 Feral 4P Bonus - if (apply) - target->CastSpell(target, 70725, true); - break; - } - break; case SPELLFAMILY_ROGUE: // Stealth if (GetSpellInfo()->SpellFamilyFlags[0] & 0x00400000) diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 89f7d7e0d7c..7b853c36075 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -29,11 +29,17 @@ enum DruidSpells { + SPELL_DRUID_BEAR_FORM_PASSIVE = 1178, + SPELL_DRUID_DIRE_BEAR_FORM_PASSIVE = 9635, + SPELL_DRUID_ENRAGE = 5229, SPELL_DRUID_ENRAGE_MOD_DAMAGE = 51185, + SPELL_DRUID_ENRAGED_DEFENSE = 70725, SPELL_DRUID_GLYPH_OF_TYPHOON = 62135, SPELL_DRUID_IDOL_OF_FERAL_SHADOWS = 34241, SPELL_DRUID_IDOL_OF_WORSHIP = 60774, SPELL_DRUID_INCREASED_MOONFIRE_DURATION = 38414, + SPELL_DRUID_ITEM_T8_BALANCE_RELIC = 64950, + SPELL_DRUID_ITEM_T10_FERAL_4P_BONUS = 70726, SPELL_DRUID_KING_OF_THE_JUNGLE = 48492, SPELL_DRUID_LIFEBLOOM_ENERGIZE = 64372, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL = 33778, @@ -42,8 +48,58 @@ enum DruidSpells SPELL_DRUID_NATURES_SPLENDOR = 57865, SPELL_DRUID_SURVIVAL_INSTINCTS = 50322, SPELL_DRUID_SAVAGE_ROAR = 62071, - SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178, - SPELL_DRUID_ITEM_T8_BALANCE_RELIC = 64950, + SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178 +}; + +// 1178 - Bear Form (Passive) +// 9635 - Dire Bear Form (Passive) +class spell_dru_bear_form_passive : public SpellScriptLoader +{ + public: + spell_dru_bear_form_passive() : SpellScriptLoader("spell_dru_bear_form_passive") { } + + class spell_dru_bear_form_passive_AuraScript : public AuraScript + { + PrepareAuraScript(spell_dru_bear_form_passive_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_ENRAGE) + || !sSpellMgr->GetSpellInfo(SPELL_DRUID_ITEM_T10_FERAL_4P_BONUS)) + return false; + return true; + } + + void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) + { + if (!GetUnitOwner()->HasAura(SPELL_DRUID_ENRAGE) || GetUnitOwner()->HasAura(SPELL_DRUID_ITEM_T10_FERAL_4P_BONUS)) + return; + + int32 mod = 0; + switch (GetId()) + { + case SPELL_DRUID_BEAR_FORM_PASSIVE: + mod = -27; + break; + case SPELL_DRUID_DIRE_BEAR_FORM_PASSIVE: + mod = -16; + break; + default: + return; + } + amount += mod; + } + + void Register() override + { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dru_bear_form_passive_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_BASE_RESISTANCE_PCT); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_dru_bear_form_passive_AuraScript(); + } }; // -1850 - Dash @@ -81,33 +137,63 @@ class spell_dru_enrage : public SpellScriptLoader public: spell_dru_enrage() : SpellScriptLoader("spell_dru_enrage") { } - class spell_dru_enrage_SpellScript : public SpellScript + class spell_dru_enrage_AuraScript : public AuraScript { - PrepareSpellScript(spell_dru_enrage_SpellScript); + PrepareAuraScript(spell_dru_enrage_AuraScript); bool Validate(SpellInfo const* /*spellInfo*/) override { if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_KING_OF_THE_JUNGLE) - || !sSpellMgr->GetSpellInfo(SPELL_DRUID_ENRAGE_MOD_DAMAGE)) + || !sSpellMgr->GetSpellInfo(SPELL_DRUID_ENRAGE_MOD_DAMAGE) + || !sSpellMgr->GetSpellInfo(SPELL_DRUID_ENRAGED_DEFENSE) + || !sSpellMgr->GetSpellInfo(SPELL_DRUID_ITEM_T10_FERAL_4P_BONUS)) return false; return true; } - void OnHit() + void RecalculateBaseArmor() { - if (AuraEffect const* aurEff = GetHitUnit()->GetAuraEffectOfRankedSpell(SPELL_DRUID_KING_OF_THE_JUNGLE, EFFECT_0)) - GetHitUnit()->CastCustomSpell(SPELL_DRUID_ENRAGE_MOD_DAMAGE, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetHitUnit(), true); + Unit::AuraEffectList const& auras = GetTarget()->GetAuraEffectsByType(SPELL_AURA_MOD_BASE_RESISTANCE_PCT); + for (Unit::AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i) + { + SpellInfo const* spellInfo = (*i)->GetSpellInfo(); + // Dire- / Bear Form (Passive) + if (spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && spellInfo->SpellFamilyFlags.HasFlag(0x0, 0x0, 0x2)) + (*i)->RecalculateAmount(); + } + } + + void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + Unit* target = GetTarget(); + if (AuraEffect const* aurEff = target->GetAuraEffectOfRankedSpell(SPELL_DRUID_KING_OF_THE_JUNGLE, EFFECT_0)) + target->CastCustomSpell(SPELL_DRUID_ENRAGE_MOD_DAMAGE, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), target, true); + + // Item - Druid T10 Feral 4P Bonus + if (target->HasAura(SPELL_DRUID_ITEM_T10_FERAL_4P_BONUS)) + target->CastSpell(target, SPELL_DRUID_ENRAGED_DEFENSE, true); + + RecalculateBaseArmor(); + } + + void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->RemoveAurasDueToSpell(SPELL_DRUID_ENRAGE_MOD_DAMAGE); + GetTarget()->RemoveAurasDueToSpell(SPELL_DRUID_ENRAGED_DEFENSE); + + RecalculateBaseArmor(); } void Register() override { - AfterHit += SpellHitFn(spell_dru_enrage_SpellScript::OnHit); + AfterEffectApply += AuraEffectApplyFn(spell_dru_enrage_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_PERIODIC_ENERGIZE, AURA_EFFECT_HANDLE_REAL); + AfterEffectRemove += AuraEffectRemoveFn(spell_dru_enrage_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_PERIODIC_ENERGIZE, AURA_EFFECT_HANDLE_REAL); } }; - SpellScript* GetSpellScript() const override + AuraScript* GetAuraScript() const override { - return new spell_dru_enrage_SpellScript(); + return new spell_dru_enrage_AuraScript(); } }; @@ -1089,6 +1175,7 @@ class spell_dru_wild_growth : public SpellScriptLoader void AddSC_druid_spell_scripts() { + new spell_dru_bear_form_passive(); new spell_dru_dash(); new spell_dru_enrage(); new spell_dru_glyph_of_starfire(); |