public void execute() {
try {
for (Channel player :channels) {
// If this player is the one that just joined the map, treat him differently
GameServerSession playerData = newPlayerData.attr(SessionKey.SESSION_KEY).get();
if (player == this.newPlayerData) {
spawnChar(playerData.getCurrentCharacter(), player);
P023_InstanceLoadFadeIntoMap fadeIntoMap = new P023_InstanceLoadFadeIntoMap();
fadeIntoMap.setAgentId(playerData.getCurrentCharacter().getAgentID());
fadeIntoMap.setUnknown2(3);
this.newPlayerData.write(fadeIntoMap);
continue;
} else {
// It's another player, so spawn this player for the new player, and spawn him for the other
// spawn the new player for the "other" player
spawnChar(playerData.getCurrentCharacter(), player);
// spawn the "other" player for the new player
spawnChar(player.attr(SessionKey.SESSION_KEY).get().getCurrentCharacter(), this.newPlayerData);
}
}