Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Prevent crashes caused by client_entergame and other minor bugs. #736

Merged
merged 3 commits into from
Apr 3, 2024
Merged

Conversation

kokekanon
Copy link
Collaborator

@kokekanon kokekanon commented Mar 31, 2024

1.- fix: crash game_entergame if httpLoginBox is boolean

produced in #647

I think httpLogin is always boolean, but I haven't studied pr 647 enough.

    if type(httpLogin) == "boolean" then
        enterGame:getChildById('httpLoginBox'):setChecked(httpLogin)
    else
        enterGame:getChildById('httpLoginBox'):setChecked(#httpLogin > 0)
    end

Error:

ERROR: Lua exception: /client_entergame/entergame.lua:270: attempt to get length of local 'httpLogin' (a boolean value)
stack traceback:
	[C]: in function '__len'
	/client_entergame/entergame.lua:270: in function 'setHttpLogin'
	/client_serverlist/serverlist.lua:44: in function 'select'
	/client_serverlist/serverlist.lua:81: in function </client_serverlist/serverlist.lua:80>
ERROR: protected lua call failed: LUA ERROR:
/client_entergame/entergame.lua:270: attempt to get length of local 'httpLogin' (a boolean value)
stack traceback:
	[C]: in function '__len'
	/client_entergame/entergame.lua:270: in function 'setHttpLogin'
	/client_serverlist/serverlist.lua:44: in function 'select'
	/client_serverlist/serverlist.lua:81: in function </client_serverlist/serverlist.lua:80>
ERROR: Lua exception: 
ERROR: protected lua call failed: LUA ERROR:

ERROR: Lua exception: 
ERROR: protected lua call failed: LUA ERROR:

ERROR: Lua exception: 
ERROR: protected lua call failed: LUA ERROR:
2024-03-31.13-58-17.mp4

2.- fix: game_entergame if host nil windows is hidden

2024-03-31.13-56-20.mp4

fix:
image

3.- temp fix: game_entergame windows is not centered

2024-03-31.13-59-32.mp4
the original bug is in
EnterGame.toggleAuthenticatorToken
EnterGame.toggleStayLoggedBox

I don't have how to test I don't use token

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Behavior

Actual

Do this and that doesn't happens

Expected

Do this and that happens

Fixes

# (issue)

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested

  • Test A
  • Test B

Test Configuration:

  • Server Version: 860 | 1320
  • 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

the original bug is in
I don't have how to test I don't use token
  EnterGame.toggleAuthenticatorToken
  EnterGame.toggleStayLoggedBox
@Nottinghster Nottinghster merged commit 8bf721f into mehah:main Apr 3, 2024
6 of 10 checks passed
kokekanon added a commit to kokekanon/otclient.readme that referenced this pull request Apr 17, 2024
The modification made to mehah#736 of loadBox was in the wrong place in the code. causes display loadBox in old protocols.
Nottinghster pushed a commit that referenced this pull request Apr 20, 2024
* fix: [game_entergame] loadBox in old protocol

The modification made to #736 of loadBox was in the wrong place in the code. causes display loadBox in old protocols.

* fix: If you try to login without assets.

* fix: indentation Reviewer: luanluciano93
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.

3 participants