Core/Spells: fixed Predatory Strikes crit chance bonus

* removed some deprecated crit modifiers
This commit is contained in:
Ovahlord committed 2018-07-22 17:20:53 +02:00
1 parent 6d706dfb92
commit cbbbfcafd9
3 files changed
+8 -48

No files matched your search

@@ -0,0 +1 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_dru_predatory_strikes';
+7 -18
View File
@@ -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;
}
}
-30
View File
@@ -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);