Package lineage2.gameserver.model.entity.events.impl

Examples of lineage2.gameserver.model.entity.events.impl.FortressSiegeEvent


  @Override
  public void onEvtSpawn()
  {
    super.onEvtSpawn();
    final SiegeGuardInstance actor = getActor();
    final FortressSiegeEvent siegeEvent = actor.getEvent(FortressSiegeEvent.class);
    if (siegeEvent == null)
    {
      return;
    }
    if (siegeEvent.getResidence().getFacilityLevel(Fortress.GUARD_BUFF) > 0)
    {
      actor.doCast(SkillTable.getInstance().getInfo(5432, siegeEvent.getResidence().getFacilityLevel(Fortress.GUARD_BUFF)), actor, false);
    }
    siegeEvent.barrackAction(2, false);
  }
View Full Code Here


   */
  @Override
  public void onEvtDead(Creature killer)
  {
    final SiegeGuardInstance actor = getActor();
    final FortressSiegeEvent siegeEvent = actor.getEvent(FortressSiegeEvent.class);
    if (siegeEvent == null)
    {
      return;
    }
    siegeEvent.barrackAction(2, true);
    siegeEvent.broadcastTo(SystemMsg.THE_BARRACKS_HAVE_BEEN_SEIZED, SiegeEvent.ATTACKERS, SiegeEvent.DEFENDERS);
    Functions.npcShout(actor, NpcString.AT_LAST_THE_MAGIC_FIELD_THAT_PROTECTS_THE_FORTRESS_HAS_WEAKENED_VOLUNTEERS_STAND_BACK);
    super.onEvtDead(killer);
    siegeEvent.checkBarracks();
  }
View Full Code Here

  public void onEvtSpawn()
  {
    super.onEvtSpawn();
    final NpcInstance actor = getActor();
    final Fortress f = actor.getFortress();
    final FortressSiegeEvent event = f.getSiegeEvent();
    _points = event.getObjects(FortressSiegeEvent.MERCENARY_POINTS);
  }
View Full Code Here

  @Override
  public void onEvtSpawn()
  {
    super.onEvtSpawn();
    final SiegeGuardInstance actor = getActor();
    final FortressSiegeEvent siegeEvent = actor.getEvent(FortressSiegeEvent.class);
    if (siegeEvent == null)
    {
      return;
    }
    if (siegeEvent.getResidence().getFacilityLevel(Fortress.GUARD_BUFF) > 0)
    {
      actor.doCast(SkillTable.getInstance().getInfo(5432, siegeEvent.getResidence().getFacilityLevel(Fortress.GUARD_BUFF)), actor, false);
    }
    siegeEvent.barrackAction(4, false);
  }
View Full Code Here

   */
  @Override
  public void onEvtDead(Creature killer)
  {
    final SiegeGuardInstance actor = getActor();
    final FortressSiegeEvent siegeEvent = actor.getEvent(FortressSiegeEvent.class);
    if (siegeEvent == null)
    {
      return;
    }
    siegeEvent.barrackAction(4, true);
    siegeEvent.broadcastTo(SystemMsg.THE_BARRACKS_HAVE_BEEN_SEIZED, SiegeEvent.ATTACKERS, SiegeEvent.DEFENDERS);
    Functions.npcShout(actor, NpcString.I_FEEL_SO_MUCH_GRIEF_THAT_I_CANT_EVEN_TAKE_CARE_OF_MYSELF);
    super.onEvtDead(killer);
    siegeEvent.checkBarracks();
  }
View Full Code Here

  @Override
  public void onEvtSpawn()
  {
    super.onEvtSpawn();
    final SiegeGuardInstance actor = getActor();
    final FortressSiegeEvent siegeEvent = actor.getEvent(FortressSiegeEvent.class);
    if (siegeEvent == null)
    {
      return;
    }
    if (siegeEvent.getResidence().getFacilityLevel(Fortress.GUARD_BUFF) > 0)
    {
      actor.doCast(SkillTable.getInstance().getInfo(5432, siegeEvent.getResidence().getFacilityLevel(Fortress.GUARD_BUFF)), actor, false);
    }
    siegeEvent.barrackAction(1, false);
  }
View Full Code Here

   */
  @Override
  public void onEvtDead(Creature killer)
  {
    final SiegeGuardInstance actor = getActor();
    final FortressSiegeEvent siegeEvent = actor.getEvent(FortressSiegeEvent.class);
    if (siegeEvent == null)
    {
      return;
    }
    siegeEvent.barrackAction(1, true);
    siegeEvent.broadcastTo(SystemMsg.THE_BARRACKS_HAVE_BEEN_SEIZED, SiegeEvent.ATTACKERS, SiegeEvent.DEFENDERS);
    Functions.npcShout(actor, NpcString.AIIEEEE_COMMAND_CENTER_THIS_IS_GUARD_UNIT_WE_NEED_BACKUP_RIGHT_AWAY);
    super.onEvtDead(killer);
    siegeEvent.checkBarracks();
  }
View Full Code Here

    if (player.getClan() == null)
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
      return false;
    }
    FortressSiegeEvent siegeEvent = player.getEvent(FortressSiegeEvent.class);
    if (siegeEvent == null)
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
      return false;
    }
    if (player.isMounted())
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
      return false;
    }
    ItemAttachment attach = player.getActiveWeaponFlagAttachment();
    if (!(attach instanceof FortressCombatFlagObject) || (((FortressCombatFlagObject) attach).getEvent() != siegeEvent))
    {
      activeChar.sendPacket(new SystemMessage2(SystemMsg.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addSkillName(this));
      return false;
    }
    if (!player.isInRangeZ(target, getCastRange()))
    {
      player.sendPacket(SystemMsg.YOUR_TARGET_IS_OUT_OF_RANGE);
      return false;
    }
    if (first)
    {
      siegeEvent.broadcastTo(new SystemMessage2(SystemMsg.S1_CLAN_IS_TRYING_TO_DISPLAY_A_FLAG).addString(player.getClan().getName()), SiegeEvent.DEFENDERS);
    }
    return true;
  }
View Full Code Here

    if (!(flagPole instanceof StaticObjectInstance) || (((StaticObjectInstance) flagPole).getType() != 3))
    {
      return;
    }
    Player player = (Player) activeChar;
    FortressSiegeEvent siegeEvent = player.getEvent(FortressSiegeEvent.class);
    if (siegeEvent == null)
    {
      return;
    }
    StaticObjectObject object = siegeEvent.getFirstObject(FortressSiegeEvent.FLAG_POLE);
    if (((StaticObjectInstance) flagPole).getUId() != object.getUId())
    {
      return;
    }
    siegeEvent.processStep(player.getClan());
  }
View Full Code Here

  {
    if (player.getActiveWeaponFlagAttachment() != null)
    {
      return false;
    }
    FortressSiegeEvent event = player.getEvent(FortressSiegeEvent.class);
    if (event == null)
    {
      return false;
    }
    SiegeClanObject object = event.getSiegeClan(SiegeEvent.ATTACKERS, player.getClan());
    if (object == null)
    {
      return false;
    }
    return true;
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.entity.events.impl.FortressSiegeEvent

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.