mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 04:24:54 +02:00
10.94, 10.95 support
This commit is contained in:
@@ -78,6 +78,11 @@ function resetSkillColor(id)
|
||||
widget:setColor('#bbbbbb')
|
||||
end
|
||||
|
||||
function toggleSkill(id, state)
|
||||
local skill = skillsWindow:recursiveGetChildById(id)
|
||||
skill:setVisible(state)
|
||||
end
|
||||
|
||||
function setSkillBase(id, value, baseValue)
|
||||
if baseValue <= 0 or value < 0 then
|
||||
return
|
||||
@@ -118,10 +123,12 @@ end
|
||||
function setSkillPercent(id, percent, tooltip)
|
||||
local skill = skillsWindow:recursiveGetChildById(id)
|
||||
local widget = skill:getChildById('percent')
|
||||
widget:setPercent(math.floor(percent))
|
||||
if widget then
|
||||
widget:setPercent(math.floor(percent))
|
||||
|
||||
if tooltip then
|
||||
widget:setTooltip(tooltip)
|
||||
if tooltip then
|
||||
widget:setTooltip(tooltip)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -204,16 +211,25 @@ function refresh()
|
||||
onRegenerationChange(player, player:getRegenerationTime())
|
||||
onSpeedChange(player, player:getSpeed())
|
||||
|
||||
for i=0,6 do
|
||||
local hasAdditionalSkills = g_game.getFeature(GameAdditionalSkills)
|
||||
for i = Skill.Fist, Skill.ManaLeechAmount do
|
||||
onSkillChange(player, i, player:getSkillLevel(i), player:getSkillLevelPercent(i))
|
||||
onBaseSkillChange(player, i, player:getSkillBaseLevel(i))
|
||||
|
||||
if i > Skill.Fishing then
|
||||
toggleSkill('skillId'..i, hasAdditionalSkills)
|
||||
end
|
||||
end
|
||||
|
||||
update()
|
||||
|
||||
local contentsPanel = skillsWindow:getChildById('contentsPanel')
|
||||
skillsWindow:setContentMinimumHeight(44)
|
||||
skillsWindow:setContentMaximumHeight(390)
|
||||
if hasAdditionalSkills then
|
||||
skillsWindow:setContentMaximumHeight(480)
|
||||
else
|
||||
skillsWindow:setContentMaximumHeight(390)
|
||||
end
|
||||
end
|
||||
|
||||
function offline()
|
||||
|
@@ -5,6 +5,9 @@ SkillButton < UIButton
|
||||
margin-bottom: 2
|
||||
&onClick: onSkillButtonClick
|
||||
|
||||
SmallSkillButton < SkillButton
|
||||
height: 14
|
||||
|
||||
SkillNameLabel < GameLabel
|
||||
font: verdana-11px-monochrome
|
||||
anchors.left: parent.left
|
||||
@@ -170,3 +173,39 @@ MiniWindow
|
||||
!text: tr('Fishing')
|
||||
SkillValueLabel
|
||||
SkillPercentPanel
|
||||
|
||||
SmallSkillButton
|
||||
id: skillId7
|
||||
SkillNameLabel
|
||||
!text: tr('Critical Hit Chance')
|
||||
SkillValueLabel
|
||||
|
||||
SmallSkillButton
|
||||
id: skillId8
|
||||
SkillNameLabel
|
||||
!text: tr('Critical Hit Damage')
|
||||
SkillValueLabel
|
||||
|
||||
SmallSkillButton
|
||||
id: skillId9
|
||||
SkillNameLabel
|
||||
!text: tr('Life Leech Chance')
|
||||
SkillValueLabel
|
||||
|
||||
SmallSkillButton
|
||||
id: skillId10
|
||||
SkillNameLabel
|
||||
!text: tr('Life Leech Amount')
|
||||
SkillValueLabel
|
||||
|
||||
SmallSkillButton
|
||||
id: skillId11
|
||||
SkillNameLabel
|
||||
!text: tr('Life Leech Chance')
|
||||
SkillValueLabel
|
||||
|
||||
SmallSkillButton
|
||||
id: skillId12
|
||||
SkillNameLabel
|
||||
!text: tr('Life Leech Amount')
|
||||
SkillValueLabel
|
||||
|
@@ -45,6 +45,22 @@ Directions = {
|
||||
NorthWest = 7
|
||||
}
|
||||
|
||||
Skill = {
|
||||
Fist = 0,
|
||||
Club = 1,
|
||||
Sword = 2,
|
||||
Axe = 3,
|
||||
Distance = 4,
|
||||
Shielding = 5,
|
||||
Fishing = 6,
|
||||
CriticalChance = 7,
|
||||
CriticalDamage = 8,
|
||||
LifeLeechChance = 9,
|
||||
LifeLeechAmount = 10,
|
||||
ManaLeechChance = 11,
|
||||
ManaLeechAmount = 12
|
||||
}
|
||||
|
||||
North = Directions.North
|
||||
East = Directions.East
|
||||
South = Directions.South
|
||||
@@ -134,6 +150,9 @@ GameDeathType = 70
|
||||
GameIdleAnimations = 71
|
||||
GameKeepUnawareTiles = 72
|
||||
GameIngameStore = 73
|
||||
GameIngameStoreHighlights = 74
|
||||
GameIngameStoreServiceType = 75
|
||||
GameAdditionalSkills = 76
|
||||
|
||||
TextColors = {
|
||||
red = '#f55e5e', --'#c83200'
|
||||
|
@@ -75,7 +75,7 @@ function g_game.getSupportedClients()
|
||||
1063, 1064, 1070, 1071, 1072,
|
||||
1073, 1074, 1075, 1076, 1080,
|
||||
1081, 1082, 1090, 1091, 1092,
|
||||
1093
|
||||
1093, 1094, 1095
|
||||
}
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user