diff --git a/sql/updates/world/custom/custom_2018_07_22_01_world.sql b/sql/updates/world/custom/custom_2018_07_22_01_world.sql new file mode 100644 index 00000000000..2870fda1244 --- /dev/null +++ b/sql/updates/world/custom/custom_2018_07_22_01_world.sql @@ -0,0 +1 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_dru_predatory_strikes'; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index a83e2919d77..e85e78bbef2 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -7140,24 +7140,6 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto if (AuraEffect const* aurEff = GetAuraEffect(56369, EFFECT_0)) crit_chance += aurEff->GetAmount(); break; - case SPELLFAMILY_DRUID: - // Improved Faerie Fire - if (victim->HasAuraState(AURA_STATE_FAERIE_FIRE)) - if (AuraEffect const* aurEff = GetDummyAuraEffect(SPELLFAMILY_DRUID, 109, 0)) - crit_chance += aurEff->GetAmount(); - - // cumulative effect - don't break - - // Starfire - if (spellProto->SpellFamilyFlags[0] & 0x4 && spellProto->SpellIconID == 1485) - { - // Improved Insect Swarm - if (AuraEffect const* aurEff = GetDummyAuraEffect(SPELLFAMILY_DRUID, 1771, 0)) - if (victim->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x00000002, 0, 0)) - crit_chance += aurEff->GetAmount(); - break; - } - break; case SPELLFAMILY_ROGUE: // Shiv-applied poisons can't crit if (FindCurrentSpellBySpellId(5938)) @@ -7210,6 +7192,13 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto crit_chance += rendAndTear->GetAmount(); break; } + + // Predatory Strikes + if (spellProto->SpellFamilyFlags[0] & 0x00010000) + if (AuraEffect const* critAuraEff = GetDummyAuraEffect(SPELLFAMILY_DRUID, 1563, EFFECT_0)) + if (AuraEffect const* healthAuraEff = GetDummyAuraEffect(SPELLFAMILY_DRUID, 1563, EFFECT_1)) + if (victim->GetHealthPct() >= healthAuraEff->GetAmount()) + crit_chance += critAuraEff->GetAmount(); break; } } diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 2993e9a6483..aa94c34ab8e 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -815,35 +815,6 @@ class spell_dru_living_seed_proc : public SpellScriptLoader } }; -// -16972 - Predatory Strikes -class spell_dru_predatory_strikes : public SpellScriptLoader -{ - public: - spell_dru_predatory_strikes() : SpellScriptLoader("spell_dru_predatory_strikes") { } - - class spell_dru_predatory_strikes_AuraScript : public AuraScript - { - PrepareAuraScript(spell_dru_predatory_strikes_AuraScript); - - void UpdateAmount(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) - { - if (Player* target = GetTarget()->ToPlayer()) - target->UpdateAttackPowerAndDamage(); - } - - void Register() override - { - AfterEffectApply += AuraEffectApplyFn(spell_dru_predatory_strikes_AuraScript::UpdateAmount, EFFECT_ALL, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK); - AfterEffectRemove += AuraEffectRemoveFn(spell_dru_predatory_strikes_AuraScript::UpdateAmount, EFFECT_ALL, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK); - } - }; - - AuraScript* GetAuraScript() const override - { - return new spell_dru_predatory_strikes_AuraScript(); - } -}; - // 1079 - Rip class spell_dru_rip : public SpellScriptLoader { @@ -1878,7 +1849,6 @@ void AddSC_druid_spell_scripts() new spell_dru_living_seed(); new spell_dru_living_seed_proc(); RegisterAuraScript(spell_dru_moonfire); - new spell_dru_predatory_strikes(); new spell_dru_rejuvenation(); new spell_dru_rip(); RegisterAuraScript(spell_dru_savage_defense);