Minor bug fixes

This commit is contained in:
OTCv8
2020-01-31 19:11:08 +01:00
parent 6bc4188d7a
commit dbfad99ca4
3 changed files with 37 additions and 6 deletions

View File

@@ -113,9 +113,21 @@ context.setSpellTimeout = function()
context.lastSpell = context.now
end
context.use = g_game.useInventoryItem
context.usewith = g_game.useInventoryItemWith
context.useWith = g_game.useInventoryItemWith
context.use = function(thing, subtype)
if type(thing) == 'number' then
return g_game.useInventoryItem(thing, subtype)
else
return g_game.use(thing)
end
end
context.usewith = function(thing, target, subtype)
if type(thing) == 'number' then
return g_game.useInventoryItemWith(thing, target, subtype)
else
return g_game.useWith(item, target, subtype)
end
end
context.useWith = context.usewith
context.useRune = function(itemid, target, lastSpellTimeout)
if context.lastRuneUse == nil then