{
if(onlyOne == -1 || flagCastleId == onlyOne)
{
SiegeSpawn info = TerritorySiegeDatabase.getSiegeFlags().get(flagCastleId).get(0);
Location loc = points.get(i).getLoc();
L2TerritoryFlagInstance flag = new L2TerritoryFlagInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(info.getNpcId()));
flag.setCurrentHpMp(flag.getMaxHp(), flag.getMaxMp(), true);
flag.setXYZInvisible(loc.correctGeoZ());
flag.setSpawnedLoc(flag.getLoc());
flag.setHeading(loc.h);
flag.setItemId(info.getValue());
flag.setBaseTerritoryId(flagCastleId);
flag.setCurrentTerritoryId(castle.getId());
flag.spawnMe();
_flags.add(flag);
setWardLoc(flagCastleId, flag.getLoc());
}
i++;
}
}
}