feature: implemented delayed spell casting logic to handle auto-unshift requirements for Druid forms

This commit is contained in:
Bluewhale1337
2026-09-01 11:03:11 +02:00
parent e05238a5b2
commit 59ceb3b465
2 changed files with 37 additions and 0 deletions
+7
View File
@@ -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