Added a debug check for potential player error

This commit is contained in:
Treeku
2014-07-13 22:15:40 +01:00
parent 341af2c7d8
commit 01ee9addd3
+9 -5
View File
@@ -197,12 +197,16 @@ public class PlayerService implements INetworkDispatch {
}, 0, 1000, TimeUnit.MILLISECONDS));
scheduleList.add(scheduler.scheduleAtFixedRate(() -> {
long[] ids = creature.getAwareObjects().stream().mapToLong(SWGObject::getObjectID).toArray();
for(int i = 0; i < ids.length; i++) {
for(int j = 0; j < ids.length; j++) {
if(ids[i] == ids[j] && i != j)
System.err.println("Detected duplicate ids, Template " + core.objectService.getObject(ids[i]).getTemplate());
try {
long[] ids = creature.getAwareObjects().stream().mapToLong(SWGObject::getObjectID).toArray();
for(int i = 0; i < ids.length; i++) {
for(int j = 0; j < ids.length; j++) {
if(ids[i] == ids[j] && i != j)
System.err.println("Detected duplicate ids, Template " + core.objectService.getObject(ids[i]).getTemplate());
}
}
} catch (Exception e) {
e.printStackTrace();
}
}, 0, 5000, TimeUnit.MILLISECONDS));