Package lineage2.gameserver.model.pledge

Examples of lineage2.gameserver.model.pledge.SubUnit


   * @param damage int
   */
  @Override
  protected void onEvtAttacked(Creature attacker, int damage)
  {
    final NpcInstance actor = getActor();
    if ((attacker != null) && attacker.isPlayer())
    {
      final Skill skill = SkillTable.getInstance().getInfo(5423, 12);
      skill.getEffects(actor, attacker, false, false);
      return;
View Full Code Here


   * @param aggro int
   */
  @Override
  protected void onEvtAggression(Creature attacker, int aggro)
  {
    final NpcInstance actor = getActor();
    if ((attacker != null) && attacker.isPlayer())
    {
      final Skill skill = SkillTable.getInstance().getInfo(5423, 12);
      skill.getEffects(actor, attacker, false, false);
      return;
View Full Code Here

   * @param damage int
   */
  @Override
  protected void onEvtAttacked(Creature attacker, int damage)
  {
    final NpcInstance actor = getActor();
    if (_firstTimeAttacked)
    {
      Functions.npcSay(actor, "A non-permitted target has been discovered.");
      Functions.npcSay(actor, "Starting intruder removal system.");
      _firstTimeAttacked = false;
View Full Code Here

   * @param killer Creature
   */
  @Override
  protected void onEvtDead(Creature killer)
  {
    final NpcInstance actor = getActor();
    actor.broadcastPacket(new PlaySound(PlaySound.Type.MUSIC, "BS02_D", 1, 0, actor.getLoc()));
    Functions.npcSay(actor, "A fatal error has occurred");
    Functions.npcSay(actor, "System is being shut down...");
    Functions.npcSay(actor, "......");
    try
    {
      final NpcInstance cubic1 = NpcHolder.getInstance().getTemplate(TELEPORTATION_CUBIC_ID).getNewInstance();
      cubic1.setReflection(actor.getReflection());
      cubic1.setCurrentHpMp(cubic1.getMaxHp(), cubic1.getMaxMp(), true);
      cubic1.spawnMe(CUBIC_1_POSITION);
      final NpcInstance cubic2 = NpcHolder.getInstance().getTemplate(TELEPORTATION_CUBIC_ID).getNewInstance();
      cubic2.setReflection(actor.getReflection());
      cubic2.setCurrentHpMp(cubic1.getMaxHp(), cubic1.getMaxMp(), true);
      cubic2.spawnMe(CUBIC_2_POSITION);
      ThreadPoolManager.getInstance().schedule(new DeSpawnScheduleTimerTask(cubic1, cubic2), CUBIC_DESPAWN_TIME);
    }
    catch (Exception e)
    {
      e.printStackTrace();
View Full Code Here

   */
  @Override
  protected void onEvtSpawn()
  {
    super.onEvtSpawn();
    final NpcInstance actor = getActor();
    if (Rnd.chance(50))
    {
      actor.setNpcState(1);
    }
    ThreadPoolManager.getInstance().scheduleAtFixedRate(new Switch(), 5 * 60 * 1000L, 5 * 60 * 1000L);
  }
 
View Full Code Here

     * Method runImpl.
     */
    @Override
    public void runImpl()
    {
      final NpcInstance actor = getActor();
      if (actor.getNpcState() == 1)
      {
        actor.setNpcState(2);
      }
      else
      {
        actor.setNpcState(1);
      }
    }
View Full Code Here

   * @param activeChar Player
   */
  private static void notifyClanMembers(Player activeChar)
  {
    Clan clan = activeChar.getClan();
    SubUnit subUnit = activeChar.getSubUnit();
    if ((clan == null) || (subUnit == null))
    {
      return;
    }
    UnitMember member = subUnit.getUnitMember(activeChar.getObjectId());
    if (member == null)
    {
      return;
    }
    member.setPlayerInstance(activeChar, false);
View Full Code Here

        activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeReorganizeMember.MemberLeaderAnotherUnit", activeChar));
        activeChar.sendActionFailed();
        return;
      }
    }
    SubUnit oldUnit = null;
    if (replacement != null)
    {
      oldUnit = replacement.getSubUnit();
      oldUnit.replace(replacement.getObjectId(), subject.getPledgeType());
      clan.broadcastToOnlineMembers(new PledgeShowMemberListUpdate(replacement));
      if (replacement.isOnline())
      {
        replacement.getPlayer().updatePledgeClass();
        replacement.getPlayer().broadcastCharInfo();
      }
    }
    oldUnit = subject.getSubUnit();
    oldUnit.replace(subject.getObjectId(), _targetUnit);
    clan.broadcastToOnlineMembers(new PledgeShowMemberListUpdate(subject));
    if (subject.isOnline())
    {
      subject.getPlayer().updatePledgeClass();
      subject.getPlayer().broadcastCharInfo();
View Full Code Here

    _sex = player.getSex();
    _race = player.getRace().ordinal();
    _objectId = player.getObjectId();
    _isOnline = player.isOnline();
    _pledgeType = player.getPledgeType();
    SubUnit subUnit = player.getSubUnit();
    UnitMember member = subUnit == null ? null : subUnit.getUnitMember(_objectId);
    if (member != null)
      _isApprentice = member.hasSponsor() ? 1 : 0;
  }
View Full Code Here

        player.sendPacket(SystemMsg.INCORRECT_ITEM_COUNT);
      }
      return;
    }
    show(new CustomMessage("scripts.services.Rename.changedname", player).addString(player.getClan().getName()).addString(param[0]), player);
    SubUnit sub = player.getClan().getSubUnit(Clan.SUBUNIT_MAIN_CLAN);
    sub.setName(param[0], true);
    removeItem(player, Config.SERVICES_CHANGE_CLAN_NAME_ITEM, Config.SERVICES_CHANGE_CLAN_NAME_PRICE);
    player.getClan().broadcastClanStatus(true, true, false);
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.pledge.SubUnit

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.