Jump to content

[10246] Positive spells proc (Earth Shield, some trinkets, etc..)


Auntie Mangos

Recommended Posts

I've been able to reproduce this as well and I did a little research on this, hope it's correct.

There has been a similar bug report ( http://getmangos.eu/community/viewtopic.php?id=14663 ) mentioning things like "DM: Greatness" trinket and a certain commit (d55650ae) fixing that. That sure fixed the mentioned trinket (which I managed to fix with proper procFlags even without that commit), but it didn't do anything to Earth Shield or other trinkets (for example spell 60063 and it's proc spell). I believe I know the cause for this.

You must make a DB update:

UPDATE `spell_proc_event` SET `procFlags`='1048576',`procEx`='0' WHERE (`entry`='974')

I was unable to override the proc for spell 974, the server just kept ignoring my spell_proc_event entry for it. I don't really know why. Perhaps commit 4d7b773f4 is able to fix that.

Perhaps it was the proc system rewrite (b2260d2e0), perhaps it was something else, I believe the cause of this "proc from everything" might be in generic IsPositiveSpell() check on PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL (which is - by code comment - meant to proc only for heals) that triggers the proc on every positive spell cast (like mount, minipet, ...) instead of heals.

That is no problem for Earth Shield (which is supposed to proc only on damage taken), but it is indeed a problem for trinkets like DM: Greatness, which - on a pretty recent (4d7b773f4) revision - does not proc from heals (because it would make it, presumably, proc from all other positive spells as well). I can't think of any non-heal positive spell that needs a proc flag entry. And if there is such a spell, it should be probably separated from "heal proc" / handled in code.

Just my guess, I've not written the code, so I can't make clear statements.

Link to comment
Share on other sites

  • 40 years later...

MaNGOS version: 10246

Custom patches: tested on clean core also

SD2 version: 1734

DB: UDB rev. 391

How it should work:

for example Earth Shield - it should only proc when aura owner is damaged

similiar problem with this trinket: http://www.wowhead.com/item=40682 - it should only proc when damaging spell is casted (by wearer)

How it works:

Earth shield procs from any positive spell, same as all the trinkets (for example when you mount, or something like this)

Link to comment
Share on other sites

You must make a DB update:

UPDATE `spell_proc_event` SET `procFlags`='1048576',`procEx`='0' WHERE (`entry`='974')

I have a server with a revision of 10154. I hope it still correct.

for information, a small table

enum ProcFlags
{
   PROC_FLAG_NONE                          = 0x00000000,

   PROC_FLAG_KILLED                        = 0x00000001,   // 00 Killed by aggressor
   PROC_FLAG_KILL                          = 0x00000002,   // 01 Kill target (in most cases need XP/Honor reward, see Unit::IsTriggeredAtSpellProcEvent for additinoal check)

   PROC_FLAG_SUCCESSFUL_MELEE_HIT          = 0x00000004,   // 02 Successful melee auto attack
   PROC_FLAG_TAKEN_MELEE_HIT               = 0x00000008,   // 03 Taken damage from melee auto attack hit

   PROC_FLAG_SUCCESSFUL_MELEE_SPELL_HIT    = 0x00000010,   // 04 Successful attack by Spell that use melee weapon
   PROC_FLAG_TAKEN_MELEE_SPELL_HIT         = 0x00000020,   // 05 Taken damage by Spell that use melee weapon

   PROC_FLAG_SUCCESSFUL_RANGED_HIT         = 0x00000040,   // 06 Successful Ranged auto attack
   PROC_FLAG_TAKEN_RANGED_HIT              = 0x00000080,   // 07 Taken damage from ranged auto attack

   PROC_FLAG_SUCCESSFUL_RANGED_SPELL_HIT   = 0x00000100,   // 08 Successful Ranged attack by Spell that use ranged weapon
   PROC_FLAG_TAKEN_RANGED_SPELL_HIT        = 0x00000200,   // 09 Taken damage by Spell that use ranged weapon

   PROC_FLAG_SUCCESSFUL_POSITIVE_AOE_HIT   = 0x00000400,   // 10 Successful AoE (not 100% shure unused)
   PROC_FLAG_TAKEN_POSITIVE_AOE            = 0x00000800,   // 11 Taken AoE      (not 100% shure unused)

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

   PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL     = 0x00004000,   // 14 Successful cast positive spell (by default only on healing)
   PROC_FLAG_TAKEN_POSITIVE_SPELL          = 0x00008000,   // 15 Taken positive spell hit (by default only on healing)

   PROC_FLAG_SUCCESSFUL_NEGATIVE_SPELL_HIT = 0x00010000,   // 16 Successful negative spell cast (by default only on damage)
   PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT      = 0x00020000,   // 17 Taken negative spell (by default only on damage)

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

   PROC_FLAG_TAKEN_ANY_DAMAGE              = 0x00100000,   // 20 Taken any damage
   PROC_FLAG_ON_TRAP_ACTIVATION            = 0x00200000,   // 21 On trap activation

   PROC_FLAG_TAKEN_OFFHAND_HIT             = 0x00400000,   // 22 Taken off-hand melee attacks(not used)
   PROC_FLAG_SUCCESSFUL_OFFHAND_HIT        = 0x00800000    // 23 Successful off-hand melee attacks
};

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