mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Spells: Implement Deft Experience warrior talent (#31060)
This commit is contained in:
4
sql/updates/world/master/2025_06_15_04_world.sql
Normal file
4
sql/updates/world/master/2025_06_15_04_world.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_warr_deft_experience';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(23881, 'spell_warr_deft_experience'),
|
||||
(335096, 'spell_warr_deft_experience');
|
||||
@@ -43,6 +43,7 @@ enum WarriorSpells
|
||||
SPELL_WARRIOR_COLOSSUS_SMASH = 167105,
|
||||
SPELL_WARRIOR_COLOSSUS_SMASH_AURA = 208086,
|
||||
SPELL_WARRIOR_CRITICAL_THINKING_ENERGIZE = 392776,
|
||||
SPELL_WARRIOR_DEFT_EXPERIENCE = 383295,
|
||||
SPELL_WARRIOR_EXECUTE = 20647,
|
||||
SPELL_WARRIOR_ENRAGE = 184362,
|
||||
SPELL_WARRIOR_FRENZIED_ENRAGE = 383848,
|
||||
@@ -326,6 +327,37 @@ class spell_warr_critical_thinking : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 383295 - Deft Experience (attached to 23881 - Bloodthirst)
|
||||
// 383295 - Deft Experience (attached to 335096 - Bloodbath)
|
||||
class spell_warr_deft_experience : public SpellScript
|
||||
{
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellEffect({ { SPELL_WARRIOR_DEFT_EXPERIENCE, EFFECT_1 } });
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->HasAura(SPELL_WARRIOR_DEFT_EXPERIENCE);
|
||||
}
|
||||
|
||||
void HandleDeftExperience(SpellEffIndex /*effIndex*/) const
|
||||
{
|
||||
if (GetHitUnit() != GetExplTargetUnit())
|
||||
return;
|
||||
|
||||
Unit const* caster = GetCaster();
|
||||
if (Aura* enrageAura = caster->GetAura(SPELL_WARRIOR_ENRAGE))
|
||||
if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_WARRIOR_DEFT_EXPERIENCE, EFFECT_1))
|
||||
enrageAura->SetDuration(enrageAura->GetDuration() + aurEff->GetAmount());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_warr_deft_experience::HandleDeftExperience, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
// 236279 - Devastator
|
||||
class spell_warr_devastator : public AuraScript
|
||||
{
|
||||
@@ -1160,6 +1192,7 @@ void AddSC_warrior_spell_scripts()
|
||||
RegisterSpellScript(spell_warr_charge_effect);
|
||||
RegisterSpellScript(spell_warr_colossus_smash);
|
||||
RegisterSpellScript(spell_warr_critical_thinking);
|
||||
RegisterSpellScript(spell_warr_deft_experience);
|
||||
RegisterSpellScript(spell_warr_devastator);
|
||||
RegisterSpellScript(spell_warr_enrage_proc);
|
||||
RegisterSpellScript(spell_warr_execute_damage);
|
||||
|
||||
Reference in New Issue
Block a user