From 9eaf8af32861e4d774ccd7eb4c9592124d577725 Mon Sep 17 00:00:00 2001 From: Elour Date: Sat, 30 Mar 2019 10:31:42 -0700 Subject: [PATCH] Prevent players from receiving tokens from another instance Using client side modifications could allow players to move between instances, being in "range" of the next instance would provide the reward without ending the exploting player's timer --- .../compiled/game/script/player/player_instance.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sku.0/sys.server/compiled/game/script/player/player_instance.java b/sku.0/sys.server/compiled/game/script/player/player_instance.java index a4ef083fb..4b4f45474 100755 --- a/sku.0/sys.server/compiled/game/script/player/player_instance.java +++ b/sku.0/sys.server/compiled/game/script/player/player_instance.java @@ -705,6 +705,15 @@ public class player_instance extends script.base_script } public int handleAwardtoken(obj_id self, dictionary params) throws InterruptedException { + obj_id instanceController = instance.getAreaInstanceController(self); + if (!isIdValid(instanceController)) + { + return SCRIPT_CONTINUE; + } + if (!instance.isPlayerInPlayerList(self, instance.getPlayerList(instanceController))) + { + return SCRIPT_CONTINUE; + } int tokenIndex = params.getInt("tokenIndex"); int count = 1; if (params.containsKey("tokenCount"))