diff options
| author | joschiwald <joschiwald.trinity@gmail.com> | 2017-08-27 14:59:18 +0200 |
|---|---|---|
| committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-08-27 14:59:18 +0200 |
| commit | db14582918222cfd5171bb795389e30f087822b0 (patch) | |
| tree | ad780e1a97e8831a12d987856f43cfb09ddf1cd6 /src | |
| parent | bf892de95cc803fa48fa9fbedd6aa41960c29eaf (diff) | |
Core/Spells: Removed obsolete spell fixes
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 66 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 6 |
2 files changed, 7 insertions, 65 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 53bb34eae34..6c3afc4afe7 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1165,14 +1165,6 @@ void Spell::EffectPowerBurn(SpellEffIndex effIndex) if (!unitTarget || !unitTarget->IsAlive() || unitTarget->getPowerType() != powerType || damage < 0) return; - // burn x% of target's mana, up to maximum of 2x% of caster's mana (Mana Burn) - if (m_spellInfo->Id == 8129) - { - int32 maxDamage = int32(CalculatePct(m_caster->GetMaxPower(powerType), damage * 2)); - damage = int32(CalculatePct(unitTarget->GetMaxPower(powerType), damage)); - damage = std::min(damage, maxDamage); - } - int32 newDamage = -(unitTarget->ModifyPower(powerType, -damage)); // NO - Not a typo - EffectPowerBurn uses effect value multiplier - not effect damage multiplier @@ -1222,51 +1214,6 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/) if (player->HasSkill(SKILL_ENGINEERING)) AddPct(addhealth, 25); } - // Swiftmend - consumes Regrowth or Rejuvenation - else if (m_spellInfo->TargetAuraState == AURA_STATE_SWIFTMEND && unitTarget->HasAuraState(AURA_STATE_SWIFTMEND, m_spellInfo, m_caster)) - { - Unit::AuraEffectList const& RejorRegr = unitTarget->GetAuraEffectsByType(SPELL_AURA_PERIODIC_HEAL); - // find most short by duration - AuraEffect* targetAura = NULL; - for (Unit::AuraEffectList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i) - { - if ((*i)->GetSpellInfo()->SpellFamilyName == SPELLFAMILY_DRUID - && (*i)->GetSpellInfo()->SpellFamilyFlags[0] & 0x50) - { - if (!targetAura || (*i)->GetBase()->GetDuration() < targetAura->GetBase()->GetDuration()) - targetAura = *i; - } - } - - if (!targetAura) - { - TC_LOG_ERROR("spells", "Target (%s) has the aurastate AURA_STATE_SWIFTMEND, but no matching aura.", unitTarget->GetGUID().ToString().c_str()); - return; - } - - int32 tickheal = targetAura->GetAmount(); - if (Unit* auraCaster = targetAura->GetCaster()) - tickheal = auraCaster->SpellHealingBonusDone(unitTarget, targetAura->GetSpellInfo(), tickheal, DOT, effectInfo); - //int32 tickheal = targetAura->GetSpellInfo()->EffectBasePoints[idx] + 1; - //It is said that talent bonus should not be included - - int32 tickcount = 0; - // Rejuvenation - if (targetAura->GetSpellInfo()->SpellFamilyFlags[0] & 0x10) - tickcount = 4; - // Regrowth - else // if (targetAura->GetSpellInfo()->SpellFamilyFlags[0] & 0x40) - tickcount = 6; - - addhealth += tickheal * tickcount; - - // Glyph of Swiftmend - if (!caster->HasAura(54824)) - unitTarget->RemoveAura(targetAura->GetId(), targetAura->GetCasterGUID()); - - //addhealth += tickheal * tickcount; - //addhealth = caster->SpellHealingBonus(m_spellInfo, addhealth, HEAL, unitTarget); - } // Death Pact - return pct of max health to caster else if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && m_spellInfo->SpellFamilyFlags[0] & 0x00080000) addhealth = caster->SpellHealingBonusDone(unitTarget, m_spellInfo, int32(caster->CountPctFromMaxHealth(damage)), HEAL, effectInfo); @@ -2098,10 +2045,6 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) if (!summon || !summon->IsTotem()) return; - // Mana Tide Totem - if (m_spellInfo->Id == 16190) - damage = m_caster->CountPctFromMaxHealth(10); - if (damage) // if not spell info, DB values used { summon->SetMaxHealth(damage); @@ -5074,14 +5017,7 @@ void Spell::EffectKillCredit(SpellEffIndex /*effIndex*/) if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) return; - int32 creatureEntry = effectInfo->MiscValue; - if (!creatureEntry) - { - if (m_spellInfo->Id == 42793) // Burn Body - creatureEntry = 24008; // Fallen Combatant - } - - if (creatureEntry) + if (int32 creatureEntry = effectInfo->MiscValue) unitTarget->ToPlayer()->RewardPlayerAndGroupAtEvent(creatureEntry, unitTarget); } diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 0d949f26d75..41ab8d803b6 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3187,6 +3187,12 @@ void SpellMgr::LoadSpellInfoCorrections() const_cast<SpellEffectInfo*>(spellInfo->GetEffect(EFFECT_0))->TargetA = SpellImplicitTargetInfo(TARGET_UNIT_NEARBY_ENTRY); }); + // Burn Body + ApplySpellFix({ 42793 }, [](SpellInfo* spellInfo) + { + const_cast<SpellEffectInfo*>(spellInfo->GetEffect(EFFECT_2))->MiscValue = 24008; // Fallen Combatant + }); + // // VIOLET HOLD SPELLS // |
