Package lineage2.gameserver.model.entity.events.objects

Examples of lineage2.gameserver.model.entity.events.objects.SpawnExObject


    }
    List<CMGSiegeClanObject> attackers = miniGameEvent.getObjects(SiegeEvent.ATTACKERS);
    int index = attackers.indexOf(_winner);
    String arenaName = "arena_" + index;
    miniGameEvent.spawnAction(arenaName, false);
    SpawnExObject spawnEx = miniGameEvent.getFirstObject(arenaName);
    Spawner spawner = spawnEx.getSpawns().get(0);
    Location loc = (Location) spawner.getCurrentSpawnRange();
    miniGameEvent.removeBanishItems();
    final NpcInstance npc = NpcUtils.spawnSingle(35600, loc.x, loc.y, loc.z, 0);
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
View Full Code Here


      ClanHallSiegeEvent siegeEvent = getEvent(ClanHallSiegeEvent.class);
      if (siegeEvent == null)
      {
        return;
      }
      SpawnExObject obj = siegeEvent.getFirstObject(ClanHallSiegeEvent.BOSS);
      for (int i = 0; i < 3; i++)
      {
        final NpcInstance npc = obj.getSpawns().get(i).getFirstSpawned();
        Functions.npcSay(npc, ((_34SiegeGuard) npc).teleChatSay());
        npc.broadcastPacket(new MagicSkillUse(npc, npc, 4235, 1, 10000, 0));
        _teleportTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl()
        {
          @Override
View Full Code Here

    final ClanHallSiegeEvent siegeEvent = actor.getEvent(ClanHallSiegeEvent.class);
    if (siegeEvent == null)
    {
      return;
    }
    final SpawnExObject spawnExObject = siegeEvent.getFirstObject(ClanHallSiegeEvent.BOSS);
    final NpcInstance lidiaNpc = spawnExObject.getFirstSpawned();
    if (lidiaNpc.getCurrentHpRatio() == 1.)
    {
      lidiaNpc.setCurrentHp(lidiaNpc.getMaxHp() >> 1, true);
    }
  }
View Full Code Here

      {
        objects.add(Location.parse(objectsElement));
      }
      else if (nodeName.equalsIgnoreCase("spawn_ex"))
      {
        objects.add(new SpawnExObject(objectsElement.attributeValue("name")));
      }
      else if (nodeName.equalsIgnoreCase("door"))
      {
        objects.add(new DoorObject(Integer.parseInt(objectsElement.attributeValue("id"))));
      }
View Full Code Here

   * @param powerUnit PowerControlUnitInstance
   */
  public void powerOff(PowerControlUnitInstance powerUnit)
  {
    FortressSiegeEvent event = getEvent(FortressSiegeEvent.class);
    SpawnExObject exObject = event.getFirstObject(FortressSiegeEvent.IN_POWER_UNITS);
    int machineNumber = -1;
    for (int i = 0; i < 3; i++)
    {
      Spawner spawn = exObject.getSpawns().get(i);
      if (spawn == powerUnit.getSpawn())
      {
        machineNumber = i;
      }
    }
View Full Code Here

    FortressSiegeEvent event = getEvent(FortressSiegeEvent.class);
    if (event == null)
    {
      return COND_POWER;
    }
    SpawnExObject object = event.getFirstObject(FortressSiegeEvent.OUT_POWER_UNITS);
    boolean allPowerDisabled = true;
    for (int i = 0; i < 4; i++)
    {
      Spawner spawn = object.getSpawns().get(i);
      if (spawn.getFirstSpawned() != null)
      {
        allPowerDisabled = false;
      }
    }
View Full Code Here

      case COND_ALL_OK:
        message.setFile("residence2/fortress/fortress_inner_controller002.htm");
        FortressSiegeEvent event = getEvent(FortressSiegeEvent.class);
        if (event != null)
        {
          SpawnExObject exObject = event.getFirstObject(FortressSiegeEvent.SIEGE_COMMANDERS);
          Spawner spawn = exObject.getSpawns().get(3);
          MainMachineInstance machineInstance = (MainMachineInstance) spawn.getFirstSpawned();
          machineInstance.powerOff(this);
          onDecay();
        }
        break;
View Full Code Here

    final int y = Integer.parseInt(param[1]);
    final int z = Integer.parseInt(param[2]);
    final int castleId = (param.length > 4) ? Integer.parseInt(param[3]) : 0;
    if (player.getReflection().isDefault())
    {
      final Castle castle = (castleId > 0) ? ResidenceHolder.getInstance().getResidence(Castle.class, castleId) : null;
      if ((castle != null) && castle.getSiegeEvent().isInProgress())
      {
        player.sendPacket(Msg.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
        return;
      }
    }
View Full Code Here

    public void onZoneEnter(Zone zone, Creature cha)
    {
      if (zone.getParams() == null || !cha.isPlayer())
        return;

      Castle castle = ResidenceHolder.getInstance().getResidence(zone.getTemplate().getIndex());

      if (castle != null)
      { 
        if(_side.ordinal()==1 || _side.ordinal()==0)
        {
View Full Code Here

   * Method enter_dc.
   */
  public void enter_dc()
  {
    final Player player = getSelf();
    final NpcInstance npc = getNpc();
    if ((player == null) || (npc == null))
    {
      return;
    }
    if (!NpcInstance.canBypassCheck(player, npc))
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.entity.events.objects.SpawnExObject

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.