Jump to content

How to get the pointer of class Aura by use the pointer of class SpellAuraHolder?


Guest xuke771

Recommended Posts

Hi guys..

I was modifyed some codes in these days.. i have a problem about get the pointer of class Aura..

The error code is contained in function IsTriggeredAtSpellProcEvent..this function's parameters only support the pointer of class SpellAuraHolder,so i must use this pointer to get *Aura..

Someone can hlp me?

Link to comment
Share on other sites

Hi guys..

I was modifyed some codes in these days.. i have a problem about get the pointer of class Aura..

The error code is contained in function IsTriggeredAtSpellProcEvent..this function's parameters only support the pointer of class SpellAuraHolder,so i must use this pointer to get *Aura..

Someone can hlp me?

would be nice if you would tell what you want to do..

if you want to get the aura* out of spellauraholder then you can use that member function

Aura* GetAuraByEffectIndex(SpellEffectIndex index) const { return m_auras[index]; }

Link to comment
Share on other sites

// Aura added by spell can`t trogger from self (prevent drop charges/do triggers)
   // But except periodic triggers (can triggered from self)
   for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
   {
       Aura *aura = holder->GetAuraByEffectIndex(SpellEffectIndex(i));
       if(procSpell && procSpell->Id == spellProto->Id && !(spellProto->procFlags & PROC_FLAG_ON_TAKE_PERIODIC) && aura->GetModifier()->m_auraname != SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE)
           return false;
   }

thank you FeRkEi..the error fixed..

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