Package l2p.gameserver.model.entity.siege

Examples of l2p.gameserver.model.entity.siege.Siege$SiegeFameTask


    super(actor);
  }

  private Siege getSiege()
  {
    Siege result = _siege == null ? null : _siege.get();
    if(result == null)
    {
      result = SiegeManager.getSiege(getActor(), true);
      _siege = result != null ? new WeakReference<Siege>(result) : null;
    }
View Full Code Here


    if(player == null)
    {
      return;
    }
    L2Clan clan = player.getClan();
    Siege siege = SiegeManager.getSiege(actor, true);
    if(siege == null)
    {
      return;
    }
    if(clan != null && siege == clan.getSiege() && clan.isDefender())
View Full Code Here

    if(actor == null || caster == null || skill.getId() != BALLISTA_BOMB_SKILL_ID)
    {
      return;
    }
    L2Player player = caster.getPlayer();
    Siege siege = SiegeManager.getSiege(actor, true);
    if(siege != null && player != null && siege.getSiegeUnit().getType() == ResidenceType.Fortress)
    {
      L2Clan clan = player.getClan();
      if(clan != null && siege == clan.getSiege() && clan.isDefender())
      {
        return;
View Full Code Here

    if(TerritorySiege.isInProgress())
    {
      TerritorySiege.killedCT(getCastle().getId());
      return;
    }
    Siege siege = SiegeManager.getSiege(this, true);
    if(siege != null)
    {
      siege.killedCT();
    }
  }
View Full Code Here

   * @return уязвимая ли вышка
   */
  @Override
  public boolean isInvul()
  {
    Siege siege = SiegeManager.getSiege(this, true);
    return siege == null;
  }
View Full Code Here

  private static final L2DropData EPAULETTE = new L2DropData(9912, 1, 3, 100000, 1);

  @Override
  public void doDie(L2Character killer)
  {
    Siege siege = SiegeManager.getSiege(this, true);
    if(killer != null)
    {
      L2Player player = killer.getPlayer();
      if(siege != null && player != null && siege.getSiegeUnit().getType() == ResidenceType.Fortress)
      {
        L2Clan clan = player.getClan();
        if(clan != null && siege == clan.getSiege() && !clan.isDefender())
        {
          L2Character topdam = getTopDamager(getAggroList());
View Full Code Here

  }

  @Override
  public void doDie(L2Character killer)
  {
    Siege s = SiegeManager.getSiege(this, true);
    if(s != null)
    {
      for(SiegeClan sc : s.getDefenderClans().values())
      {
        L2Clan clan = sc.getClan();
        if(clan != null)
        {
          for(L2Player player : clan.getOnlineMembers(0))
          {
            if(player != null)
            {
              player.sendPacket(Msg.THE_CASTLE_GATE_HAS_BEEN_BROKEN_DOWN);
            }
          }
        }
      }
      for(SiegeClan sc : s.getAttackerClans().values())
      {
        L2Clan clan = sc.getClan();
        if(clan != null)
        {
          for(L2Player player : clan.getOnlineMembers(0))
View Full Code Here

    if(player.isInZone(ZoneType.siege_residense))
    {
      activeChar.sendMessage("Flag can't be placed at castle.");
      return false;
    }
    Siege siege = SiegeManager.getSiege(activeChar, true);
    if(siege == null || siege.getAttackerClan(player.getClan()) == null)
    {
      activeChar.sendMessage("You must be an attacker to place a flag.");
      return false;
    }
    return true;
View Full Code Here

    if(clan == null || !player.isClanLeader())
    {
      activeChar.sendMessage("You must be a clan leader to place a flag.");
      return;
    }
    Siege siege = SiegeManager.getSiege(activeChar, true);
    if(siege == null)
    {
      activeChar.sendMessage("You must be an attacker to place a flag.");
      return;
    }
    SiegeClan siegeClan = siege.getAttackerClan(clan);
    if(siegeClan == null)
    {
      activeChar.sendMessage("You must be an attacker to place a flag.");
      return;
    }
View Full Code Here

      {
        activeChar.sendPacket(Msg.IF_A_BASE_CAMP_DOES_NOT_EXIST_RESURRECTION_IS_NOT_POSSIBLE);
        return false;
      }
    }
    Siege siege = SiegeManager.getSiege(target, true);
    if(siege != null)
    {
      L2Clan clan = pcTarget.getClan();
      if(clan == null || clan.getSiege() == null || clan.getSiege() != siege) // Не зарегистрирован на осаду
      {
        activeChar.sendPacket(Msg.IT_IS_IMPOSSIBLE_TO_BE_RESSURECTED_IN_BATTLEFIELDS_WHERE_SIEGE_WARS_ARE_IN_PROCESS);
        return false;
      }
      // Атакующая сторона, проверка на наличие флага
      SiegeClan attackClan = siege.getAttackerClan(clan);
      if(attackClan != null && attackClan.getHeadquarter() == null)
      {
        activeChar.sendPacket(Msg.IF_A_BASE_CAMP_DOES_NOT_EXIST_RESURRECTION_IS_NOT_POSSIBLE);
        return false;
      }
      // Защищающая сторона, проверка на наличие кристалов в замке
      if(siege.checkIsDefender(clan) && siege.getSiegeUnit().getType() == ResidenceType.Castle && ((CastleSiege) siege).isAllTowersDead())
      {
        activeChar.sendPacket(Msg.THE_GUARDIAN_TOWER_HAS_BEEN_DESTROYED_AND_RESURRECTION_IS_NOT_POSSIBLE);
        return false;
      }
    }
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.entity.siege.Siege$SiegeFameTask

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.