Jump to content

[dev] Removal of Auras by procFlags


Auntie Mangos

Recommended Posts

What bug does the patch fix? What features does the patch add?

Aura-Removal by damage is no more hardcoded to DealDamage, but done depending on procFlags and Proc-Events.

For which repository revision was the patch created?

11125

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

http://getmangos.eu/community/viewtopic.php?id=15078

Who has been writing this patch? Please include either forum user names or email addresses.

me, helped by laise

Thanks to Laise for guidence ;)

Patch:

http://paste2.org/p/1237990

Remarks:

this system atm handles victim's aura removal of

confuse, stealh, fear, root, invisible, pacify_silence

It is _very_ likely that there will be need for many entries in spell_proc_event, to correct the procFlags for some spells.

Example:

Vanish

Invisibility

along the description, these auras should be removed on taking dmg so

(just testing)

DELETE FROM spell_proc_event WHERE entry IN (26888, 32612);
INSERT INTO spell_proc_event (entry, procFlags) VALUES
(26888, 664232),
(32612, 664232);

might be needed.

The procFlags 664232 correspond "remove on any damage taken"

Remark2: While thinking about these aura removals:

   if (damagetype != DOT)
   {
       RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
       RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);

       if(pVictim != this)
           RemoveSpellsCausingAura(SPELL_AURA_MOD_INVISIBILITY);

       if(pVictim->GetTypeId() == TYPEID_PLAYER && !pVictim->IsStandState() && !pVictim->hasUnitState(UNIT_STAT_STUNNED))
           pVictim->SetStandState(UNIT_STAND_STATE_STAND);

might be better placed in something like Attack Start and spell::Prepare (stealth, feign_death is already in prepar)

Or on the long term also handled by something similar to procFlags (related to special invisibility cases which shouldn't be removed)

Would be nice if someone would take his time to do a few more tests ;)

Edit Remark3:

uint32 max_dmg = getLevel() > 8 ? 25 * getLevel() - 150 : 50;

this means, that for a level 80+ target, every dmg higher than 1850 results in removal, this seems a bit low to me!

infact there need to be done quite a bit more work, as wowwiki states that players react different to fear than mobs, glyph of fear, etc..

Link to comment
Share on other sites

  • 40 years later...

   if (damagetype != DOT)
   {
       RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
       [b]RemoveSpellsCausingAuraSPELL_AURA_FEIGN_DEATH);[/b]

       if(pVictim != this)
           RemoveSpellsCausingAura(SPELL_AURA_MOD_INVISIBILITY);

       if(pVictim->GetTypeId() == TYPEID_PLAYER && !pVictim->IsStandState() && !pVictim->hasUnitState(UNIT_STAT_STUNNED))
           pVictim->SetStandState(UNIT_STAND_STATE_STAND);

is this a typo?

Link to comment
Share on other sites

  • 4 months later...
  • 2 weeks later...

good idea.

stealth auras removal must definitely be done through procs.

for example, one can make stealth not be removed by absorbed dots (off-like)

but:

- you did not remove removal (:D) of stealth auras in Spell:DoSpellHitOnUnit

- many stealth auras, e.g. Prowl 5215, 6783, 9913 have AURA_INTERRUPT_FLAG_DAMAGE, so your patch will do nothing for them

Link to comment
Share on other sites

  • 5 months later...
effectiveness of this forum is not much higher than that:) this code I have almost unchanged, but the additions - other (including that you made in 11776) :)

Ok, will check yours, but after LFG related stuff is finished

effectiveness of this forum is not much higher than that:)

I very rarely check other forums' patches

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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