Skip to content

Commit

Permalink
Merge branch 'mehah:main' into browser
Browse files Browse the repository at this point in the history
  • Loading branch information
OTArchive authored Nov 3, 2024
2 parents 5d62b82 + 19c9d1a commit 5b5019e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
12 changes: 3 additions & 9 deletions modules/game_cyclopedia/tab/character/character.lua
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ function Cyclopedia.loadCharacterCombatStats(data, mitigation, additionalSkillsA
-- Critical Chance
local skillIndex = skillsIndexes[Skill.CriticalChance]
local skill = additionalSkillsArray[skillIndex][2]
UI.CombatStats.criticalChance.value:setText(skill .. "%")
UI.CombatStats.criticalChance.value:setText(string.format("%.2f%%", skill / 100))
if skill > 0 then
UI.CombatStats.criticalChance.value:setColor("#44AD25")
else
Expand All @@ -651,7 +651,7 @@ function Cyclopedia.loadCharacterCombatStats(data, mitigation, additionalSkillsA
-- Critical Damage
skillIndex = skillsIndexes[Skill.CriticalDamage]
skill = additionalSkillsArray[skillIndex][2]
UI.CombatStats.criticalDamage.value:setText(skill .. "%")
UI.CombatStats.criticalDamage.value:setText(string.format("%.2f%%", skill / 100))
if skill > 0 then
UI.CombatStats.criticalDamage.value:setColor("#44AD25")
else
Expand Down Expand Up @@ -727,13 +727,7 @@ function Cyclopedia.loadCharacterCombatStats(data, mitigation, additionalSkillsA
value:setText(string.format("%.2f%%", percent / 100))
value:setColor("#C0C0C0")
value:setMarginRight(2)

if percent > 0 then
value:setColor("#44AD25")
else
value:setColor("#C0C0C0")
end

value:setColor("#C0C0C0")
firstSpecial = firstSpecial and false
end
end
Expand Down
6 changes: 4 additions & 2 deletions modules/game_skills/skills.lua
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@ function setSkillValue(id, value)
local skill = skillsWindow:recursiveGetChildById(id)
if skill then
local widget = skill:getChildById('value')
if id == "skillId7" or id == "skillId9" or id == "skillId11" or id == "skillId13" or id == "skillId14" or id == "skillId15" or id == "skillId16" then
local value = value / 100
if id == "skillId7" or id == "skillId8" or id == "skillId9" or id == "skillId11" or id == "skillId13" or id == "skillId14" or id == "skillId15" or id == "skillId16" then
if g_game.getFeature(GameEnterGameShowAppearance) then
value = value / 100
end
widget:setText(value .. "%")
else
widget:setText(value)
Expand Down
4 changes: 4 additions & 0 deletions modules/game_skills/skills.otui
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ MiniWindow
image-source: /images/icons/icon_fishing
image-size: 9 9
SkillPercentPanel

HorizontalSeparator
margin-top: 5
margin-bottom: 5

SmallSkillButton
id: skillId7
Expand Down
4 changes: 4 additions & 0 deletions src/client/protocolgamesend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,10 @@ void ProtocolGame::sendChangeOutfit(const Outfit& outfit)
}
}

if (g_game.getClientVersion() >= 1340) {
msg->addU8(static_cast<uint8_t>(outfit.hasMount()));
}

if (g_game.getClientVersion() >= 1281) {
msg->addU16(0x00); //familiars
msg->addU8(0x00); //randomizeMount
Expand Down

0 comments on commit 5b5019e

Please sign in to comment.