Changes to new Gold Ledger system (#3)
Changes new gold system to use separate gold/platinum with DivRem instead of relying on doubles.
This commit is contained in:
parent
1030bb7675
commit
d8ed7c1da9
7 changed files with 68 additions and 438 deletions
|
|
@ -344,10 +344,10 @@ namespace Server
|
|||
}
|
||||
else
|
||||
{
|
||||
var cur = User.Account.TotalCurrency;
|
||||
var off = _Plat + (_Gold / Math.Max(1.0, AccountGold.CurrencyThreshold));
|
||||
int totalPlat = User.Account.TotalPlat;
|
||||
int totalGold = User.Account.TotalGold;
|
||||
|
||||
if (off > cur)
|
||||
if (totalPlat < _Plat || totalGold < _Gold)
|
||||
{
|
||||
_Plat = User.Account.TotalPlat;
|
||||
_Gold = User.Account.TotalGold;
|
||||
|
|
@ -392,4 +392,4 @@ namespace Server
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue