mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-04-29 18:59:20 +02:00
Updated to OTCv8 3.1 rev 104
This commit is contained in:
parent
2b81291c05
commit
3f82a78a78
@ -1,9 +1,8 @@
|
||||
minimapWidget = nil
|
||||
minimapButton = nil
|
||||
minimapWindow = nil
|
||||
otmm = true
|
||||
preloaded = false
|
||||
fullmapView = false
|
||||
loaded = false
|
||||
oldZoom = nil
|
||||
oldPos = nil
|
||||
|
||||
@ -88,13 +87,8 @@ function onMiniWindowClose()
|
||||
end
|
||||
end
|
||||
|
||||
function preload()
|
||||
loadMap(false)
|
||||
preloaded = true
|
||||
end
|
||||
|
||||
function online()
|
||||
loadMap(not preloaded)
|
||||
loadMap()
|
||||
updateCameraPosition()
|
||||
end
|
||||
|
||||
@ -102,40 +96,37 @@ function offline()
|
||||
saveMap()
|
||||
end
|
||||
|
||||
function loadMap(clean)
|
||||
function loadMap()
|
||||
local clientVersion = g_game.getClientVersion()
|
||||
|
||||
if clean then
|
||||
g_minimap.clean()
|
||||
g_minimap.clean()
|
||||
loaded = false
|
||||
|
||||
local minimapFile = '/minimap.otmm'
|
||||
local dataMinimapFile = '/data' .. minimapFile
|
||||
local versionedMinimapFile = '/minimap' .. clientVersion .. '.otmm'
|
||||
if g_resources.fileExists(dataMinimapFile) then
|
||||
loaded = g_minimap.loadOtmm(dataMinimapFile)
|
||||
end
|
||||
|
||||
if otmm then
|
||||
local minimapFile = '/minimap.otmm'
|
||||
if g_resources.fileExists('/data' .. minimapFile) then
|
||||
g_minimap.loadOtmm('/data' .. minimapFile)
|
||||
elseif g_resources.fileExists(minimapFile) then
|
||||
g_minimap.loadOtmm(minimapFile)
|
||||
end
|
||||
else
|
||||
local minimapFile = '/minimap_' .. clientVersion .. '.otcm'
|
||||
if g_resources.fileExists('/data' .. minimapFile) then
|
||||
g_map.loadOtcm('/data' .. minimapFile)
|
||||
elseif g_resources.fileExists(minimapFile) then
|
||||
g_map.loadOtcm(minimapFile)
|
||||
end
|
||||
if not loaded and g_resources.fileExists(versionedMinimapFile) then
|
||||
loaded = g_minimap.loadOtmm(versionedMinimapFile)
|
||||
end
|
||||
if not loaded and g_resources.fileExists(minimapFile) then
|
||||
loaded = g_minimap.loadOtmm(minimapFile)
|
||||
end
|
||||
if not loaded then
|
||||
print("Minimap couldn't be loaded")
|
||||
end
|
||||
minimapWidget:load()
|
||||
end
|
||||
|
||||
function saveMap()
|
||||
local clientVersion = g_game.getClientVersion()
|
||||
if otmm then
|
||||
local minimapFile = '/minimap.otmm'
|
||||
g_minimap.saveOtmm(minimapFile)
|
||||
else
|
||||
local minimapFile = '/minimap_' .. clientVersion .. '.otcm'
|
||||
g_map.saveOtcm(minimapFile)
|
||||
if not loaded then
|
||||
return
|
||||
end
|
||||
local clientVersion = g_game.getClientVersion()
|
||||
local minimapFile = '/minimap' .. clientVersion .. '.otmm'
|
||||
g_minimap.saveOtmm(minimapFile)
|
||||
minimapWidget:save()
|
||||
end
|
||||
|
||||
|
BIN
otclient_dx.exe
BIN
otclient_dx.exe
Binary file not shown.
BIN
otclient_gl.exe
BIN
otclient_gl.exe
Binary file not shown.
BIN
otclient_linux
BIN
otclient_linux
Binary file not shown.
BIN
otclient_mac
BIN
otclient_mac
Binary file not shown.
BIN
otclientv8.apk
BIN
otclientv8.apk
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user