MCore update, bug fix and some debug output that should be removed not just yet.

This commit is contained in:
Olof Larsson
2013-06-18 09:07:05 +02:00
parent 66991fba02
commit 677a9f1a86
9 changed files with 137 additions and 89 deletions

View File

@ -29,7 +29,36 @@ public class PlayerRoleComparator implements Comparator<UPlayer>
if (ret != 0) return ret;
// Rank
return o2.getRole().getValue() - o1.getRole().getValue();
// TODO: This error output is temporary. I need a way to detect what is going wrong.
Rel r1 = null;
Rel r2 = null;
try
{
r1 = o1.getRole();
}
catch (Exception e)
{
System.out.println("Could not get role for o1: " + o1.getId());
System.out.println("universe o1: " + o1.getUniverse());
System.out.println("attached o1: " + o1.attached());
System.out.println("Now dumping the data o1: " + Factions.get().gson.toJson(o1));
e.printStackTrace();
}
try
{
r2 = o2.getRole();
}
catch (Exception e)
{
System.out.println("Could not get role for o2: " + o2.getId());
System.out.println("universe o2: " + o2.getUniverse());
System.out.println("attached o2: " + o2.attached());
System.out.println("Now dumping the data o2: " + Factions.get().gson.toJson(o2));
e.printStackTrace();
}
return r2.getValue() - r1.getValue();
}
}