Jump to content

[BUG] All Root-Auras can be removed due to damage


Auntie Mangos

Recommended Posts

Mangos Version: 10400

Custom Patches: none

SD2 Version: none

Database Name and Version: UDB392

How it SHOULD work: There are Spells which apply a root-aura, that shouldn't be broken due to dmg

How it DOES work: All root-auras are broken with dmg (and chance)

Suggested Fix: http://getmangos.eu/community/viewtopic.php?id=15283

Reason in mangos:

Unit::DealDamage
   if (!spellProto || !IsSpellHaveAura(spellProto,SPELL_AURA_MOD_FEAR))
       pVictim->RemoveSpellbyDamageTaken(SPELL_AURA_MOD_FEAR, damage);
   // root type spells do not dispel the root effect
   if (!spellProto || !(spellProto->Mechanic == MECHANIC_ROOT || IsSpellHaveAura(spellProto,SPELL_AURA_MOD_ROOT)))
       pVictim->RemoveSpellbyDamageTaken(SPELL_AURA_MOD_ROOT, damage);

* Called by DealDamage for auras that have a chance to be dispelled on damage taken. */
void Unit::RemoveSpellbyDamageTaken(AuraType auraType, uint32 damage)
{
   if(!HasAuraType(auraType))
       return;

   // The chance to dispel an aura depends on the damage taken with respect to the casters level.
   uint32 max_dmg = getLevel() > 8 ? 25 * getLevel() - 150 : 50;
   float chance = float(damage) / max_dmg * 100.0f;
   if (roll_chance_f(chance))
       RemoveSpellsCausingAura(auraType);
}

this shows, that all root-auras or fear auras can be broken with dmg.

This is not correct, especially for some creature-used special auras, like

Soulstorm - FoS, Bronjahm

this aura shouldn't get broken with dmg.

Unfortunately I didn't find any common thing of this spell and alike spells

(I did a search with NOT description LIKE "%may interrupt%" onto spells, to get a pack of candidates for non-interruption)

Link to comment
Share on other sites

  • 40 years later...

hmm, this doesn't look too bad, however if the procflags are right, then quite a few spells have wrong description:

Spells with "%interrupt%" description are (for fear and root): 49, whereas only one (61385) has not the procflags

Spells without interrupt description (for root) 399, but from them have 60 spells the procFlags

Spells without interrupt description (for fear) 166, but from them have 7 spells the procFlags (5246-wowhead comments indicate that the desc. is missing, 19134, 19725, 35474)

Link to comment
Share on other sites

hmm, most of these spells have 664232 as procflag.

this is

PROC_FLAG_TAKEN_MELEE_HIT = 0x00000008, // 03 Taken damage from melee auto attack hit

PROC_FLAG_TAKEN_MELEE_SPELL_HIT = 0x00000020, // 05 Taken damage by Spell that use melee weapon

PROC_FLAG_TAKEN_RANGED_HIT = 0x00000080, // 07 Taken damage from ranged auto attack

PROC_FLAG_TAKEN_RANGED_SPELL_HIT = 0x00000200, // 09 Taken damage by Spell that use ranged weapon

PROC_FLAG_TAKEN_AOE_SPELL_HIT = 0x00002000, // 13 Taken AoE damage spell hit (not 100% shure unused)

PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT = 0x00020000, // 17 Taken negative spell (by default only on damage)

PROC_FLAG_ON_TAKE_PERIODIC = 0x00080000, // 19 Taken spell periodic (damage / healing, determined from 14-17 flags)

if these descriptions had some motivation - to use them would be convinient here ;)

Link to comment
Share on other sites

sr for double post, but I started a _draft_ how it might be possible to "fix" the problem:

http://paste2.org/p/973176

I don't know how to check if spell-dmg is caused by melee-spell, ranged-spell or AoE spell, and it surely will have some side-effects, but perhaps it is a step to the right direction to handle it ;)

- However there is no spell which doesn't have all three of these procFlags, so this won't hurt

Link to comment
Share on other sites

  • 2 weeks later...

do you suggest to remove the chain of DealDamage, remove auras at all?

sorry, as I don't know the code well enough, for me it was natural to modify these functions.

If you suggest that it should be handled entirely different, I won't be able to give serious help about this issue ;(

sorry for that, hope you will have the time and motivation to implement it at all (or likely even slower to explain what needs to be done)

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