Skip to content

Commit

Permalink
xtarget only adds mobs if you are using OA
Browse files Browse the repository at this point in the history
  • Loading branch information
DerpleMQ2 committed Mar 11, 2024
1 parent ac40639 commit e241c25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion extras/version.lua
Original file line number Diff line number Diff line change
@@ -1 +1 @@
return { commitId = '44b4ae9 2024-03-10' }
return { commitId = 'ac40639 2024-03-10' }
7 changes: 1 addition & 6 deletions utils/rgmercs_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2790,6 +2790,7 @@ function RGMercUtils.FindTarget(validateFn)
RGMercsLogger.log_verbose(" FindTarget Setting Target To %s [%d]", assistTarget.CleanName(),
assistTarget.ID())
RGMercConfig.Globals.AutoTargetID = assistTarget.ID()
RGMercUtils.AddXTByName(1, assistTarget.Name())
end
else
---@diagnostic disable-next-line: undefined-field
Expand All @@ -2812,12 +2813,6 @@ function RGMercUtils.FindTarget(validateFn)
RGMercsLogger.log_verbose("FindTarget(): FoundTargetID(%d), myTargetId(%d)", RGMercConfig.Globals.AutoTargetID or 0,
mq.TLO.Target.ID())

if RGMercConfig.Globals.AutoTargetID > 0 then
local assistSpawn = mq.TLO.Spawn(RGMercConfig.Globals.AutoTargetID)
if assistSpawn and assistSpawn() and not assistSpawn.Dead() then
RGMercUtils.AddXTByName(1, assistSpawn.Name())
end
end
if RGMercConfig.Globals.AutoTargetID > 0 and mq.TLO.Target.ID() ~= RGMercConfig.Globals.AutoTargetID then
if not validateFn or validateFn(RGMercConfig.Globals.AutoTargetID) then
RGMercUtils.SetTarget(RGMercConfig.Globals.AutoTargetID)
Expand Down

0 comments on commit e241c25

Please sign in to comment.