Advertisement
Guest User

Untitled

a guest
Jul 15th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.37 KB | None | 0 0
  1. Index: L2ClanHallManagerInstance.java
  2. ===================================================================
  3. --- L2ClanHallManagerInstance.java (revision 591)
  4. +++ L2ClanHallManagerInstance.java (working copy)
  5. @@ -127,72 +127,83 @@
  6. }
  7. else if (actualCommand.equalsIgnoreCase("functions"))
  8. {
  9. - if ((player.getClanPrivileges() & L2Clan.CP_CH_OTHER_RIGHTS) != L2Clan.CP_CH_OTHER_RIGHTS)
  10. -
  11. - {
  12. - player.sendPacket(new SystemMessage(SystemMessage.YOU_ARE_NOT_AUTHORIZED));
  13. - return;
  14. - }
  15. -
  16. -
  17. - if (val.equalsIgnoreCase("tele"))
  18. - {
  19. - NpcHtmlMessage html = new NpcHtmlMessage(1);
  20. - if (getClanHall().getFunction(ClanHall.FUNC_TELEPORT) == null)
  21. - html.setFile("data/html/clanHallManager/chamberlain-nac.htm");
  22. - else
  23. - html.setFile("data/html/clanHallManager/tele"+getClanHall().getLocation()+getClanHall().getFunction(ClanHall.FUNC_TELEPORT).getLvl()+".htm");
  24. - sendHtmlMessage(player, html);
  25. - }
  26. - else if (val.equalsIgnoreCase("item_creation"))
  27. - {
  28. - if (getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE) == null)
  29. + if (val.equalsIgnoreCase("tele"))
  30. {
  31. NpcHtmlMessage html = new NpcHtmlMessage(1);
  32. - html.setFile("data/html/clanHallManager/chamberlain-nac.htm");
  33. + if (getClanHall().getFunction(ClanHall.FUNC_TELEPORT) == null)
  34. + {
  35. + html.setFile("data/html/clanHallManager/chamberlain-nac.htm");
  36. + }
  37. + else
  38. + {
  39. + html.setFile("data/html/clanHallManager/tele"+getClanHall().getLocation()+getClanHall().getFunction(ClanHall.FUNC_TELEPORT).getLvl()+".htm");
  40. + }
  41. sendHtmlMessage(player, html);
  42. - return;
  43. }
  44. -
  45. - if (st.countTokens() < 1)
  46. - return;
  47. -
  48. - int valbuy = Integer.parseInt(st.nextToken())+(getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE).getLvl()*100000);
  49. - showBuyWindow(player, valbuy);
  50. - }
  51. - else if (val.equalsIgnoreCase("support"))
  52. - {
  53. - NpcHtmlMessage html = new NpcHtmlMessage(1);
  54. - if (getClanHall().getFunction(ClanHall.FUNC_SUPPORT)== null)
  55. - html.setFile("data/html/clanHallManager/chamberlain-nac.htm");
  56. - else
  57. + else if (val.equalsIgnoreCase("item_creation"))
  58. {
  59. - html.setFile("data/html/clanHallManager/support"+getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLvl()+".htm");
  60. - html.replace("%mp%", String.valueOf(getCurrentMp()));
  61. + if (getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE) == null)
  62. + {
  63. + NpcHtmlMessage html = new NpcHtmlMessage(1);
  64. + html.setFile("data/html/clanHallManager/chamberlain-nac.htm");
  65. + sendHtmlMessage(player, html);
  66. + return;
  67. + }
  68. + if (st.countTokens() < 1)
  69. + {
  70. + return;
  71. + }
  72. + int valbuy = Integer.parseInt(st.nextToken())+(getClanHall().getFunction(ClanHall.FUNC_ITEM_CREATE).getLvl()*100000);
  73. + showBuyWindow(player, valbuy);
  74. }
  75. - sendHtmlMessage(player, html);
  76. - }
  77. - else if (val.equalsIgnoreCase("back"))
  78. - showMessageWindow(player);
  79. - else
  80. - {
  81. - NpcHtmlMessage html = new NpcHtmlMessage(1);
  82. - html.setFile("data/html/clanHallManager/functions.htm");
  83. - if (getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP) != null)
  84. - html.replace("%xp_regen%", String.valueOf(getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP).getLvl()) + "%");
  85. + else if (val.equalsIgnoreCase("support"))
  86. + {
  87. + NpcHtmlMessage html = new NpcHtmlMessage(1);
  88. + if (getClanHall().getFunction(ClanHall.FUNC_SUPPORT)== null)
  89. + {
  90. + html.setFile("data/html/clanHallManager/chamberlain-nac.htm");
  91. + }
  92. + else
  93. + {
  94. + html.setFile("data/html/clanHallManager/support"+getClanHall().getFunction(ClanHall.FUNC_SUPPORT).getLvl()+".htm");
  95. + html.replace("%mp%", String.valueOf(getCurrentMp()));
  96. + }
  97. + sendHtmlMessage(player, html);
  98. + }
  99. + else if (val.equalsIgnoreCase("back"))
  100. + {
  101. + showMessageWindow(player);
  102. + }
  103. else
  104. - html.replace("%xp_regen%", "0");
  105. - if (getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP) != null)
  106. - html.replace("%hp_regen%", String.valueOf(getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP).getLvl()) + "%");
  107. - else
  108. - html.replace("%hp_regen%", "0");
  109. - if (getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP) != null)
  110. - html.replace("%mp_regen%", String.valueOf(getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP).getLvl()) + "%");
  111. - else
  112. - html.replace("%mp_regen", "0");
  113. - sendHtmlMessage(player, html);
  114. - }
  115. - return;
  116. + {
  117. + NpcHtmlMessage html = new NpcHtmlMessage(1);
  118. + html.setFile("data/html/clanHallManager/functions.htm");
  119. + if (getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP) != null)
  120. + {
  121. + html.replace("%xp_regen%", String.valueOf(getClanHall().getFunction(ClanHall.FUNC_RESTORE_EXP).getLvl()) + "%");
  122. + }
  123. + else
  124. + {
  125. + html.replace("%xp_regen%", "0");
  126. + }
  127. + if (getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP) != null)
  128. + {
  129. + html.replace("%hp_regen%", String.valueOf(getClanHall().getFunction(ClanHall.FUNC_RESTORE_HP).getLvl()) + "%");
  130. + }
  131. + else
  132. + {
  133. + html.replace("%hp_regen%", "0");
  134. + }
  135. + if (getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP) != null)
  136. + {
  137. + html.replace("%mp_regen%", String.valueOf(getClanHall().getFunction(ClanHall.FUNC_RESTORE_MP).getLvl()) + "%");
  138. + }
  139. + else
  140. + {
  141. + html.replace("%mp_regen", "0");
  142. + }
  143. + sendHtmlMessage(player, html);
  144. + }
  145. }
  146. else if (actualCommand.equalsIgnoreCase("manage"))
  147. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement