mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[11288] Check IsPositiveEffect in IsPositiveSpell only for existed effects.
Thanks to NoFantasy for problem research. Also make IsPositiveEffect use SpellEntry* arg instead spell id.
This commit is contained in:
parent
dae28ae93a
commit
989d229968
9 changed files with 24 additions and 21 deletions
|
|
@ -7195,7 +7195,7 @@ bool Unit::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex i
|
|||
for(AuraList::const_iterator iter = immuneAuraApply.begin(); iter != immuneAuraApply.end(); ++iter)
|
||||
if (spellInfo->Dispel == DISPEL_MAGIC && // Magic debuff
|
||||
((*iter)->GetModifier()->m_miscvalue & GetSpellSchoolMask(spellInfo)) && // Check school
|
||||
!IsPositiveEffect(spellInfo->Id, index)) // Harmful
|
||||
!IsPositiveEffect(spellInfo, index)) // Harmful
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -8751,7 +8751,7 @@ int32 Unit::CalculateSpellDuration(SpellEntry const* spellProto, SpellEffectInde
|
|||
// Find total mod value (negative bonus)
|
||||
int32 durationMod_always = target->GetTotalAuraModifierByMiscValue(SPELL_AURA_MECHANIC_DURATION_MOD, mechanic);
|
||||
// Modify from SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL aura for negative effects (stack always ?)
|
||||
if (!IsPositiveEffect(spellProto->Id, effect_index))
|
||||
if (!IsPositiveEffect(spellProto, effect_index))
|
||||
durationMod_always+=target->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL, spellProto->Dispel);
|
||||
// Find max mod (negative bonus)
|
||||
int32 durationMod_not_stack = target->GetMaxNegativeAuraModifierByMiscValue(SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK, mechanic);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue