Don't award negative gems to players in GH (PC-1688)
This commit is contained in:
parent
20fdae0a09
commit
817ffcd6c8
@ -82,7 +82,8 @@ public class EconomyModule extends MiniClientPlugin<Integer>
|
|||||||
if (killer != null)
|
if (killer != null)
|
||||||
{
|
{
|
||||||
Player killerPlayer = (Player) killer;
|
Player killerPlayer = (Player) killer;
|
||||||
int newGems = (int) (oldGems * GEM_KILL_FACTOR);
|
// Don't award the player negative gems, in the case of an overflow
|
||||||
|
int newGems = Math.min((int) (oldGems * GEM_KILL_FACTOR), 0);
|
||||||
|
|
||||||
addToStore(killerPlayer, "Killing " + F.name(player.getName()), newGems);
|
addToStore(killerPlayer, "Killing " + F.name(player.getName()), newGems);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user