azerothcore / azerothcore-wotlk

Complete Open Source and Modular solution for MMO
http://www.azerothcore.org
GNU Affero General Public License v3.0
6.57k stars 2.63k forks source link

[Druid] Maul does not proc Omen of Clarity. #4286

Closed lineagedr closed 2 years ago

lineagedr commented 3 years ago
CURRENT BEHAVIOUR:

Maul does not proc Omen of Clarity.

EXPECTED BLIZZLIKE BEHAVIOUR:

Maul should be able to proc Omen of Clarity.

STEPS TO REPRODUCE THE PROBLEM:
  1. Get on a druid
  2. Learn Omen of Clarity Talent
  3. Spam Maul
EXTRA NOTES:

Retail: https://www.youtube.com/watch?t=31s&v=HciHmfncLc0&feature=youtu.be https://www.youtube.com/watch?t=1m49s&v=RjU5w5Wnp-w&feature=youtu.be https://www.youtube.com/watch?t=1m57s&v=VNORpfUxvxQ&feature=youtu.be

AC HASH/COMMIT:

https://github.com/azerothcore/azerothcore-wotlk/commit/d237274a66aa0a379f7ae45922aed22f382cce3d

OPERATING SYSTEM:

Win10

MODULES:
OTHER CUSTOMIZATIONS:
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/95949330-druid-maul-does-not-proc-omen-of-clarity?utm_campaign=plugin&utm_content=tracker%2F40032087&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F40032087&utm_medium=issues&utm_source=github).
lineagedr commented 3 years ago

Now that I look at it. It only procs from healing / non feral damage spells / melee swing. Never from Feral damage spells.

Kitzunu commented 3 years ago

In DB it only has PROC_EX_EX_TRIGGER_ALWAYS

And DBC has this procflags

  16 (0x10) - Successful attack by Spell that use melee weapon
  64 (0x40) - Successful Ranged attack(and wand spell cast)
  256 (0x100) - Successful Ranged attack by Spell that use ranged weapon
  1024 (0x400) - Successful positive spell hit
  4096 (0x1000) - Successful negative spell cast
  16384 (0x4000) - Successful cast positive magic spell
  65536 (0x10000) - Successful damage from harmful magic spell cast
Kitzunu commented 3 years ago

Perhaps it is missing PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_NEG

Test with


UPDATE `spell_proc_event` SET `procFlags` = 4096 WHERE `entry` = 16864;
Kitzunu commented 3 years ago

But according to this

Patch 3.0 changed the ability further, changing it from being a spell to a passive talent. It was also changed so that it could also trigger from spellcasting, making it very useful for Balance and Restoration druids.

World of Warcraft: The Burning Crusade/World of Warcraft: Wrath of the Lich King Patch 3.0.2 (14-Oct-2008): Now a passive spell. Now also procs on damage and healing spells, yet no longer procs on feral abilities(only auto-attacks proc it). Proc rate is roughly 6% with a 10 second internal cooldown

https://wowwiki.fandom.com/wiki/Omen_of_Clarity

I have doubts that it should proc from feral abilities

lineagedr commented 3 years ago

@Kitzunu Those three retail videos weren't enough?

Kitzunu commented 3 years ago

I havent watched them yet, but I gave you a solution to test.

Voxstrasza commented 3 years ago

But according to this

Patch 3.0 changed the ability further, changing it from being a spell to a passive talent. It was also changed so that it could also trigger from spellcasting, making it very useful for Balance and Restoration druids.

World of Warcraft: The Burning Crusade/World of Warcraft: Wrath of the Lich King Patch 3.0.2 (14-Oct-2008): Now a passive spell. Now also procs on damage and healing spells, yet no longer procs on feral abilities(only auto-attacks proc it). Proc rate is roughly 6% with a 10 second internal cooldown

https://wowwiki.fandom.com/wiki/Omen_of_Clarity

I have doubts that it should proc from feral abilities

Maul is an auto-attack replacement designed as a rage-dump. It should be the only feral ability that Omen of Clarity procs on for that reason

Kitzunu commented 3 years ago

But according to this

Patch 3.0 changed the ability further, changing it from being a spell to a passive talent. It was also changed so that it could also trigger from spellcasting, making it very useful for Balance and Restoration druids.

World of Warcraft: The Burning Crusade/World of Warcraft: Wrath of the Lich King Patch 3.0.2 (14-Oct-2008): Now a passive spell. Now also procs on damage and healing spells, yet no longer procs on feral abilities(only auto-attacks proc it). Proc rate is roughly 6% with a 10 second internal cooldown

