Open lingxDEV opened 4 years ago
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');
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:
SF rev. hash/commit:
Skyfire rev. 164451ca0b0b
SFDB version:
stable5
Operating system:
win10 64