This commit is contained in:
OTCv8
2020-06-09 18:19:20 +02:00
parent 76d6f2ce7d
commit 541e189d3f
154 changed files with 2540 additions and 1221 deletions

View File

@@ -4,10 +4,6 @@ Module
author: OTClient team
website: https://github.com/edubart/otclient
dependencies:
- game_features
- game_things
@onLoad: |
dofile 'const'
dofile 'util'

View File

@@ -86,6 +86,13 @@ function ProtocolLogin:sendLoginPacket()
if self.getLoginExtendedData then
local data = self:getLoginExtendedData()
msg:addString(data)
else
msg:addString("OTCv8")
local version = g_app.getVersion():split(" ")[1]:gsub("%.", "")
if version:len() == 2 then
version = version .. "0"
end
msg:addU16(tonumber(version))
end
local paddingBytes = g_crypt.rsaGetSize() - (msg:getMessageSize() - offset)

View File

@@ -26,8 +26,11 @@ function UIItem:onDrop(widget, mousePos, forced)
if not item or not item:isItem() then return false end
if self.selectable then
self:setItem(Item.create(item:getId(), item:getCountOrSubType()))
return
if item:isPickupable() then
self:setItem(Item.create(item:getId(), item:getCountOrSubType()))
return true
end
return false
end
local toPos = self.position
@@ -85,7 +88,7 @@ function UIItem:onMouseRelease(mousePosition, mouseButton)
local item = self:getItem()
if not item or not self:containsPoint(mousePosition) then return false end
if modules.client_options.getOption('classicControl') and
if modules.client_options.getOption('classicControl') and not g_app.isMobile() and
((g_mouse.isPressed(MouseLeftButton) and mouseButton == MouseRightButton) or
(g_mouse.isPressed(MouseRightButton) and mouseButton == MouseLeftButton)) then
g_game.look(item)