Skip to content

Commit

Permalink
fixed a bug with how mercs were tested
Browse files Browse the repository at this point in the history
  • Loading branch information
DerpleMQ2 committed Jan 1, 2024
1 parent 2926972 commit 09fa197
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ local function Main()
if RGMercConfig:GetSettings().DoMercenary then
local merc = mq.TLO.Me.Mercenary

if merc() then
if merc() and merc.ID() then
if RGMercUtils.MercEngage() then
if merc.Class.ShortName():lower() == "war" and merc.Stance():lower() ~= "aggressive" then
mq.cmdf("/squelch /stance aggressive")
Expand All @@ -287,7 +287,7 @@ local function Main()
end

if RGMercUtils.DoCamp() then
if mq.TLO.Me.Mercenary() and (mq.TLO.Me.Mercenary.Class.ShortName() or "none"):lower() ~= "clr" and mq.TLO.Me.Mercenary.Stance():lower() ~= "passive" then
if mq.TLO.Me.Mercenary.ID() and (mq.TLO.Me.Mercenary.Class.ShortName() or "none"):lower() ~= "clr" and mq.TLO.Me.Mercenary.Stance():lower() ~= "passive" then
mq.cmdf("/squelch /stance passive")
end
end
Expand Down

0 comments on commit 09fa197

Please sign in to comment.