commanderNpc.setXYZInvisible(loc.correctGeoZ());
commanderNpc.setSpawnedLoc(commanderNpc.getLoc());
commanderNpc.setHeading(loc.h);
commanderNpc.spawnMe();
_commanderNpcs.add(commanderNpc);
_commanderSpawns.add(new SiegeSpawn(fortress.getId(), loc, npc2_id));
}
catch(Exception e)
{
_log.warning("Error while loading commander(s) for " + fortress.getName());
}
}
for(int i = 1; i < 0xFF; i++)
{
String _spawnParams = siegeSettings.getProperty("N" + fortress.getId() + "Flag" + i, "");
if(_spawnParams.length() == 0)
{
break;
}
StringTokenizer st = new StringTokenizer(_spawnParams.trim(), ",");
try
{
Location loc = new Location(Integer.parseInt(st.nextToken()), Integer.parseInt(st.nextToken()), Integer.parseInt(st.nextToken()));
int flag_id = Integer.parseInt(st.nextToken());
_flagSpawns.add(new SiegeSpawn(fortress.getId(), loc, flag_id));
}
catch(Exception e)
{
_log.warning("Error while loading control flag(s) for " + fortress.getName());
}
}
for(int i = 1; i < 0xFF; i++)
{
String _spawnParams = siegeSettings.getProperty("N" + fortress.getId() + "FlagPole" + i, "");
if(_spawnParams.length() == 0)
{
break;
}
StringTokenizer st = new StringTokenizer(_spawnParams.trim(), ",");
try
{
Location loc = new Location(Integer.parseInt(st.nextToken()), Integer.parseInt(st.nextToken()), Integer.parseInt(st.nextToken()), Integer.parseInt(st.nextToken()));
int npc_id = Integer.parseInt(st.nextToken());
_flagPoleSpawns.add(new SiegeSpawn(fortress.getId(), loc, npc_id));
}
catch(Exception e)
{
_log.warning("Error while loading FlagPole(s) for " + fortress.getName());
}