Package com.l2jfrozen.gameserver.network.serverpackets

Examples of com.l2jfrozen.gameserver.network.serverpackets.ShowBoard


      htmlCode.append("</body></html>");
      separateAndSend(htmlCode.toString(), activeChar);
    }
    else
    {
      ShowBoard sb = new ShowBoard("<html><body><br><br><center>No player with name " + name + "</center><br><br></body></html>", "101");
      activeChar.sendPacket(sb);
      sb = null;
      activeChar.sendPacket(new ShowBoard(null, "102"));
      activeChar.sendPacket(new ShowBoard(null, "103"));
    }
    htmlCode = null;
    player = null;
  }
View Full Code Here


      htmlCode = null;
    }
    else
    {
      ShowBoard sb = new ShowBoard("<html><body><br><br><center>the command: " + ar1 + " is not implemented yet</center><br><br></body></html>", "101");
      activeChar.sendPacket(sb);
      sb = null;
      activeChar.sendPacket(new ShowBoard(null, "102"));
      activeChar.sendPacket(new ShowBoard(null, "103"));
    }

  }
View Full Code Here

    if(ar1.equals("crea"))
    {
      Forum f = ForumsBBSManager.getInstance().getForumByID(Integer.parseInt(ar2));
      if(f == null)
      {
        ShowBoard sb = new ShowBoard("<html><body><br><br><center>the forum: " + ar2 + " is not implemented yet</center><br><br></body></html>", "101");
        activeChar.sendPacket(sb);
        sb = null;
        activeChar.sendPacket(new ShowBoard(null, "102"));
        activeChar.sendPacket(new ShowBoard(null, "103"));
      }
      else
      {
        f.vload();
        Topic t = new Topic(Topic.ConstructorType.CREATE, TopicBBSManager.getInstance().getMaxID(f) + 1, Integer.parseInt(ar2), ar5, Calendar.getInstance().getTimeInMillis(), activeChar.getName(), activeChar.getObjectId(), Topic.MEMO, 0);
        f.addtopic(t);
        TopicBBSManager.getInstance().setMaxID(t.getID(), f);
        Post p = new Post(activeChar.getName(), activeChar.getObjectId(), Calendar.getInstance().getTimeInMillis(), t.getID(), f.getID(), ar4);
        PostBBSManager.getInstance().addPostByTopic(p, t);
        parsecmd("_bbsmemo", activeChar);
        t = null;
        p = null;
      }
      f = null;

    }
    else if(ar1.equals("del"))
    {
      Forum f = ForumsBBSManager.getInstance().getForumByID(Integer.parseInt(ar2));
      if(f == null)
      {
        ShowBoard sb = new ShowBoard("<html><body><br><br><center>the forum: " + ar2 + " does not exist !</center><br><br></body></html>", "101");
        activeChar.sendPacket(sb);
        sb = null;
        activeChar.sendPacket(new ShowBoard(null, "102"));
        activeChar.sendPacket(new ShowBoard(null, "103"));
      }
      else
      {
        Topic t = f.gettopic(Integer.parseInt(ar3));
        if(t == null)
        {
          ShowBoard sb = new ShowBoard("<html><body><br><br><center>the topic: " + ar3 + " does not exist !</center><br><br></body></html>", "101");
          activeChar.sendPacket(sb);
          sb = null;
          activeChar.sendPacket(new ShowBoard(null, "102"));
          activeChar.sendPacket(new ShowBoard(null, "103"));
        }
        else
        {
          //CPost cp = null;
          Post p = PostBBSManager.getInstance().getGPosttByTopic(t);
          if(p != null)
          {
            p.deleteme(t);
          }
          t.deleteme(f);
          parsecmd("_bbsmemo", activeChar);
          p = null;
        }
      }
      f = null;
    }
    else
    {
      ShowBoard sb = new ShowBoard("<html><body><br><br><center>the command: " + ar1 + " is not implemented yet</center><br><br></body></html>", "101");
      activeChar.sendPacket(sb);
      sb = null;
      activeChar.sendPacket(new ShowBoard(null, "102"));
      activeChar.sendPacket(new ShowBoard(null, "103"));
    }
  }
