Progress updating to cv981/pv973:

* Implemented the new client AND protocol version methods.
* Implemented the new speed laws added in cv980 (http://www.tibia.com/news/?subtopic=newsarchive&id=2251).
* Added more missing bytea to login packets (client version/type and some unknown bytes).
* Fixed the InputMessage::getDouble method.
* Cleaned up some of the const values.
* Started on the pending state features.

TODO:
* Pending game state feature.
* Ensure version compatibility hasn't been compromised.
This commit is contained in:
BeniS
2012-12-29 00:05:45 +13:00
parent 619285069c
commit 44e428bccb
29 changed files with 260 additions and 129 deletions

View File

@@ -182,7 +182,7 @@ function addMapFlag(pos, icon, message, flagId, version)
return
end
version = version or g_game.getClientVersion()
version = version or g_game.getProtocolVersion()
-- Check if flag is set for that position
for i = 1, flagsPanel:getChildCount() do
local flag = flagsPanel:getChildByIndex(i)
@@ -218,7 +218,7 @@ function getMapArea()
end
function isFlagVisible(flag, firstPosition, lastPosition)
return flag.version == g_game.getClientVersion() and (minimapWidget:getZoom() >= 30 and minimapWidget:getZoom() <= 150) and flag.position.x >= firstPosition.x and flag.position.x <= lastPosition.x and flag.position.y >= firstPosition.y and flag.position.y <= lastPosition.y and flag.position.z == firstPosition.z
return flag.version == g_game.getProtocolVersion() and (minimapWidget:getZoom() >= 30 and minimapWidget:getZoom() <= 150) and flag.position.x >= firstPosition.x and flag.position.x <= lastPosition.x and flag.position.y >= firstPosition.y and flag.position.y <= lastPosition.y and flag.position.z == firstPosition.z
end
function updateMapFlag(id)
@@ -267,8 +267,8 @@ function offline()
end
function loadMap()
local clientVersion = g_game.getClientVersion()
local minimapFile = '/minimap_' .. clientVersion .. '.otcm'
local protocolVersion = g_game.getProtocolVersion()
local minimapFile = '/minimap_' .. protocolVersion .. '.otcm'
if g_resources.fileExists(minimapFile) then
g_map.clean()
g_map.loadOtcm(minimapFile)
@@ -276,8 +276,8 @@ function loadMap()
end
function saveMap()
local clientVersion = g_game.getClientVersion()
local minimapFile = '/minimap_' .. clientVersion .. '.otcm'
local protocolVersion = g_game.getProtocolVersion()
local minimapFile = '/minimap_' .. protocolVersion .. '.otcm'
g_map.saveOtcm(minimapFile)
end