SkyFire_548 icon indicating copy to clipboard operation
SkyFire_548 copied to clipboard

[SPELL/ROGUE/COMBAT] Revealing Strike

Open lingxDEV opened this issue 4 years ago • 1 comments

Current behaviour:

Revealing Strike only gives the debuff on the target, but it has no effect.

Expected behaviour:

Should give a chance to gain 2 combo points when using Sinister Strike. Should make offensive finishers 35% more efficient. (this means that Eviscerate should do 35% more damage, Kidney Shot should last 35% longer, etc.)

Steps to reproduce the problem:

  1. Make a rogue
  2. Spec into Combat > Use Revealing Strike > Get 5 combo points > use Kidney Shot > See that it only lasts 6 seconds (should last 8,1 seconds)
  3. Use Eviscerate at 5 combo points a bunch of times, see the average damage
  4. Do the same, but with Revealing Strike and see that it's the same damage being done
  5. While Revealing Strike is active, use Sinister Strike a bunch of times, see that you will never get 2 combo points.

SF rev. hash/commit:

Skyfire rev. 164451ca0b0b

SFDB version:

stable5

Operating system:

win10 64

lingxDEV avatar Sep 18 '20 08:09 lingxDEV

Wrote the logic for Kidney Shot increased duration.

Need to add 35% more damage to Eviscerate, 35% increased damage for Rupture.

Also need to add logic for when Target is affected by Revealing Strikes, the rogue has a 20% chance when using Sinister Strike, to add an extra combo point.

    ROGUE_SPELL_KIDNEY_SHOT                         = 408,
    ROGUE_SPELL_REVEALING_STRIKE                    = 84617


// Called by Kidney Shot - 408
// Revealing Strike
class spell_rog_revealing_strike : public SpellScriptLoader
{
public:
    spell_rog_revealing_strike() : SpellScriptLoader("spell_rog_revealing_strike") { }

    class spell_rog_revealing_strike_SpellScript : public SpellScript
    {
        PrepareSpellScript(spell_rog_revealing_strike_SpellScript);

        void HandleOnHit()
        {
            if (GetSpellInfo()->Id != ROGUE_SPELL_KIDNEY_SHOT)
                return;

            if (!GetCaster())
                return;

            if (Unit* caster = GetCaster())
            {
                if (Unit* target = GetHitUnit())
                {
                    if (target->HasAura(ROGUE_SPELL_REVEALING_STRIKE, caster->GetGUID()))
                    {
                        if (Aura* kidney = target->GetAura(ROGUE_SPELL_KIDNEY_SHOT, caster->GetGUID()))
                        {
                            int32 duration = kidney->GetMaxDuration();
                            AddPct(duration, 35);
                            kidney->SetMaxDuration(duration);
                            kidney->RefreshDuration();
                        }
                    }
                }
            }
        }

        void Register()
        {
            OnHit += SpellHitFn(spell_rog_revealing_strike_SpellScript::HandleOnHit);
        }
    };

    SpellScript* GetSpellScript() const
    {
        return new spell_rog_revealing_strike_SpellScript();
    }
};


new spell_rog_revealing_strike();


INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES ('408', 'spell_rog_revealing_strike');

lingxDEV avatar Sep 19 '20 09:09 lingxDEV