mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-16 01:49:49 +12:00
Maybe? make sure money doesnt overflow
This commit is contained in:
parent
9add26a6fa
commit
b2c4e9682c
1 changed files with 16 additions and 3 deletions
|
@ -257,12 +257,25 @@ namespace HISP.Player
|
||||||
return money;
|
return money;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
checked
|
||||||
{
|
{
|
||||||
money = value;
|
money = value;
|
||||||
Database.SetPlayerMoney(value, Id);
|
Database.SetPlayerMoney(value, Id);
|
||||||
GameServer.UpdatePlayer(LoggedinClient);
|
GameServer.UpdatePlayer(LoggedinClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch(OverflowException)
|
||||||
|
{
|
||||||
|
money = 2147483647;
|
||||||
|
Database.SetPlayerMoney(2147483647, Id);
|
||||||
|
GameServer.UpdatePlayer(LoggedinClient);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public int Experience
|
public int Experience
|
||||||
|
|
Loading…
Add table
Reference in a new issue