Package lineage2.gameserver.model.entity.residence

Examples of lineage2.gameserver.model.entity.residence.Residence


    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


    Player player = getClient().getActiveChar();
    if (player == null)
    {
      return;
    }
    Residence residence = ResidenceHolder.getInstance().getResidence(_unitId);
    if (residence != null)
    {
      sendPacket(new CastleSiegeAttackerList(residence));
    }
  }
View Full Code Here

   * @return int
   */
  @Override
  protected int getCond(Player player)
  {
    Residence residence = getResidence();
    Clan residenceOwner = residence.getOwner();
    if ((residenceOwner != null) && (player.getClan() == residenceOwner))
    {
      if (residence.getSiegeEvent().isInProgress())
      {
        return COND_SIEGE;
      }
      return COND_OWNER;
    }
View Full Code Here

        final int castleId,
        state;
        final String fileName;
        if (command.equalsIgnoreCase("yes"))
        {
          Residence castle = ResidenceHolder.getInstance().getResidence(Castle.class, _castleId);
          if (castle.getOwnerId() == 0)
          {
            castleId = -1;
            state = Fortress.NOT_DECIDED;
            fileName = _failContractDialog;
          }
          else
          {
            castleId = castle.getId();
            state = Fortress.CONTRACT_WITH_CASTLE;
            fileName = _successContractDialog;
          }
        }
        else
View Full Code Here

   * @param player Player
   * @return int
   */
  protected int getCond(Player player)
  {
    Residence residence = getFortress();
    if (residence == null)
    {
      throw new IllegalArgumentException("Not find fortress: " + getNpcId() + "; loc: " + getLoc());
    }
    Clan residenceOwner = residence.getOwner();
    if ((residenceOwner != null) && (player.getClan() == residenceOwner) && (residenceOwner.getLeaderId() == player.getObjectId()))
    {
      return COND_LEADER;
    }
    return COND_FAIL;
View Full Code Here

   * @return int
   */
  @Override
  protected int getCond(Player player)
  {
    Residence residence = getResidence();
    Clan residenceOwner = residence.getOwner();
    if ((residenceOwner != null) && (player.getClan() == residenceOwner))
    {
      return COND_OWNER;
    }
    return COND_FAIL;
View Full Code Here

    if (!actor.isPlayer())
    {
      return;
    }
    Player player = (Player) actor;
    Residence residence = (Residence) zone.getParams().get("residence");
    if ((residence.getOwner() == null) || (residence.getOwner() != player.getClan()))
    {
      return;
    }
    if (residence.isFunctionActive(ResidenceFunction.RESTORE_HP))
    {
      double value = 1. + (residence.getFunction(ResidenceFunction.RESTORE_HP).getLevel() / 100.);
      player.addStatFunc(new FuncMul(Stats.REGENERATE_HP_RATE, 0x30, residence, value));
    }
    if (residence.isFunctionActive(ResidenceFunction.RESTORE_MP))
    {
      double value = 1. + (residence.getFunction(ResidenceFunction.RESTORE_MP).getLevel() / 100.);
      player.addStatFunc(new FuncMul(Stats.REGENERATE_MP_RATE, 0x30, residence, value));
    }
  }
View Full Code Here

  {
    if (!actor.isPlayer())
    {
      return;
    }
    Residence residence = (Residence) zone.getParams().get("residence");
    actor.removeStatsOwner(residence);
  }
View Full Code Here

    Player player = actor.getPlayer();
    if (player != null)
    {
      if (player.isFlying() && (player.getMountNpcId() == PetDataTable.WYVERN_ID))
      {
        Residence residence = ResidenceHolder.getInstance().getResidence(zone.getParams().getInteger("residence", 0));
        if ((residence != null) && (player.getClan() != null) && (residence.getOwner() == player.getClan()))
        {
        }
        else
        {
          player.stopMove();
View Full Code Here

  @Override
  protected int getCond(Player player)
  {
    if(player.isGM())
      return COND_OWNER;
    Residence castle = getCastle();
    if(castle != null && castle.getId() > 0)
      if(player.getClan() != null)
        if(castle.getSiegeEvent().isInProgress())
          return COND_SIEGE; // Busy because of siege
        else if(castle.getOwnerId() == player.getClanId())
        {
          if(player.isClanLeader()) // Leader of clan
            return COND_OWNER;
          if(isHaveRigths(player, Clan.CP_CS_ENTRY_EXIT) || // doors
          isHaveRigths(player, Clan.CP_CS_MANOR_ADMIN) || // manor
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.entity.residence.Residence

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.