From 752a01fcdff3e0df8960bc1d22294e6387f837af Mon Sep 17 00:00:00 2001
From: Yordi <yordi@krews.org>
Date: Wed, 7 Feb 2024 15:04:56 +0100
Subject: [PATCH] Habbos batch 2: Added infinite points dis for WIRED Effect:
 Give Points

---
 .../wired/actions/WiredActionGiveScore.java         | 13 ++++++-------
 .../wired/actions/WiredActionGiveScoreToTeam.java   |  6 +++---
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/actions/WiredActionGiveScore.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/actions/WiredActionGiveScore.java
index ae32f49ae..8d14c04cd 100644
--- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/actions/WiredActionGiveScore.java
+++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/actions/WiredActionGiveScore.java
@@ -38,11 +38,11 @@ public class WiredActionGiveScore extends InteractionWiredAction {
         int score = this.getWiredSettings().getIntegerParams().get(PARAM_SCORE);
         int timesPerGame = this.getWiredSettings().getIntegerParams().get(PARAM_TIMES_PER_GAME);
 
-        if(score < 1 || score > 100) {
+        if (score < -1000 || score > 1000) {
             return false;
         }
 
-        if(timesPerGame < 1 || timesPerGame > 10) {
+        if (timesPerGame < 0 || timesPerGame > 10) {
             return false;
         }
 
@@ -67,7 +67,7 @@ public class WiredActionGiveScore extends InteractionWiredAction {
 
                 if (map.getValue() == habbo.getHabboInfo().getId()) {
                     if (map.getKey() == gameStartTime) {
-                        if (iterator.value() < timesPerGame) {
+                        if (iterator.value() < timesPerGame || timesPerGame == 0) {
                             iterator.setValue(iterator.value() + 1);
 
                             habbo.getHabboInfo().getGamePlayer().addScore(score, true);
@@ -82,8 +82,7 @@ public class WiredActionGiveScore extends InteractionWiredAction {
 
             try {
                 this.data.put(new AbstractMap.SimpleEntry<>(gameStartTime, habbo.getHabboInfo().getId()), 1);
-            }
-            catch(IllegalArgumentException ignored) {
+            } catch (IllegalArgumentException ignored) {
 
             }
 
@@ -100,7 +99,7 @@ public class WiredActionGiveScore extends InteractionWiredAction {
 
     @Override
     public void loadDefaultIntegerParams() {
-        if(this.getWiredSettings().getIntegerParams().isEmpty()) {
+        if (this.getWiredSettings().getIntegerParams().isEmpty()) {
             this.getWiredSettings().getIntegerParams().add(1);
             this.getWiredSettings().getIntegerParams().add(1);
         }
@@ -136,4 +135,4 @@ public class WiredActionGiveScore extends InteractionWiredAction {
     public boolean isAdvancedMode() {
         return advancedMode = true;
     }
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/actions/WiredActionGiveScoreToTeam.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/actions/WiredActionGiveScoreToTeam.java
index e6538ea7f..57f8e906a 100644
--- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/actions/WiredActionGiveScoreToTeam.java
+++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/actions/WiredActionGiveScoreToTeam.java
@@ -37,11 +37,11 @@ public class WiredActionGiveScoreToTeam extends InteractionWiredAction {
         int timesPerGame = this.getWiredSettings().getIntegerParams().get(PARAM_TIMES_PER_GAME);
         int teamValue = this.getWiredSettings().getIntegerParams().get(PARAM_TEAM);
 
-        if(score < 1 || score > 100) {
+        if (score < -1000 || score > 1000) {
             return false;
         }
 
-        if(timesPerGame < 1 || timesPerGame > 10) {
+        if (timesPerGame < 0 || timesPerGame > 10) {
             return false;
         }
 
@@ -55,7 +55,7 @@ public class WiredActionGiveScoreToTeam extends InteractionWiredAction {
             if (game != null && game.state.equals(GameState.RUNNING)) {
                 int c = this.startTimes.get(game.getStartTime());
 
-                if (c < timesPerGame) {
+                if (c < timesPerGame || timesPerGame == 0) {
                     GameTeam team = game.getTeam(teamColor);
 
                     if (team != null) {
-- 
GitLab