mirror of
https://gitlab.com/Deukhoofd/DeukBot4.git
synced 2025-10-27 17:00:05 +00:00
Fix issue where initial change of points could set below limit
This commit is contained in:
@@ -36,6 +36,8 @@ namespace DeukBot4.Database
|
|||||||
var exists = db.HashGet("points", (RedisValue) key);
|
var exists = db.HashGet("points", (RedisValue) key);
|
||||||
if (!exists.HasValue)
|
if (!exists.HasValue)
|
||||||
{
|
{
|
||||||
|
if (deltaPoints < -100)
|
||||||
|
deltaPoints = -100;
|
||||||
db.HashSet("points", (RedisValue) key, deltaPoints);
|
db.HashSet("points", (RedisValue) key, deltaPoints);
|
||||||
return deltaPoints;
|
return deltaPoints;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user