Skip to content

Commit

Permalink
removed auto destroy campfire.
Browse files Browse the repository at this point in the history
  • Loading branch information
DerpleMQ2 committed Feb 24, 2024
1 parent 07e574f commit b754131
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions modules/movement.lua
Original file line number Diff line number Diff line change
Expand Up @@ -179,30 +179,28 @@ end

function Module:CampOff()
self.settings.ReturnToCamp = false
self:DestoryCampfire()
self:SaveSettings(false)
RGMercUtils.DoCmd("/mapfilter campradius off")
RGMercUtils.DoCmd("/mapfilter pullradius off")
end

function Module:DestoryCampfire()
if mq.TLO.Me.Fellowship.Campfire() == nil then return end
RGMercsLogger.log_debug("DestoryCampfire()")

mq.TLO.Window("FellowshipWnd").DoOpen()
mq.delay("3s", function() return mq.TLO.Window("FellowshipWnd").Open() end)
mq.TLO.Window("FellowshipWnd").Child("FP_Subwindows").SetCurrentTab(2)

if mq.TLO.Me.Fellowship.Campfire() then
if mq.TLO.Zone.ID() ~= mq.TLO.Me.Fellowship.CampfireZone.ID() then
mq.TLO.Window("FellowshipWnd").Child("FP_DestroyCampsite").LeftMouseUp()
mq.delay("5s", function() return mq.TLO.Window("ConfirmationDialogBox").Open() end)
mq.TLO.Window("FellowshipWnd").Child("FP_DestroyCampsite").LeftMouseUp()
mq.delay("5s", function() return mq.TLO.Window("ConfirmationDialogBox").Open() end)

if mq.TLO.Window("ConfirmationDialogBox").Open() then
mq.TLO.Window("ConfirmationDialogBox").Child("Yes_Button").LeftMouseUp()
end

mq.delay("5s", function() return mq.TLO.Me.Fellowship.Campfire() == nil end)
if mq.TLO.Window("ConfirmationDialogBox").Open() then
mq.TLO.Window("ConfirmationDialogBox").Child("Yes_Button").LeftMouseUp()
end

mq.delay("5s", function() return mq.TLO.Me.Fellowship.Campfire() == nil end)
end
mq.TLO.Window("FellowshipWnd").DoClose()
end
Expand Down

0 comments on commit b754131

Please sign in to comment.