enrollment officer system
This commit is contained in:
@@ -96,6 +96,15 @@ public class VendorDialogMsg extends ClientNetMsg {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(npc.contractUUID == 1502040){ //enrollment officer
|
||||||
|
if(!playerCharacter.getTimestamps().containsKey("lastBoxFlag"))
|
||||||
|
playerCharacter.getTimestamps().put("lastBoxFlag",System.currentTimeMillis() - 1000);
|
||||||
|
|
||||||
|
if(playerCharacter.getTimestamps().get("lastBoxFlag") + 10000 > System.currentTimeMillis())
|
||||||
|
PlayerCharacter.unboxPlayer(playerCharacter);
|
||||||
|
}
|
||||||
|
|
||||||
// Restrict disc trainers to only characters who have
|
// Restrict disc trainers to only characters who have
|
||||||
// tht disc applied.
|
// tht disc applied.
|
||||||
|
|
||||||
|
|||||||
@@ -4834,7 +4834,21 @@ public class PlayerCharacter extends AbstractCharacter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public static void unboxPlayer(PlayerCharacter player){
|
||||||
|
String machineID = player.getClientConnection().machineID;
|
||||||
|
ArrayList<PlayerCharacter> sameMachine = new ArrayList<>();
|
||||||
|
for(PlayerCharacter pc : SessionManager.getAllActivePlayerCharacters()){
|
||||||
|
if(!pc.equals(player) && pc. isActive && pc.isEnteredWorld() && pc.getClientConnection().machineID.equals(machineID)){
|
||||||
|
sameMachine.add(pc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(PlayerCharacter pc : sameMachine)
|
||||||
|
pc.isBoxed = true;
|
||||||
|
|
||||||
|
player.isBoxed = false;
|
||||||
|
|
||||||
|
}
|
||||||
public static boolean checkIfBoxed(PlayerCharacter player){
|
public static boolean checkIfBoxed(PlayerCharacter player){
|
||||||
String machineID = player.getClientConnection().machineID;
|
String machineID = player.getClientConnection().machineID;
|
||||||
ArrayList<PlayerCharacter> sameMachine = new ArrayList<>();
|
ArrayList<PlayerCharacter> sameMachine = new ArrayList<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user