Jump to content

[patch] Flametongue Weapon proc implementation


darkstalker

Recommended Posts

This adds the fire damage on melee hit for Flametongue Weapon (all ranks). This is the first time i attempt to fix something in mangos, i hope its correct.

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

Implements the Flametongue Weapon proc

* For which repository revision was the patch created?

8280

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

didnt fount one

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

darkstalker

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 83e1a43..63e15f6 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -6039,6 +6039,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
                return false;
                break;
            }
+            // Flametongue Weapon proc
+            if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000000000200000))
+            {
+                triggered_spell_id = 10444;
+                basepoints0 = GetAttackTime(BASE_ATTACK) * (dummySpell->EffectBasePoints[0]+1) / 100000;
+                break;
+            }
            break;
        }
        case SPELLFAMILY_DEATHKNIGHT:

SQL patch:

DELETE FROM `spell_bonus_data` WHERE `entry` IN (8026, 10444);

INSERT INTO `spell_bonus_data` VALUES
(10444, 0.1, 0, 0, "Shaman - Flametongue Weapon Proc");

Link to comment
Share on other sites

Mangos coding style uses 4 spaces instead of tabs, because tabs vary in length across Git/IDEs/paste2/etc.

Your patch works alright, but SQL changes are necessary as well:

DELETE FROM `spell_bonus_data` WHERE `entry` IN (8026, 10444);

INSERT INTO `spell_bonus_data` VALUES
(10444, 0.1, 0, 0, "Shaman - Flametongue Weapon Proc");

Now this brings to light some more generic fixes that need to be made for Flametongue Weapon before it deals the correct amount of damage. The spell that is procced has a spellLevel of 1, so the coefficient is subject to downranking, and for a level 80, it'd only get ~0.007 * SP instead of 0.1 * SP.

Link to comment
Share on other sites

The spell that is procced has a spellLevel of 1, so the coefficient is subject to downranking, and for a level 80, it'd only get ~0.007 * SP instead of 0.1 * SP.

I wonder if there is attribute or something because i'm tired of spells being suffered from unneeded downranking =\\

Link to comment
Share on other sites

maybe adding the correct coeff to base dmg and ignoring the one from db?

That would work, but it would be hacky and might be unnecessary when you consider that Earth Shield, Prayer of Mending, Paladin Judgements, etc. would also need the same fix.

Edit: I mean this patch is fine as is once you add the coefficient, and the downranking problem isn't an issue completely related to this patch. But back when the procs actually did the damage, there wasn't this problem with spellLevels/downranking (currently, they seem to just supply client display data with their unused dummy effect).

Edit2: No, I meant I personally liked it as is, without the hardcoded coefficient :P

Link to comment
Share on other sites

just edited the original post to correct the spellcoef issue.

With this hack this patch has no chances to get into the official repo ;)

Leav it as it was. This was a correct fix for this dummy proc. The issue with spell damage bonus is a completely other thing.

OT: Maybe we should use the level of the triggering aura but not level of the spell itself. Would just require to give the pointer of the triggering aura to SpellBonusDamage() as argument...

Link to comment
Share on other sites

OT: Maybe we should use the level of the triggering aura but not level of the spell itself. Would just require to give the pointer of the triggering aura to SpellBonusDamage() as argument...

OT: It won't work with judgements, no aura involved; but I supposed you could change the script effect to treat the seal as the proccing aura.

With this hack this patch has no chances to get into the official repo ;)

Leav it as it was. This was a correct fix for this dummy proc. The issue with spell damage bonus is a completely other thing.

I agree.

Link to comment
Share on other sites

  • 11 months later...

Alternative fix added in [10237]

On further investigation, after patch 3.1 spellpower bonus was no longer a fixed 10%, probably the reason why the proc spell is a dummy which does a custom attack spell cast.

This also prevents the downranking problem, the attack spell does not get any direct spell damage bonus.

Also special care was required to make it proc only for attacks of the enchanted weapon.

And another fix was required to make some special attack properly be detected as off-hand attacks, such as the Stormstrike off-hand attack and Lava Lash.

Hope i got everything right...

One remaining bug: When enchanting main-hand, Stormstrike procs Flametongue twice, because the base spell triggers two attack spells, but itself is also classified as melee attack spell.

Funnily enough, this bug even existed (or maybe even still does?) on retail servers...

This however must be considered a Stormstrike bug and may affect other procs too, not just Flametongue. Needs further research...

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