DELETE FROM spell_script_names WHERE ScriptName='spell_warl_chaotic_energies';
INSERT INTO spell_script_names (spell_id,ScriptName) VALUES
(77220,'spell_warl_chaotic_energies');
From the spell_warlock.cpp
// 77220 - Mastery: Chaotic Energies
class spell_warl_chaotic_energies : public AuraScript
{
PrepareAuraScript(spell_warl_chaotic_energies);
void HandleAbsorb(AuraEffect* /*aurEff*/, DamageInfo& dmgInfo, uint32& absorbAmount)
{
AuraEffect const* effect1 = GetEffect(EFFECT_1);
if (!effect1 || !GetTargetApplication()->HasEffect(EFFECT_1))
{
PreventDefaultAction();
return;
}
// You take ${$s2/3}% reduced damage
float damageReductionPct = float(effect1->GetAmount()) / 3;
// plus a random amount of up to ${$s2/3}% additional reduced damage
damageReductionPct += frand(0.0f, damageReductionPct);
absorbAmount = CalculatePct(dmgInfo.GetDamage(), damageReductionPct);
}
void Register() override
{
OnEffectAbsorb += AuraEffectAbsorbFn(spell_warl_chaotic_energies::HandleAbsorb, EFFECT_2);
}
};
void AddSC_warlock_spell_scripts()
{
new spell_warl_bane_of_doom();
new spell_warl_banish();
+ RegisterAuraScript(spell_warl_chaotic_energies);
new spell_warl_conflagrate();
new spell_warl_create_healthstone();
new spell_warl_demonic_circle_summon();
@ottconnect Hey brow! Follow the link for the warlock problem with absorb damage:
https://github.com/TrinityCore/TrinityCore/commit/32f18d05ae8c49d9879adcaa91f9a6fbce4b7ec0
From the table World:
DELETE FROM
spell_script_names
WHEREScriptName
='spell_warl_chaotic_energies'; INSERT INTOspell_script_names
(spell_id
,ScriptName
) VALUES (77220,'spell_warl_chaotic_energies');From the spell_warlock.cpp
// 77220 - Mastery: Chaotic Energies class spell_warl_chaotic_energies : public AuraScript { PrepareAuraScript(spell_warl_chaotic_energies);
};
void AddSC_warlock_spell_scripts() { new spell_warl_bane_of_doom(); new spell_warl_banish(); + RegisterAuraScript(spell_warl_chaotic_energies); new spell_warl_conflagrate(); new spell_warl_create_healthstone(); new spell_warl_demonic_circle_summon();