mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 20:43:26 +02:00
Started 1050 implementation and fix ups:
* Dat now loads (new animations aren't yet functional). * Fixed the way we reference client versions. TODO: Write new animation functionality & find out protocol changes.
This commit is contained in:
@@ -382,7 +382,7 @@ function doKeyCombo(keyCombo)
|
||||
modules.game_console.setTextEditText(hotKey.value)
|
||||
end
|
||||
elseif hotKey.useType == HOTKEY_MANAGER_USE then
|
||||
if g_game.getProtocolVersion() < 780 or hotKey.subType then
|
||||
if g_game.getClientVersion() < 780 or hotKey.subType then
|
||||
local item = g_game.findPlayerItem(hotKey.itemId, hotKey.subType or -1)
|
||||
if item then
|
||||
g_game.use(item)
|
||||
@@ -391,7 +391,7 @@ function doKeyCombo(keyCombo)
|
||||
g_game.useInventoryItem(hotKey.itemId)
|
||||
end
|
||||
elseif hotKey.useType == HOTKEY_MANAGER_USEONSELF then
|
||||
if g_game.getProtocolVersion() < 780 or hotKey.subType then
|
||||
if g_game.getClientVersion() < 780 or hotKey.subType then
|
||||
local item = g_game.findPlayerItem(hotKey.itemId, hotKey.subType or -1)
|
||||
if item then
|
||||
g_game.useWith(item, g_game.getLocalPlayer())
|
||||
@@ -403,7 +403,7 @@ function doKeyCombo(keyCombo)
|
||||
local attackingCreature = g_game.getAttackingCreature()
|
||||
if not attackingCreature then
|
||||
local item = Item.create(hotKey.itemId)
|
||||
if g_game.getProtocolVersion() < 780 or hotKey.subType then
|
||||
if g_game.getClientVersion() < 780 or hotKey.subType then
|
||||
local tmpItem = g_game.findPlayerItem(hotKey.itemId, hotKey.subType or -1)
|
||||
if not tmpItem then return end
|
||||
item = tmpItem
|
||||
@@ -414,7 +414,7 @@ function doKeyCombo(keyCombo)
|
||||
end
|
||||
|
||||
if not attackingCreature:getTile() then return end
|
||||
if g_game.getProtocolVersion() < 780 or hotKey.subType then
|
||||
if g_game.getClientVersion() < 780 or hotKey.subType then
|
||||
local item = g_game.findPlayerItem(hotKey.itemId, hotKey.subType or -1)
|
||||
if item then
|
||||
g_game.useWith(item, attackingCreature)
|
||||
@@ -424,7 +424,7 @@ function doKeyCombo(keyCombo)
|
||||
end
|
||||
elseif hotKey.useType == HOTKEY_MANAGER_USEWITH then
|
||||
local item = Item.create(hotKey.itemId)
|
||||
if g_game.getProtocolVersion() < 780 or hotKey.subType then
|
||||
if g_game.getClientVersion() < 780 or hotKey.subType then
|
||||
local tmpItem = g_game.findPlayerItem(hotKey.itemId, hotKey.subType or -1)
|
||||
if not tmpItem then return true end
|
||||
item = tmpItem
|
||||
|
Reference in New Issue
Block a user