mirror of
https://github.com/Bluewhale1337/HealBotBlue.git
synced 2026-09-11 09:50:21 +00:00
feature: implemented delayed spell casting logic to handle auto-unshift requirements for Druid forms
This commit is contained in:
@@ -298,13 +298,20 @@ function HealBot_CastSpellOnFriend(spell, target)
|
||||
local targetEnemy = UnitCanAttack("player", "target");
|
||||
local oldTarget = UnitName("target");
|
||||
|
||||
local formCancelled = false
|
||||
if HealBot_UnitClass("player") == "DRUID" and HealBot_Config.AutoUnshift == 1 then
|
||||
local currentForm = HealBot_GetShapeshiftForm()
|
||||
if currentForm then
|
||||
CastShapeshiftForm(currentForm);
|
||||
formCancelled = true
|
||||
end
|
||||
end
|
||||
|
||||
if formCancelled then
|
||||
HealBot_PendingShapeshiftCast = { spell = spell, target = target, targetEnemy = targetEnemy, oldTarget = oldTarget, expires = GetTime() + 1.0 }
|
||||
return;
|
||||
end
|
||||
|
||||
if oldTarget ~= UnitName(target) then
|
||||
TargetUnit(target);
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user