From d04e04548bb4e8d7a0191c44b40990fe768bd057 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 3 Jan 2018 14:04:47 -0500 Subject: [PATCH] Core/Spells: Removed obsolete spell fixes --- Source/Game/Entities/TemporarySummon.cs | 17 --------- Source/Game/Entities/Unit/Unit.Spells.cs | 44 ++---------------------- Source/Game/Entities/Unit/Unit.cs | 16 --------- Source/Game/Spells/Auras/Aura.cs | 13 ------- Source/Game/Spells/SpellEffects.cs | 32 +++-------------- 5 files changed, 7 insertions(+), 115 deletions(-) diff --git a/Source/Game/Entities/TemporarySummon.cs b/Source/Game/Entities/TemporarySummon.cs index 0fa2392a7..a38810e9d 100644 --- a/Source/Game/Entities/TemporarySummon.cs +++ b/Source/Game/Entities/TemporarySummon.cs @@ -859,8 +859,6 @@ namespace Game.Entities else if (IsSpiritWolf()) //wolf benefit from shaman's attack power { float dmg_multiplier = 0.31f; - if (GetOwner().GetAuraEffect(63271, 0) != null) // Glyph of Feral Spirit - dmg_multiplier = 0.61f; bonusAP = owner.GetTotalAttackPowerValue(WeaponAttackType.BaseAttack) * dmg_multiplier; SetBonusDamage((int)(owner.GetTotalAttackPowerValue(WeaponAttackType.BaseAttack) * dmg_multiplier)); } @@ -939,21 +937,6 @@ namespace Game.Entities float mindamage = ((base_value + weapon_mindamage) * base_pct + total_value) * total_pct; float maxdamage = ((base_value + weapon_maxdamage) * base_pct + total_value) * total_pct; - var mDummy = GetAuraEffectsByType(AuraType.ModAttackspeed); - foreach (var eff in mDummy) - { - switch (eff.GetSpellInfo().Id) - { - case 61682: - case 61683: - MathFunctions.AddPct(ref mindamage, -eff.GetAmount()); - MathFunctions.AddPct(ref maxdamage, -eff.GetAmount()); - break; - default: - break; - } - } - SetStatFloatValue(UnitFields.MinDamage, mindamage); SetStatFloatValue(UnitFields.MaxDamage, maxdamage); } diff --git a/Source/Game/Entities/Unit/Unit.Spells.cs b/Source/Game/Entities/Unit/Unit.Spells.cs index 3e9820c07..1d6ab829c 100644 --- a/Source/Game/Entities/Unit/Unit.Spells.cs +++ b/Source/Game/Entities/Unit/Unit.Spells.cs @@ -241,17 +241,6 @@ namespace Game.Entities if (victim.HasAuraState(AuraStateType.Frozen, spellProto, this)) DoneTotalMod *= 3.0f; - break; - case SpellFamilyNames.Priest: - // Smite - if (spellProto.SpellFamilyFlags[0].HasAnyFlag(0x80)) - { - // Glyph of Smite - AuraEffect aurEff = GetAuraEffect(55692, 0); - if (aurEff != null) - if (victim.GetAuraEffect(AuraType.PeriodicDamage, SpellFamilyNames.Priest, new FlagArray128(0x100000, 0, 0), GetGUID()) != null) - MathFunctions.AddPct(ref DoneTotalMod, aurEff.GetAmount()); - } break; case SpellFamilyNames.Warlock: // Shadow Bite (30% increase from each dot) @@ -262,20 +251,11 @@ namespace Game.Entities MathFunctions.AddPct(ref DoneTotalMod, 30 * count); } - // Drain Soul - increased damage for targets under 25 % HP - if (spellProto.SpellFamilyFlags[0].HasAnyFlag(0x00004000)) - if (HasAura(100001)) + // Drain Soul - increased damage for targets under 20% HP + if (spellProto.Id == 198590) + if (HasAuraState(AuraStateType.HealthLess20Percent)) DoneTotalMod *= 2; break; - case SpellFamilyNames.Deathknight: - // Sigil of the Vengeful Heart - if (spellProto.SpellFamilyFlags[0].HasAnyFlag(0x2000)) - { - AuraEffect aurEff = GetAuraEffect(64962, 1); - if (aurEff != null) - DoneTotalMod += aurEff.GetAmount(); - } - break; } return DoneTotalMod; @@ -723,24 +703,6 @@ namespace Game.Entities if (FindCurrentSpellBySpellId(5938) != null) crit_chance = 0.0f; break; - case SpellFamilyNames.Paladin: - // Flash of light - if (spellProto.SpellFamilyFlags[0].HasAnyFlag(0x40000000u)) - { - // Sacred Shield - AuraEffect aura = victim.GetAuraEffect(58597, 1, GetGUID()); - if (aura != null) - crit_chance += aura.GetAmount(); - break; - } - // Exorcism - else if (spellProto.GetCategory() == 19) - { - if (victim.GetCreatureTypeMask().HasAnyFlag((uint)CreatureType.MaskDemonOrUnDead)) - return 100.0f; - break; - } - break; case SpellFamilyNames.Shaman: // Lava Burst if (spellProto.SpellFamilyFlags[1].HasAnyFlag(0x00001000u)) diff --git a/Source/Game/Entities/Unit/Unit.cs b/Source/Game/Entities/Unit/Unit.cs index 55f01e8dc..82c98dc62 100644 --- a/Source/Game/Entities/Unit/Unit.cs +++ b/Source/Game/Entities/Unit/Unit.cs @@ -1834,22 +1834,6 @@ namespace Game.Entities } } - // Glyphs which increase duration of selfcasted buffs - if (target == this) - { - switch (spellProto.SpellFamilyName) - { - case SpellFamilyNames.Druid: - if (spellProto.SpellFamilyFlags[0].HasAnyFlag(0x100u)) - { - // Glyph of Thorns - AuraEffect aurEff = GetAuraEffect(57862, 0); - if (aurEff != null) - duration += aurEff.GetAmount() * Time.Minute * Time.InMilliseconds; - } - break; - } - } return Math.Max(duration, 0); } diff --git a/Source/Game/Spells/Auras/Aura.cs b/Source/Game/Spells/Auras/Aura.cs index e7773b13a..b4d0097c0 100644 --- a/Source/Game/Spells/Auras/Aura.cs +++ b/Source/Game/Spells/Auras/Aura.cs @@ -1249,13 +1249,6 @@ namespace Game.Spells } } break; - case SpellFamilyNames.Rogue: - // Sprint (skip non player casted spells by category) - if (GetSpellInfo().SpellFamilyFlags[0].HasAnyFlag(0x40u) && GetSpellInfo().GetCategory() == 44) - // in official maybe there is only one icon? - if (target.HasAura(58039)) // Glyph of Blurred Speed - target.CastSpell(target, 61922, true); // Sprint (waterwalk) - break; } } // mods at aura remove @@ -1316,12 +1309,6 @@ namespace Game.Spells if (GetId() == 1784) target.RemoveAurasWithFamily(SpellFamilyNames.Rogue, new FlagArray128(0x0000800, 0, 0), target.GetGUID()); break; - case SpellFamilyNames.Hunter: - // Glyph of Freezing Trap - if (GetSpellInfo().SpellFamilyFlags[0].HasAnyFlag(0x00000008u)) - if (caster != null && caster.HasAura(56845)) - target.CastSpell(target, 61394, true); - break; } } diff --git a/Source/Game/Spells/SpellEffects.cs b/Source/Game/Spells/SpellEffects.cs index 7ab705f0c..02ad07e7c 100644 --- a/Source/Game/Spells/SpellEffects.cs +++ b/Source/Game/Spells/SpellEffects.cs @@ -1281,26 +1281,15 @@ namespace Game.Spells return; // Some level depends spells - int level_multiplier = 0; - int level_diff = 0; switch (m_spellInfo.Id) { - case 9512: // Restore Energy - level_diff = (int)m_caster.getLevel() - 40; - level_multiplier = 2; - break; case 24571: // Blood Fury - level_diff = (int)m_caster.getLevel() - 60; - level_multiplier = 10; + // Instantly increases your rage by ${(300-10*$max(0,$PL-60))/10}. + damage -= 10 * (int)Math.Max(0, Math.Min(30, m_caster.getLevel() - 60)); break; case 24532: // Burst of Energy - level_diff = (int)m_caster.getLevel() - 60; - level_multiplier = 4; - break; - case 31930: // Judgements of the Wise - case 63375: // Primal Wisdom - case 68082: // Glyph of Seal of Command - damage = (int)MathFunctions.CalculatePct(unitTarget.GetCreateMana(), damage); + // Instantly increases your energy by ${60-4*$max(0,$min(15,$PL-60))}. + damage -= 4 * (int)Math.Max(0, Math.Min(15, m_caster.getLevel() - 60)); break; case 67490: // Runic Mana Injector (mana gain increased by 25% for engineers - 3.2.0 patch change) { @@ -1314,12 +1303,6 @@ namespace Game.Spells break; } - if (level_diff > 0) - damage -= level_multiplier * level_diff; - - if (damage < 0 && power != PowerType.LunarPower) - return; - m_caster.EnergizeBySpell(unitTarget, m_spellInfo.Id, damage, power); // Mad Alchemist's Potion @@ -3336,13 +3319,6 @@ namespace Game.Spells m_caster.CastCustomSpell(totem, 55277, basepoints0, 0, 0, true); } } - // Glyph of Stoneclaw Totem - AuraEffect aur = unitTarget.GetAuraEffect(63298, 0); - if (aur != null) - { - basepoints0 *= aur.GetAmount(); - m_caster.CastCustomSpell(unitTarget, 55277, basepoints0, 0, 0, true); - } break; } case 45668: // Ultra-Advanced Proto-Typical Shortening Blaster