Version 2.3.1 - bug fixes, hotkeys and anction bars work now in old tibia version (<780)

This commit is contained in:
OTCv8
2020-04-15 21:41:49 +02:00
parent 9a4ab2ae3b
commit 401eb76bba
44 changed files with 101 additions and 47 deletions

View File

@@ -459,7 +459,7 @@ function doKeyCombo(keyCombo, repeated)
end
hotKey.hotkeyDelayTo = g_clock.millis() + hotkeyDelay
elseif hotKey.useType == HOTKEY_MANAGER_USE then
if g_game.getClientVersion() < 740 then
if g_game.getClientVersion() < 780 then
local item = g_game.findPlayerItem(hotKey.itemId, hotKey.subType or -1)
if item then
g_game.use(item)
@@ -469,7 +469,7 @@ function doKeyCombo(keyCombo, repeated)
end
hotKey.hotkeyDelayTo = g_clock.millis() + hotkeyDelay
elseif hotKey.useType == HOTKEY_MANAGER_USEONSELF then
if g_game.getClientVersion() < 740 then
if g_game.getClientVersion() < 780 then
local item = g_game.findPlayerItem(hotKey.itemId, hotKey.subType or -1)
if item then
g_game.useWith(item, g_game.getLocalPlayer())
@@ -482,7 +482,7 @@ function doKeyCombo(keyCombo, repeated)
local attackingCreature = g_game.getAttackingCreature()
if not attackingCreature then
local item = Item.create(hotKey.itemId)
if g_game.getClientVersion() < 740 then
if g_game.getClientVersion() < 780 then
local tmpItem = g_game.findPlayerItem(hotKey.itemId, hotKey.subType or -1)
if not tmpItem then return end
item = tmpItem
@@ -493,7 +493,7 @@ function doKeyCombo(keyCombo, repeated)
end
if not attackingCreature:getTile() then return end
if g_game.getClientVersion() < 740 then
if g_game.getClientVersion() < 780 then
local item = g_game.findPlayerItem(hotKey.itemId, hotKey.subType or -1)
if item then
g_game.useWith(item, attackingCreature, hotKey.subType or -1)
@@ -504,7 +504,7 @@ function doKeyCombo(keyCombo, repeated)
hotKey.hotkeyDelayTo = g_clock.millis() + hotkeyDelay
elseif hotKey.useType == HOTKEY_MANAGER_USEWITH then
local item = Item.create(hotKey.itemId)
if g_game.getClientVersion() < 740 then
if g_game.getClientVersion() < 780 then
local tmpItem = g_game.findPlayerItem(hotKey.itemId, hotKey.subType or -1)
if not tmpItem then return true end
item = tmpItem