Closed jzy-chitong56 closed 1 month ago
TeleportCaptain maybe need check Retreating
if not CaptainInCombat(true) and not CaptainRetreating() then
call TeleportCaptain(lastcaptainx, lastcaptainy)
endif
No unless true retreat control is engaged (which is picked up by earlier exitwhen) its fine in this case as it should stay around by design to pick up items.
set u
isif (lastcaptainx != 0 and lastcaptainy != 0) then
In fact, this condition is almost 100% met, which means that it will be reset every time the loop is repeated. I think we need to add self-locking here and only reacquire whenU
isnull
or deadif (lastcaptainx != 0 and lastcaptainy != 0) and (u == null or not UnitAlive(u)) then
call TeleportCaptain(lastcaptainx, lastcaptainy)
maybe need check Combatif (u != null and (not CaptainInCombat(true) or CaptainRetreating() or CaptainIsHome())) then
It seems that the parentheses are written in the wrong position here. Is the original intention