Core/Spells: Fixed diminishing returns on creatures with CREATURE_FLAG_EXTRA_ALL_DIMINISH

Closes #11073
This commit is contained in:
gerripeach
2013-10-20 12:47:54 +02:00
committed by Shauren
parent dd9ea285ae
commit f8b1b264d1

View File

@@ -2680,7 +2680,9 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
m_diminishLevel = unit->GetDiminishing(m_diminishGroup);
DiminishingReturnsType type = GetDiminishingReturnsGroupType(m_diminishGroup);
// Increase Diminishing on unit, current informations for actually casts will use values above
if ((type == DRTYPE_PLAYER && unit->GetCharmerOrOwnerPlayerOrPlayerItself()) || type == DRTYPE_ALL)
if ((type == DRTYPE_PLAYER &&
(unit->GetCharmerOrOwnerPlayerOrPlayerItself() || (unit->GetTypeId() == TYPEID_UNIT && unit->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_ALL_DIMINISH))) ||
type == DRTYPE_ALL)
unit->IncrDiminishing(m_diminishGroup);
}