Paragon cross-class family wildcard + Predatory Strikes proc

- CONFIG_PARAGON_WILDCARD_FAMILY + Paragon.WildcardFamilyMatching (reloadable)
- SpellInfo::IsAffected / IsAffectedBySpellMod(listenerOwner) for Paragon proc/mod wildcard
- SpellMgr::CanSpellTriggerProcOnEvent(procOwner) + Aura::IsProcTriggeredOnEvent wiring
- Player::IsAffectedBySpellmod passes listener for SpellMod wildcard
- ParagonFamilyMatches helper + Nourish / Shred-Maul bleed gate usage in Unit.cpp
- Spell::prepare: Paragon consumes 69369 for Nature spells <10s base cast (non-channeled)
- spell_paragon_predatory_strikes + SQL 2026_05_11_00.sql (spell_proc + spell_script_names)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Docker Build
2026-05-11 01:24:50 -04:00
parent b408c8a95d
commit a1c9172beb
14 changed files with 337 additions and 9 deletions
+128
View File
@@ -514,8 +514,136 @@ class spell_paragon_arcane_torrent : public SpellScript
}
};
// Predatory Strikes (16972 / 16974 / 16975) for Paragon: re-implements the
// Cataclysm-era proc behavior of the talent so a Paragon's damaging
// finishers (Eviscerate / Envenom / Ferocious Bite / Rip / Rupture) can
// roll Predator's Swiftness (69369) -- the same buff that real druids
// get from the Cata redesign of this talent. Combined with the
// Spell::prepare interception in core (Spell.cpp), 69369 makes the
// Paragon's NEXT Nature-school spell with a base cast time below 10s
// instant cast: Chain Lightning, Lightning Bolt, Healing Touch, Wrath,
// Nourish, etc. -- not just the Druid-family Nature subset that the
// stock SPELLMOD_CASTING_TIME mask on 69369 covers.
//
// Filter logic:
// - Source spell must consume combo points (NeedsComboPoints() — gates
// out non-finisher combo-point builders).
// - "Damaging finisher": SPELL_ATTR1_FINISHING_MOVE_DAMAGE (Eviscerate,
// Envenom, Ferocious Bite, ...) OR a SPELL_ATTR1_FINISHING_MOVE_DURATION
// finisher that applies periodic damage (Rip, Rupture). Duration
// finishers that only heal (Recuperate) or only buff / CC / armor shred
// (Slice and Dice, Savage Roar, Kidney Shot, Maim, Expose Armor) are
// rejected.
//
// Chance per combo point matches the Cataclysm tuning that the user's
// client tooltip text reflects: rank 1 = 3% per CP, rank 2 = 5% per CP,
// rank 3 = 7% per CP. At 5 CP that is 15% / 25% / 35%, capped at 100%.
//
// Combo-point read happens during PROC_SPELL_PHASE_CAST, which fires in
// Spell::cast → Spell::ProcReflectProcs / Unit::ProcDamageAndSpellFor
// BEFORE Spell::_handle_finish_phase clears the player's combo points
// (see Spell.cpp:_handle_finish_phase clearing combo points). So
// player->GetComboPoints() inside HandleProc returns the pre-clear value.
class spell_paragon_predatory_strikes : public AuraScript
{
PrepareAuraScript(spell_paragon_predatory_strikes);
static constexpr uint32 SPELL_PARAGON_PREDATORS_SWIFTNESS = 69369;
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_PARAGON_PREDATORS_SWIFTNESS });
}
bool CheckProc(ProcEventInfo& eventInfo)
{
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo || !spellInfo->NeedsComboPoints())
return false;
if (spellInfo->HasAttribute(SPELL_ATTR1_FINISHING_MOVE_DAMAGE))
return true;
if (spellInfo->HasAttribute(SPELL_ATTR1_FINISHING_MOVE_DURATION))
{
bool periodicHeal = false;
bool periodicDamage = false;
for (SpellEffectInfo const& eff : spellInfo->Effects)
{
if (eff.Effect != SPELL_EFFECT_APPLY_AURA && eff.Effect != SPELL_EFFECT_APPLY_AREA_AURA_PARTY
&& eff.Effect != SPELL_EFFECT_PERSISTENT_AREA_AURA)
continue;
switch (eff.ApplyAuraName)
{
case SPELL_AURA_PERIODIC_HEAL:
case SPELL_AURA_PERIODIC_HEALTH_FUNNEL:
case SPELL_AURA_OBS_MOD_HEALTH:
periodicHeal = true;
break;
case SPELL_AURA_PERIODIC_DAMAGE:
case SPELL_AURA_PERIODIC_DAMAGE_PERCENT:
case SPELL_AURA_PERIODIC_LEECH:
periodicDamage = true;
break;
default:
break;
}
}
if (periodicHeal)
return false;
return periodicDamage;
}
return false;
}
void HandleProc(ProcEventInfo& eventInfo)
{
PreventDefaultAction();
Unit* actor = eventInfo.GetActor();
Player* player = actor ? actor->ToPlayer() : nullptr;
if (!player || player->getClass() != CLASS_PARAGON)
return;
uint8 const cp = player->GetComboPoints();
if (cp == 0)
return;
SpellInfo const* talent = GetSpellInfo();
if (!talent)
return;
uint32 pctPerCP = 0;
switch (talent->Id)
{
case 16972: pctPerCP = 3; break;
case 16974: pctPerCP = 5; break;
case 16975: pctPerCP = 7; break;
default:
return;
}
uint32 const chance = std::min<uint32>(100u, pctPerCP * uint32(cp));
if (!roll_chance_i(int32(chance)))
return;
player->CastSpell(player, SPELL_PARAGON_PREDATORS_SWIFTNESS, true);
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_paragon_predatory_strikes::CheckProc);
OnProc += AuraProcFn(spell_paragon_predatory_strikes::HandleProc);
}
};
void AddSC_paragon()
{
new Paragon_PlayerScript();
RegisterSpellScript(spell_paragon_arcane_torrent);
RegisterSpellScript(spell_paragon_predatory_strikes);
}