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;
    }
    PcInventory inventory = activeChar.getInventory();
    ItemInstance _item = inventory.getItemByObjectId(_itemObjId);
    ItemFunctions.removeItem(activeChar, _consumeItemId, 1, true);
    boolean equipped = _item.isEquipped();
    if (equipped)
    {
      activeChar.getInventory().isRefresh = true;
      activeChar.getInventory().unEquipItem(_item);
    }
    Element oldElement = _item.getAttackElement();
    int elementVal = _item.getAttributeElementValue(oldElement, false);
    _item.setAttributeElement(oldElement, 0);
    Element newElement = Element.VALUES[_newElementId];
    _item.setAttributeElement(newElement, _item.getAttributeElementValue(newElement, false) + elementVal);
    _item.setJdbcState(JdbcEntityState.UPDATED);
    _item.update();
    if (equipped)
    {
      activeChar.getInventory().equipItem(_item);
      activeChar.getInventory().isRefresh = false;
    }
    activeChar.sendPacket(new InventoryUpdate().addModifiedItem(_item));
    activeChar.sendPacket(new ExChangeAttributeOk());
  }
View Full Code Here


  public String onTalk(NpcInstance npc, QuestState st)
  {
    String htmltext = "noquest";
    int npcId = npc.getNpcId();
    int cond = st.getCond();
    Player player = st.getPlayer();
    QuestState ToTheSeedOfDestruction = player.getQuestState(_10269_ToTheSeedOfDestruction.class);
    if (npcId == Orbyu)
    {
      if (cond == 0)
      {
        if ((player.getLevel() >= 75) && (ToTheSeedOfDestruction != null) && ToTheSeedOfDestruction.isCompleted() && (player.getParty() != null) && (player.getParty().getCommandChannel() != null) && (player.getParty().getCommandChannel().getMemberCount() >= CC_MINIMUM))
        {
          htmltext = "orbyu_q10271_1.htm";
        }
        else
        {
View Full Code Here

   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    Player player = getClient().getActiveChar();
    if (player == null)
    {
      return;
    }
    Alliance ally = player.getAlliance();
    if (ally == null)
    {
      return;
    }
    int clancount = 0;
    Clan leaderclan = player.getAlliance().getLeader();
    clancount = ClanTable.getInstance().getAlliance(leaderclan.getAllyId()).getMembers().length;
    int[] online = new int[clancount + 1];
    int[] count = new int[clancount + 1];
    Clan[] clans = player.getAlliance().getMembers();
    for (int i = 0; i < clancount; i++)
    {
      online[i + 1] = clans[i].getOnlineMembers(0).size();
      count[i + 1] = clans[i].getAllSize();
      online[0] += online[i + 1];
      count[0] += count[i + 1];
    }
    List<L2GameServerPacket> packets = new ArrayList<>(7 + (5 * clancount));
    packets.add(Msg._ALLIANCE_INFORMATION_);
    packets.add(new SystemMessage(SystemMessage.ALLIANCE_NAME_S1).addString(player.getClan().getAlliance().getAllyName()));
    packets.add(new SystemMessage(SystemMessage.CONNECTION_S1_TOTAL_S2).addNumber(online[0]).addNumber(count[0]));
    packets.add(new SystemMessage(SystemMessage.ALLIANCE_LEADER_S2_OF_S1).addString(leaderclan.getName()).addString(leaderclan.getLeaderName()));
    packets.add(new SystemMessage(SystemMessage.AFFILIATED_CLANS_TOTAL_S1_CLAN_S).addNumber(clancount));
    packets.add(Msg._CLAN_INFORMATION_);
    for (int i = 0; i < clancount; i++)
    {
      packets.add(new SystemMessage(SystemMessage.CLAN_NAME_S1).addString(clans[i].getName()));
      packets.add(new SystemMessage(SystemMessage.CLAN_LEADER_S1).addString(clans[i].getLeaderName()));
      packets.add(new SystemMessage(SystemMessage.CLAN_LEVEL_S1).addNumber(clans[i].getLevel()));
      packets.add(new SystemMessage(SystemMessage.CONNECTION_S1_TOTAL_S2).addNumber(online[i + 1]).addNumber(count[i + 1]));
      packets.add(Msg.__DASHES__);
    }
    packets.add(Msg.__EQUALS__);
    player.sendPacket(packets);
  }
View Full Code Here

  }

  @Override
  public String onTalk(NpcInstance npc, QuestState st)
  {
    Player player = st.getPlayer();
    int npcId = npc.getNpcId();
    int cond = st.getCond();
    if(player.getLevel() < 95)
    {
      return "32892-lvl.htm";
    }
    QuestState qs = st.getPlayer().getQuestState(_10318_DecayingDarkness.class);
    if(qs == null || !qs.isCompleted())
View Full Code Here

   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    Player activeChar = getClient().getActiveChar();
    if (activeChar == null)
    {
      return;
    }
    if (!activeChar.isInMovie() || (activeChar.getMovieId() != _movieId))
    {
      activeChar.sendActionFailed();
      return;
    }
    activeChar.setIsInMovie(false);
    activeChar.setMovieId(0);
    activeChar.decayMe();
    activeChar.spawnMe();
  }
View Full Code Here

   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    Player player = getClient().getActiveChar();
    if (player == null)
    {
      return;
    }
    player.sendPacket(new HennaEquipList(player));
  }
View Full Code Here

   * Method runImpl.
   */
  @Override
  protected void runImpl()
  {
    Player player = getClient().getActiveChar();
    if (player == null)
    {
      return;
    }
    MatchingRoom room = player.getMatchingRoom();
    if (room == null)
    {
      new PartyMatchingRoom(player, _minLevel, _maxLevel, _maxMembers, _lootDist, _roomTitle);
    }
    else if ((room.getId() == _roomId) && (room.getType() == MatchingRoom.PARTY_MATCHING) && (room.getLeader() == player))
View Full Code Here

  {
    int npcId = npc.getNpcId();
    switch (npcId)
    {
      case OLYMPIAD_MANAGER:
        Player player = st.getPlayer();
        if (!player.isNoble() || (player.getLevel() < 75) || (player.getClassLevel() < 4))
        {
          return "olympiad_operator_q0551_08.htm";
        }
        if (st.isCreated())
        {
View Full Code Here

    else if (event.equalsIgnoreCase("olympiad_operator_q0551_07.htm"))
    {
      if (st.getQuestItemsCount(OLYMPIAD_CERT3) > 0)
      {
        st.giveItems(OLYMPIAD_CHEST, 2);
        Player player = st.getPlayer();
        player.setFame(player.getFame() + 10000, "quest olympiad");
        st.takeItems(OLYMPIAD_CERT1, -1);
        st.takeItems(OLYMPIAD_CERT2, -1);
        st.takeItems(OLYMPIAD_CERT3, -1);
        st.playSound(SOUND_FINISH);
        st.exitCurrentQuest(this);
      }
      else if (st.getQuestItemsCount(OLYMPIAD_CERT2) > 0)
      {
        st.giveItems(OLYMPIAD_CHEST, 2);
        Player player = st.getPlayer();
        player.setFame(player.getFame() + 6000, "quest olympiad");
        st.takeItems(OLYMPIAD_CERT1, -1);
        st.takeItems(OLYMPIAD_CERT2, -1);
        st.takeItems(OLYMPIAD_CERT3, -1);
        st.playSound(SOUND_FINISH);
        st.exitCurrentQuest(this);
View Full Code Here

     * @see lineage2.gameserver.listener.actor.player.OnAnswerListener#sayYes()
     */
    @Override
    public void sayYes()
    {
      Player player1, player2;
      if (((player1 = _playerRef1.get()) == null) || ((player2 = _playerRef2.get()) == null))
      {
        return;
      }
      CoupleManager.getInstance().createCouple(player1, player2);
      player1.sendMessage(new CustomMessage("lineage2.gameserver.model.L2Player.EngageAnswerYes", player2));
    }
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.