Package lineage2.gameserver.model.entity.events.objects

Examples of lineage2.gameserver.model.entity.events.objects.SiegeClanObject


  {
    if (!checkIfInZone(player))
    {
      return null;
    }
    SiegeClanObject attackerClan = getSiegeClan(ATTACKERS, player.getClan());
    Location loc = null;
    switch (type)
    {
      case TO_VILLAGE:
        if ((attackerClan != null) && checkIfInZone(player))
View Full Code Here


    Player player = target.getPlayer();
    if (player == null)
    {
      return null;
    }
    SiegeClanObject siegeClan1 = getSiegeClan(SiegeEvent.ATTACKERS, player.getClan());
    if ((siegeClan1 == null) && attacker.isSiegeGuard())
    {
      return SystemMsg.INVALID_TARGET;
    }
    Player playerAttacker = attacker.getPlayer();
    if (playerAttacker == null)
    {
      return SystemMsg.INVALID_TARGET;
    }
    SiegeClanObject siegeClan2 = getSiegeClan(SiegeEvent.ATTACKERS, playerAttacker.getClan());
    if ((siegeClan1 != null) && (siegeClan2 != null) && isAttackersInAlly())
    {
      return SystemMsg.FORCE_ATTACK_IS_IMPOSSIBLE_AGAINST_A_TEMPORARY_ALLIED_MEMBER_DURING_A_SIEGE;
    }
    if ((siegeClan1 == null) && (siegeClan2 == null))
View Full Code Here

  public void startEvent()
  {
    _oldOwner = getResidence().getOwner();
    if (_oldOwner != null)
    {
      addObject(DEFENDERS, new SiegeClanObject(DEFENDERS, _oldOwner, 0));
    }
    SiegeClanDAO.getInstance().delete(getResidence());
    flagPoleUpdate(true);
    updateParticles(true, ATTACKERS, DEFENDERS);
    broadcastTo(new SystemMessage2(SystemMsg.THE_FORTRESS_BATTLE_S1_HAS_BEGUN).addResidenceName(getResidence()), ATTACKERS, DEFENDERS);
View Full Code Here

        targetPlayer.sendPacket(SystemMsg.IT_IS_NOT_POSSIBLE_TO_RESURRECT_IN_BATTLEFIELDS_WHERE_A_SIEGE_WAR_IS_TAKING_PLACE);
      }
      resurrectPlayer.sendPacket(force ? SystemMsg.IT_IS_NOT_POSSIBLE_TO_RESURRECT_IN_BATTLEFIELDS_WHERE_A_SIEGE_WAR_IS_TAKING_PLACE : SystemMsg.INVALID_TARGET);
      return false;
    }
    SiegeClanObject targetSiegeClan = siegeEvent.getSiegeClan(ATTACKERS, targetPlayer.getClan());
    if ((targetSiegeClan == null) || (targetSiegeClan.getFlag() == null))
    {
      if (force)
      {
        targetPlayer.sendPacket(SystemMsg.IF_A_BASE_CAMP_DOES_NOT_EXIST_RESURRECTION_IS_NOT_POSSIBLE);
      }
View Full Code Here

      while (rset.next())
      {
        int clanId = rset.getInt("clan_id");
        long param = rset.getLong("param");
        long date = rset.getLong("date");
        SiegeClanObject object = residence.<SiegeEvent<?, ?>> getSiegeEvent().newSiegeClan(name, clanId, param, date);
        if (object != null)
        {
          siegeClans.add(object);
        }
        else
View Full Code Here

   */
  @SuppressWarnings("unchecked")
  public S newSiegeClan(String type, int clanId, long param, long date)
  {
    Clan clan = ClanTable.getInstance().getClan(clanId);
    return clan == null ? null : (S) new SiegeClanObject(type, clan, param, date);
  }
View Full Code Here

    {
      return null;
    }
    for (int i = 0; i < siegeClanList.size(); i++)
    {
      SiegeClanObject siegeClan = siegeClanList.get(i);
      if (siegeClan.getObjectId() == objectId)
      {
        return (S) siegeClan;
      }
    }
    return null;
View Full Code Here

    }
    SiegeEvent<?, ?> siegeEvent2 = targetPlayer.getEvent(SiegeEvent.class);
    if (this == siegeEvent2)
    {
      result |= RelationChanged.RELATION_INSIEGE;
      SiegeClanObject siegeClan1 = getSiegeClan(SiegeEvent.ATTACKERS, clan1);
      SiegeClanObject siegeClan2 = getSiegeClan(SiegeEvent.ATTACKERS, clan2);
      if (((siegeClan1 == null) && (siegeClan2 == null)) || ((siegeClan1 != null) && (siegeClan2 != null) && isAttackersInAlly()))
      {
        result |= RelationChanged.RELATION_ALLY;
      }
      else
View Full Code Here

   * @return int
   */
  @Override
  public int getUserRelation(Player thisPlayer, int oldRelation)
  {
    SiegeClanObject siegeClan = getSiegeClan(SiegeEvent.ATTACKERS, thisPlayer.getClan());
    if (siegeClan != null)
    {
      oldRelation |= 0x180;
    }
    else
View Full Code Here

  {
    _oldOwner = getResidence().getOwner();
    if (_oldOwner != null)
    {
      getResidence().changeOwner(null);
      addObject(ATTACKERS, new SiegeClanObject(ATTACKERS, _oldOwner, 0));
    }
    if (getObjects(ATTACKERS).size() == 0)
    {
      broadcastInZone2(new SystemMessage2(SystemMsg.THE_SIEGE_OF_S1_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_INTEREST).addResidenceName(getResidence()));
      reCalcNextTime(false);
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.entity.events.objects.SiegeClanObject

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.