diff options
author | QAston <none@none> | 2009-07-08 00:16:51 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-07-08 00:16:51 +0200 |
commit | f28810576dc10701cbda179f62e8c8242048ef77 (patch) | |
tree | 5264b658212d68eec920d84304271300c5102ab0 /src | |
parent | 8090b330253322799f400e225167ca053f25d43e (diff) |
*Fix the bug that freezing trap has not diminished duration.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellMgr.cpp | 6 | ||||
-rw-r--r-- | src/game/Unit.cpp | 4 |
3 files changed, 3 insertions, 9 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index cbace8757f4..3d4cf7bbf10 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -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()); diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 8d11c676235..4ec9ff516d1 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -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: diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index bdef7cb2d71..9cad6a6c66c 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -11537,7 +11537,7 @@ void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Un if(duration == -1 || group == DIMINISHING_NONE || caster->IsFriendlyTo(this) ) return; - // test pet/charm masters instead pets/charmeds + // test pet/charm masters instead pets/charmeds Unit const* targetOwner = GetCharmerOrOwner(); Unit const* casterOwner = caster->GetCharmerOrOwner(); @@ -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) |