mirror of
https://github.com/edubart/otclient.git
synced 2025-04-29 17:19:20 +02:00
Save the minimap on a per server basis
Co-authored-by: Xagul <eixim@hotmail.com>
This commit is contained in:
parent
a3fdf073b9
commit
52475761cd
@ -103,12 +103,12 @@ function loadMap(clean)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if otmm then
|
if otmm then
|
||||||
local minimapFile = '/minimap.otmm'
|
local minimapFile = '/minimap_'.. G.host ..'.otmm'
|
||||||
if g_resources.fileExists(minimapFile) then
|
if g_resources.fileExists(minimapFile) then
|
||||||
g_minimap.loadOtmm(minimapFile)
|
g_minimap.loadOtmm(minimapFile)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local minimapFile = '/minimap_' .. clientVersion .. '.otcm'
|
local minimapFile = '/minimap_' .. clientVersion .. '_'.. G.host ..'.otcm'
|
||||||
if g_resources.fileExists(minimapFile) then
|
if g_resources.fileExists(minimapFile) then
|
||||||
g_map.loadOtcm(minimapFile)
|
g_map.loadOtcm(minimapFile)
|
||||||
end
|
end
|
||||||
@ -119,10 +119,10 @@ end
|
|||||||
function saveMap()
|
function saveMap()
|
||||||
local clientVersion = g_game.getClientVersion()
|
local clientVersion = g_game.getClientVersion()
|
||||||
if otmm then
|
if otmm then
|
||||||
local minimapFile = '/minimap.otmm'
|
local minimapFile = '/minimap_'.. G.host ..'.otmm'
|
||||||
g_minimap.saveOtmm(minimapFile)
|
g_minimap.saveOtmm(minimapFile)
|
||||||
else
|
else
|
||||||
local minimapFile = '/minimap_' .. clientVersion .. '.otcm'
|
local minimapFile = '/minimap_' .. clientVersion .. '_'.. G.host ..'.otcm'
|
||||||
g_map.saveOtcm(minimapFile)
|
g_map.saveOtcm(minimapFile)
|
||||||
end
|
end
|
||||||
minimapWidget:save()
|
minimapWidget:save()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user