Package lineage2.gameserver.network.serverpackets

Examples of lineage2.gameserver.network.serverpackets.NpcHtmlMessage


        {
          htmlpath = getHtmlPath(getNpcId(), 3, player);
        }
        break;
    }
    NpcHtmlMessage html = new NpcHtmlMessage(player, this);
    if (htmlpath == null)
    {
      htmlpath = getHtmlPath(getNpcId(), 0, player);
    }
    html.setFile(htmlpath);
    html.replace("%objectId%", String.valueOf(getObjectId()));
    html.replace("%npcname%", getName());
    player.sendPacket(html);
  }
View Full Code Here


   * @param player Player
   * @param path String
   */
  private void showDialog(Player player, String path)
  {
    NpcHtmlMessage html = new NpcHtmlMessage(player, this);
    html.setFile(path);
    html.replace("%objectId%", String.valueOf(getObjectId()));
    player.sendPacket(html);
  }
View Full Code Here

  }

  @Override
  public void showChatWindow(Player player, int val, Object... arg)
  {
    player.sendPacket(new NpcHtmlMessage(player, this, "tauti/sofa_sizraku001.htm", val));
    return;
  }
View Full Code Here

   * @param file String
   * @param npc NpcInstance
   */
  public void showHtmlFile(Player player, String file, NpcInstance npc)
  {
    NpcHtmlMessage html = new NpcHtmlMessage(player, npc);
    html.setFile(file);
    html.replace("%t_name%", npc.getName());
    player.sendPacket(html);
  }
View Full Code Here

  @Override
  public void showChatWindow(Player player, int val, Object... arg)
  {
    if(!accepted)
    {
      player.sendPacket(new NpcHtmlMessage(player, this, "default/33678.htm", val));
      return;
    }
    else
    {
      player.sendPacket(new NpcHtmlMessage(player, this, "default/33678-1.htm", val));
      return;
    }
  }
View Full Code Here

    List<OlympiadHistory> historyList = _historyOld.get(entry.getKey());
    if (historyList == null)
    {
      historyList = Collections.emptyList();
    }
    NpcHtmlMessage html = new NpcHtmlMessage(player, null);
    html.setFile("olympiad/monument_hero_info.htm");
    html.replace("%title%", StringHolder.getInstance().getNotNull(player, "hero.history"));
    int allStatWinner = 0;
    int allStatLoss = 0;
    int allStatTie = 0;
    for (OlympiadHistory h : historyList)
    {
      if (h.getGameStatus() == 0)
      {
        allStatTie++;
      }
      else
      {
        int team = entry.getKey() == h.getObjectId1() ? 1 : 2;
        if (h.getGameStatus() == team)
        {
          allStatWinner++;
        }
        else
        {
          allStatLoss++;
        }
      }
    }
    html.replace("%wins%", String.valueOf(allStatWinner));
    html.replace("%ties%", String.valueOf(allStatTie));
    html.replace("%losses%", String.valueOf(allStatLoss));
    int min = perpage * (page - 1);
    int max = perpage * page;
    int currentWinner = 0;
    int currentLoss = 0;
    int currentTie = 0;
    final StringBuilder b = new StringBuilder(500);
    for (int i = 0; i < historyList.size(); i++)
    {
      OlympiadHistory history = historyList.get(i);
      if (history.getGameStatus() == 0)
      {
        currentTie++;
      }
      else
      {
        int team = entry.getKey() == history.getObjectId1() ? 1 : 2;
        if (history.getGameStatus() == team)
        {
          currentWinner++;
        }
        else
        {
          currentLoss++;
        }
      }
      if (i < min)
      {
        continue;
      }
      if (i >= max)
      {
        break;
      }
      b.append("<tr><td>");
      b.append(history.toString(player, entry.getKey(), currentWinner, currentLoss, currentTie));
      b.append("</td></tr");
    }
    if (min > 0)
    {
      html.replace("%buttprev%", HtmlUtils.PREV_BUTTON);
      html.replace("%prev_bypass%", "_match?class=" + targetClassId + "&page=" + (page - 1));
    }
    else
    {
      html.replace("%buttprev%", StringUtils.EMPTY);
    }
    if (historyList.size() > max)
    {
      html.replace("%buttnext%", HtmlUtils.NEXT_BUTTON);
      html.replace("%prev_bypass%", "_match?class=" + targetClassId + "&page=" + (page + 1));
    }
    else
    {
      html.replace("%buttnext%", StringUtils.EMPTY);
    }
    html.replace("%list%", b.toString());
    player.sendPacket(html);
  }
View Full Code Here

   * @param arg Object[]
   */
  @Override
  public void showChatWindow(Player player, int val, Object... arg)
  {
    NpcHtmlMessage html = new NpcHtmlMessage(player, this);
    Fortress fortress = getFortress();
    if (fortress.getOwner() != null)
    {
      html.setFile("residence2/fortress/fortress_ordery001a.htm");
      html.replace("%clan_name%", fortress.getOwner().getName());
    }
    else
    {
      html.setFile("residence2/fortress/fortress_ordery001.htm");
    }
   
    player.sendPacket(html);
  }
View Full Code Here

        {
          filename = "fortress/SupportUnitCaptain-" + val + ".htm";
        }
      }
    }
    NpcHtmlMessage html = new NpcHtmlMessage(player, this);
    html.setFile(filename);
    player.sendPacket(html);
  }
View Full Code Here

      if (!clan.getNotice().isEmpty())
      {
        String html = HtmCache.getInstance().getNotNull(Config.BBS_HOME_DIR + "clan_popup.htm", player);
        html = html.replace("%pledge_name%", clan.getName());
        html = html.replace("%content%", clan.getNotice());
        player.sendPacket(new NpcHtmlMessage(0).setHtml(html));
      }
    }
View Full Code Here

        return;
      }
      int npcId = getNpcId();
      if (NaiaTowerManager.isRoomDone(npcId, player))
      {
        player.sendPacket(new NpcHtmlMessage(player, this).setHtml("Ingenious Contraption:<br><br>The room is already challenged."));
        return;
      }
      switch (npcId)
      {
        case 18494:
View Full Code Here

TOP

Related Classes of lineage2.gameserver.network.serverpackets.NpcHtmlMessage

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.