fix(Core/SAI): rooted check blocks vehicles from casting quest credit (#20283)
spell The quest SteamTank Surprise has a SmartAI entry in the db that causes the tank to cast the kill credit spell on the player when they successfully destroy a plague wagon. Currently, this spell cast is being blocked by the rooted check handler for SMART_ACTION_CAST. The change proposes that this rooted check should not apply to vehicles. Closes AzerothCore issue #20237 Co-authored-by: cgrahamseven <chris.graham@protonmail.com>
This commit is contained in:
parent
8852c38cd4
commit
1c1a281eda
1 changed files with 1 additions and 1 deletions
|
|
@ -693,7 +693,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||
bool isSpellIgnoreLOS = spellInfo->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT);
|
||||
|
||||
// If target is rooted we move out of melee range before casting, but not further than spell max range.
|
||||
if (isWithinLOSInMap && isWithinMeleeRange && isRangedAttack && isTargetRooted && canCastSpell)
|
||||
if (isWithinLOSInMap && isWithinMeleeRange && isRangedAttack && isTargetRooted && canCastSpell && !me->IsVehicle())
|
||||
{
|
||||
failedSpellCast = true; // Mark spellcast as failed so we can retry it later
|
||||
float minDistance = std::max(meleeRange, spellMinRange) - distanceToTarget + NOMINAL_MELEE_RANGE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue