Advertisement
abumini

.Repair- RequestBypassToServer

Mar 8th, 2018
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.58 KB | None | 0 0
  1. b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
  2. index 4133ba8..4c5ba69 100644
  3. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
  4. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
  5. @@ -12,8 +12,10 @@
  6.  import net.sf.l2j.gameserver.handler.AdminCommandHandler;
  7.  import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
  8. +import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
  9. +import net.sf.l2j.gameserver.handler.VoicedCommandHandler;
  10.  import net.sf.l2j.gameserver.model.World;
  11.  import net.sf.l2j.gameserver.model.WorldObject;
  12.  import net.sf.l2j.gameserver.model.actor.Npc;
  13.  import net.sf.l2j.gameserver.model.actor.instance.OlympiadManagerNpc;
  14. @@ -140,8 +142,31 @@
  15.                 activeChar.sendPacket(html);
  16.                 activeChar.sendPacket(ActionFailed.STATIC_PACKET);
  17.             }
  18.            
  19. +           if (_command.startsWith("voice_"))
  20. +           {
  21. +               String params = "";
  22. +               String command;
  23. +               if (_command.indexOf(" ") != -1)
  24. +               {
  25. +                   command = _command.substring(6, _command.indexOf(" "));
  26. +                   params = _command.substring(_command.indexOf(" ") + 1);
  27. +               }
  28. +               else
  29. +               {
  30. +                   command = _command.substring(6);
  31. +               }
  32. +              
  33. +               IVoicedCommandHandler vc = VoicedCommandHandler.getInstance().getHandler(command);
  34. +              
  35. +               if (vc == null)
  36. +               {
  37. +                   return;
  38. +               }
  39. +               vc.useVoicedCommand(command, activeChar, params);
  40. +           }
  41. +          
  42.             else if (_command.startsWith("player_help "))
  43.             {
  44.                 playerHelp(activeChar, _command.substring(12));
  45.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement