Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Player$SummonSkillCastingTask


   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    Player activeChar = getClient().getActiveChar();
    if (activeChar == null)
    {
      return;
    }
    if ((_powerGrade < Clan.RANK_FIRST) || (_powerGrade > Clan.RANK_LAST))
    {
      return;
    }
    Clan clan = activeChar.getClan();
    if (clan == null)
    {
      return;
    }
    if ((activeChar.getClanPrivileges() & Clan.CP_CL_MANAGE_RANKS) == Clan.CP_CL_MANAGE_RANKS)
    {
      UnitMember member = activeChar.getClan().getAnyMember(_name);
      if (member != null)
      {
        if (Clan.isAcademy(member.getPledgeType()))
        {
          activeChar.sendMessage("You cannot change academy member grade.");
          return;
        }
        if (_powerGrade > 5)
        {
          member.setPowerGrade(clan.getAffiliationRank(member.getPledgeType()));
        }
        else
        {
          member.setPowerGrade(_powerGrade);
        }
        if (member.isOnline())
        {
          member.getPlayer().sendUserInfo();
        }
      }
      else
      {
        activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeSetMemberPowerGrade.NotBelongClan", activeChar));
      }
    }
    else
    {
      activeChar.sendMessage(new CustomMessage("lineage2.gameserver.clientpackets.RequestPledgeSetMemberPowerGrade.HaveNotAuthority", activeChar));
    }
  }
View Full Code Here


   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    Player player = getClient().getActiveChar();
    if (player == null)
    {
      return;
    }
    Quest q = QuestManager.getQuest(255);
    if (q != null)
    {
      player.processQuestEvent(q.getName(), _bypass, null);
    }
  }
View Full Code Here

    String htmltext = "noquest";
    if (st == null)
    {
      return htmltext;
    }
    Player player = st.getPlayer();
    QuestState prevst = player.getQuestState(_10306_TheCorruptedLeader.class);
    if (npc.getNpcId() == NPC_NAOMI_KASHERON)
    {
      switch (st.getState())
      {
        case COMPLETED:
          htmltext = "32896-02.htm";
          break;
        case CREATED:
          if (player.getLevel() >= 90)
          {
            if ((prevst != null) && (prevst.isCompleted()))
            {
              htmltext = "32896-01.htm";
            }
View Full Code Here

   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    Player player = getClient().getActiveChar();
    if (player == null)
    {
      return;
    }
    Residence residence = ResidenceHolder.getInstance().getResidence(_unitId);
View Full Code Here

  {
    if (qs == null)
    {
      return null;
    }
    Player player = qs.getPlayer();
    if (player == null)
    {
      return null;
    }
    String htmltext = null;
    int cond = qs.getCond();
    switch (npc.getNpcId())
    {
      case CELLPHINE_ID:
        if (!isAvailableFor(player))
        {
          htmltext = "noqu.htm";
        }
        else
        {
          //If a DualClass Not Awakened Yet try to do the quest reset it.
          //TODO: Check if better put this quest as repeatable by simply add more start condition or leave as this
          if (player.getSubClassList().isDoubleClassActive() && player.getClassLevel() == 4)
          {
            qs.exitCurrentQuest(true);
          }
          switch (cond)
          {
View Full Code Here

    String htmltext = event;
    if (st == null)
    {
      return htmltext;
    }
    Player player = st.getPlayer();
    if (player == null)
    {
      return htmltext;
    }
    if (event.equalsIgnoreCase("MemoryOfDisaster"))
    {
      Reflection r = player.getActiveReflection();
      if (r != null)
      {
        if (player.canReenterInstance(MEMORY_OF_DISASTER_ID))
        {
          player.teleToLocation(r.getTeleportLoc(), r);
        }
      }
      else if (player.canEnterInstance(MEMORY_OF_DISASTER_ID))
      {
        ReflectionUtils.enterReflection(player, new MemoryOfDisaster(player), MEMORY_OF_DISASTER_ID);
      }
      htmltext = null;
    }
    if (npc == null)
    {
      return htmltext;
    }
    switch (npc.getNpcId())
    {
      case CELLPHINE_ID:
        if (event.equalsIgnoreCase("quest_ac"))
        {
          st.setState(STARTED);
          st.setCond(1);
          st.playSound(SOUND_ACCEPT);
          htmltext = "0-2.htm";
        }
        break;
      case HADEL_ID:
        if (event.equalsIgnoreCase("1-5.htm"))
        {
          st.setCond(2);
          st.playSound(SOUND_MIDDLE);
        }
        else if (event.equalsIgnoreCase("EnterInstance"))
        {
          Reflection r = player.getActiveReflection();
          if (r != null)
          {
            if (player.canReenterInstance(INSTANCE_ID))
            {
              player.teleToLocation(r.getTeleportLoc(), r);
            }
          }
          else if (player.canEnterInstance(INSTANCE_ID))
          {
            if (st.getCond() < 3)
            {
              ReflectionUtils.enterReflection(player, new HarnakUndergroundRuins(1), INSTANCE_ID);
            }
            else
            {
              ReflectionUtils.enterReflection(player, new HarnakUndergroundRuins(2), INSTANCE_ID);
            }
          }
          htmltext = null;
        }
        break;
      case HERMUNKUS_ID:
        if (event.equalsIgnoreCase("accept_scroll"))
        {
          player.sendPacket(new ExShowScreenMessage(NpcString.YOU_MAY_USE_SCROLL_OF_AFTERLIFE_FROM_HERMUNCUS_TO_AWAKEN, 10000, ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER, true, ExShowScreenMessage.STRING_TYPE, 0, false, 0));
          st.playSound(SOUND_FINISH);
          st.giveItems(SCROLL_OF_AFTERLIFE, 1);
          st.exitCurrentQuest(false);
          htmltext = "2-3.htm";
        }
View Full Code Here

      player.unEquipWeapon();
      player.broadcastCharInfo();
    }
    else
    {
      Player oldDriver = getDriver();
      _driverRef = HardReferences.emptyRef();
      if (oldDriver != null)
      {
        oldDriver.setLockedTarget(false);
        oldDriver.broadcastCharInfo();
      }
    }
    broadcastCharInfo();
  }
View Full Code Here

    if(!env.character.isPlayer())
    {
      return false;
    }

    Player player = env.character.getPlayer();

    if(player.getClan() == null || player.getCastle() == null)
    {
      return false;
    }

    if(!player.isClanLeader())
    {
      return false;
    }

    return player.getCastle().isCastleTypeLight();
  }
View Full Code Here

   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    Player activeChar = getClient().getActiveChar();
    if (activeChar == null)
    {
      return;
    }
    if (_crestId == 0)
View Full Code Here

    if (AutoBan.isBanned(objId))
    {
      sendPacket(ActionFail.STATIC);
      return;
    }
    Player activeChar = client.loadCharFromDisk(_charSlot);
    if (activeChar == null)
    {
      sendPacket(ActionFail.STATIC);
      return;
    }
    if (activeChar.getAccessLevel() < 0)
    {
      activeChar.setAccessLevel(0);
    }
    client.setState(GameClientState.IN_GAME);
    sendPacket(new CharSelected(activeChar, client.getSessionKey().playOkID1));
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.Player$SummonSkillCastingTask

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.