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

Add Player.addBankBalance function #4318

Merged
merged 2 commits into from
Feb 15, 2023
Merged

Add Player.addBankBalance function #4318

merged 2 commits into from
Feb 15, 2023

Conversation

omarcopires
Copy link
Contributor

@omarcopires omarcopires commented Feb 8, 2023

Pull Request Prelude

Changes Proposed

The function Player.addBankBalance adds a specified amount of money to the player's bank balance. The function takes two parameters: self and amount. The self parameter refers to the player object calling the function and the amount parameter is the amount of money to be added to the player's bank balance.

The function starts by using the setBankBalance method of the player object to set the player's bank balance to the current balance plus the specified amount. This will update the player's bank balance with the added amount.

Example usage:

player:addBankBalance(100)

The addBankMoney function is then called on this player object, with the parameter 100, to add 100 gold coins to the player's bank balance.

EPuncker
EPuncker previously approved these changes Feb 8, 2023
data/lib/core/player.lua Outdated Show resolved Hide resolved
Co-authored-by: Ranieri Althoff <1993083+ranisalt@users.noreply.github.com>
@omarcopires omarcopires changed the title Add Player.addBankMoney function Add Player.addBankBalance function Feb 9, 2023
@EPuncker EPuncker merged commit ecd0c04 into otland:master Feb 15, 2023
@omarcopires omarcopires deleted the new-method branch February 15, 2023 14:43
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

4 participants