View Full Code Here

      Forum f = ForumsBBSManager.getInstance().getForumByID(idf);

      if(f == null)
      {
        ShowBoard sb = new ShowBoard("<html><body><br><br><center>the forum: " + idf + " does not exist !</center><br><br></body></html>", "101");
        activeChar.sendPacket(sb);
        sb = null;
        activeChar.sendPacket(new ShowBoard(null, "102"));
        activeChar.sendPacket(new ShowBoard(null, "103"));
      }
      else
      {
        Topic t = f.gettopic(idt);
        if(t == null)
        {
          ShowBoard sb = new ShowBoard("<html><body><br><br><center>the topic: " + idt + " does not exist !</center><br><br></body></html>", "101");
          activeChar.sendPacket(sb);
          sb = null;
          activeChar.sendPacket(new ShowBoard(null, "102"));
          activeChar.sendPacket(new ShowBoard(null, "103"));
        }
        else
        {
          //CPost cp = null;
          Post p = PostBBSManager.getInstance().getGPosttByTopic(t);

          if(p != null)
          {
            p.deleteme(t);
          }

          p = null;

          t.deleteme(f);
          parsecmd("_bbsmemo", activeChar);
        }
      }
      f = null;
    }
    else
    {
      ShowBoard sb = new ShowBoard("<html><body><br><br><center>the command: " + command + " is not implemented yet</center><br><br></body></html>", "101");
      activeChar.sendPacket(sb);
      sb = null;
      activeChar.sendPacket(new ShowBoard(null, "102"));
      activeChar.sendPacket(new ShowBoard(null, "103"));
    }
  }
View Full Code Here

   */
  private void showNewTopic(Forum forum, L2PcInstance activeChar, int idf)
  {
    if(forum == null)
    {
      ShowBoard sb = new ShowBoard("<html><body><br><br><center>the forum: " + idf + " is not implemented yet</center><br><br></body></html>", "101");
      activeChar.sendPacket(sb);
      sb = null;
      activeChar.sendPacket(new ShowBoard(null, "102"));
      activeChar.sendPacket(new ShowBoard(null, "103"));
    }
    else if(forum.getType() == Forum.MEMO)
    {
      showMemoNewTopics(forum, activeChar);
    }
    else
    {
      ShowBoard sb = new ShowBoard("<html><body><br><br><center>the forum: " + forum.getName() + " is not implemented yet</center><br><br></body></html>", "101");
      activeChar.sendPacket(sb);
      sb = null;
      activeChar.sendPacket(new ShowBoard(null, "102"));
      activeChar.sendPacket(new ShowBoard(null, "103"));
    }
  }
View Full Code Here

   */
  private void showTopics(Forum forum, L2PcInstance activeChar, int index, int idf)
  {
    if(forum == null)
    {
      ShowBoard sb = new ShowBoard("<html><body><br><br><center>the forum: " + idf + " is not implemented yet</center><br><br></body></html>", "101");
      activeChar.sendPacket(sb);
      sb = null;
      activeChar.sendPacket(new ShowBoard(null, "102"));
      activeChar.sendPacket(new ShowBoard(null, "103"));
    }
    else if(forum.getType() == Forum.MEMO)
    {
      showMemoTopics(forum, activeChar, index);
    }
    else
    {
      ShowBoard sb = new ShowBoard("<html><body><br><br><center>the forum: " + forum.getName() + " is not implemented yet</center><br><br></body></html>", "101");
      activeChar.sendPacket(sb);
      sb = null;
      activeChar.sendPacket(new ShowBoard(null, "102"));
      activeChar.sendPacket(new ShowBoard(null, "103"));
    }
  }
View Full Code Here

    if(html == null)
      return;

    if(html.length() < 4090)
    {
      acha.sendPacket(new ShowBoard(html, "101"));
      acha.sendPacket(new ShowBoard(null, "102"));
      acha.sendPacket(new ShowBoard(null, "103"));

    }
    else if(html.length() < 8180)
    {
      acha.sendPacket(new ShowBoard(html.substring(0, 4090), "101"));
      acha.sendPacket(new ShowBoard(html.substring(4090, html.length()), "102"));
      acha.sendPacket(new ShowBoard(null, "103"));

    }
    else if(html.length() < 12270)
    {
      acha.sendPacket(new ShowBoard(html.substring(0, 4090), "101"));
      acha.sendPacket(new ShowBoard(html.substring(4090, 8180), "102"));
      acha.sendPacket(new ShowBoard(html.substring(8180, html.length()), "103"));

    }
  }
View Full Code Here

   */
  protected void send1001(String html, L2PcInstance acha)
  {
    if(html.length() < 8180)
    {
      acha.sendPacket(new ShowBoard(html, "1001"));
    }
  }
View Full Code Here

    _arg.add(string);
    _arg.add(string3);
    _arg.add(string3);
    _arg.add("0");
    _arg.add("0");
    activeChar.sendPacket(new ShowBoard(_arg));
    _arg = null;
  }
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.network.serverpackets.ShowBoard

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.