Advertisement
Guest User

.menu

a guest
Dec 9th, 2014
1,194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 26.44 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/UserCommandHandler.java
  129. ===================================================================
  130. --- head-src/com/l2jfrozen/gameserver/handler/UserCommandHandler.java   (revision 986)
  131. +++ head-src/com/l2jfrozen/gameserver/handler/UserCommandHandler.java   (working copy)
  132. @@ -33,6 +33,7 @@
  133.  import com.l2jfrozen.gameserver.handler.usercommandhandlers.DisMount;
  134.  import com.l2jfrozen.gameserver.handler.usercommandhandlers.Escape;
  135.  import com.l2jfrozen.gameserver.handler.usercommandhandlers.Loc;
  136. +import com.l2jfrozen.gameserver.handler.usercommandhandlers.Menu;
  137.  import com.l2jfrozen.gameserver.handler.usercommandhandlers.Mount;
  138.  import com.l2jfrozen.gameserver.handler.usercommandhandlers.OfflineShop;
  139.  import com.l2jfrozen.gameserver.handler.usercommandhandlers.OlympiadStat;
  140. @@ -76,6 +77,7 @@
  141.         registerUserCommandHandler(new Loc());
  142.         registerUserCommandHandler(new Mount());
  143.         registerUserCommandHandler(new PartyInfo());
  144. +       registerUserCommandHandler(new Menu());
  145.         if (Config.OFFLINE_TRADE_ENABLE && Config.OFFLINE_COMMAND1)
  146.             registerUserCommandHandler(new OfflineShop());
  147.         _log.config("UserCommandHandler: Loaded " + _datatable.size() + " handlers.");
  148. Index: head-src/com/l2jfrozen/gameserver/handler/usercommandhandlers/Menu.java
  149. ===================================================================
  150. --- head-src/com/l2jfrozen/gameserver/handler/usercommandhandlers/Menu.java (revision 0)
  151. +++ head-src/com/l2jfrozen/gameserver/handler/usercommandhandlers/Menu.java (revision 0)
  152. @@ -0,0 +1,173 @@
  153. +/*
  154. + * This program is free software: you can redistribute it and/or modify it under
  155. + * the terms of the GNU General Public License as published by the Free Software
  156. + * Foundation, either version 3 of the License, or (at your option) any later
  157. + * version.
  158. + *
  159. + * This program is distributed in the hope that it will be useful, but WITHOUT
  160. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  161. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  162. + * details.
  163. + *
  164. + * You should have received a copy of the GNU General Public License along with
  165. + * this program. If not, see <http://www.gnu.org/licenses/>.
  166. + */
  167. +package com.l2jfrozen.gameserver.handler.usercommandhandlers;
  168. +
  169. +import javolution.text.TextBuilder;
  170. +
  171. +import com.l2jfrozen.gameserver.handler.IUserCommandHandler;
  172. +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  173. +import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
  174. +
  175. +public class Menu implements IUserCommandHandler
  176. +{
  177. +       private static final int[] COMMAND_IDS =
  178. +       {
  179. +               114
  180. +       };
  181. +      
  182. +       @Override
  183. +       public boolean useUserCommand(int id, L2PcInstance activeChar)
  184. +       {
  185. +               mainHtml(activeChar);
  186. +               return true;
  187. +       }
  188. +      
  189. +       public static void mainHtml(L2PcInstance activeChar)
  190. +       {
  191. +               NpcHtmlMessage nhm = new NpcHtmlMessage(5);
  192. +               TextBuilder tb = new TextBuilder("");
  193. +              
  194. +               tb.append("<html><head><title>Personal Menu</title></head><body>");
  195. +               tb.append("<center>");
  196. +               tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">");
  197. +               tb.append("<tr>");
  198. +               tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>");
  199. +               tb.append("<td valign=\"top\"><font color=\"FF6600\">Personal Menu</font>");  
  200. +               tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, use this menu for everything related to your gameplay.<br1></td>");
  201. +               tb.append("</tr>");
  202. +               tb.append("</table>");
  203. +               tb.append("</center>");
  204. +               tb.append("<center>");
  205. +               tb.append("<table border=\"1\" width=\"100\" height=\"12\" bgcolor=\"000000\">");
  206. +               tb.append("<tr>");
  207. +               tb.append("<td width=\"52\">ON</td>");
  208. +               tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
  209. +               tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>");
  210. +               tb.append("</tr>");
  211. +               tb.append("<tr>");
  212. +               tb.append("<td width=\"52\">OFF</td>");
  213. +               tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
  214. +               tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>");
  215. +               tb.append("</tr>");
  216. +               tb.append("</table><br>");
  217. +               tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
  218. +               tb.append("<tr>");
  219. +               tb.append("<td align=\"center\" width=\"52\">Buff Protection</td>");
  220. +               if(activeChar.isBuffProtected())
  221. +               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>");
  222. +               if(!activeChar.isBuffProtected())
  223. +               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>");
  224. +               tb.append("</tr>");
  225. +               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>");
  226. +               tb.append("</table>");
  227. +               tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
  228. +               tb.append("<tr>");
  229. +               tb.append("<td align=\"center\" width=\"52\">Personal Message Refusal</td>");
  230. +               if(activeChar.isInRefusalMode())
  231. +               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>");
  232. +               if(!activeChar.isInRefusalMode())
  233. +               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>");
  234. +               tb.append("</tr>");
  235. +               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>");
  236. +               tb.append("</table>");
  237. +               tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
  238. +               tb.append("<tr>");
  239. +               tb.append("<td align=\"center\" width=\"52\">Trade Request Protection</td>");
  240. +               if(activeChar.isInTradeProt())
  241. +               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>");
  242. +               if(!activeChar.isInTradeProt())
  243. +               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>");
  244. +               tb.append("</tr>");
  245. +               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>");
  246. +               tb.append("</table>");
  247. +               tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
  248. +               tb.append("<tr>");
  249. +               tb.append("<td align=\"center\" width=\"52\">Soulshot/Spiritshot Effect</td>");
  250. +               if(activeChar.isSSDisabled())
  251. +               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>");
  252. +               if(!activeChar.isSSDisabled())
  253. +               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>");
  254. +               tb.append("</tr>");
  255. +               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>");
  256. +               tb.append("</table>");
  257. +              
  258. +               tb.append("</center>");
  259. +               tb.append("</body></html>");
  260. +              
  261. +               nhm.setHtml(tb.toString());
  262. +               activeChar.sendPacket(nhm);
  263. +       }
  264. +      
  265. +       public static void mainHtml2(L2PcInstance activeChar)
  266. +       {
  267. +               NpcHtmlMessage nhm = new NpcHtmlMessage(5);
  268. +               TextBuilder tb = new TextBuilder("");
  269. +              
  270. +               tb.append("<html><head><title>Personal Menu</title></head><body>");
  271. +               tb.append("<center>");
  272. +               tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">");
  273. +               tb.append("<tr>");
  274. +               tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>");
  275. +               tb.append("<td valign=\"top\"><font color=\"FF6600\">Personal Menu</font>");  
  276. +               tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, use this menu for everything related to your gameplay.<br1></td>");
  277. +               tb.append("</tr>");
  278. +               tb.append("</table>");
  279. +               tb.append("</center>");
  280. +               tb.append("<center>");
  281. +               tb.append("<table border=\"1\" width=\"100\" height=\"12\" bgcolor=\"000000\">");
  282. +               tb.append("<tr>");
  283. +               tb.append("<td width=\"52\">ON</td>");
  284. +               tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
  285. +               tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>");
  286. +               tb.append("</tr>");
  287. +               tb.append("<tr>");
  288. +               tb.append("<td width=\"52\">OFF</td>");
  289. +               tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
  290. +               tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>");
  291. +               tb.append("</tr>");
  292. +               tb.append("</table><br>");
  293. +               tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
  294. +               tb.append("<tr>");
  295. +               tb.append("<td align=\"center\" width=\"52\">Party Invite Protection</td>");
  296. +               if(activeChar.isPartyInvProt())
  297. +               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>");
  298. +               if(!activeChar.isPartyInvProt())
  299. +               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>");
  300. +               tb.append("</tr>");
  301. +               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>");
  302. +               tb.append("</table>");
  303. +               tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
  304. +               tb.append("<tr>");
  305. +               tb.append("<td align=\"center\" width=\"52\">Exp Gain Protection</td>");
  306. +               if(activeChar.cantGainXP())
  307. +               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>");
  308. +               if(!activeChar.cantGainXP())
  309. +               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>");
  310. +               tb.append("</tr>");
  311. +               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>");
  312. +               tb.append("</table>");
  313. +               tb.append("</center>");
  314. +               tb.append("</body></html>");
  315. +              
  316. +               nhm.setHtml(tb.toString());
  317. +               activeChar.sendPacket(nhm);
  318. +       }
  319. +      
  320. +       @Override
  321. +       public int[] getUserCommandList()
  322. +       {
  323. +               return COMMAND_IDS;
  324. +       }
  325. +}
  326. \ No newline at end of file
  327. Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SpiritShot.java
  328. ===================================================================
  329. --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SpiritShot.java  (revision 986)
  330. +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SpiritShot.java  (working copy)
  331. @@ -128,7 +128,8 @@
  332.  
  333.         // Send message to client
  334.         activeChar.sendPacket(new SystemMessage(SystemMessageId.ENABLED_SPIRITSHOT));
  335. -       Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/);
  336. +       if (!activeChar.isSSDisabled())
  337. +           Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/);
  338.  
  339.         activeChar = null;
  340.     }
  341. Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java
  342. ===================================================================
  343. --- head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java   (revision 986)
  344. +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java   (working copy)
  345. @@ -202,7 +202,13 @@
  346.             player.sendPacket(new SystemMessage(SystemMessageId.TARGET_TOO_FAR));
  347.             return;
  348.         }
  349. -
  350. +      
  351. +       if (partner.isInTradeProt())
  352. +       {
  353. +           player.sendMessage(partner.getName() + " is in Trade Protection Mode");
  354. +           return;
  355. +       }
  356. +      
  357.         // Alt game - Karma punishment
  358.         if(!Config.ALT_GAME_KARMA_PLAYER_CAN_TRADE && (player.getKarma() > 0 || partner.getKarma() > 0))
  359.         {
  360. Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SoulShots.java
  361. ===================================================================
  362. --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SoulShots.java   (revision 986)
  363. +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SoulShots.java   (working copy)
  364. @@ -142,7 +142,8 @@
  365.  
  366.         // Send message to client
  367.         activeChar.sendPacket(new SystemMessage(SystemMessageId.ENABLED_SOULSHOT));
  368. -       Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/);
  369. +       if (!activeChar.isSSDisabled())
  370. +           Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/);
  371.  
  372.         activeChar = null;
  373.     }
  374. Index: head-src/com/l2jfrozen/gameserver/model/actor/stat/PcStat.java
  375. ===================================================================
  376. --- head-src/com/l2jfrozen/gameserver/model/actor/stat/PcStat.java  (revision 986)
  377. +++ head-src/com/l2jfrozen/gameserver/model/actor/stat/PcStat.java  (working copy)
  378. @@ -58,6 +58,9 @@
  379.         //Player is Gm and access level is below or equal to canGainExp and is in party, don't give Xp
  380.         if(!getActiveChar().getAccessLevel().canGainExp() && getActiveChar().isInParty())
  381.             return false;
  382. +      
  383. +       if (activeChar.cantGainXP())
  384. +           return false;
  385.  
  386.         if(!super.addExp(value))
  387.             return false;
  388. @@ -111,6 +114,9 @@
  389.         L2PcInstance activeChar = getActiveChar();
  390.         if(!activeChar.getAccessLevel().canGainExp() && activeChar.isInParty())
  391.             return false;
  392. +      
  393. +       if (activeChar.cantGainXP())
  394. +           return false;
  395.  
  396.         // if this player has a pet that takes from the owner's Exp, give the pet Exp now
  397.  
  398. Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java
  399. ===================================================================
  400. --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java  (revision 986)
  401. +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java  (working copy)
  402. @@ -28,6 +28,7 @@
  403.  import com.l2jfrozen.gameserver.handler.AdminCommandHandler;
  404.  import com.l2jfrozen.gameserver.handler.IAdminCommandHandler;
  405.  import com.l2jfrozen.gameserver.handler.custom.CustomBypassHandler;
  406. +import com.l2jfrozen.gameserver.handler.usercommandhandlers.Menu;
  407.  import com.l2jfrozen.gameserver.model.L2Object;
  408.  import com.l2jfrozen.gameserver.model.L2World;
  409.  import com.l2jfrozen.gameserver.model.actor.instance.L2ClassMasterInstance;
  410. @@ -41,8 +42,10 @@
  411.  import com.l2jfrozen.gameserver.model.entity.event.TvT;
  412.  import com.l2jfrozen.gameserver.model.entity.event.VIP;
  413.  import com.l2jfrozen.gameserver.model.entity.olympiad.Olympiad;
  414. +import com.l2jfrozen.gameserver.network.SystemMessageId;
  415.  import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;
  416.  import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
  417. +import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
  418.  import com.l2jfrozen.gameserver.util.GMAudit;
  419.  
  420.  public final class RequestBypassToServer extends L2GameClientPacket
  421. @@ -308,7 +311,90 @@
  422.                     player.processQuestEvent(p.substring(0, idx), p.substring(idx).trim());
  423.                 }
  424.             }
  425. -
  426. +           else if (_command.startsWith("page1"))
  427. +               Menu.mainHtml(activeChar);
  428. +           else if (_command.startsWith("buffprot"))
  429. +           {
  430. +               if (activeChar.isBuffProtected())
  431. +               {
  432. +                   activeChar.setIsBuffProtected(false);
  433. +                   Menu.mainHtml(activeChar);
  434. +               }
  435. +               else
  436. +               {
  437. +                   activeChar.setIsBuffProtected(true);
  438. +                   Menu.mainHtml(activeChar);
  439. +               }
  440. +           }
  441. +           else if (_command.startsWith("tradeprot"))
  442. +           {
  443. +               if (activeChar.isInTradeProt())
  444. +               {
  445. +                   activeChar.setIsInTradeProt(false);
  446. +                   Menu.mainHtml(activeChar);
  447. +               }
  448. +               else
  449. +               {
  450. +                   activeChar.setIsInTradeProt(true);
  451. +                   Menu.mainHtml(activeChar);
  452. +               }
  453. +           }
  454. +           else if (_command.startsWith("ssprot"))
  455. +           {
  456. +               if (activeChar.isSSDisabled())
  457. +               {
  458. +                   activeChar.setIsSSDisabled(false);
  459. +                   Menu.mainHtml(activeChar);
  460. +               }
  461. +               else
  462. +               {
  463. +                   activeChar.setIsSSDisabled(true);
  464. +                   Menu.mainHtml(activeChar);
  465. +               }
  466. +           }
  467. +           else if (_command.startsWith("pmref"))
  468. +           {
  469. +               if (activeChar.isInRefusalMode())
  470. +               {
  471. +                   activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.MESSAGE_ACCEPTANCE_MODE));
  472. +                   activeChar.getBlockList().setBlockAll(false);
  473. +                   Menu.mainHtml(activeChar);
  474. +               }
  475. +               else
  476. +               {
  477. +                   activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.MESSAGE_REFUSAL_MODE));
  478. +                   activeChar.getBlockList().setBlockAll(true);
  479. +                   Menu.mainHtml(activeChar);
  480. +               }
  481. +           }
  482. +           else if (_command.startsWith("xpnot"))
  483. +           {
  484. +               if (activeChar.cantGainXP())
  485. +               {
  486. +                   activeChar.cantGainXP(false);
  487. +                   Menu.mainHtml2(activeChar);
  488. +               }
  489. +               else
  490. +               {
  491. +                   activeChar.cantGainXP(true);
  492. +                   Menu.mainHtml2(activeChar);
  493. +               }
  494. +           }
  495. +           else if (_command.startsWith("partyin"))
  496. +           {
  497. +               if (activeChar.isPartyInvProt())
  498. +               {
  499. +                   activeChar.setIsPartyInvProt(false);
  500. +                   Menu.mainHtml2(activeChar);
  501. +               }
  502. +               else
  503. +               {
  504. +                   activeChar.setIsPartyInvProt(true);
  505. +                   Menu.mainHtml2(activeChar);
  506. +               }
  507. +           }
  508. +           else if (_command.startsWith("page2"))
  509. +               Menu.mainHtml2(activeChar);
  510.             // Jstar's Custom Bypass Caller!
  511.             else if(_command.startsWith("custom_"))
  512.             {
  513. Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSpiritShot.java
  514. ===================================================================
  515. --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSpiritShot.java (revision 986)
  516. +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSpiritShot.java (working copy)
  517. @@ -169,7 +169,8 @@
  518.  
  519.         // Pet uses the power of spirit.
  520.         activeOwner.sendPacket(new SystemMessage(SystemMessageId.PET_USE_THE_POWER_OF_SPIRIT));
  521. -       Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, isBlessed ? 2009 : 2008, 1, 0, 0), 360000/*600*/);
  522. +       if (!activeOwner.isSSDisabled())
  523. +           Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, isBlessed ? 2009 : 2008, 1, 0, 0), 360000/*600*/);
  524.  
  525.         activeOwner = null;
  526.         activePet = null;
  527. Index: head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Continuous.java
  528. ===================================================================
  529. --- head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Continuous.java (revision 986)
  530. +++ head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Continuous.java (working copy)
  531. @@ -143,7 +143,16 @@
  532.                     || skill.getSkillType() == L2Skill.SkillType.MANAHEAL_PERCENT
  533.                     || skill.getSkillType() == L2Skill.SkillType.COMBATPOINTHEAL
  534.                     || skill.getSkillType() == L2Skill.SkillType.REFLECT))
  535. -                   continue;
  536. +               continue;
  537. +          
  538. +           if (activeChar instanceof L2PcInstance && target != activeChar && target.isBuffProtected() && !skill.isHeroSkill()
  539. +               && (skill.getSkillType() == L2Skill.SkillType.BUFF
  540. +               || skill.getSkillType() == L2Skill.SkillType.HEAL_PERCENT
  541. +               || skill.getSkillType() == L2Skill.SkillType.FORCE_BUFF
  542. +               || skill.getSkillType() == L2Skill.SkillType.MANAHEAL_PERCENT
  543. +               || skill.getSkillType() == L2Skill.SkillType.COMBATPOINTHEAL
  544. +               || skill.getSkillType() == L2Skill.SkillType.REFLECT))
  545. +               continue;
  546.            
  547.             // Player holding a cursed weapon can't be buffed and can't buff
  548.             if(skill.getSkillType() == L2Skill.SkillType.BUFF)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement