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
This commit is contained in:
Elour
2019-03-30 10:31:42 -07:00
parent 42585bc909
commit 9eaf8af328
@@ -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"))