PlaySound.java 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 net.sf.l2j.gameserver.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. public PlaySound(String soundFile)
  32. {
  33. _unknown1 = 0;
  34. _soundFile = soundFile;
  35. _unknown3 = 0;
  36. _unknown4 = 0;
  37. _unknown5 = 0;
  38. _unknown6 = 0;
  39. _unknown7 = 0;
  40. }
  41. public PlaySound(int unknown1, String soundFile, int unknown3, int unknown4, int unknown5, int unknown6, int unknown7)
  42. {
  43. _unknown1 = unknown1;
  44. _soundFile = soundFile;
  45. _unknown3 = unknown3;
  46. _unknown4 = unknown4;
  47. _unknown5 = unknown5;
  48. _unknown6 = unknown6;
  49. _unknown7 = unknown7;
  50. }
  51. @Override
  52. protected final void writeImpl()
  53. {
  54. writeC(0x9e);
  55. writeD(_unknown1); //unknown 0 for quest and ship;
  56. writeS(_soundFile);
  57. writeD(_unknown3); //unknown 0 for quest; 1 for ship;
  58. writeD(_unknown4); //0 for quest; objectId of ship
  59. writeD(_unknown5); //x
  60. writeD(_unknown6); //y
  61. writeD(_unknown7); //z
  62. }
  63. /* (non-Javadoc)
  64. * @see net.sf.l2j.gameserver.serverpackets.ServerBasePacket#getType()
  65. */
  66. @Override
  67. public String getType()
  68. {
  69. return _S__98_PlaySound;
  70. }
  71. }