https://wowwiki.fandom.com/wiki/Omen_of_Clarity I have doubts that it should proc from feral abilities

Maul is an auto-attack replacement designed as a rage-dump. It should be the only feral ability that Omen of Clarity procs on for that reason

Perhaps it is missing PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_NEG

Test with

UPDATE `spell_proc_event` SET `procFlags` = 4096 WHERE `entry` = 16864;

Perhaps it should be procFlag = 4 then (PROC_FLAG_DONE_MELEE_AUTO_ATTACK)

lineagedr commented 3 years ago

PROC_FLAG_DONE_MELEE_AUTO_ATTACK = 0x00000004 PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS = 0x00000010 PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS = 0x00004000 PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG = 0x00010000

UPDATE `spell_proc_event` SET `procFlags` = 81940 WHERE `entry` = 16864;

Fixes the issue.

Tested and it procs with: Healing spells, None Damage Spells, White attacks, Feral Damage Spells.

Voxstrasza commented 3 years ago

Does it proc with all feral abilities or only Maul?

lineagedr commented 3 years ago

@Voxstrasza All feral damage abilities.

Voxstrasza commented 3 years ago

@Voxstrasza All feral damage abilities.

Not really a fix then. It’s only supposed to proc from Maul for feral, and that’s because it replaces auto attack.

lineagedr commented 3 years ago

@Voxstrasza hmm your're right. Problem is that PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS affects all feral dmg spells including maul

Voxstrasza commented 3 years ago

Yea, that’s a problem then. Maul is a “on next melee swing” ability, which effectively replaces your next auto attack. Might need to create an exception on the flags somehow

Kitzunu commented 3 years ago

Did you test if PROC_FLAG_DONE_MELEE_AUTO_ATTACK only worked? I am thinking if maul is classed as a melee attack?

Kitzunu commented 3 years ago

Here is spellwork of Maul Rank 7

Maul (Rank 7) ``` ID - 9881 Maul (Rank 7) ================================================= Description: A strong attack that increases melee damage by $s1 and causes a high amount of threat. Effects which increase Bleed damage also increase Maul damage. Category = 0, SpellIconID = 261, activeIconID = 0, SpellVisual = (166,0), SpellPriority = 0 Family SPELLFAMILY_DRUID, flag [0] 0x00000800 [1] 0x00000000 [2] 0x00000000 SpellSchoolMask = 1 (SPELL_SCHOOL_MASK_NORMAL) DamageClass = 2 (SPELL_DAMAGE_CLASS_MELEE) PreventionType = 2 (SPELL_PREVENTION_TYPE_PACIFY) ================================================= Attributes: 0x00000414 (SPELL_ATTR0_ON_NEXT_SWING, SPELL_ATTR0_ABILITY, SPELL_ATTR0_ON_NEXT_SWING_2) AttributesEx1: 0x08000200 (SPELL_ATTR1_MELEE_COMBAT_START, SPELL_ATTR1_UNK27) AttributesEx2: 0x00001000 (SPELL_ATTR2_UNK12) ================================================= Stances: FORM_BEAR, FORM_DIREBEAR Skill (Id 134) "Feral Combat" ReqSkillValue 1, Forward Spell = 26996, MinMaxValue (0, 0), CharacterPoints (0, 0)Spell Level = 58, base 58, max 0, maxTarget 0 Category = 0 DispelType = 0 (DISPEL_NONE) Mechanic = 0 (MECHANIC_NONE) SpellRange: (Id 2) "Combat Range": MinRange = 0, MinRangeFriendly = 0 MaxRange = 5, MaxRangeFriendly = 5 CastingTime (Id 1) = 0,00 Power POWER_RAGE, Cost 150 Interrupt Flags: 0x00000000, AuraIF 0x00000000, ChannelIF 0x00000000 Chance = 101, charges - 0 ================================================= Effect 0: Id 58 (SPELL_EFFECT_WEAPON_DAMAGE) BasePoints = 192 Bonus = 1,00 Targets (6, 0) (TARGET_UNIT_TARGET_ENEMY, NO_TARGET) Effect 1: NO EFFECT Effect 2: NO EFFECT ```
Omen of Clarity ``` ID - 16864 Omen of Clarity ================================================= Description: Each of the Druid's damage, healing spells and auto attacks has a chance of causing the caster to enter a Clearcasting state. The Clearcasting state reduces the Mana, Rage or Energy cost of your next damage, healing spell or offensive ability by $16870s1%. ToolTip: Each damage and healing spell and auto attacks have a chance of causing the caster to enter a Clearcasting state. Category = 0, SpellIconID = 1754, activeIconID = 0, SpellVisual = (4040,0), SpellPriority = 0 Family SPELLFAMILY_DRUID, flag [0] 0x00000000 [1] 0x00200000 [2] 0x00000000 SpellSchoolMask = 8 (SPELL_SCHOOL_MASK_NATURE) DamageClass = 1 (SPELL_DAMAGE_CLASS_MAGIC) PreventionType = 1 (SPELL_PREVENTION_TYPE_SILENCE) ================================================= Attributes: 0x000000C0 (SPELL_ATTR0_PASSIVE, SPELL_ATTR0_HIDDEN_CLIENTSIDE) AttributesEx3: 0x04000000 (SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED) ================================================= Skill (Id 573) "Restoration" ReqSkillValue 1, Forward Spell = 0, MinMaxValue (0, 0), CharacterPoints (0, 0)Spell Level = 20, base 20, max 26, maxTarget 0 Category = 0 DispelType = 1 (DISPEL_MAGIC) Mechanic = 0 (MECHANIC_NONE) SpellRange: (Id 1) "Self Only": MinRange = 0, MinRangeFriendly = 0 MaxRange = 0, MaxRangeFriendly = 0 CastingTime (Id 1) = 0,00 RecoveryTime: 0 ms, CategoryRecoveryTime: 0 ms StartRecoveryCategory = 133, StartRecoveryTime = 1500,00 ms Interrupt Flags: 0x00000000, AuraIF 0x00000000, ChannelIF 0x00000000 Proc flag 0x00014004, chance = 100, charges - 0 ================================================= 4 (0x4) - Successful melee attack 16384 (0x4000) - Successful cast positive magic spell 65536 (0x10000) - Successful damage from harmful magic spell cast ================================================= Effect 0: Id 6 (SPELL_EFFECT_APPLY_AURA) BasePoints = 0 Bonus = 1,00 Targets (1, 0) (TARGET_UNIT_CASTER, NO_TARGET) Aura Id 42 (SPELL_AURA_PROC_TRIGGER_SPELL), value = 0, misc = 0 (0), miscB = 0, periodic = 0 Trigger spell (16870) Clearcasting. Chance = 100 Description: Each of the Druid's damage, healing spells and auto attacks has a chance of causing the caster to enter a Clearcasting state. The Clearcasting state reduces the Mana, Rage or Energy cost of your next damage, healing spell or offensive ability by $16870s1%. ToolTip: Your next damage or healing spell or offensive ability has its mana, rage or energy cost reduced by $s1%. Charges - 1 ================================================= 16 (0x10) - Successful attack by Spell that use melee weapon 64 (0x40) - Successful Ranged attack(and wand spell cast) 256 (0x100) - Successful Ranged attack by Spell that use ranged weapon 1024 (0x400) - Successful positive spell hit 4096 (0x1000) - Successful negative spell cast 16384 (0x4000) - Successful cast positive magic spell 65536 (0x10000) - Successful damage from harmful magic spell cast ================================================= Effect 1: NO EFFECT Effect 2: NO EFFECT ```
Voxstrasza commented 3 years ago

0x00000414 (SPELL_ATTR0_ON_NEXT_SWING, SPELL_ATTR0_ABILITY, SPELL_ATTR0_ON_NEXT_SWING_2)

This attribute is the one we need

Kitzunu commented 3 years ago
    ApplySpellFix({ spell }, [](SpellEntry* spellInfo)
    {
        spellInfo->Attributes |= SPELL_ATTR0_ON_NEXT_SWING;
    });

Hmm... then I dont know how to fix it because I doubt this would as it would only add the attr

Kitzunu commented 3 years ago

Actually could we do it in spell_dru_omen_of_clarity?

lineagedr commented 3 years ago

@Voxstrasza Could proc from non dmg spells like cyclone? https://youtu.be/y0NI3hDZyjs?t=37

Voxstrasza commented 3 years ago

@Voxstrasza Could proc from non dmg spells like cyclone? https://youtu.be/y0NI3hDZyjs?t=37

Yes. It can also proc from faerie fire and thorns damage effect.

Omen of Clarity should cover all magical spells, one physical spell, and melee swings.

Voxstrasza commented 3 years ago

Is there a 'successful damage from on next swing' flag? Warriors have a similar mechanic with heroic strike, maybe similar code we can copy from?

Kitzunu commented 3 years ago

No, not in spell_proc_event https://www.azerothcore.org/wiki/spell_proc_event

Voxstrasza commented 3 years ago

@Kitzunu #2148 was a PR that attempted to apply Swipe Cat/Bear to proc Omen of Clarity but it was closed because it wasn't blizzlike. Check the code, can it work in this instance?

Kitzunu commented 3 years ago

it is as @lineagedr said, they use PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS which includes ALL feral abilities

Successful attack by a spell that use a melee weapon

lineagedr commented 3 years ago

Almost done with it, so far it does NOT proc from any feral dmg spells it does however proc from healing spells / dmg spells, maul, casting positive spells like cyclone / barkskin / nature's grasp. the only thing left is the dmg from thorns.

Kitzunu commented 3 years ago

This is what I found from tc (I don't know if it works on TC)

spell_proc

SELECT * FROM world.spell_proc WHERE spellid = 16864
SpellId SchoolMask SpellFamilyName SpellFamilyMask0 SpellFamilyMask1 SpellFamilyMask2 ProcFlags SpellTypeMask SpellPhaseMask HitMask AttributesMask DisableEffectsMask ProcsPerMinute Chance Cooldown Charges
16864 0 0 0 0 0 0 0 2 0 0 0 0 6 0 0

VS Acore

spell_proc_event

SELECT * FROM acore_world.spell_proc_event WHERE entry = 16864
entry SchoolMask SpellFamilyName SpellFamilyMask0 SpellFamilyMask1 SpellFamilyMask2 procFlags procEx ppmRate CustomChance Cooldown
16864 0 0 0 0 0 0 65536 3,5 0 0

Spell Script

spell_dru_omen_of_clarity TC ```cpp // 16864 - Omen of Clarity class spell_dru_omen_of_clarity : public AuraScript { PrepareAuraScript(spell_dru_omen_of_clarity); bool Validate(SpellInfo const* /*spellInfo*/) override { return ValidateSpellInfo( { SPELL_DRUID_BALANCE_T10_BONUS, SPELL_DRUID_BALANCE_T10_BONUS_PROC }); } void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) { Unit* target = GetTarget(); if (target->HasAura(SPELL_DRUID_BALANCE_T10_BONUS)) target->CastSpell(nullptr, SPELL_DRUID_BALANCE_T10_BONUS_PROC, aurEff); } void Register() override { OnEffectProc += AuraEffectProcFn(spell_dru_omen_of_clarity::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); } }; ```
spell_dru_omen_of_clarity AC ```cpp class spell_dru_omen_of_clarity : public SpellScriptLoader { public: spell_dru_omen_of_clarity() : SpellScriptLoader("spell_dru_omen_of_clarity") { } class spell_dru_omen_of_clarity_AuraScript : public AuraScript { PrepareAuraScript(spell_dru_omen_of_clarity_AuraScript); bool CheckProc(ProcEventInfo& eventInfo) { const SpellInfo* spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo(); if (!spellInfo) return true; // xinef: no mana cost if (spellInfo->ManaCost == 0 && spellInfo->ManaCostPercentage == 0) return false; // xinef: SPELL_ATTR0_CU_NO_INITIAL_THREAT and SPELL_ATTR0_CU_DIRECT_DAMAGE contains spells capable of healing and damaging + some others, but this is taken care of above return spellInfo->HasAttribute(SpellCustomAttributes(SPELL_ATTR0_CU_DIRECT_DAMAGE | SPELL_ATTR0_CU_NO_INITIAL_THREAT)); } void Register() override { DoCheckProc += AuraCheckProcFn(spell_dru_omen_of_clarity_AuraScript::CheckProc); } }; AuraScript* GetAuraScript() const override { return new spell_dru_omen_of_clarity_AuraScript(); } }; ```
BarbzYHOOL commented 3 years ago

and should proc from faerie fire (feral) prob (and not from thorns ofc)

btw i also thought it should proc from feral abilities, as it was in vanilla/tbc, but no, such a nerf

BarbzYHOOL commented 3 years ago

https://www.youtube.com/watch?t=122&v=WuWOFtk6JS4&feature=youtu.be to verify official behaviour, it procced off a feral ability first by the way, a special one

also there is similar discussion on sunwell bugtracker

BarbzYHOOL commented 3 years ago

just for clarification, found no proof that it should proc off thorns damage, but it must proc when casting the thorns buff of course i read wowhead comments, wowwiki, wowpedia, watched the video above and played druid in vanilla/tbc

it would be very imbalanced for the bear imo and i'm not the only one thinking that (sunwell bugtracker)

can only proc when casting smthg, not when a spell is automatically cast as a passive effect

bonfax4 commented 3 years ago

Any update on this ? this is a huge source of procs with glyphed maul. PPM/PPH(PPH = Weapon speed * PPM / 60) would put maul/mellee atack with a 14.58% chance to proc each hit.