Package com.l2jfrozen.gameserver.model

Examples of com.l2jfrozen.gameserver.model.L2SiegeClan


           
            loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, teleportWhere);
            break;
         
          case 3: // to siege HQ
            L2SiegeClan siegeClan = null;
            castle = CastleManager.getInstance().getCastle(activeChar);
            fort = FortManager.getInstance().getFort(activeChar);
           
            if (castle != null && castle.getSiege().getIsInProgress())
            {
              siegeClan = castle.getSiege().getAttackerClan(activeChar.getClan());
            }
            else if (fort != null && fort.getSiege().getIsInProgress())
            {
              siegeClan = fort.getSiege().getAttackerClan(activeChar.getClan());
            }
           
            if (siegeClan == null || siegeClan.getFlag().size() == 0)
            {
              // cheater
              activeChar.sendMessage("You may not use this respawn point!");
              Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " used respawn cheat.", IllegalPlayerAction.PUNISH_KICK);
              return;
View Full Code Here


    {
      deleteMe();
    }
    else
    {
      L2SiegeClan sc = _siege.getAttackerClan(_player.getClan());
      if(sc == null)
      {
        deleteMe();
      }
      else
      {
        sc.addFlag(this);
      }
      sc = null;
    }
  }
View Full Code Here

  @Override
  public boolean doDie(L2Character killer)
  {
    if(!super.doDie(killer))
      return false;
    L2SiegeClan sc = _siege.getAttackerClan(_player.getClan());
    if(sc != null)
    {
      sc.removeFlag(this);
    }
    sc = null;

    return true;
  }
View Full Code Here

          addAttacker(sc);
        }
      }

      // owner as defender
      L2SiegeClan sc_newowner = getAttackerClan(getFort().getOwnerId());
      removeAttacker(sc_newowner);
      addDefender(sc_newowner, SiegeClanType.OWNER);
      endSiege();
      sc_newowner = null;
View Full Code Here

   *
   * @param clanId The int of clan's id
   */
  private void addAttacker(int clanId)
  {
    getAttackerClans().add(new L2SiegeClan(clanId, SiegeClanType.ATTACKER)); // Add registered attacker to attacker list
  }
View Full Code Here

   *
   * @param clanId The int of clan's id
   */
  private void addDefender(int clanId)
  {
    getDefenderClans().add(new L2SiegeClan(clanId, SiegeClanType.DEFENDER)); // Add registered defender to defender list
  }
View Full Code Here

   * @param clanId The int of clan's id
   * @param type the type of the clan
   */
  private void addDefender(int clanId, SiegeClanType type)
  {
    getDefenderClans().add(new L2SiegeClan(clanId, type));
  }
View Full Code Here

   *
   * @param clanId The int of clan's id
   */
  private void addDefenderWaiting(int clanId)
  {
    getDefenderWaitingClans().add(new L2SiegeClan(clanId, SiegeClanType.DEFENDER_PENDING)); // Add registered defender to defender list
  }
View Full Code Here

   */
  public List<L2NpcInstance> getFlag(L2Clan clan)
  {
    if(clan != null)
    {
      L2SiegeClan sc = getAttackerClan(clan);
      if(sc != null)
        return sc.getFlag();
    }

    return null;
  }
View Full Code Here

    writeD(_canTeleport ? 0x01 : 0);   // 6d 00 00 00 00 - to nearest village

    if(_canTeleport && _clan != null)
    {
      L2SiegeClan siegeClan = null;
      Boolean isInDefense = false;
      Castle castle = CastleManager.getInstance().getCastle(_activeChar);
      Fort fort = FortManager.getInstance().getFort(_activeChar);

      if(castle != null && castle.getSiege().getIsInProgress())
      {
        //siege in progress
        siegeClan = castle.getSiege().getAttackerClan(_clan);
        if(siegeClan == null && castle.getSiege().checkIsDefender(_clan))
        {
          isInDefense = true;
        }
      }
      else if(fort != null && fort.getSiege().getIsInProgress())
      {
        //siege in progress
        siegeClan = fort.getSiege().getAttackerClan(_clan);
        if(siegeClan == null && fort.getSiege().checkIsDefender(_clan))
        {
          isInDefense = true;
        }
      }

      writeD(_clan.getHasHideout() > 0 ? 0x01 : 0x00); // 6d 01 00 00 00 - to hide away
      writeD(_clan.getHasCastle() > 0 || _clan.getHasFort() > 0 || isInDefense ? 0x01 : 0x00); // 6d 02 00 00 00 - to castle
      writeD(siegeClan != null && !isInDefense && siegeClan.getFlag().size() > 0 ? 0x01 : 0x00); // 6d 03 00 00 00 - to siege HQ
    }
    else
    {
      writeD(0x00); // 6d 01 00 00 00 - to hide away
      writeD(0x00); // 6d 02 00 00 00 - to castle
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.model.L2SiegeClan

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.