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: XP Boost does not update the price #2424 #2428

Closed
wants to merge 1 commit into from

Conversation

ctlsEx
Copy link

@ctlsEx ctlsEx commented Mar 13, 2024

No description provided.

@@ -1743,7 +1743,7 @@ function GameStore.processExpBoostPuchase(player)
player:setStorageValue(GameStore.Storages.expBoostCount, 1)
end

player:setStorageValue(GameStore.Storages.expBoostCount, expBoostCount + 1)
player:setStorageValue(GameStore.Storages.expBoostCount, player:getStorageValue(GameStore.Storages.expBoostCount) + 1)
Copy link
Contributor

@elsongabriel elsongabriel Mar 13, 2024

Choose a reason for hiding this comment

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

in the line 1737 we have this variable
local expBoostCount = player:getStorageValue(GameStore.Storages.expBoostCount)
you are using redundant
player:getStorageValue(GameStore.Storages.expBoostCount) than expBoostCount

and in the line 1742 we can use
if expBoostCount == -1 or expBoostCount == 6 then than
if player:getStorageValue(GameStore.Storages.expBoostCount) == -1 or expBoostCount == 6 then

@ctlsEx ctlsEx closed this Mar 14, 2024
@ctlsEx ctlsEx deleted the patch-1 branch March 14, 2024 01:05
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.

2 participants