Core/Spells: Removed obsolete spell fixes
This commit is contained in:
@@ -859,8 +859,6 @@ namespace Game.Entities
|
|||||||
else if (IsSpiritWolf()) //wolf benefit from shaman's attack power
|
else if (IsSpiritWolf()) //wolf benefit from shaman's attack power
|
||||||
{
|
{
|
||||||
float dmg_multiplier = 0.31f;
|
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;
|
bonusAP = owner.GetTotalAttackPowerValue(WeaponAttackType.BaseAttack) * dmg_multiplier;
|
||||||
SetBonusDamage((int)(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 mindamage = ((base_value + weapon_mindamage) * base_pct + total_value) * total_pct;
|
||||||
float maxdamage = ((base_value + weapon_maxdamage) * 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.MinDamage, mindamage);
|
||||||
SetStatFloatValue(UnitFields.MaxDamage, maxdamage);
|
SetStatFloatValue(UnitFields.MaxDamage, maxdamage);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,17 +241,6 @@ namespace Game.Entities
|
|||||||
if (victim.HasAuraState(AuraStateType.Frozen, spellProto, this))
|
if (victim.HasAuraState(AuraStateType.Frozen, spellProto, this))
|
||||||
DoneTotalMod *= 3.0f;
|
DoneTotalMod *= 3.0f;
|
||||||
|
|
||||||
break;
|
|
||||||
case SpellFamilyNames.Priest:
|
|
||||||
// Smite
|
|
||||||
if (spellProto.SpellFamilyFlags[0].HasAnyFlag<uint>(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;
|
break;
|
||||||
case SpellFamilyNames.Warlock:
|
case SpellFamilyNames.Warlock:
|
||||||
// Shadow Bite (30% increase from each dot)
|
// Shadow Bite (30% increase from each dot)
|
||||||
@@ -262,20 +251,11 @@ namespace Game.Entities
|
|||||||
MathFunctions.AddPct(ref DoneTotalMod, 30 * count);
|
MathFunctions.AddPct(ref DoneTotalMod, 30 * count);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Drain Soul - increased damage for targets under 25 % HP
|
// Drain Soul - increased damage for targets under 20% HP
|
||||||
if (spellProto.SpellFamilyFlags[0].HasAnyFlag<uint>(0x00004000))
|
if (spellProto.Id == 198590)
|
||||||
if (HasAura(100001))
|
if (HasAuraState(AuraStateType.HealthLess20Percent))
|
||||||
DoneTotalMod *= 2;
|
DoneTotalMod *= 2;
|
||||||
break;
|
break;
|
||||||
case SpellFamilyNames.Deathknight:
|
|
||||||
// Sigil of the Vengeful Heart
|
|
||||||
if (spellProto.SpellFamilyFlags[0].HasAnyFlag<uint>(0x2000))
|
|
||||||
{
|
|
||||||
AuraEffect aurEff = GetAuraEffect(64962, 1);
|
|
||||||
if (aurEff != null)
|
|
||||||
DoneTotalMod += aurEff.GetAmount();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return DoneTotalMod;
|
return DoneTotalMod;
|
||||||
@@ -723,24 +703,6 @@ namespace Game.Entities
|
|||||||
if (FindCurrentSpellBySpellId(5938) != null)
|
if (FindCurrentSpellBySpellId(5938) != null)
|
||||||
crit_chance = 0.0f;
|
crit_chance = 0.0f;
|
||||||
break;
|
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:
|
case SpellFamilyNames.Shaman:
|
||||||
// Lava Burst
|
// Lava Burst
|
||||||
if (spellProto.SpellFamilyFlags[1].HasAnyFlag(0x00001000u))
|
if (spellProto.SpellFamilyFlags[1].HasAnyFlag(0x00001000u))
|
||||||
|
|||||||
@@ -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);
|
return Math.Max(duration, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1249,13 +1249,6 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
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
|
// mods at aura remove
|
||||||
@@ -1316,12 +1309,6 @@ namespace Game.Spells
|
|||||||
if (GetId() == 1784)
|
if (GetId() == 1784)
|
||||||
target.RemoveAurasWithFamily(SpellFamilyNames.Rogue, new FlagArray128(0x0000800, 0, 0), target.GetGUID());
|
target.RemoveAurasWithFamily(SpellFamilyNames.Rogue, new FlagArray128(0x0000800, 0, 0), target.GetGUID());
|
||||||
break;
|
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1281,26 +1281,15 @@ namespace Game.Spells
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Some level depends spells
|
// Some level depends spells
|
||||||
int level_multiplier = 0;
|
|
||||||
int level_diff = 0;
|
|
||||||
switch (m_spellInfo.Id)
|
switch (m_spellInfo.Id)
|
||||||
{
|
{
|
||||||
case 9512: // Restore Energy
|
|
||||||
level_diff = (int)m_caster.getLevel() - 40;
|
|
||||||
level_multiplier = 2;
|
|
||||||
break;
|
|
||||||
case 24571: // Blood Fury
|
case 24571: // Blood Fury
|
||||||
level_diff = (int)m_caster.getLevel() - 60;
|
// Instantly increases your rage by ${(300-10*$max(0,$PL-60))/10}.
|
||||||
level_multiplier = 10;
|
damage -= 10 * (int)Math.Max(0, Math.Min(30, m_caster.getLevel() - 60));
|
||||||
break;
|
break;
|
||||||
case 24532: // Burst of Energy
|
case 24532: // Burst of Energy
|
||||||
level_diff = (int)m_caster.getLevel() - 60;
|
// Instantly increases your energy by ${60-4*$max(0,$min(15,$PL-60))}.
|
||||||
level_multiplier = 4;
|
damage -= 4 * (int)Math.Max(0, Math.Min(15, m_caster.getLevel() - 60));
|
||||||
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);
|
|
||||||
break;
|
break;
|
||||||
case 67490: // Runic Mana Injector (mana gain increased by 25% for engineers - 3.2.0 patch change)
|
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;
|
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);
|
m_caster.EnergizeBySpell(unitTarget, m_spellInfo.Id, damage, power);
|
||||||
|
|
||||||
// Mad Alchemist's Potion
|
// Mad Alchemist's Potion
|
||||||
@@ -3336,13 +3319,6 @@ namespace Game.Spells
|
|||||||
m_caster.CastCustomSpell(totem, 55277, basepoints0, 0, 0, true);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case 45668: // Ultra-Advanced Proto-Typical Shortening Blaster
|
case 45668: // Ultra-Advanced Proto-Typical Shortening Blaster
|
||||||
|
|||||||
Reference in New Issue
Block a user