Skip to content

fix: event schedule#1190

Merged
mehah merged 2 commits intoopentibiabr:mainfrom
GooseWithAKnife:patch-1
Jun 11, 2025
Merged

fix: event schedule#1190
mehah merged 2 commits intoopentibiabr:mainfrom
GooseWithAKnife:patch-1

Conversation

@GooseWithAKnife
Copy link
Copy Markdown
Contributor

@GooseWithAKnife GooseWithAKnife commented Jun 11, 2025

Description

Basic validation for the data to avoid problems with responses.

Behavior

Actual

Events.xml doesn't load correctly on the homepage of the client using assets 13.40

Expected

events should show.

Fixes

#1186

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration:

  • Server Version: Canary 3.2.1
  • Client: mehah/otclient 13.40 Assets
  • Operating System: Windows

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Basic validation for the data to avoid problems with responses.
@mehah mehah requested review from kokekanon and luanluciano93 June 11, 2025 14:58
@kokekanon
Copy link
Copy Markdown
Contributor

kokekanon commented Jun 11, 2025

PHP Version | 8.3.0
windows

image

In my case, it works, but it's quite likely that you'll need to make the same changes as well in:
to prevent the error in case the web is sending a json with extra characters (285 and 0)

285 <---

{"eventlist":[{"colorlight":"#2d7400","colordark":"#235c00","description":"Otserver br example 1 description double exp and a half, double loot !chance!, regular spawn and double skill","displaypriority":6,"enddate":1703880000,"isseasonal":false,"name":"Otservbr example 1","startdate":1604347200,"specialevent":0},{"colorlight":"#8B6D05","colordark":"#735D10","description":"Otserver br example 2 description 50% less exp, triple loot !chance!, 50% faster spawn and regular skill","displaypriority":6,"enddate":1703966400,"isseasonal":false,"name":"Otservbr example 2","startdate":1643745600,"specialevent":0}],"lastupdatetimestamp":1749413995}

0<---

specifically in

function EnterGame.postCacheInfo()
function EnterGame.postShowOff()
function EnterGame.postShowCreatureBoost()

and change the title

"Fix"

to

"fix:"

@GooseWithAKnife GooseWithAKnife changed the title Fix Events Schedule for Clients 13.40 fix: Events Schedule for Clients 13.40 Jun 11, 2025
@majestyotbr majestyotbr changed the title fix: Events Schedule for Clients 13.40 fix: event schedule Jun 11, 2025
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@kokekanon kokekanon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modify the functions to prevent the error and send warning

function EnterGame.postCacheInfo()
function EnterGame.postShowOff()
function EnterGame.postShowCreatureBoost()

test in :

PHP Version | 8.3.0
windows

work

image
image

force error:

image

@mehah mehah merged commit e666630 into opentibiabr:main Jun 11, 2025
4 checks passed
@GooseWithAKnife GooseWithAKnife deleted the patch-1 branch June 11, 2025 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants