Skip to content

Commit

Permalink
fix: game_outfit custom compatible with canary (familiar, outfit/moun…
Browse files Browse the repository at this point in the history
…t in store) (#962)

Co-authored-by: Luan Luciano <[email protected]>
Co-authored-by: Rodrigo Paixão <[email protected]>
Co-authored-by: Renato Machado <[email protected]>
  • Loading branch information
4 people authored Jan 23, 2025
1 parent fc21488 commit ac3deac
Show file tree
Hide file tree
Showing 19 changed files with 379 additions and 96 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,6 @@ Have found a bug? Please create an issue in our [bug tracker](https://github.com
| TO-DO list | Status | PR |
|----------------------- |----------------------------------- |------ |
| Android compatibility | ![](https://geps.dev/progress/50) | [Branch](https://github.com/mehah/otclient/tree/mobile-working) |
| Familiar outfit | ![](https://geps.dev/progress/30) | [#39](https://github.com/Nottinghster/otclient/pull/39) |
| wheel of destiny | ![](https://geps.dev/progress/1) | None |
| Forge | ![](https://geps.dev/progress/1) | None |
| Analyzer | ![](https://geps.dev/progress/10) | [#802](https://github.com/mehah/otclient/pull/802) |
Expand All @@ -547,9 +546,9 @@ Have found a bug? Please create an issue in our [bug tracker](https://github.com

| Protocol / version | Description | Required Feature | Compatibility |
|--------------------- |----------------------------- |----------------------------------------------------- |--------------- |
| TFS <br> (7.72) | Downgrade nekiro /<br> Nostalrius | [force-new-walking-formula: true](https://github.com/mehah/otclient/blob/cf7badda978de88cb3724615688e3d9da2ff4207/data/setup.otml#L21) <br> [item-ticks-per-frame: 75](https://github.com/mehah/otclient/blob/cf7badda978de88cb3724615688e3d9da2ff4207/data/setup.otml#L32) ||
| TFS 0.4 <br> (8.6) | Fir3element | [item-ticks-per-frame: 75](https://github.com/mehah/otclient/blob/cf7badda978de88cb3724615688e3d9da2ff4207/data/setup.otml#L32) ||
| TFS 1.5 <br> (8.0 / 8.60) | Downgrade nekiro / <br>MillhioreBT | [force-new-walking-formula: true](https://github.com/mehah/otclient/blob/cf7badda978de88cb3724615688e3d9da2ff4207/data/setup.otml#L21) <br> [item-ticks-per-frame: 75](https://github.com/mehah/otclient/blob/cf7badda978de88cb3724615688e3d9da2ff4207/data/setup.otml#L32) ||
| TFS <br> (7.72) | Downgrade nekiro /<br> Nostalrius | [force-new-walking-formula: true](https://github.com/mehah/otclient/blob/cf7badda978de88cb3724615688e3d9da2ff4207/data/setup.otml#L21) <br> [item-ticks-per-frame: 500](https://github.com/mehah/otclient/blob/cf7badda978de88cb3724615688e3d9da2ff4207/data/setup.otml#L32) ||
| TFS 0.4 <br> (8.6) | Fir3element | [item-ticks-per-frame: 500](https://github.com/mehah/otclient/blob/cf7badda978de88cb3724615688e3d9da2ff4207/data/setup.otml#L32) ||
| TFS 1.5 <br> (8.0 / 8.60) | Downgrade nekiro / <br>MillhioreBT | [force-new-walking-formula: true](https://github.com/mehah/otclient/blob/cf7badda978de88cb3724615688e3d9da2ff4207/data/setup.otml#L21) <br> [item-ticks-per-frame: 500](https://github.com/mehah/otclient/blob/cf7badda978de88cb3724615688e3d9da2ff4207/data/setup.otml#L32) ||
| TFS 1.4.2 <br> (10.98) | Release Otland | ||
| TFS 1.6 <br>(13.10) | Main repo <br> otland (2024) | [See wiki](https://github.com/mehah/otclient/wiki/Tutorial-to-Use-OTC-in-TFS-main) ||
| Canary 13.21 | OpenTibiaBr | [Assets , Enable HTTP login and port 80](https://docs.opentibiabr.com/opentibiabr/projects/otclient-redemption#how-to-connect-on-canary-with-otclient-redemption) ||
Expand Down
File renamed without changes
Binary file added data/images/ui/button-grey-qt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
97 changes: 81 additions & 16 deletions data/styles/40-outfitwindow.otui
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ PresetButton < Panel

$focus:
border: 1 white
image-color: #ffffff


UICreature
id: creature
Expand Down Expand Up @@ -95,20 +95,15 @@ PresetButton < Panel
text: Save

SelectionButton < Panel
image-source: /images/ui/button
image-color: #dfdfdf
image-clip: 0 0 22 23
image-source: /images/ui/button-grey-qt
image-clip: 0 0 98 40
image-border: 3
border: 1 alpha
focusable: true
phantom: false

$hover:
image-color: #ffffff

$focus:
border: 1 white
image-color: #ffffff


UICreature
id: outfit
Expand Down Expand Up @@ -195,6 +190,28 @@ OutfitWindow < MainWindow
anchors.right: parent.right
text: Show Mount

FlatPanel
id: showFamiliar
height: 22
padding: 5
@onSetup: |
if not g_game.getFeature(GamePlayerFamiliars) then
self:hide()
self:setHeight(0)
self:setPadding(0)
end

CheckBox
id: check
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.right: parent.right
text: Show Familiar
@onSetup: |
if not g_game.getFeature(GamePlayerFamiliars) then
self:hide()
end

FlatPanel
id: showWings
height: 22
Expand Down Expand Up @@ -287,7 +304,16 @@ OutfitWindow < MainWindow
type: grid
cell-size: 64 64
flow: true


UICreature
id: UIfamiliar
anchors.centerIn: parent
size: 256 256
@onSetup: |
if not g_game.getFeature(GamePlayerFamiliars) then
self:hide()
end

UICreature
id: creature
anchors.centerIn: parent
Expand Down Expand Up @@ -499,7 +525,40 @@ OutfitWindow < MainWindow
anchors.bottom: parent.bottom
anchors.left: prev.right
anchors.right: parent.right


Panel
id: familiar
height: 20
@onSetup: |
if not g_game.getFeature(GamePlayerFamiliars) then
self:hide()
self:setHeight(0)
end

CheckBox
id: check
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
image-source: /images/ui/outfits/checkbox_round
text-offset: 15 0
text: Familiar:
width: 84
@onSetup: |
if not g_game.getFeature(GamePlayerFamiliars) then
self:hide()
end

FlatPanel
id: name
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: prev.right
anchors.right: parent.right
@onSetup: |
if not g_game.getFeature(GamePlayerFamiliars) then
self:hide()
end

Panel
id: wings
height: 20
Expand Down Expand Up @@ -590,7 +649,7 @@ OutfitWindow < MainWindow
anchors.left: parent.left
image-source: /images/ui/outfits/checkbox_round
text-offset: 15 0
text: Effects Bar:
text: Effects:
width: 84

FlatPanel
Expand All @@ -600,8 +659,6 @@ OutfitWindow < MainWindow
anchors.left: prev.right
anchors.right: parent.right



Panel
id: title
height: 20
Expand Down Expand Up @@ -715,12 +772,20 @@ OutfitWindow < MainWindow
margin-left: 5
height: 50
text: Filter

QtCheckBox
id: onlyMine
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
text: "Only mine"
width: 84

TextEdit
id: search
anchors.fill: parent
anchors.left: prev.right
anchors.right: parent.right
placeholder: Search by name
placeholder-color: #00000077
placeholder-color: #c0c0c0c0

ScrollablePanel
id: presetsList
Expand Down
3 changes: 0 additions & 3 deletions modules/game_attachedeffects/attachedeffects.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ function controller:onTerminate()
g_attachedEffects.clear()
end

-- @ note: sorry, I couldn't find any other way to do it
function getCategory(id)
return AttachedEffectManager.get(id).thingCategory
end
Expand All @@ -84,5 +83,3 @@ function thingId(id)
return "None"
end
end

-- @
1 change: 1 addition & 0 deletions modules/game_features/features.lua
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ controller:registerEvents(g_game, {
end

if version >= 1281 then
g_game.enableFeature(GamePlayerFamiliars)
g_game.disableFeature(GameEnvironmentEffect)
g_game.disableFeature(GameItemAnimationPhase)
end
Expand Down
Loading

0 comments on commit ac3deac

Please sign in to comment.