Updated to OTCv8 3.1 rev 157

This commit is contained in:
OTCv8
2022-03-17 20:50:37 +00:00
parent 1d7d2f0c2b
commit 19fad11949
114 changed files with 2172 additions and 984 deletions

View File

@@ -226,6 +226,7 @@ end
function toggleIcon(bitChanged)
local content = states
if not content then return end
local icon = content:getChildById(Icons[bitChanged].id)
if icon then
@@ -245,6 +246,7 @@ function loadIcon(bitChanged)
end
function onHealthChange(localPlayer, health, maxHealth)
if not healthBar then return end
if health > maxHealth then maxHealth = health end
local healthPercent = (health / maxHealth) * 100
@@ -268,6 +270,7 @@ function onHealthChange(localPlayer, health, maxHealth)
end
function onManaChange(localPlayer, mana, maxMana)
if not manaBar then return end
if mana > maxMana then maxMana = mana end
local manaPercent = (mana / maxMana) * 100
@@ -278,6 +281,7 @@ function onManaChange(localPlayer, mana, maxMana)
end
function onLevelChange(localPlayer, value, percent)
if not topBar then return end
local experienceBar = topBar.Experience.progress
local levelLabel = topBar.Experience.level
experienceBar:setTooltip(tr(experienceTooltip, 100-percent, value + 1))
@@ -374,6 +378,7 @@ function setupSkills()
end
function toggleSkillPanel(id)
if not topBar then return end
local panel = topBar.skills[id]
panel = panel or topBar.Experience
if not panel then return end
@@ -384,6 +389,7 @@ function toggleSkillPanel(id)
end
function setSkillValue(id, value)
if not topBar then return end
local panel = topBar.skills[id]
if not panel then return end
@@ -391,6 +397,7 @@ function setSkillValue(id, value)
end
function setSkillPercent(id, percent, tooltip)
if not topBar then return end
local panel = topBar.skills[id]
if not panel then return end
@@ -398,6 +405,7 @@ function setSkillPercent(id, percent, tooltip)
end
function setSkillBase(id, value, baseValue)
if not topBar then return end
local panel = topBar.skills[id]
if not panel then return end