Skip to content

Commit a387e33

Browse files
authored
Merge branch 'main' into patch-1
2 parents b16267b + 746648f commit a387e33

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+12840
-12310
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
4141
# *****************************************************************************
4242
include(MessageColors)
4343
include(LoggingHelper)
44+
include(CheckIncludeFileCXX)
4445

4546
# *****************************************************************************
4647
# Options

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ Beyond of it's flexibility with scripts, otclient comes with tons of other featu
195195
</details>
196196
197197
- Client 12.85 ~ 12.92, 13.00 ~ 13.40 support (protobuf)
198-
- Market has been rewritten to work only [Canary](https://github.com/opentibiabr/canary)
198+
- Market has been rewritten compatible with tfs and canary
199199
- Async Texture Loading
200200
- <details>
201201
<summary>Anti-Aliasing Mode Options</summary>
@@ -241,7 +241,7 @@ Beyond of it's flexibility with scripts, otclient comes with tons of other featu
241241
242242
| <img src="https://github.com/kokekanon/OTredemption-Picture-NODELETE/blob/main/Picture/Attached%20Effect/Tile/001_attachedeffect.gif?raw=true" width="250" alt="Haskanoid Video" style="max-width:250px;"> | <img src="https://github.com/kokekanon/OTredemption-Picture-NODELETE/blob/main/Picture/Attached%20Effect/Tile/002_widget.png?raw=true" width="200" alt="Peoplemon by Alex Stuart" style="max-width: 200px;"> | <img src="https://github.com/kokekanon/OTredemption-Picture-NODELETE/raw/main/Picture/Attached%20Effect/Tile/003_particulas.gif?raw=true" width="310" alt="Space Invaders" style="max-width: 310px;"> |
243243
|-------------------------------------------|---------------|-------------------------|
244-
|Title Attached Effect | Title Widget | Title light |
244+
|<center>Title Attached Effect</center> | <center> Title Widget </center>| <center>Title Particule</center> |
245245
246246
247247
- <details>
@@ -441,7 +441,8 @@ Beyond of it's flexibility with scripts, otclient comes with tons of other featu
441441
442442
- by [@OTArchive](https://github.com/OTArchive)
443443
- wiki: https://github.com/OTArchive/otclient-web/wiki/Guia-%E2%80%90-OTClient-Redemption-Web
444-
- <video src="https://github.com/kokekanon/OTredemption-Picture-NODELETE/blob/main/Wiki/2024-09-27_19-50-58.mp4?raw=true" width="400" controls></video>
444+
445+
- https://github.com/user-attachments/assets/e8ab58c7-1be3-4c76-bc6d-bd831e846826
445446
446447
</details>
447448
File renamed without changes.

data/styles/10-effect.otui

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Effect < UIEffect

data/styles/10-missile.otui

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Missile < UIMissile

modules/client_options/control.otui

+40-17
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,23 @@ Panel
4444
!tooltip: tr('Will detect when to use diagonal step based on the\nkeys you are pressing')
4545

4646
SmallReversedQtPanel
47+
id: hotkeyDelay_label
4748
anchors.left: parent.left
4849
anchors.right: parent.right
4950
anchors.top: prev.bottom
5051
margin-top: 7
5152
height: 22
52-
53-
OptionCheckBoxMarked
54-
id: preciseControl
55-
!text: tr('Enable precise control')
56-
!tooltip: tr('You will have more precision over the character walking,\nbut it can feel more abrupt or unnatural')
57-
@onCheckChange: g_game.setScheduleLastWalk(not self:isChecked())
53+
54+
OptionScaleScroll
55+
id: hotkeyDelay
56+
!text: tr('Hotkey delay: 30ms')
57+
anchors.fill: parent
58+
&minimumScrollValue: 30
59+
&maximumScrollValue: 250
60+
&scrollSize: 21
61+
@onSetup: |
62+
local value = modules.client_options.getOption('hotkeyDelay')
63+
self:setText(tr('Hotkey delay: %dms', value))
5864

5965
SmallReversedQtPanel
6066
anchors.left: parent.left
@@ -64,34 +70,51 @@ Panel
6470
height: 22
6571

6672
OptionScaleScroll
67-
id: turnDelay
68-
!text: tr('Turn delay: 30ms')
73+
id: walkFirstStepDelay
74+
!text: tr('Walk Delay after first step: 50ms')
6975
anchors.fill: parent
70-
&minimumScrollValue: 30
71-
&maximumScrollValue: 250
76+
&minimumScrollValue: 50
77+
&maximumScrollValue: 500
7278
&scrollSize: 21
7379
@onSetup: |
74-
local value = modules.client_options.getOption('turnDelay')
75-
self:setText(tr('Turn delay: %dms', value))
80+
local value = modules.client_options.getOption('walkFirstStepDelay')
81+
self:setText(tr('Walk Delay after first step: %dms', value))
7682

7783
SmallReversedQtPanel
78-
id: hotkeyDelay_label
7984
anchors.left: parent.left
8085
anchors.right: parent.right
8186
anchors.top: prev.bottom
8287
margin-top: 7
8388
height: 22
8489

8590
OptionScaleScroll
86-
id: hotkeyDelay
87-
!text: tr('Hotkey delay: 30ms')
91+
id: walkTurnDelay
92+
!text: tr('Walk delay after turn: 50ms')
93+
anchors.fill: parent
94+
&minimumScrollValue: 50
95+
&maximumScrollValue: 500
96+
&scrollSize: 21
97+
@onSetup: |
98+
local value = modules.client_options.getOption('walkTurnDelay')
99+
self:setText(tr('Walk delay after turn: %dms', value))
100+
101+
SmallReversedQtPanel
102+
anchors.left: parent.left
103+
anchors.right: parent.right
104+
anchors.top: prev.bottom
105+
margin-top: 7
106+
height: 22
107+
108+
OptionScaleScroll
109+
id: turnDelay
110+
!text: tr('Turn delay: 30ms')
88111
anchors.fill: parent
89112
&minimumScrollValue: 30
90113
&maximumScrollValue: 250
91114
&scrollSize: 21
92115
@onSetup: |
93-
local value = modules.client_options.getOption('hotkeyDelay')
94-
self:setText(tr('Hotkey delay: %dms', value))
116+
local value = modules.client_options.getOption('turnDelay')
117+
self:setText(tr('Turn delay: %dms', value))
95118

96119
QtButton
97120
id: hotkeysButton

modules/client_options/data_options.lua

+17-6
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ return {
2525
},
2626
classicControl = false,
2727
smartWalk = false,
28-
preciseControl = {
29-
value = false,
30-
action = function(value, options, controller, panels, extraWidgets)
31-
g_game.setScheduleLastWalk(not value)
32-
end
33-
},
3428
autoChaseOverride = true,
3529
moveStack = false,
3630
showStatusMessagesInConsole = true,
@@ -156,6 +150,23 @@ return {
156150
g_app.setDrawTexts(value)
157151
end
158152
},
153+
walkFirstStepDelay = {
154+
value = 250,
155+
action = function(value, options, controller, panels, extraWidgets)
156+
panels.generalPanel:recursiveGetChildById('walkFirstStepDelay'):setText(string.format(
157+
'Walk Delay after first step: %sms', value))
158+
g_game.setWalkFirstStepDelay(value)
159+
end
160+
},
161+
walkTurnDelay = {
162+
value = 100,
163+
action = function(value, options, controller, panels, extraWidgets)
164+
panels.generalPanel:recursiveGetChildById('walkTurnDelay'):setText(string.format(
165+
'Walk delay after turn: %sms',
166+
value))
167+
g_game.setWalkTurnDelay(value)
168+
end
169+
},
159170
turnDelay = {
160171
value = 50,
161172
action = function(value, options, controller, panels, extraWidgets)

modules/client_options/styles/controls/general.otui

+45-22
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,6 @@ UIWidget
5656
!text: tr('Enable smart walking')
5757
!tooltip: tr('Will detect when to use diagonal step based on the\nkeys you are pressing')
5858

59-
SmallReversedQtPanel
60-
anchors.left: parent.left
61-
anchors.right: parent.right
62-
anchors.top: prev.bottom
63-
margin-top: 7
64-
height: 22
65-
66-
OptionCheckBoxMarked
67-
id: preciseControl
68-
!text: tr('Enable precise control')
69-
!tooltip: tr('You will have more precision over the character walking,\nbut it can feel more abrupt or unnatural')
70-
@onCheckChange: g_game.setScheduleLastWalk(not self:isChecked())
71-
7259
SmallReversedQtPanel
7360
anchors.left: parent.left
7461
anchors.right: parent.right
@@ -92,41 +79,77 @@ UIWidget
9279
!text: tr('Display text messages')
9380

9481
SmallReversedQtPanel
82+
id: hotkeyDelay_label
9583
anchors.left: parent.left
9684
anchors.right: parent.right
9785
anchors.top: prev.bottom
9886
margin-top: 7
9987
height: 22
10088

10189
OptionScaleScroll
102-
id: turnDelay
103-
!text: tr('Turn delay: 30ms')
90+
id: hotkeyDelay
91+
!text: tr('Hotkey delay: 30ms')
10492
anchors.fill: parent
10593
&minimumScrollValue: 30
10694
&maximumScrollValue: 250
10795
&scrollSize: 21
10896
@onSetup: |
109-
local value = modules.client_options.getOption('turnDelay')
110-
self:setText(tr('Turn delay: %dms', value))
97+
local value = modules.client_options.getOption('hotkeyDelay')
98+
self:setText(tr('Hotkey delay: %dms', value))
11199

112100
SmallReversedQtPanel
113-
id: hotkeyDelay_label
114101
anchors.left: parent.left
115102
anchors.right: parent.right
116103
anchors.top: prev.bottom
117104
margin-top: 7
118105
height: 22
119106

120107
OptionScaleScroll
121-
id: hotkeyDelay
122-
!text: tr('Hotkey delay: 30ms')
108+
id: walkFirstStepDelay
109+
!text: tr('Walk Delay after first step: 50ms')
110+
anchors.fill: parent
111+
&minimumScrollValue: 50
112+
&maximumScrollValue: 500
113+
&scrollSize: 21
114+
@onSetup: |
115+
local value = modules.client_options.getOption('walkFirstStepDelay')
116+
self:setText(tr('Walk Delay after first step: %dms', value))
117+
118+
SmallReversedQtPanel
119+
anchors.left: parent.left
120+
anchors.right: parent.right
121+
anchors.top: prev.bottom
122+
margin-top: 7
123+
height: 22
124+
125+
OptionScaleScroll
126+
id: walkTurnDelay
127+
!text: tr('Walk delay after turn: 50ms')
128+
anchors.fill: parent
129+
&minimumScrollValue: 50
130+
&maximumScrollValue: 500
131+
&scrollSize: 21
132+
@onSetup: |
133+
local value = modules.client_options.getOption('walkTurnDelay')
134+
self:setText(tr('Walk delay after turn: %dms', value))
135+
136+
SmallReversedQtPanel
137+
anchors.left: parent.left
138+
anchors.right: parent.right
139+
anchors.top: prev.bottom
140+
margin-top: 7
141+
height: 22
142+
143+
OptionScaleScroll
144+
id: turnDelay
145+
!text: tr('Turn delay: 30ms')
123146
anchors.fill: parent
124147
&minimumScrollValue: 30
125148
&maximumScrollValue: 250
126149
&scrollSize: 21
127150
@onSetup: |
128-
local value = modules.client_options.getOption('hotkeyDelay')
129-
self:setText(tr('Hotkey delay: %dms', value))
151+
local value = modules.client_options.getOption('turnDelay')
152+
self:setText(tr('Turn delay: %dms', value))
130153

131154
QtButton
132155
id: hotkeysButton

modules/game_cyclopedia/cyclopedia_widgets.otui

+1-1
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ RowStore2 < UIWidget
14181418
text-align: center
14191419
text-offset: 15 0
14201420
image-color: #1111118c
1421-
icon: images/tibiaCoin
1421+
icon: /images/ui/tibiaCoin
14221422
icon-align: right
14231423
icon-offset: -2 0
14241424

modules/game_cyclopedia/game_cyclopedia.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function controllerCyclopedia:onInit()
3737
end
3838

3939
function controllerCyclopedia:onGameStart()
40-
if g_game.getClientVersion() >= 1332 then
40+
if g_game.getClientVersion() >= 1310 then
4141
CyclopediaButton = modules.game_mainpanel.addToggleButton('CyclopediaButton', tr('Cyclopedia'),
4242
'/images/options/cooldowns', toggle, false, 7)
4343
ButtonBossSlot = modules.game_mainpanel.addToggleButton("bossSlot", tr("Open Boss Slots dialog"),

modules/game_cyclopedia/tab/character/character.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ function Cyclopedia.loadCharacterItems(data)
317317

318318
local itemKey = data.itemId .. "-" .. (data.tier or "no_tier")
319319
local insertedItem = Cyclopedia.Character.Items[itemKey]
320-
if insertedItem then
320+
if insertedItem and insertedItem.amount then
321321
insertedItem.amount = insertedItem.amount + data.amount
322322
else
323323
Cyclopedia.Character.Items[itemKey] = {
@@ -1238,6 +1238,7 @@ function Cyclopedia.onParseCyclopediaStoreSummary(xpBoostTime, dailyRewardXpBoos
12381238
local maxVisibleRows = 1.6
12391239
local itemCount = #houseItems
12401240
UI.StoreSummary.ListBase.List.houseItems:setHeight(math.min(itemCount, maxVisibleRows) * rowHeight)
1241+
UI.StoreSummary.ListBase.List.houseItems.PurchasedHouseItems:destroyChildren()
12411242
for _, item in ipairs(houseItems) do
12421243
local row = g_ui.createWidget('RowStore2', UI.StoreSummary.ListBase.List.houseItems.PurchasedHouseItems)
12431244
local nameLabel = row:getChildById('lblName')

modules/game_interface/gameinterface.lua

+8-7
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,12 @@ limitedZoom = false
2525
currentViewMode = 0
2626
smartWalkDirs = {}
2727
smartWalkDir = nil
28-
firstStep = false
2928
leftIncreaseSidePanels = nil
3029
leftDecreaseSidePanels = nil
3130
rightIncreaseSidePanels = nil
3231
rightDecreaseSidePanels = nil
3332
hookedMenuOptions = {}
3433
lastDirTime = g_clock.millis()
35-
lastManualWalk = 0
3634

3735
function init()
3836
g_ui.importStyle('styles/countwindow')
@@ -132,7 +130,7 @@ function init()
132130
end
133131

134132
function bindKeys()
135-
gameRootPanel:setAutoRepeatDelay(200)
133+
gameRootPanel:setAutoRepeatDelay(50)
136134

137135
bindWalkKey('Up', North)
138136
bindWalkKey('Right', East)
@@ -184,6 +182,7 @@ function bindWalkKey(key, dir)
184182
onWalkKeyDown(dir)
185183
end, gameRootPanel, true)
186184
g_keyboard.bindKeyUp(key, function()
185+
g_game.getLocalPlayer():setNextWalkDir(Directions.Invalid)
187186
changeWalkDir(dir, true)
188187
end, gameRootPanel, true)
189188
g_keyboard.bindKeyPress(key, function()
@@ -455,7 +454,6 @@ function onWalkKeyDown(dir)
455454
g_game.setChaseMode(DontChase)
456455
end
457456
end
458-
firstStep = true
459457
changeWalkDir(dir)
460458
end
461459

@@ -496,10 +494,13 @@ function smartWalk(dir)
496494
return false
497495
end
498496

497+
499498
local dire = smartWalkDir or dir
500-
g_game.walk(dire, firstStep)
501-
firstStep = false
502-
lastManualWalk = g_clock.millis()
499+
500+
g_game.getLocalPlayer():setNextWalkDir(dire)
501+
502+
g_game.walk(dire)
503+
503504
return true
504505
end
505506

0 commit comments

Comments
 (0)