diff options
author | joschiwald <joschiwald.trinity@gmail.com> | 2018-01-03 18:10:47 +0100 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2018-01-03 18:10:47 +0100 |
commit | 78ba1d76ddc65add3be3ccbb08c750c6a5c8f5a5 (patch) | |
tree | 3cc6083b7bf6df8e229e89c6b587ad36d8286d4c | |
parent | 8199eef81cad464bb43f3613ed884a2c8fc3973d (diff) |
Core/Spells: Removed obsolete spell fixes
-rw-r--r-- | src/server/game/Entities/Unit/StatSystem.cpp | 18 | ||||
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 54 | ||||
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuras.cpp | 15 | ||||
-rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 31 |
4 files changed, 7 insertions, 111 deletions
diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index 3800b76b6a6..54f39f1e94d 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -1138,8 +1138,6 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged) else if (IsSpiritWolf()) //wolf benefit from shaman's attack power { float dmg_multiplier = 0.31f; - if (m_owner->GetAuraEffect(63271, 0)) // Glyph of Feral Spirit - dmg_multiplier = 0.61f; bonusAP = owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier; SetBonusDamage(int32(owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier)); } @@ -1218,22 +1216,6 @@ void Guardian::UpdateDamagePhysical(WeaponAttackType attType) float mindamage = ((base_value + weapon_mindamage) * base_pct + total_value) * total_pct; float maxdamage = ((base_value + weapon_maxdamage) * base_pct + total_value) * total_pct; - /// @todo: remove this - Unit::AuraEffectList const& mDummy = GetAuraEffectsByType(SPELL_AURA_MOD_ATTACKSPEED); - for (Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr) - { - switch ((*itr)->GetSpellInfo()->Id) - { - case 61682: - case 61683: - AddPct(mindamage, -(*itr)->GetAmount()); - AddPct(maxdamage, -(*itr)->GetAmount()); - break; - default: - break; - } - } - SetStatFloatValue(UNIT_FIELD_MINDAMAGE, mindamage); SetStatFloatValue(UNIT_FIELD_MAXDAMAGE, maxdamage); } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 8233d7b2457..bdb3b00e050 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -6559,33 +6559,17 @@ float Unit::SpellDamagePctDone(Unit* victim, SpellInfo const* spellProto, Damage if (victim->HasAuraState(AURA_STATE_FROZEN, spellProto, this)) DoneTotalMod *= 3.0f; break; - case SPELLFAMILY_PRIEST: - // Smite - if (spellProto->SpellFamilyFlags[0] & 0x80) - { - // Glyph of Smite - if (AuraEffect* aurEff = GetAuraEffect(55692, 0)) - if (victim->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, flag128(0x100000, 0, 0), GetGUID())) - AddPct(DoneTotalMod, aurEff->GetAmount()); - } - break; case SPELLFAMILY_WARLOCK: // Shadow Bite (30% increase from each dot) if (spellProto->SpellFamilyFlags[1] & 0x00400000 && IsPet()) if (uint8 count = victim->GetDoTsByCaster(GetOwnerGUID())) AddPct(DoneTotalMod, 30 * count); - // Drain Soul - increased damage for targets under 25 % HP - if (spellProto->SpellFamilyFlags[0] & 0x00004000) - if (HasAura(100001)) + // Drain Soul - increased damage for targets under 20% HP + if (spellProto->Id == 198590) + if (HasAuraState(AURA_STATE_HEALTHLESS_20_PERCENT)) DoneTotalMod *= 2; break; - case SPELLFAMILY_DEATHKNIGHT: - // Sigil of the Vengeful Heart - if (spellProto->SpellFamilyFlags[0] & 0x2000) - if (AuraEffect* aurEff = GetAuraEffect(64962, EFFECT_1)) - DoneTotalMod += aurEff->GetAmount(); - break; } return DoneTotalMod; @@ -6811,23 +6795,6 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto if (FindCurrentSpellBySpellId(5938)) crit_chance = 0.0f; break; - case SPELLFAMILY_PALADIN: - // Flash of light - if (spellProto->SpellFamilyFlags[0] & 0x40000000) - { - // Sacred Shield - if (AuraEffect const* aura = victim->GetAuraEffect(58597, 1, GetGUID())) - crit_chance += aura->GetAmount(); - break; - } - // Exorcism - else if (spellProto->GetCategory() == 19) - { - if (victim->GetCreatureTypeMask() & CREATURE_TYPEMASK_DEMON_OR_UNDEAD) - return 100.0f; - break; - } - break; case SPELLFAMILY_SHAMAN: // Lava Burst if (spellProto->SpellFamilyFlags[1] & 0x00001000) @@ -8935,21 +8902,6 @@ int32 Unit::ModSpellDuration(SpellInfo const* spellProto, Unit const* target, in } } - // Glyphs which increase duration of selfcast buffs - if (target == this) - { - switch (spellProto->SpellFamilyName) - { - case SPELLFAMILY_DRUID: - if (spellProto->SpellFamilyFlags[0] & 0x100) - { - // Glyph of Thorns - if (AuraEffect* aurEff = GetAuraEffect(57862, 0)) - duration += aurEff->GetAmount() * MINUTE * IN_MILLISECONDS; - } - break; - } - } return std::max(duration, 0); } diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 93decad221c..2a6b9ac227d 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1317,13 +1317,6 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b } } break; - case SPELLFAMILY_ROGUE: - // Sprint (skip non player cast spells by category) - if (GetSpellInfo()->SpellFamilyFlags[0] & 0x40 && 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 @@ -1382,14 +1375,6 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b if (GetId() == 1784) target->RemoveAurasWithFamily(SPELLFAMILY_ROGUE, flag128(0x0000800, 0, 0, 0), target->GetGUID()); break; - case SPELLFAMILY_DEATHKNIGHT: - break; - case SPELLFAMILY_HUNTER: - // Glyph of Freezing Trap - if (GetSpellInfo()->SpellFamilyFlags[0] & 0x00000008) - if (caster && caster->HasAura(56845)) - target->CastSpell(target, 61394, true); - break; } } diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 54bda15ee37..845de8f534c 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1549,26 +1549,15 @@ void Spell::EffectEnergize(SpellEffIndex /*effIndex*/) return; // Some level depends spells - int level_multiplier = 0; - int level_diff = 0; switch (m_spellInfo->Id) { - case 9512: // Restore Energy - level_diff = m_caster->getLevel() - 40; - level_multiplier = 2; - break; case 24571: // Blood Fury - level_diff = m_caster->getLevel() - 60; - level_multiplier = 10; + // Instantly increases your rage by ${(300-10*$max(0,$PL-60))/10}. + damage -= 10 * std::max(0, std::min(30, m_caster->getLevel() - 60)); break; case 24532: // Burst of Energy - level_diff = 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 = int32(CalculatePct(unitTarget->GetCreateMana(), damage)); + // Instantly increases your energy by ${60-4*$max(0,$min(15,$PL-60))}. + damage -= 4 * std::max(0, std::min(15, m_caster->getLevel() - 60)); break; case 67490: // Runic Mana Injector (mana gain increased by 25% for engineers - 3.2.0 patch change) { @@ -1581,12 +1570,6 @@ void Spell::EffectEnergize(SpellEffIndex /*effIndex*/) break; } - if (level_diff > 0) - damage -= level_multiplier * level_diff; - - if (damage < 0 && power != POWER_LUNAR_POWER) - return; - m_caster->EnergizeBySpell(unitTarget, m_spellInfo->Id, damage, power); // Mad Alchemist's Potion @@ -3522,12 +3505,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) m_caster->CastCustomSpell(totem, 55277, &basepoints0, NULL, NULL, true); } } - // Glyph of Stoneclaw Totem - if (AuraEffect* aur=unitTarget->GetAuraEffect(63298, 0)) - { - basepoints0 *= aur->GetAmount(); - m_caster->CastCustomSpell(unitTarget, 55277, &basepoints0, NULL, NULL, true); - } break; } case 45668: // Ultra-Advanced Proto-Typical Shortening Blaster |