diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellMgr.cpp | 5 | ||||
-rw-r--r-- | src/game/Unit.cpp | 31 |
2 files changed, 25 insertions, 11 deletions
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index c876fbf822d..1536868fbb7 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -3813,6 +3813,11 @@ void SpellMgr::LoadSpellCustomAttr() case 62324: // Throw Passenger spellInfo->Targets |= TARGET_FLAG_CASTER; break; + case 51735: // Ebon Plague + case 51734: + case 51726: + spellInfo->SpellFamilyFlags[2] = 0x10; + break; // cleansing totem pulse when it is spawned case 8172: spellInfo->AttributesEx5 |= SPELL_ATTR_EX5_START_PERIODIC_AT_APPLY; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3984614b05e..2d9383e53ee 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9675,20 +9675,29 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3 TakenTotalMod *= ((*i)->GetAmount()+100.0f)/100.0f; // .. taken pct: dummy auras - if (pVictim->GetTypeId() == TYPEID_PLAYER) + AuraEffectList const& mDummyAuras = pVictim->GetAurasByType(SPELL_AURA_DUMMY); + for (AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i) { - //Cheat Death - if (AuraEffect *dummy = pVictim->GetAuraEffect(45182, 0)) + switch((*i)->GetSpellProto()->SpellIconID) { - float mod = -((Player*)pVictim)->GetRatingBonusValue(CR_CRIT_TAKEN_SPELL)*2*4; - if (mod < dummy->GetAmount()) - mod = dummy->GetAmount(); - TakenTotalMod *= (mod+100.0f)/100.0f; + // Cheat Death + case 2109: + if ((*i)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + continue; + float mod = ((Player*)pVictim)->GetRatingBonusValue(CR_CRIT_TAKEN_MELEE)*(-8.0f); + if (mod < (*i)->GetAmount()) + mod = (*i)->GetAmount(); + TakenTotalMod *= (mod+100.0f)/100.0f; + } + break; + // Ebon Plague + case 1933: + if ((*i)->GetMiscValue() & (spellProto ? GetSpellSchoolMask(spellProto) : 0)) + TakenTotalMod *= ((*i)->GetAmount()+100.0f)/100.0f; + break; } - // Ebon Plague - if (AuraEffect *dummy = pVictim->GetDummyAura(SPELLFAMILY_DEATHKNIGHT, 1933, 1)) - if (dummy->GetMiscValue() & GetSpellSchoolMask(spellProto)) - TakenTotalMod *= (dummy->GetAmount()+100.0f)/100.0f; } // From caster spells |