fix(Scripts/Ulduar): Freya's Ancient Conservator should cast Nature's Fury on a random player (#26199)
Co-authored-by: Lopin <Lopin@TwinStar.cz> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -292,10 +292,14 @@ SpellCastResult UnitAI::DoCastAOE(uint32 spellId, bool triggered)
|
||||
|
||||
/**
|
||||
* @brief Cast the spell on a random unit from the threat list
|
||||
*
|
||||
* @param aura Optional aura filter forwarded to SelectTarget: a positive value
|
||||
* requires the aura on the target, a negative value excludes targets
|
||||
* that already have it.
|
||||
*/
|
||||
SpellCastResult UnitAI::DoCastRandomTarget(uint32 spellId, uint32 threatTablePosition, float dist, bool playerOnly, bool triggered, bool withTank)
|
||||
SpellCastResult UnitAI::DoCastRandomTarget(uint32 spellId, uint32 threatTablePosition, float dist, bool playerOnly, bool triggered, bool withTank, int32 aura)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, threatTablePosition, dist, playerOnly, withTank))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, threatTablePosition, dist, playerOnly, withTank, aura))
|
||||
{
|
||||
return DoCast(target, spellId, triggered);
|
||||
}
|
||||
|
||||
@@ -395,7 +395,8 @@ public:
|
||||
SpellCastResult DoCastToAllHostilePlayers(uint32 spellid, bool triggered = false);
|
||||
SpellCastResult DoCastVictim(uint32 spellId, bool triggered = false);
|
||||
SpellCastResult DoCastAOE(uint32 spellId, bool triggered = false);
|
||||
SpellCastResult DoCastRandomTarget(uint32 spellId, uint32 threatTablePosition = 0, float dist = 0.0f, bool playerOnly = true, bool triggered = false, bool withTank = true);
|
||||
// aura: forwarded to SelectTarget - if 0: ignored, if > 0: the target shall have the aura, if < 0: the target shall NOT have the aura
|
||||
SpellCastResult DoCastRandomTarget(uint32 spellId, uint32 threatTablePosition = 0, float dist = 0.0f, bool playerOnly = true, bool triggered = false, bool withTank = true, int32 aura = 0);
|
||||
|
||||
/// @brief Cast spell on the top threat target, which may not be the current victim.
|
||||
SpellCastResult DoCastMaxThreat(uint32 spellId, uint32 threatTablePosition = 0, float dist = 0.0f, bool playerOnly = true, bool triggered = false);
|
||||
|
||||
Reference in New Issue
Block a user