*Fix the bug that freezing trap has not diminished duration.
--HG-- branch : trunk
This commit is contained in:
+1
-1
@@ -1362,7 +1362,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
|
|||||||
// Now Reduce spell duration using data received at spell hit
|
// Now Reduce spell duration using data received at spell hit
|
||||||
int32 duration = Aur->GetAuraMaxDuration();
|
int32 duration = Aur->GetAuraMaxDuration();
|
||||||
int32 limitduration = GetDiminishingReturnsLimitDuration(m_diminishGroup,aurSpellInfo);
|
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);
|
Aur->setDiminishGroup(m_diminishGroup);
|
||||||
|
|
||||||
duration = caster->ModSpellDuration(aurSpellInfo, unit, duration, Aur->IsPositive());
|
duration = caster->ModSpellDuration(aurSpellInfo, unit, duration, Aur->IsPositive());
|
||||||
|
|||||||
@@ -2591,9 +2591,6 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
|
|||||||
// Frostbite 0x80000000
|
// Frostbite 0x80000000
|
||||||
if (spellproto->SpellFamilyFlags[1] & 0x80000000)
|
if (spellproto->SpellFamilyFlags[1] & 0x80000000)
|
||||||
return DIMINISHING_TRIGGER_ROOT;
|
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)
|
// Frost Nova / Freeze (Water Elemental)
|
||||||
else if (spellproto->SpellIconID == 193)
|
else if (spellproto->SpellIconID == 193)
|
||||||
return DIMINISHING_CONTROL_ROOT;
|
return DIMINISHING_CONTROL_ROOT;
|
||||||
@@ -2626,9 +2623,6 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
|
|||||||
// Howl of Terror
|
// Howl of Terror
|
||||||
else if (spellproto->SpellFamilyFlags[1] & 0x8)
|
else if (spellproto->SpellFamilyFlags[1] & 0x8)
|
||||||
return DIMINISHING_FEAR_BLIND;
|
return DIMINISHING_FEAR_BLIND;
|
||||||
// Seduction
|
|
||||||
else if (spellproto->SpellFamilyFlags[1] & 0x40000000)
|
|
||||||
return DIMINISHING_CHARM;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELLFAMILY_DRUID:
|
case SPELLFAMILY_DRUID:
|
||||||
|
|||||||
+2
-2
@@ -11537,7 +11537,7 @@ void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Un
|
|||||||
if(duration == -1 || group == DIMINISHING_NONE || caster->IsFriendlyTo(this) )
|
if(duration == -1 || group == DIMINISHING_NONE || caster->IsFriendlyTo(this) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// test pet/charm masters instead pets/charmeds
|
// test pet/charm masters instead pets/charmeds
|
||||||
Unit const* targetOwner = GetCharmerOrOwner();
|
Unit const* targetOwner = GetCharmerOrOwner();
|
||||||
Unit const* casterOwner = caster->GetCharmerOrOwner();
|
Unit const* casterOwner = caster->GetCharmerOrOwner();
|
||||||
|
|
||||||
@@ -11554,7 +11554,7 @@ void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Un
|
|||||||
float mod = 1.0f;
|
float mod = 1.0f;
|
||||||
|
|
||||||
// Some diminishings applies to mobs too (for example, Stun)
|
// 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;
|
DiminishingLevels diminish = Level;
|
||||||
switch(diminish)
|
switch(diminish)
|
||||||
|
|||||||
Reference in New Issue
Block a user