PlaySound.java 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright (C) 2004-2015 L2J Server
  3. *
  4. * This file is part of L2J Server.
  5. *
  6. * L2J Server is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * L2J Server is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package com.l2jserver.gameserver.network.serverpackets;
  20. public class PlaySound extends L2GameServerPacket
  21. {
  22. private final int _unknown1;
  23. private final String _soundFile;
  24. private final int _unknown3;
  25. private final int _unknown4;
  26. private final int _unknown5;
  27. private final int _unknown6;
  28. private final int _unknown7;
  29. private final int _unknown8;
  30. public PlaySound(String soundFile)
  31. {
  32. _unknown1 = 0;
  33. _soundFile = soundFile;
  34. _unknown3 = 0;
  35. _unknown4 = 0;
  36. _unknown5 = 0;
  37. _unknown6 = 0;
  38. _unknown7 = 0;
  39. _unknown8 = 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. _unknown8 = 0;
  51. }
  52. public String getSoundName()
  53. {
  54. return _soundFile;
  55. }
  56. @Override
  57. protected final void writeImpl()
  58. {
  59. writeC(0x9e);
  60. writeD(_unknown1); // unknown 0 for quest and ship;
  61. writeS(_soundFile);
  62. writeD(_unknown3); // unknown 0 for quest; 1 for ship;
  63. writeD(_unknown4); // 0 for quest; objectId of ship
  64. writeD(_unknown5); // x
  65. writeD(_unknown6); // y
  66. writeD(_unknown7); // z
  67. writeD(_unknown8);
  68. }
  69. }