Advertisement
Guest User

Untitled

a guest
Jan 5th, 2012
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 5.68 KB | None | 0 0
  1. Index: java/com/l2jserver/gameserver/communitybbs/Manager/RegionBBSManager.java
  2. ===================================================================
  3. --- java/com/l2jserver/gameserver/communitybbs/Manager/RegionBBSManager.java    (revision 5121)
  4. +++ java/com/l2jserver/gameserver/communitybbs/Manager/RegionBBSManager.java    (working copy)
  5. @@ -257,8 +257,6 @@
  6.         }
  7.        
  8.     }
  9. -   private int _onlineCount = 0;
  10. -   private int _onlineCountGm = 0;
  11.     private static FastMap<Integer, FastList<L2PcInstance>> _onlinePlayers = new FastMap<Integer, FastList<L2PcInstance>>().shared();
  12.     private static FastMap<Integer, FastMap<String, String>> _communityPages = new FastMap<Integer, FastMap<String, String>>().shared();
  13.    
  14. @@ -284,8 +282,6 @@
  15.         });
  16.        
  17.         _onlinePlayers.clear();
  18. -       _onlineCount = 0;
  19. -       _onlineCountGm = 0;
  20.        
  21.         for (L2PcInstance player : sortedPlayers)
  22.         {
  23. @@ -307,9 +303,6 @@
  24.                 if (!page.contains(player))
  25.                 {
  26.                     page.add(player);
  27. -                   if (!player.getAppearance().getInvisible())
  28. -                       _onlineCount++;
  29. -                   _onlineCountGm++;
  30.                 }
  31.                 added = true;
  32.                 break;
  33. @@ -328,9 +321,6 @@
  34.             if (temp.add(player))
  35.             {
  36.                 _onlinePlayers.put(page, temp);
  37. -               if (!player.getAppearance().getInvisible())
  38. -                   _onlineCount++;
  39. -               _onlineCountGm++;
  40.             }
  41.         }
  42.     }
  43. @@ -362,8 +352,7 @@
  44.                             + trOpen
  45.                             + "<td><img src=\"sek.cbui355\" width=600 height=1><br></td>"
  46.                             + trClose
  47. -                           + trOpen + tdOpen, String.valueOf(L2World.getInstance().getAllVisibleObjectsCount()), " Object count</td>" + trClose
  48. -                           + trOpen + tdOpen, String.valueOf(getOnlineCount("gm")), " Player(s) Online</td>" + trClose + "</table>");
  49. +                           + trOpen + tdOpen, String.valueOf(L2World.getInstance().getAllVisibleObjectsCount()), " Object count</td>" + trClose + "</table>");
  50.            
  51.             int cell = 0;
  52.             if (Config.BBS_SHOW_PLAYERLIST)
  53. @@ -410,31 +399,6 @@
  54.                         + "</table>");
  55.             }
  56.            
  57. -           if (getOnlineCount("gm") > Config.NAME_PAGE_SIZE_COMMUNITYBOARD)
  58. -           {
  59. -               htmlCode.append("<table border=0 width=600><tr>");
  60. -               if (page == 1)
  61. -               {
  62. -                   htmlCode.append("<td align=right width=190><button value=\"Prev\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>");
  63. -               }
  64. -               else
  65. -               {
  66. -                   StringUtil.append(htmlCode, "<td align=right width=190><button value=\"Prev\" action=\"bypass _bbsloc;page;", String.valueOf(page - 1), "\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>");
  67. -               }
  68. -              
  69. -               StringUtil.append(htmlCode, "<td FIXWIDTH=10></td>" + "<td align=center valign=top width=200>Displaying ", String.valueOf(((page - 1) * Config.NAME_PAGE_SIZE_COMMUNITYBOARD) + 1), " - ", String.valueOf(((page - 1) * Config.NAME_PAGE_SIZE_COMMUNITYBOARD)
  70. -                       + getOnlinePlayers(page).size()), " player(s)</td>" + "<td FIXWIDTH=10></td>");
  71. -               if (getOnlineCount("gm") <= (page * Config.NAME_PAGE_SIZE_COMMUNITYBOARD))
  72. -               {
  73. -                   htmlCode.append("<td width=190><button value=\"Next\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>");
  74. -               }
  75. -               else
  76. -               {
  77. -                   StringUtil.append(htmlCode, "<td width=190><button value=\"Next\" action=\"bypass _bbsloc;page;", String.valueOf(page + 1), "\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>");
  78. -               }
  79. -               htmlCode.append("</tr></table>");
  80. -           }
  81. -          
  82.             htmlCode.append("</body></html>");
  83.            
  84.             communityPage.put("gm", htmlCode.toString());
  85. @@ -452,8 +416,7 @@
  86.                     + "<table>"
  87.                     + trOpen
  88.                     + "<td><img src=\"sek.cbui355\" width=600 height=1><br></td>"
  89. -                   + trClose
  90. -                   + trOpen + tdOpen, String.valueOf(getOnlineCount("pl")), " Player(s) Online</td>" + trClose + "</table>");
  91. +                   + trClose + "</table>");
  92.            
  93.             if (Config.BBS_SHOW_PLAYERLIST)
  94.             {
  95. @@ -501,34 +464,6 @@
  96.                         + "</table>");
  97.             }
  98.            
  99. -           if (getOnlineCount("pl") > Config.NAME_PAGE_SIZE_COMMUNITYBOARD)
  100. -           {
  101. -               htmlCode.append("<table border=0 width=600><tr>");
  102. -              
  103. -               if (page == 1)
  104. -               {
  105. -                   htmlCode.append("<td align=right width=190><button value=\"Prev\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>");
  106. -               }
  107. -               else
  108. -               {
  109. -                   StringUtil.append(htmlCode, "<td align=right width=190><button value=\"Prev\" action=\"bypass _bbsloc;page;", String.valueOf(page - 1), "\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>");
  110. -               }
  111. -              
  112. -               StringUtil.append(htmlCode, "<td FIXWIDTH=10></td>" + "<td align=center valign=top width=200>Displaying ", String.valueOf(((page - 1) * Config.NAME_PAGE_SIZE_COMMUNITYBOARD) + 1), " - ", String.valueOf(((page - 1) * Config.NAME_PAGE_SIZE_COMMUNITYBOARD)
  113. -                       + getOnlinePlayers(page).size()), " player(s)</td>" + "<td FIXWIDTH=10></td>");
  114. -              
  115. -               if (getOnlineCount("pl") <= (page * Config.NAME_PAGE_SIZE_COMMUNITYBOARD))
  116. -               {
  117. -                   htmlCode.append("<td width=190><button value=\"Next\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>");
  118. -               }
  119. -               else
  120. -               {
  121. -                   StringUtil.append(htmlCode, "<td width=190><button value=\"Next\" action=\"bypass _bbsloc;page;", String.valueOf(page + 1), "\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>");
  122. -               }
  123. -              
  124. -               htmlCode.append("</tr></table>");
  125. -           }
  126. -          
  127.             htmlCode.append("</body></html>");
  128.            
  129.             communityPage.put("pl", htmlCode.toString());
  130. @@ -537,14 +472,6 @@
  131.         }
  132.     }
  133.    
  134. -   private int getOnlineCount(String type)
  135. -   {
  136. -       if (type.equalsIgnoreCase("gm"))
  137. -           return _onlineCountGm;
  138. -      
  139. -       return _onlineCount;
  140. -   }
  141. -  
  142.     private FastList<L2PcInstance> getOnlinePlayers(int page)
  143.     {
  144.         return _onlinePlayers.get(page);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement