mirror of
https://github.com/rafi1212122/BLHX.Server.git
synced 2025-12-12 14:34:39 +01:00
fix resource init on uint.MaxValue
This commit is contained in:
@@ -122,7 +122,7 @@ namespace BLHX.Server.Common.Database
|
||||
if (num < 0)
|
||||
res.Num = (uint)Math.Max(res.Num - num, 0);
|
||||
else
|
||||
res.Num = Math.Max(res.Num + (uint)num, uint.MaxValue);
|
||||
res.Num = Math.Min(res.Num + (uint)num, uint.MaxValue);
|
||||
}
|
||||
|
||||
public void AddShip(uint shipTemplateId)
|
||||
|
||||
Reference in New Issue
Block a user