Package l2p.gameserver.model.entity.siege

Examples of l2p.gameserver.model.entity.siege.SiegeSpawn


          GArray<SiegeSpawn> flagSpawns = new GArray<SiegeSpawn>();
          for(int x = xc - 150; x <= xc + 150; x += 150)
          {
            for(int y = yc - 150; y <= yc + 150; y += 150)
            {
              flagSpawns.add(new SiegeSpawn(castle.getId(), new Location(x, y, zc), flagNpcId, flagItemId));
            }
          }
          _flagSpawnList.put(castle.getId(), flagSpawns);
        }
        else
View Full Code Here


      int i = 0;
      for(int flagCastleId : castle.getFlags())
      {
        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());
View Full Code Here

          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());
            _siegeBossSpawns.add(new SiegeSpawn(clanhall.getId(), loc, npc_id));
          }
          catch(Exception e)
          {
            _log.warning("Error while loading Siege Boss for " + clanhall.getName());
          }
View Full Code Here

          try
          {
            Location loc = new Location(Integer.parseInt(st.nextToken()), Integer.parseInt(st.nextToken()), Integer.parseInt(st.nextToken()));
            int npc_id = Integer.parseInt(st.nextToken());
            int hp = Integer.parseInt(st.nextToken());
            controlTowersSpawns.add(new SiegeSpawn(castle.getId(), loc, npc_id, hp));
          }
          catch(Exception e)
          {
            _log.warning("Error while loading control tower(s) for " + castle.getName() + " castle.");
          }
        }
        GArray<SiegeSpawn> artefactSpawns = new GArray<SiegeSpawn>();
        for(int i = 1; i < 0xFF; i++)
        {
          String _spawnParams = siegeSettings.getProperty(castle.getName() + "Artefact" + Integer.toString(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());
            artefactSpawns.add(new SiegeSpawn(castle.getId(), loc, npc_id));
          }
          catch(Exception e)
          {
            _log.warning("Error while loading artefact(s) for " + castle.getName() + " castle.");
          }
View Full Code Here

            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());
          }
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.entity.siege.SiegeSpawn

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.