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 hireling_lib crash on server startup #621

Closed
wants to merge 3 commits into from

Conversation

jlcvp
Copy link

@jlcvp jlcvp commented Nov 9, 2022

Description

  • Using FLAG_NOLIMIT when returning the hireling lamp to user's store inbox.
  • Ignoring the inbox available slots in this case avoids a crash in the hireling_lib file when the user losing the house has a full store inbox.

This PR replicates the fix from opentibiabr/otservbr-global#809

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.

Behaviour

Actual

hireling_lib.lua crashes on a specific scenario on server startup

Expected

Server startup must not crash

Fixes

#607

Type of change

Please delete options that are not relevant.

  • 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

  • Using a player without any available slots in the store inbox, that owns a house with a hireling spawned inside, setup this house to be freed upon the server save. On the server save, the hireling lamp is added to the store inbox and the startup continues without errors.

Test Configuration:

  • Server Version:
  • Client:
  • Operating System:

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

- Using FLAG_NOLIMIT when returning the hireling lamp to user's store inbox.
- Ignoring the inbox available slots in this case avoids a crash in the hireling_lib file when the user losing the house has a full store inbox.
@dudantas
Copy link
Contributor

dudantas commented Nov 19, 2022

Obrigado por sua contribuição, como nós mesclamos as duas datapacks, global e canary, o pr que vc fez no global, já veio junto com o pr de migração #572, de toda forma agradecemos sua contribuição, deixarei aqui o seu pull request na pack do global para ficar registrado a quem interessar o diff da correção: opentibiabr/otservbr-global#809

@sonarcloud
Copy link

sonarcloud bot commented Nov 19, 2022

Please retry analysis of this Pull-Request directly on SonarCloud.

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.

None yet

2 participants