mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-11-01 11:26:23 +01:00
Updated to OTCv8 3.1 rev 224
This commit is contained in:
@@ -522,7 +522,8 @@ function initCallbacks()
|
||||
onTurn = botCreatureTurn,
|
||||
onWalk = botCreatureWalk,
|
||||
onManaChange = botManaChange,
|
||||
onStatesChange = botStatesChange
|
||||
onStatesChange = botStatesChange,
|
||||
onInventoryChange = botInventoryChange
|
||||
})
|
||||
|
||||
connect(Container, {
|
||||
@@ -587,7 +588,8 @@ function terminateCallbacks()
|
||||
onTurn = botCreatureTurn,
|
||||
onWalk = botCreatureWalk,
|
||||
onManaChange = botManaChange,
|
||||
onStatesChange = botStatesChange
|
||||
onStatesChange = botStatesChange,
|
||||
onInventoryChange = botInventoryChange
|
||||
})
|
||||
|
||||
disconnect(Container, {
|
||||
@@ -770,9 +772,9 @@ function botManaChange(player, mana, maxMana, oldMana, oldMaxMana)
|
||||
safeBotCall(function() botExecutor.callbacks.onManaChange(player, mana, maxMana, oldMana, oldMaxMana) end)
|
||||
end
|
||||
|
||||
function botStatesChange(states, oldStates)
|
||||
function botStatesChange(player, states, oldStates)
|
||||
if botExecutor == nil then return false end
|
||||
safeBotCall(function() botExecutor.callbacks.onStatesChange(states, oldStates) end)
|
||||
safeBotCall(function() botExecutor.callbacks.onStatesChange(player, states, oldStates) end)
|
||||
end
|
||||
|
||||
function botContainerAddItem(container, slot, item, oldItem)
|
||||
@@ -795,6 +797,11 @@ function botGroupSpellCooldown(iconId, duration)
|
||||
safeBotCall(function() botExecutor.callbacks.onGroupSpellCooldown(iconId, duration) end)
|
||||
end
|
||||
|
||||
function botInventoryChange(player, slot, item, oldItem)
|
||||
if botExecutor == nil then return false end
|
||||
safeBotCall(function() botExecutor.callbacks.onInventoryChange(player, slot, item, oldItem) end)
|
||||
end
|
||||
|
||||
function botGameQuestLog(quests)
|
||||
if botExecutor == nil then return false end
|
||||
safeBotCall(function() botExecutor.callbacks.onGameQuestLog(quests) end)
|
||||
|
||||
Reference in New Issue
Block a user