Examples of SpawnNpcInfo


Examples of lineage2.gameserver.templates.spawn.SpawnNpcInfo

  public void decreaseCount(NpcInstance oldNpc)
  {
    oldNpc.setSpawn(null);
    oldNpc.deleteMe();
    _spawned.remove(oldNpc);
    SpawnNpcInfo npcInfo = getNextNpcInfo();
    NpcInstance npc = npcInfo.getTemplate().getNewInstance();
    npc.setSpawn(this);
    _reSpawned.add(npc);
    decreaseCount0(npcInfo.getTemplate(), npc, oldNpc.getDeadTime());
  }
View Full Code Here

Examples of lineage2.gameserver.templates.spawn.SpawnNpcInfo

   * @return NpcInstance
   */
  @Override
  public NpcInstance doSpawn(boolean spawn)
  {
    SpawnNpcInfo npcInfo = getNextNpcInfo();
    return doSpawn0(npcInfo.getTemplate(), spawn, npcInfo.getParameters());
  }
View Full Code Here

Examples of lineage2.gameserver.templates.spawn.SpawnNpcInfo

   * @return int
   */
  @Override
  public int getCurrentNpcId()
  {
    SpawnNpcInfo npcInfo = _template.getNpcId(_npcIndex);
    if (npcInfo.getTemplate() == null)
    {
      _log.warn("NpcIndex not found: " + _npcIndex);
      return 0;
    }
    return npcInfo.getTemplate().npcId;
  }
View Full Code Here

Examples of lineage2.gameserver.templates.spawn.SpawnNpcInfo

    int old = _npcIndex++;
    if (_npcIndex >= _template.getNpcSize())
    {
      _npcIndex = 0;
    }
    SpawnNpcInfo npcInfo = _template.getNpcId(old);
    if (npcInfo.getMax() > 0)
    {
      int count = 0;
      for (NpcInstance npc : _spawned)
      {
        if (npc.getNpcId() == npcInfo.getTemplate().getNpcId())
        {
          count++;
        }
      }
      if (count >= npcInfo.getMax())
      {
        return getNextNpcInfo();
      }
    }
    return npcInfo;
View Full Code Here

Examples of lineage2.gameserver.templates.spawn.SpawnNpcInfo

        int x = rset.getInt("locx");
        int y = rset.getInt("locy");
        int z = rset.getInt("locz");
        int h = rset.getInt("heading");
        template = new SpawnTemplate(PeriodOfDay.NONE, count, delay, delay_rnd);
        template.addNpc(new SpawnNpcInfo(npcId, 1, StatsSet.EMPTY));
        template.addSpawnRange(new Location(x, y, z, h));
        SpawnHolder.getInstance().addSpawn(PeriodOfDay.NONE.name(), template);
      }
    }
    catch (Exception e1)
View Full Code Here

Examples of lineage2.gameserver.templates.spawn.SpawnNpcInfo

        int x = rset.getInt("locx");
        int y = rset.getInt("locy");
        int z = rset.getInt("locz");
        int h = rset.getInt("heading");
        template = new SpawnTemplate(PeriodOfDay.NONE, count, delay, delay_rnd);
        template.addNpc(new SpawnNpcInfo(npcId, 1, StatsSet.EMPTY));
        template.addSpawnRange(new Location(x, y, z, h));
        SpawnHolder.getInstance().addSpawn(PeriodOfDay.NONE.name(), template);
      }
    }
    catch (Exception e1)
View Full Code Here

Examples of lineage2.gameserver.templates.spawn.SpawnNpcInfo

              {
                parameters = new MultiValueSet<>();
              }
              parameters.set(e.attributeValue("name"), e.attributeValue("value"));
            }
            template.addNpc(new SpawnNpcInfo(npcId, max, parameters));
          }
        }
        if (template.getNpcSize() == 0)
        {
          warn("Npc id is zero! File: " + getCurrentFileName());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.