*Update diminishing return table: sap and gouge have polymorph return, warlock's fear and seduction have fear return.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-13 00:46:43 -06:00
parent be875bc6c0
commit 3533c094d2
2 changed files with 19 additions and 7 deletions

View File

@@ -1223,11 +1223,14 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
}
// Get Data Needed for Diminishing Returns, some effects may have multiple auras, so this must be done on spell hit, not aura add
m_diminishGroup = GetDiminishingReturnsGroupForSpell(m_spellInfo,m_triggeredByAuraSpell);
m_diminishLevel = unit->GetDiminishing(m_diminishGroup);
// Increase Diminishing on unit, current informations for actually casts will use values above
if((GetDiminishingReturnsGroupType(m_diminishGroup) == DRTYPE_PLAYER && unit->GetTypeId() == TYPEID_PLAYER) || GetDiminishingReturnsGroupType(m_diminishGroup) == DRTYPE_ALL)
unit->IncrDiminishing(m_diminishGroup);
if(m_diminishGroup = GetDiminishingReturnsGroupForSpell(m_spellInfo,m_triggeredByAuraSpell))
{
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)
unit->IncrDiminishing(m_diminishGroup);
}
for(uint32 effectNumber=0;effectNumber<3;effectNumber++)
{

View File

@@ -2138,6 +2138,12 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
// Kidney Shot
if (spellproto->SpellFamilyFlags & 0x00000200000LL)
return DIMINISHING_KIDNEYSHOT;
// Sap
else if (spellproto->SpellFamilyFlags & 0x00000000080LL)
return DIMINISHING_POLYMORPH;
// Gouge
else if (spellproto->SpellFamilyFlags & 0x00000000008LL)
return DIMINISHING_POLYMORPH;
// Blind
else if (spellproto->SpellFamilyFlags & 0x00001000000LL)
return DIMINISHING_BLIND_CYCLONE;
@@ -2148,9 +2154,12 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
// Death Coil
if (spellproto->SpellFamilyFlags & 0x00000080000LL)
return DIMINISHING_DEATHCOIL;
// Seduction
if (spellproto->SpellFamilyFlags & 0x00040000000LL)
return DIMINISHING_FEAR;
// Fear
else if (spellproto->SpellFamilyFlags & 0x40840000000LL)
return DIMINISHING_WARLOCK_FEAR;
//else if (spellproto->SpellFamilyFlags & 0x40840000000LL)
// return DIMINISHING_WARLOCK_FEAR;
// Curses/etc
else if (spellproto->SpellFamilyFlags & 0x00080000000LL)
return DIMINISHING_LIMITONLY;