Updated to OTCv8 3.1 rev 224

This commit is contained in:
OTCv8
2022-06-06 22:04:52 +00:00
parent 00ca45bd62
commit 9cfff63e16
111 changed files with 2292 additions and 1465 deletions

View File

@@ -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)