Closed ranisalt closed 1 week ago
Need to remove the dependencies of the vs Project File
To be honest I'd much rather see Account becoming a metatable, there's been a couple times where that would have been nice. For example you could then do something like
local account = player:getAccount()
local guid = account:getId()
local email = account:getEmail()
account:addCoins(50)
function Player.addCoins(amount)
self:getAccount():addCoins(amount)
end
player:addCoins(50)
account:addPremiumDays(7)
account:setType(ACCOUNT_TYPE_GOD)
local accountType = account:getType()
...
To be honest I'd much rather see Account becoming a metatable, there's been a couple times where that would have been nice
Agreed, but it can be done in Lua, doesn't need the C++ overhead :P
Pull Request Prelude
Changes Proposed
The
Account
class serves just as a temporary storage for database queries and is not really necessary, since it's never used to pass data between functions. TheloadAccount
function is only used once and can be inlined and some columns can be omitted from it.