Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "MawKit/KVDatabase.hpp"
- bool buyIfPossible( long long price )
- {
- constexpr const char *moneyKey = "money";
- if ( MK::KVDatabase::getLongValueForKey( moneyKey ) > price ) {
- MK::KVDatabase::decreaseLongValueForKey( moneyKey, price );
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment