*Fix diminishing returns for spells casted on a pet.

--HG--
branch : trunk
This commit is contained in:
QAston committed 2009-02-13 18:43:17 +01:00
1 parent 0421212873
commit edcb8840c3
2 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -1186,7 +1186,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
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->GetTypeId() == TYPEID_PLAYER) || type == DRTYPE_ALL)
if((type == DRTYPE_PLAYER && (unit->GetTypeId() == TYPEID_PLAYER || ((Creature*)unit)->isPet() || ((Creature*)unit)->isPossessedByPlayer())) || type == DRTYPE_ALL)
unit->IncrDiminishing(m_diminishGroup);
}