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

Lose forge items with maxContainer #2903

Open
3 of 5 tasks
rokamdev opened this issue Sep 20, 2024 · 2 comments · May be fixed by #3190
Open
3 of 5 tasks

Lose forge items with maxContainer #2903

rokamdev opened this issue Sep 20, 2024 · 2 comments · May be fixed by #3190
Labels
Priority: Critical Represents a risk to live servers Status: Pending Test This PR or Issue requires more testing Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@rokamdev
Copy link

rokamdev commented Sep 20, 2024

Priority

Critical

Area

  • Datapack
  • Source
  • Map
  • Other

What happened?

If the player has the maximum limit of containers determined in "maxContainer" (config.lua) and makes a tier transfer at the forge on an item (traditional transfer or convergence), the provider item, the receiving item, the money and the exalted colors are removed and the “exaltation chest” container is not generated, along with a modal error on the screen.
image
image

ps: The first test I did was with the forging of two tier 0 items and the forge correctly returned the exaltation chest with the item inside, however after creating the issue, I carried out the test again with the forging of identical items and it presented the same transfer error, consuming all items and returning nothing.

What OS are you seeing the problem on?

Linux

Code of Conduct

  • I agree to follow this project's Code of Conduct
@rokamdev rokamdev added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Sep 20, 2024
@github-actions github-actions bot added Priority: Critical Represents a risk to live servers Status: Pending Test This PR or Issue requires more testing labels Sep 20, 2024
@lBaah
Copy link

lBaah commented Sep 24, 2024

You can just put this after the getFreeBackpackSlots() check at Player::forgeFuseItems and Player::forgeTransferItemTier:

uint32_t maxContainer = static_cast<uint32_t>(g_configManager().getNumber(MAX_CONTAINER, FUNCTION));
auto backpack = getInventoryItem(CONST_SLOT_BACKPACK);
auto mainBackpack = backpack ? backpack->getContainer() : nullptr;
if (mainBackpack && mainBackpack->getContainerHoldingCount() >= maxContainer) {
sendCancelMessage(RETURNVALUE_CONTAINERISFULL);
return;
}

This is a shit workaround. The best to do is to refactor all the code to remove the items only if everything occured successfuly.

@helenarubra
Copy link

Several problem

@dudantas dudantas linked a pull request Dec 21, 2024 that will close this issue
jprzimba added a commit to jprzimba/crystalserver that referenced this issue Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Critical Represents a risk to live servers Status: Pending Test This PR or Issue requires more testing Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants