-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added several functions mainly related to banker NPC (#3085)
These functions were added in order for the upcoming sample `Banker` NPC #2934 and in the future for the guild balance feature #2214 - function getPlayerDatabaseInfo(name_or_guid) TFS 1.3 function that queries for player information from the database, returns a table of useful information if success, false if player doesn't exist. - function isNumber(str) used in several distros but wasn't there on compat.lua yet - function Player.transferMoneyTo(self, target, amount) - function Player.withdrawMoney(self, amount) - function Player.depositMoney(self, amount) - function isValidMoney(money) - function getMoneyCount(string) - function getMoneyWeight(money) Co-authored-by: Znote <stefan_brannfjell@live.no>
- Loading branch information
Showing
4 changed files
with
225 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Couldn't you directly use "return tonumber (money) ~ = nil and money> 0" instead of using the isValidMoney (money) function?