Jump to content

Fix for logical mistake in aura create


Guest breakwater

Recommended Posts

if an holder is create, some holder start with max stacks

i mean this part in in

SpellAuraHolder::SpellAuraHolder(SpellEntry const* spellproto, Unit *target, WorldObject *caster, Item *castItem) :
m_spellProto(spellproto), m_target(target), m_castItemGuid(castItem ? castItem->GetObjectGuid() : ObjectGuid()),
m_auraSlot(MAX_AURAS), m_auraFlags(AFLAG_NONE), m_auraLevel(1), m_procCharges(0),
m_stackAmount(1), m_removeMode(AURA_REMOVE_BY_DEFAULT), m_AuraDRGroup(DIMINISHING_NONE), m_timeCla(1000),
m_permanent(false), m_isRemovedOnShapeLost(true), m_deleted(false), m_in_use(0)
{
[...]
   // some custom stack values at aura holder create
   switch (m_spellProto->Id)
   {
       // some auras applied with max stack
       case 24575:                                         // Brittle Armor
       case 24659:                                         // Unstable Power
       case 24662:                                         // Restless Strength
       case 26464:                                         // Mercurial Shield
       case 34027:                                         // Kill Command
       case 55166:                                         // Tidal Force
       case 58914:                                         // Kill Command (pet part)
       case 62519:                                         // Attuned to Nature
       case 63050:                                         // Sanity (Ulduar - Yogg Saron)
       case 64455:                                         // Feral Essence
       case 71564:                                         // Deadly Precision
       case 74396:                                         // Fingers of Frost
           m_stackAmount = m_spellProto->StackAmount;
           break;
   }

now in aura constructor the stacks are not be in look.

with SetModifier we must take damage * stack

this:

@@ -417,10 +417,12 @@ m_isPersistent(false), m_in_use(0), m_spellAuraHolder(holder)
                }
            }
        }
    }

+    damage = damage * GetStackAmount();
+
    DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "Aura: construct Spellid : %u, Aura : %u Target : %d Damage : %d", spellproto->Id, spellproto->EffectApplyAuraName[eff], spellproto->EffectImplicitTargetA[eff], damage);

    SetModifier(AuraType(spellproto->EffectApplyAuraName[eff]), damage, spellproto->EffectAmplitude[eff], spellproto->EffectMiscValue[eff]);

    Player* modOwner = caster ? caster->GetSpellModOwner() : NULL;

i hope you unterstand. I have registered this logical mistake with the spell 62519. The Modifier is without this fix calculate right in the method SetStackAmount()

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use