Quick optimization to aggregate for Gold Ledger
This commit is contained in:
parent
5d61205240
commit
f6d5689dee
1 changed files with 1 additions and 0 deletions
|
|
@ -75,6 +75,7 @@ namespace Server.Mobiles
|
||||||
checks = bank.FindItemsByType(typeof(BankCheck));
|
checks = bank.FindItemsByType(typeof(BankCheck));
|
||||||
|
|
||||||
balance += gold.OfType<Gold>().Aggregate(0L, (c, t) => c + t.Amount);
|
balance += gold.OfType<Gold>().Aggregate(0L, (c, t) => c + t.Amount);
|
||||||
|
if (balance >= Int32.MaxValue) { return Int32.MaxValue; }
|
||||||
balance += checks.OfType<BankCheck>().Aggregate(0L, (c, t) => c + t.Worth);
|
balance += checks.OfType<BankCheck>().Aggregate(0L, (c, t) => c + t.Worth);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue