Examples of Siege


Examples of com.l2jfrozen.gameserver.model.entity.siege.Siege

                }

                if(getSkillType() == SkillType.RESURRECT)
                {
                  // check target is not in a active siege zone
                  Siege siege = SiegeManager.getInstance().getSiege(newTarget);
                  if(siege != null && siege.getIsInProgress())
                  {
                    continue;
                  }

                  siege = null;
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.entity.siege.Siege

  public final static double calcSiegeRegenModifer(L2PcInstance activeChar)
  {
    if(activeChar == null || activeChar.getClan() == null)
      return 0;

    Siege siege = SiegeManager.getInstance().getSiege(activeChar.getPosition().getX(), activeChar.getPosition().getY(), activeChar.getPosition().getZ());
    if(siege == null || !siege.getIsInProgress())
      return 0;

    L2SiegeClan siegeClan = siege.getAttackerClan(activeChar.getClan().getClanId());
    if(siegeClan == null || siegeClan.getFlag().size() == 0 || !Util.checkIfInRange(200, activeChar, siegeClan.getFlag().get(0), true))
      return 0;

    return 1.5; // If all is true, then modifer will be 50% more
  }
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.entity.siege.Siege

   * @see com.l2jfrozen.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList()
   */

  private boolean away(L2PcInstance activeChar, String text)
  {
    Siege siege = SiegeManager.getInstance().getSiege(activeChar);

    //check char is all ready in away mode
    if(activeChar.isAway() || activeChar.isAwaying())
    {
      activeChar.sendMessage("You are already Away.");
      return false;
    }

    if(!activeChar.isInsideZone(ZONE_PEACE) && Config.AWAY_PEACE_ZONE)
    {
      activeChar.sendMessage("You can only Away in peace zone.");
      return false;
    }

    //check player is death/fake death and movement disable
    if(activeChar.isMovementDisabled() || activeChar.isAlikeDead())
      return false;

    // Check if player is in Siege
    if(siege != null && siege.getIsInProgress())
    {
      activeChar.sendMessage("You are in siege, you can't go Afk.");
      return false;
    }

View Full Code Here

Examples of com.l2jfrozen.gameserver.model.entity.siege.Siege

        if (isAutoAttackable(player))
        {
         
          if (Config.ALLOW_CHAR_KILL_PROTECT)
          {
            Siege siege = SiegeManager.getInstance().getSiege(player);
           
            if (siege != null && siege.getIsInProgress())
            {
              if (player.getLevel() > 20 && ((L2Character) player.getTarget()).getLevel() < 20)
              {
                player.sendMessage("Your target is not in your grade!");
                player.sendPacket(ActionFailed.STATIC_PACKET);
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.entity.siege.Siege

          if (isAutoAttackable(player))
          {
           
            if (Config.ALLOW_CHAR_KILL_PROTECT)
            {
              Siege siege = SiegeManager.getInstance().getSiege(player);
             
              if (siege != null && siege.getIsInProgress())
              {
                if (player.getLevel() > 20 && ((L2Character) player.getTarget()).getLevel() < 20)
                {
                  player.sendMessage("Your target is not in your grade!");
                  player.sendPacket(ActionFailed.STATIC_PACKET);
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.entity.siege.Siege

      if (isInsideZone(ZONE_CHAOTIC) && ((L2PcInstance) attacker).isInsideZone(ZONE_CHAOTIC))
                return true;
     
      if (getClan() != null)
      {
        Siege siege = SiegeManager.getInstance().getSiege(getX(), getY(), getZ());
        FortSiege fortsiege = FortSiegeManager.getInstance().getSiege(getX(), getY(), getZ());
        if (siege != null)
        {
          // Check if a siege is in progress and if attacker and the L2PcInstance aren't in the Defender clan
          if (siege.checkIsDefender(((L2PcInstance) attacker).getClan()) && siege.checkIsDefender(getClan()))
          {
            siege = null;
            return false;
          }
         
          // Check if a siege is in progress and if attacker and the L2PcInstance aren't in the Attacker clan
          if (siege.checkIsAttacker(((L2PcInstance) attacker).getClan()) && siege.checkIsAttacker(getClan()))
          {
            siege = null;
            return false;
          }
        }
        if (fortsiege != null)
        {
          // Check if a siege is in progress and if attacker and the L2PcInstance aren't in the Defender clan
          if (fortsiege.checkIsDefender(((L2PcInstance) attacker).getClan()) && fortsiege.checkIsDefender(getClan()))
          {
            fortsiege = null;
            return false;
          }
         
          // Check if a siege is in progress and if attacker and the L2PcInstance aren't in the Attacker clan
          if (fortsiege.checkIsAttacker(((L2PcInstance) attacker).getClan()) && fortsiege.checkIsAttacker(getClan()))
          {
            fortsiege = null;
            return false;
          }
        }
       
        // Check if clan is at war
        if (getClan() != null && ((L2PcInstance) attacker).getClan() != null && getClan().isAtWarWith(((L2PcInstance) attacker).getClanId()) && getWantsPeace() == 0 && ((L2PcInstance) attacker).getWantsPeace() == 0 && !isAcademyMember())
          return true;
      }
     
    }
    else if (attacker instanceof L2SiegeGuardInstance)
    {
      if (getClan() != null)
      {
        Siege siege = SiegeManager.getInstance().getSiege(this);
        return siege != null && siege.checkIsAttacker(getClan()) || DevastatedCastle.getInstance().getIsInProgress();
      }
    }
    else if (attacker instanceof L2FortSiegeGuardInstance)
    {
      if (getClan() != null)
View Full Code Here

Examples of l2p.gameserver.model.L2Zone.ZoneType.Siege

    lostexp *= deathPenaltyBonus;
    lostexp = (int) calcStat(Stats.EXP_LOST, lostexp, killer, null);
    // На зарегистрированной осаде нет потери опыта, на чужой осаде - как при обычной смерти от *моба*
    if(isInZone(Siege))
    {
      Siege siege = SiegeManager.getSiege(this, true);
      if(siege != null && siege.isParticipant(this))
      {
        lostexp = 0;
      }
      if(getTerritorySiege() > -1 && TerritorySiege.checkIfInZone(this))
      {
View Full Code Here

Examples of l2p.gameserver.model.L2Zone.ZoneType.Siege

            player.sendMessage(new CustomMessage("l2p.gameserver.clientpackets.EnterWorld.TeleportedReasonNoRestart", player));
            player.setXYZInvisible(MapRegion.getTeleToClosestTown(player));
          }
          if(player.isInZone(Siege))
          {
            Siege siege = SiegeManager.getSiege(player, true);
            if(siege != null && !siege.checkIsDefender(player.getClan()))
            {
              if(siege.getHeadquarter(player.getClan()) == null)
              {
                player.setXYZInvisible(MapRegion.getTeleToClosestTown(player));
              }
              else
              {
View Full Code Here

Examples of l2p.gameserver.model.L2Zone.ZoneType.Siege

  {
    if(isInZone(no_landing))
    {
      return false;
    }
    Siege siege = SiegeManager.getSiege(this, false);
    if(siege != null)
    {
      Residence unit = siege.getSiegeUnit();
      if(unit != null && getClan() != null && isClanLeader() && (getClan().getHasCastle() == unit.getId() || getClan().getHasFortress() == unit.getId()))
      {
        return true;
      }
      return false;
View Full Code Here

Examples of l2p.gameserver.model.L2Zone.ZoneType.Siege

    }
    L2Clan clan1 = getClan();
    L2Clan clan2 = target.getClan();
    if(clan1 != null && clan2 != null)
    {
      Siege siege1 = clan1.getSiege();
      Siege siege2 = clan2.getSiege();
      int state1 = getSiegeState();
      int state2 = target.getSiegeState();
      if(siege1 != null && siege2 != null && siege1 == siege2 && siege1.isInProgress() && state1 != 0 && state2 != 0)
      {
        result |= RelationChanged.RELATION_INSIEGE;
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.