aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorJeremy <Golrag@users.noreply.github.com>2025-08-28 16:01:27 +0200
committerGitHub <noreply@github.com>2025-08-28 16:01:27 +0200
commit4ab6f8d28f0358b5079833999f2890259b388e28 (patch)
treeacfac284f9d66fda65a500a86c1b0fc9d5fd6d94 /src/server/scripts
parent1cb8991460374a28693553ab85f2c8ca759ccd93 (diff)
Scripts/Spells: Implement Fresh Meat talent (#31053)
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Spells/spell_warrior.cpp54
1 files changed, 52 insertions, 2 deletions
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp
index 7fefae22b25..8f61fe4f753 100644
--- a/src/server/scripts/Spells/spell_warrior.cpp
+++ b/src/server/scripts/Spells/spell_warrior.cpp
@@ -50,6 +50,8 @@ enum WarriorSpells
SPELL_WARRIOR_FRENZIED_ENRAGE = 383848,
SPELL_WARRIOR_FRENZY_TALENT = 335077,
SPELL_WARRIOR_FRENZY_BUFF = 335082,
+ SPELL_WARRIOR_FRESH_MEAT_DEBUFF = 316044,
+ SPELL_WARRIOR_FRESH_MEAT_TALENT = 215568,
SPELL_WARRIOR_FUELED_BY_VIOLENCE_HEAL = 383104,
SPELL_WARRIOR_GLYPH_OF_THE_BLAZING_TRAIL = 123779,
SPELL_WARRIOR_GLYPH_OF_HEROIC_LEAP = 159708,
@@ -423,6 +425,11 @@ class spell_warr_devastator : public AuraScript
// 184361 - Enrage
class spell_warr_enrage_proc : public AuraScript
{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_WARRIOR_FRESH_MEAT_TALENT, SPELL_WARRIOR_FRESH_MEAT_DEBUFF });
+ }
+
static bool CheckRampageProc(AuraScript const&, AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo)
{
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
@@ -432,12 +439,36 @@ class spell_warr_enrage_proc : public AuraScript
return true;
}
+ static bool IsBloodthirst(SpellInfo const* spellInfo)
+ {
+ // Bloodthirst/Bloodbath
+ return spellInfo->IsAffected(SPELLFAMILY_WARRIOR, { 0x0, 0x400 });
+ }
+
static bool CheckBloodthirstProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
{
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
- if (!spellInfo || !spellInfo->IsAffected(SPELLFAMILY_WARRIOR, { 0x0, 0x400 })) // Bloodthirst/Bloodbath
+ if (!spellInfo || !IsBloodthirst(spellInfo))
return false;
+ // Fresh Meat talent handling
+ if (Unit const* actor = eventInfo.GetActor())
+ {
+ if (actor->HasAura(SPELL_WARRIOR_FRESH_MEAT_TALENT))
+ {
+ Spell const* procSpell = eventInfo.GetProcSpell();
+ if (!procSpell)
+ return false;
+
+ Unit const* target = procSpell->m_targets.GetUnitTarget();
+ if (!target)
+ return false;
+
+ if (!target->HasAura(SPELL_WARRIOR_FRESH_MEAT_DEBUFF, actor->GetGUID()))
+ return true;
+ }
+ }
+
return roll_chance_i(aurEff->GetAmount());
}
@@ -445,10 +476,29 @@ class spell_warr_enrage_proc : public AuraScript
{
PreventDefaultAction();
- GetTarget()->CastSpell(nullptr, SPELL_WARRIOR_ENRAGE, CastSpellExtraArgsInit{
+ Unit* auraTarget = GetTarget();
+
+ auraTarget->CastSpell(nullptr, SPELL_WARRIOR_ENRAGE, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.TriggeringSpell = eventInfo.GetProcSpell()
});
+
+ // Fresh Meat talent handling
+ if (auraTarget->HasAura(SPELL_WARRIOR_FRESH_MEAT_TALENT))
+ {
+ Spell const* procSpell = eventInfo.GetProcSpell();
+ if (!procSpell)
+ return;
+
+ if (!IsBloodthirst(procSpell->GetSpellInfo()))
+ return;
+
+ if (Unit* bloodthirstTarget = procSpell->m_targets.GetUnitTarget())
+ if (!bloodthirstTarget->HasAura(SPELL_WARRIOR_FRESH_MEAT_DEBUFF, auraTarget->GetGUID()))
+ auraTarget->CastSpell(bloodthirstTarget, SPELL_WARRIOR_FRESH_MEAT_DEBUFF, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
+ });
+ }
}
void Register() override