Package com.l2jfrozen.gameserver.model.entity.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


  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

   * @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

        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

          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

      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

TOP

Related Classes of com.l2jfrozen.gameserver.model.entity.siege.Siege

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.