*Fix the bug that freezing trap has not diminished duration.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-07-08 00:16:51 +02:00
parent 8090b33025
commit f28810576d
3 changed files with 3 additions and 9 deletions
+1 -1
View File
@@ -1362,7 +1362,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
// Now Reduce spell duration using data received at spell hit
int32 duration = Aur->GetAuraMaxDuration();
int32 limitduration = GetDiminishingReturnsLimitDuration(m_diminishGroup,aurSpellInfo);
unitTarget->ApplyDiminishingToDuration(m_diminishGroup, duration, m_caster, m_diminishLevel,limitduration);
unitTarget->ApplyDiminishingToDuration(m_diminishGroup, duration, caster, m_diminishLevel,limitduration);
Aur->setDiminishGroup(m_diminishGroup);
duration = caster->ModSpellDuration(aurSpellInfo, unit, duration, Aur->IsPositive());
-6
View File
@@ -2591,9 +2591,6 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
// Frostbite 0x80000000
if (spellproto->SpellFamilyFlags[1] & 0x80000000)
return DIMINISHING_TRIGGER_ROOT;
// Shattered Barrier (triggered so doesn't share with Frost Nova)
else if (spellproto->SpellFamilyFlags[0] & 0x80000)
return DIMINISHING_TRIGGER_ROOT;
// Frost Nova / Freeze (Water Elemental)
else if (spellproto->SpellIconID == 193)
return DIMINISHING_CONTROL_ROOT;
@@ -2626,9 +2623,6 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
// Howl of Terror
else if (spellproto->SpellFamilyFlags[1] & 0x8)
return DIMINISHING_FEAR_BLIND;
// Seduction
else if (spellproto->SpellFamilyFlags[1] & 0x40000000)
return DIMINISHING_CHARM;
break;
}
case SPELLFAMILY_DRUID:
+1 -1
View File
@@ -11554,7 +11554,7 @@ void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Un
float mod = 1.0f;
// Some diminishings applies to mobs too (for example, Stun)
if((GetDiminishingReturnsGroupType(group) == DRTYPE_PLAYER && (targetOwner ? targetOwner->GetTypeId():GetTypeId()) == TYPEID_PLAYER) || GetDiminishingReturnsGroupType(group) == DRTYPE_ALL)
if((GetDiminishingReturnsGroupType(group) == DRTYPE_PLAYER && (targetOwner ? (targetOwner->GetTypeId() == TYPEID_PLAYER) : (GetTypeId() == TYPEID_PLAYER))) || GetDiminishingReturnsGroupType(group) == DRTYPE_ALL)
{
DiminishingLevels diminish = Level;
switch(diminish)