PlaySound.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * This program is free software: you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation, either version 3 of the License, or (at your option) any later
  5. * version.
  6. *
  7. * This program is distributed in the hope that it will be useful, but WITHOUT
  8. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. * details.
  11. *
  12. * You should have received a copy of the GNU General Public License along with
  13. * this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. package com.l2jserver.gameserver.network.serverpackets;
  16. /**
  17. * This class ...
  18. *
  19. * @version $Revision: 1.1.6.2 $ $Date: 2005/03/27 15:29:39 $
  20. */
  21. public class PlaySound extends L2GameServerPacket
  22. {
  23. private static final String _S__98_PlaySound = "[S] 9e PlaySound";
  24. private int _unknown1;
  25. private String _soundFile;
  26. private int _unknown3;
  27. private int _unknown4;
  28. private int _unknown5;
  29. private int _unknown6;
  30. private int _unknown7;
  31. private int _unknown8;
  32. public PlaySound(String soundFile)
  33. {
  34. _unknown1 = 0;
  35. _soundFile = soundFile;
  36. _unknown3 = 0;
  37. _unknown4 = 0;
  38. _unknown5 = 0;
  39. _unknown6 = 0;
  40. _unknown7 = 0;
  41. _unknown8 = 0;
  42. }
  43. public PlaySound(int unknown1, String soundFile, int unknown3, int unknown4, int unknown5, int unknown6, int unknown7)
  44. {
  45. _unknown1 = unknown1;
  46. _soundFile = soundFile;
  47. _unknown3 = unknown3;
  48. _unknown4 = unknown4;
  49. _unknown5 = unknown5;
  50. _unknown6 = unknown6;
  51. _unknown7 = unknown7;
  52. _unknown8 = 0;
  53. }
  54. @Override
  55. protected final void writeImpl()
  56. {
  57. writeC(0x9e);
  58. writeD(_unknown1); //unknown 0 for quest and ship;
  59. writeS(_soundFile);
  60. writeD(_unknown3); //unknown 0 for quest; 1 for ship;
  61. writeD(_unknown4); //0 for quest; objectId of ship
  62. writeD(_unknown5); //x
  63. writeD(_unknown6); //y
  64. writeD(_unknown7); //z
  65. writeD(_unknown8);
  66. }
  67. /* (non-Javadoc)
  68. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
  69. */
  70. @Override
  71. public String getType()
  72. {
  73. return _S__98_PlaySound;
  74. }
  75. }