Advertisement
Axelut

.menu frozen

May 11th, 2023
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.03 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2jFrozen_GameServer
  3. Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSoulShot.java
  4. ===================================================================
  5. --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSoulShot.java (revision 986)
  6. +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSoulShot.java (working copy)
  7. @@ -156,7 +156,8 @@
  8.  
  9. // Pet uses the power of spirit.
  10. activeOwner.sendPacket(new SystemMessage(SystemMessageId.PET_USE_THE_POWER_OF_SPIRIT));
  11. - Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, 2033, 1, 0, 0), 360000/*600*/);
  12. + if (!activeOwner.isSSDisabled())
  13. + Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, 2033, 1, 0, 0), 360000/*600*/);
  14.  
  15. activeOwner = null;
  16. activePet = null;
  17. Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/FishShots.java
  18. ===================================================================
  19. --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/FishShots.java (revision 986)
  20. +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/FishShots.java (working copy)
  21. @@ -92,7 +92,8 @@
  22. //activeChar.sendPacket(new SystemMessage(SystemMessage.ENABLED_SPIRITSHOT));
  23.  
  24. MagicSkillUser MSU = new MagicSkillUser(activeChar, SKILL_IDS[grade], 1, 0, 0);
  25. - Broadcast.toSelfAndKnownPlayers(activeChar, MSU);
  26. + if (!activeChar.isSSDisabled())
  27. + Broadcast.toSelfAndKnownPlayers(activeChar, MSU);
  28. MSU = null;
  29. activeChar.setTarget(oldTarget);
  30.  
  31. Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
  32. ===================================================================
  33. --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 986)
  34. +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy)
  35. @@ -20222,4 +20222,60 @@
  36. }
  37. sendSkillList();
  38. }
  39. +
  40. + private boolean _cantGainXP = false;
  41. + private boolean _isPartyInvProt = false;
  42. + private boolean _isInTradeProt = false;
  43. + private boolean _isSSDisabled = false;
  44. + private boolean _isInRefusal = false;
  45. +
  46. + public boolean isInTradeProt()
  47. + {
  48. + return _isInTradeProt;
  49. + }
  50. +
  51. + public void setIsInTradeProt(boolean value)
  52. + {
  53. + _isInTradeProt = value;
  54. + }
  55. +
  56. + public boolean isSSDisabled()
  57. + {
  58. + return _isSSDisabled;
  59. + }
  60. +
  61. + public void setIsSSDisabled(boolean value)
  62. + {
  63. + _isSSDisabled = value;
  64. + }
  65. +
  66. + public boolean isPartyInvProt()
  67. + {
  68. + return _isPartyInvProt;
  69. + }
  70. +
  71. + public void setIsPartyInvProt(boolean value)
  72. + {
  73. + _isPartyInvProt = value;
  74. + }
  75. +
  76. + public void cantGainXP(boolean b)
  77. + {
  78. + _cantGainXP = b;
  79. + }
  80. +
  81. + public boolean cantGainXP()
  82. + {
  83. + return _cantGainXP;
  84. + }
  85. +
  86. + public void setInRefusalMode(boolean b)
  87. + {
  88. + _isInRefusal = b;
  89. + }
  90. +
  91. + public boolean isInRefusalMode()
  92. + {
  93. + return _isInRefusal;
  94. + }
  95. }
  96. \ No newline at end of file
  97. Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinParty.java
  98. ===================================================================
  99. --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinParty.java (revision 986)
  100. +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinParty.java (working copy)
  101. @@ -78,6 +78,12 @@
  102. return;
  103. }
  104.  
  105. + if (target.isPartyInvProt())
  106. + {
  107. + requestor.sendMessage("You can't invite that player because he is in party protection.");
  108. + return;
  109. + }
  110. +
  111. if (target.isInParty())
  112. {
  113. SystemMessage msg = new SystemMessage(SystemMessageId.S1_IS_ALREADY_IN_PARTY);
  114. Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BlessedSpiritShot.java
  115. ===================================================================
  116. --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BlessedSpiritShot.java (revision 986)
  117. +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BlessedSpiritShot.java (working copy)
  118. @@ -137,7 +137,8 @@
  119.  
  120. // Send message to client
  121. activeChar.sendPacket(new SystemMessage(SystemMessageId.ENABLED_SPIRITSHOT));
  122. - Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/);
  123. + if (!activeChar.isSSDisabled())
  124. + Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/);
  125.  
  126. activeChar = null;
  127. weaponInst = null;
  128. Index: head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java
  129. ===================================================================
  130. --- head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (revision 986)
  131. +++ head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (working copy)
  132. import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Wedding;
  133. +import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Menu;
  134.  
  135.  
  136. +registerVoicedCommandHandler( new Menu());
  137.  
  138. if (Config.BANKING_SYSTEM_ENABLED)
  139. Index: head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Menu.java
  140. ===================================================================
  141. --- head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Menu.java (revision 0)
  142. +++ head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Menu.java (revision 0)
  143. @@ -0,0 +1,173 @@
  144. /*
  145. * This program is free software: you can redistribute it and/or modify it under
  146. * the terms of the GNU General Public License as published by the Free Software
  147. * Foundation, either version 3 of the License, or (at your option) any later
  148. * version.
  149. *
  150. * This program is distributed in the hope that it will be useful, but WITHOUT
  151. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  152. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  153. * details.
  154. *
  155. * You should have received a copy of the GNU General Public License along with
  156. * this program. If not, see <http://www.gnu.org/licenses/>.
  157. */
  158. package com.l2jfrozen.gameserver.handler.voicedcommandhandlers;
  159.  
  160. import javolution.text.TextBuilder;
  161.  
  162. import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
  163. import com.l2jfrozen.gameserver.model.L2World;
  164. import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  165. import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
  166.  
  167. public class Menu implements IVoicedCommandHandler
  168. {
  169. private final String[] _voicedCommands =
  170. {
  171. "menu"
  172. };
  173.  
  174. @Override
  175. public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
  176. {
  177. mainHtml(activeChar);
  178. return true;
  179. }
  180.  
  181. public static void mainHtml(L2PcInstance activeChar)
  182. {
  183. NpcHtmlMessage nhm = new NpcHtmlMessage(5);
  184. TextBuilder tb = new TextBuilder("");
  185.  
  186. tb.append("<html><head><title>Personal Menu</title></head><body>");
  187. tb.append("<center>");
  188. tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">");
  189. tb.append("<tr>");
  190. tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>");
  191. tb.append("<td valign=\"top\">Players online <font color=\"FF6600\"> "+L2World.getInstance().getAllPlayers().size()+"</font>");
  192. tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, use this menu for everything related to your gameplay.<br1></td>");
  193. tb.append("</tr>");
  194. tb.append("</table>");
  195. tb.append("</center>");
  196. tb.append("<center>");
  197. tb.append("<table border=\"1\" width=\"100\" height=\"12\" bgcolor=\"000000\">");
  198. tb.append("<tr>");
  199. tb.append("<td width=\"52\">ON</td>");
  200. tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
  201. tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>");
  202. tb.append("</tr>");
  203. tb.append("<tr>");
  204. tb.append("<td width=\"52\">OFF</td>");
  205. tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
  206. tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>");
  207. tb.append("</tr>");
  208. tb.append("</table><br>");
  209. tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
  210. tb.append("<tr>");
  211. tb.append("<td align=\"center\" width=\"52\">Buff Protection</td>");
  212. if(activeChar.isBuffProtected())
  213. tb.append("<td width=\"16\"><button action=\"bypass -h buffprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
  214. if(!activeChar.isBuffProtected())
  215. tb.append("<td width=\"16\"><button action=\"bypass -h buffprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
  216. tb.append("</tr>");
  217. tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY buff from another character.</font></td></tr>");
  218. tb.append("</table>");
  219. tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
  220. tb.append("<tr>");
  221. tb.append("<td align=\"center\" width=\"52\">Personal Message Refusal</td>");
  222. if(activeChar.getMessageRefusal())
  223. tb.append("<td width=\"16\"><button action=\"bypass -h pmref\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
  224. if(!activeChar.getMessageRefusal())
  225. tb.append("<td width=\"16\"><button action=\"bypass -h pmref\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
  226. tb.append("</tr>");
  227. tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY pm from another character.</font></td></tr>");
  228. tb.append("</table>");
  229. tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
  230. tb.append("<tr>");
  231. tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
  232. tb.append("<tr>");
  233. tb.append("<td align=\"center\" width=\"52\">Trade Request Protection</td>");
  234. if(activeChar.isInTradeProt())
  235. tb.append("<td width=\"16\"><button action=\"bypass -h tradeprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
  236. if(!activeChar.isInTradeProt())
  237. tb.append("<td width=\"16\"><button action=\"bypass -h tradeprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
  238. tb.append("</tr>");
  239. tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY trade request from another character.</font></td></tr>");
  240. tb.append("</table>");
  241. tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
  242. tb.append("<tr>");
  243. tb.append("<td align=\"center\" width=\"52\">Soulshot/Spiritshot Effect</td>");
  244. if(activeChar.isSSDisabled())
  245. tb.append("<td width=\"16\"><button action=\"bypass -h ssprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
  246. if(!activeChar.isSSDisabled())
  247. tb.append("<td width=\"16\"><button action=\"bypass -h ssprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
  248. tb.append("</tr>");
  249. tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you will enchance your pc's performance by disabling your ss effects.</font></td><td align=\"center\" valign=\"middle\"><button action=\"bypass -h page2\" width=16 height=16 back=\"L2UI_CH3.next1\" fore=\"L2UI_CH3.next1\"></td></tr>");
  250. tb.append("</table>");
  251.  
  252. tb.append("</center>");
  253. tb.append("</body></html>");
  254.  
  255. nhm.setHtml(tb.toString());
  256. activeChar.sendPacket(nhm);
  257. }
  258.  
  259. public static void mainHtml2(L2PcInstance activeChar)
  260. {
  261. NpcHtmlMessage nhm = new NpcHtmlMessage(5);
  262. TextBuilder tb = new TextBuilder("");
  263.  
  264. tb.append("<html><head><title>Personal Menu</title></head><body>");
  265. tb.append("<center>");
  266. tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">");
  267. tb.append("<tr>");
  268. tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>");
  269. tb.append("<td valign=\"top\">Players online <font color=\"FF6600\"> "+L2World.getInstance().getAllPlayers().size()+"</font>");
  270. tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, use this menu for everything related to your gameplay.<br1></td>");
  271. tb.append("</tr>");
  272. tb.append("</table>");
  273. tb.append("</center>");
  274. tb.append("<center>");
  275. tb.append("<table border=\"1\" width=\"100\" height=\"12\" bgcolor=\"000000\">");
  276. tb.append("<tr>");
  277. tb.append("<td width=\"52\">ON</td>");
  278. tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
  279. tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>");
  280. tb.append("</tr>");
  281. tb.append("<tr>");
  282. tb.append("<td width=\"52\">OFF</td>");
  283. tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
  284. tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>");
  285. tb.append("</tr>");
  286. tb.append("</table><br>");
  287. tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
  288. tb.append("<tr>");
  289. tb.append("<td align=\"center\" width=\"52\">Party Invite Protection</td>");
  290. if(activeChar.isPartyInvProt())
  291. tb.append("<td width=\"16\"><button action=\"bypass -h partyin\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
  292. if(!activeChar.isPartyInvProt())
  293. tb.append("<td width=\"16\"><button action=\"bypass -h partyin\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
  294. tb.append("</tr>");
  295. tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY party invite from another character.</font></td></tr>");
  296. tb.append("</table>");
  297. tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
  298. tb.append("<tr>");
  299. tb.append("<td align=\"center\" width=\"52\">Exp Gain Protection</td>");
  300. if(activeChar.cantGainXP())
  301. tb.append("<td width=\"16\"><button action=\"bypass -h xpnot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
  302. if(!activeChar.cantGainXP())
  303. tb.append("<td width=\"16\"><button action=\"bypass -h xpnot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
  304. tb.append("</tr>");
  305. tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve expirience from killing monsters.</font></td><td align=\"center\" valign=\"middle\"><button action=\"bypass -h page1\" width=16 height=16 back=\"L2UI_CH3.back1\" fore=\"L2UI_CH3.next1\"></td></tr>");
  306. tb.append("</table>");
  307. tb.append("</center>");
  308. tb.append("</body></html>");
  309.  
  310. nhm.setHtml(tb.toString());
  311. activeChar.sendPacket(nhm);
  312. }
  313.  
  314. @Override
  315. public String[] getVoicedCommandList()
  316. {
  317. return _voicedCommands;
  318. }
  319. }
  320. \ No newline at end of file
  321. Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SpiritShot.java
  322. ===================================================================
  323. --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SpiritShot.java (revision 986)
  324. +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SpiritShot.java (working copy)
  325. @@ -128,7 +128,8 @@
  326.  
  327. // Send message to client
  328. activeChar.sendPacket(new SystemMessage(SystemMessageId.ENABLED_SPIRITSHOT));
  329. - Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/);
  330. + if (!activeChar.isSSDisabled())
  331. + Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/);
  332.  
  333. activeChar = null;
  334. }
  335. Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java
  336. ===================================================================
  337. --- head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java (revision 986)
  338. +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java (working copy)
  339. @@ -202,7 +202,13 @@
  340. player.sendPacket(new SystemMessage(SystemMessageId.TARGET_TOO_FAR));
  341. return;
  342. }
  343. -
  344. +
  345. + if (partner.isInTradeProt())
  346. + {
  347. + player.sendMessage(partner.getName() + " is in Trade Protection Mode");
  348. + return;
  349. + }
  350. +
  351. // Alt game - Karma punishment
  352. if(!Config.ALT_GAME_KARMA_PLAYER_CAN_TRADE && (player.getKarma() > 0 || partner.getKarma() > 0))
  353. {
  354. Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SoulShots.java
  355. ===================================================================
  356. --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SoulShots.java (revision 986)
  357. +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SoulShots.java (working copy)
  358. @@ -142,7 +142,8 @@
  359.  
  360. // Send message to client
  361. activeChar.sendPacket(new SystemMessage(SystemMessageId.ENABLED_SOULSHOT));
  362. - Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/);
  363. + if (!activeChar.isSSDisabled())
  364. + Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/);
  365.  
  366. activeChar = null;
  367. }
  368. Index: head-src/com/l2jfrozen/gameserver/model/actor/stat/PcStat.java
  369. ===================================================================
  370. --- head-src/com/l2jfrozen/gameserver/model/actor/stat/PcStat.java (revision 986)
  371. +++ head-src/com/l2jfrozen/gameserver/model/actor/stat/PcStat.java (working copy)
  372. @@ -58,6 +58,9 @@
  373. //Player is Gm and access level is below or equal to canGainExp and is in party, don't give Xp
  374. if(!getActiveChar().getAccessLevel().canGainExp() && getActiveChar().isInParty())
  375. return false;
  376. +
  377. + if (activeChar.cantGainXP())
  378. + return false;
  379.  
  380. if(!super.addExp(value))
  381. return false;
  382. @@ -111,6 +114,9 @@
  383. L2PcInstance activeChar = getActiveChar();
  384. if(!activeChar.getAccessLevel().canGainExp() && activeChar.isInParty())
  385. return false;
  386. +
  387. + if (activeChar.cantGainXP())
  388. + return false;
  389.  
  390. // if this player has a pet that takes from the owner's Exp, give the pet Exp now
  391.  
  392. Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java
  393. ===================================================================
  394. --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java (revision 986)
  395. +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java (working copy)
  396. @@ -28,6 +28,7 @@
  397. import com.l2jfrozen.gameserver.handler.AdminCommandHandler;
  398. import com.l2jfrozen.gameserver.handler.IAdminCommandHandler;
  399. import com.l2jfrozen.gameserver.handler.custom.CustomBypassHandler;
  400. +import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Menu;
  401. import com.l2jfrozen.gameserver.model.L2Object;
  402. import com.l2jfrozen.gameserver.model.L2World;
  403. import com.l2jfrozen.gameserver.model.actor.instance.L2ClassMasterInstance;
  404. @@ -41,8 +42,10 @@
  405. import com.l2jfrozen.gameserver.model.entity.event.TvT;
  406. import com.l2jfrozen.gameserver.model.entity.event.VIP;
  407. import com.l2jfrozen.gameserver.model.entity.olympiad.Olympiad;
  408. +import com.l2jfrozen.gameserver.network.SystemMessageId;
  409. import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;
  410. import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
  411. +import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
  412. import com.l2jfrozen.gameserver.util.GMAudit;
  413.  
  414. public final class RequestBypassToServer extends L2GameClientPacket
  415. @@ -308,7 +311,90 @@
  416. player.processQuestEvent(p.substring(0, idx), p.substring(idx).trim());
  417. }
  418. }
  419. -
  420. + else if (_command.startsWith("page1"))
  421. + Menu.mainHtml(activeChar);
  422. + else if (_command.startsWith("buffprot"))
  423. + {
  424. + if (activeChar.isBuffProtected())
  425. + {
  426. + +activeChar.setIsBuffProtected(false);
  427. + +activeChar.sendMessage("Buff protection is disabled.");
  428. + +Menu.mainHtml(activeChar);
  429. + }
  430. + else
  431. + {
  432. + activeChar.setIsBuffProtected(true);
  433. + activeChar.sendMessage("Buff protection is enabled.");
  434. + Menu.mainHtml(activeChar);
  435. + }
  436. + }
  437. + else if (_command.startsWith("tradeprot"))
  438. + {
  439. + if (activeChar.isInTradeProt())
  440. + {
  441. + +activeChar.setIsInTradeProt(false);
  442. + +activeChar.sendMessage("Trade acceptance mode is enabled.");
  443. + +Menu.mainHtml(activeChar);
  444. + }
  445. + else
  446. + {
  447. + activeChar.setIsInTradeProt(true);
  448. + activeChar.sendMessage("Trade refusal mode is enabled.");
  449. + Menu.mainHtml(activeChar);
  450. + }
  451. + }
  452. + else if (_command.startsWith("ssprot"))
  453. + {
  454. + if (activeChar.isSSDisabled())
  455. + {
  456. + activeChar.setIsSSDisabled(false);
  457. + activeChar.sendMessage("Soulshots effects are enabled.");
  458. + Menu.mainHtml(activeChar);
  459. + }
  460. + else
  461. + {
  462. + activeChar.setIsSSDisabled(true);
  463. + activeChar.sendMessage("Soulshots effects are disabled.");
  464. + Menu.mainHtml(activeChar);
  465. + }
  466. + }
  467. + else if (_command.startsWith("xpnot"))
  468. + {
  469. + if (activeChar.cantGainXP())
  470. + {
  471. + activeChar.cantGainXP(false);
  472. + activeChar.sendMessage("Enable Xp");
  473. + Menu.mainHtml2(activeChar);
  474. + }
  475. + else
  476. + {
  477. + activeChar.cantGainXP(true);
  478. + activeChar.sendMessage("Disable Xp");
  479. + Menu.mainHtml2(activeChar);
  480. + }
  481. + }
  482. + else if (_command.startsWith("pmref"))
  483. + {
  484. + if (activeChar.getMessageRefusal())
  485. + {
  486. + activeChar.setMessageRefusal(false);
  487. + activeChar.sendPacket(new SystemMessage(SystemMessageId.MESSAGE_ACCEPTANCE_MODE));
  488. + Menu.mainHtml(activeChar);
  489. + }
  490. + else
  491. + {
  492. + activeChar.setMessageRefusal(true);
  493. + activeChar.sendPacket(new SystemMessage(SystemMessageId.MESSAGE_REFUSAL_MODE));
  494. + Menu.mainHtml(activeChar);
  495. + }
  496. + }
  497. + else if (_command.startsWith("partyin"))
  498. + {
  499. + if (activeChar.isPartyInvProt())
  500. + {
  501. + activeChar.setIsPartyInvProt(false);
  502. + activeChar.sendMessage("Party acceptance mode is enabled.");
  503. + Menu.mainHtml2(activeChar);
  504. + }
  505. + else
  506. + {
  507. + activeChar.setIsPartyInvProt(true);
  508. + activeChar.sendMessage("Party refusal mode is enabled.");
  509. + Menu.mainHtml2(activeChar);
  510. + }
  511. + }
  512. + else if (_command.startsWith("page2"))
  513. + Menu.mainHtml2(activeChar);
  514. // Jstar's Custom Bypass Caller!
  515. else if(_command.startsWith("custom_"))
  516. {
  517. Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSpiritShot.java
  518. ===================================================================
  519. --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSpiritShot.java (revision 986)
  520. +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSpiritShot.java (working copy)
  521. @@ -169,7 +169,8 @@
  522.  
  523. // Pet uses the power of spirit.
  524. activeOwner.sendPacket(new SystemMessage(SystemMessageId.PET_USE_THE_POWER_OF_SPIRIT));
  525. - Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, isBlessed ? 2009 : 2008, 1, 0, 0), 360000/*600*/);
  526. + if (!activeOwner.isSSDisabled())
  527. + Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, isBlessed ? 2009 : 2008, 1, 0, 0), 360000/*600*/);
  528.  
  529. activeOwner = null;
  530. activePet = null;
  531. Index: head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Continuous.java
  532. ===================================================================
  533. --- head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Continuous.java (revision 986)
  534. +++ head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Continuous.java (working copy)
  535. @@ -143,7 +143,16 @@
  536. || skill.getSkillType() == L2Skill.SkillType.MANAHEAL_PERCENT
  537. || skill.getSkillType() == L2Skill.SkillType.COMBATPOINTHEAL
  538. || skill.getSkillType() == L2Skill.SkillType.REFLECT))
  539. - continue;
  540. + continue;
  541. +
  542. + if (activeChar instanceof L2PcInstance && target != activeChar && target.isBuffProtected() && !skill.isHeroSkill()
  543. + && (skill.getSkillType() == L2Skill.SkillType.BUFF
  544. + || skill.getSkillType() == L2Skill.SkillType.HEAL_PERCENT
  545. + || skill.getSkillType() == L2Skill.SkillType.FORCE_BUFF
  546. + || skill.getSkillType() == L2Skill.SkillType.MANAHEAL_PERCENT
  547. + || skill.getSkillType() == L2Skill.SkillType.COMBATPOINTHEAL
  548. + || skill.getSkillType() == L2Skill.SkillType.REFLECT))
  549. + continue;
  550.  
  551. // Player holding a cursed weapon can't be buffed and can't buff
  552. if(skill.getSkillType() == L2Skill.SkillType.BUFF)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement