Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: java/com/l2jserver/gameserver/communitybbs/Manager/RegionBBSManager.java
- ===================================================================
- --- java/com/l2jserver/gameserver/communitybbs/Manager/RegionBBSManager.java (revision 5121)
- +++ java/com/l2jserver/gameserver/communitybbs/Manager/RegionBBSManager.java (working copy)
- @@ -257,8 +257,6 @@
- }
- }
- - private int _onlineCount = 0;
- - private int _onlineCountGm = 0;
- private static FastMap<Integer, FastList<L2PcInstance>> _onlinePlayers = new FastMap<Integer, FastList<L2PcInstance>>().shared();
- private static FastMap<Integer, FastMap<String, String>> _communityPages = new FastMap<Integer, FastMap<String, String>>().shared();
- @@ -284,8 +282,6 @@
- });
- _onlinePlayers.clear();
- - _onlineCount = 0;
- - _onlineCountGm = 0;
- for (L2PcInstance player : sortedPlayers)
- {
- @@ -307,9 +303,6 @@
- if (!page.contains(player))
- {
- page.add(player);
- - if (!player.getAppearance().getInvisible())
- - _onlineCount++;
- - _onlineCountGm++;
- }
- added = true;
- break;
- @@ -328,9 +321,6 @@
- if (temp.add(player))
- {
- _onlinePlayers.put(page, temp);
- - if (!player.getAppearance().getInvisible())
- - _onlineCount++;
- - _onlineCountGm++;
- }
- }
- }
- @@ -362,8 +352,7 @@
- + trOpen
- + "<td><img src=\"sek.cbui355\" width=600 height=1><br></td>"
- + trClose
- - + trOpen + tdOpen, String.valueOf(L2World.getInstance().getAllVisibleObjectsCount()), " Object count</td>" + trClose
- - + trOpen + tdOpen, String.valueOf(getOnlineCount("gm")), " Player(s) Online</td>" + trClose + "</table>");
- + + trOpen + tdOpen, String.valueOf(L2World.getInstance().getAllVisibleObjectsCount()), " Object count</td>" + trClose + "</table>");
- int cell = 0;
- if (Config.BBS_SHOW_PLAYERLIST)
- @@ -410,31 +399,6 @@
- + "</table>");
- }
- - if (getOnlineCount("gm") > Config.NAME_PAGE_SIZE_COMMUNITYBOARD)
- - {
- - htmlCode.append("<table border=0 width=600><tr>");
- - if (page == 1)
- - {
- - 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>");
- - }
- - else
- - {
- - 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>");
- - }
- -
- - 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)
- - + getOnlinePlayers(page).size()), " player(s)</td>" + "<td FIXWIDTH=10></td>");
- - if (getOnlineCount("gm") <= (page * Config.NAME_PAGE_SIZE_COMMUNITYBOARD))
- - {
- - htmlCode.append("<td width=190><button value=\"Next\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>");
- - }
- - else
- - {
- - 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>");
- - }
- - htmlCode.append("</tr></table>");
- - }
- -
- htmlCode.append("</body></html>");
- communityPage.put("gm", htmlCode.toString());
- @@ -452,8 +416,7 @@
- + "<table>"
- + trOpen
- + "<td><img src=\"sek.cbui355\" width=600 height=1><br></td>"
- - + trClose
- - + trOpen + tdOpen, String.valueOf(getOnlineCount("pl")), " Player(s) Online</td>" + trClose + "</table>");
- + + trClose + "</table>");
- if (Config.BBS_SHOW_PLAYERLIST)
- {
- @@ -501,34 +464,6 @@
- + "</table>");
- }
- - if (getOnlineCount("pl") > Config.NAME_PAGE_SIZE_COMMUNITYBOARD)
- - {
- - htmlCode.append("<table border=0 width=600><tr>");
- -
- - if (page == 1)
- - {
- - 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>");
- - }
- - else
- - {
- - 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>");
- - }
- -
- - 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)
- - + getOnlinePlayers(page).size()), " player(s)</td>" + "<td FIXWIDTH=10></td>");
- -
- - if (getOnlineCount("pl") <= (page * Config.NAME_PAGE_SIZE_COMMUNITYBOARD))
- - {
- - htmlCode.append("<td width=190><button value=\"Next\" width=50 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>");
- - }
- - else
- - {
- - 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>");
- - }
- -
- - htmlCode.append("</tr></table>");
- - }
- -
- htmlCode.append("</body></html>");
- communityPage.put("pl", htmlCode.toString());
- @@ -537,14 +472,6 @@
- }
- }
- - private int getOnlineCount(String type)
- - {
- - if (type.equalsIgnoreCase("gm"))
- - return _onlineCountGm;
- -
- - return _onlineCount;
- - }
- -
- private FastList<L2PcInstance> getOnlinePlayers(int page)
- {
- return _onlinePlayers.get(page);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement