VeParticleGeneratorNode.cs 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. #region License information
  2. // ----------------------------------------------------------------------------
  3. //
  4. // libeq2 - A library for analyzing the Everquest II File Format
  5. // Blaz (blaz@blazlabs.com)
  6. //
  7. // This program is free software; you can redistribute it and/or
  8. // modify it under the terms of the GNU General Public License
  9. // as published by the Free Software Foundation; either version 2
  10. // of the License, or (at your option) any later version.
  11. //
  12. // This program is distributed in the hope that it will be useful,
  13. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. // GNU General Public License for more details.
  16. //
  17. // You should have received a copy of the GNU General Public License
  18. // along with this program; if not, write to the Free Software
  19. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  20. //
  21. // ( The full text of the license can be found in the License.txt file )
  22. //
  23. // ----------------------------------------------------------------------------
  24. #endregion
  25. #region Using directives
  26. using System;
  27. using System.Collections.Generic;
  28. using Everquest2.Visualization.ParticleGenerator;
  29. #endregion
  30. namespace Everquest2.Visualization
  31. {
  32. public class VeParticleGeneratorNode : VeGeometryNode
  33. {
  34. public VeParticleGeneratorNode()
  35. {
  36. }
  37. /// <summary>
  38. /// Special constructor used when deserializing the instance of the class.
  39. /// </summary>
  40. /// <param name="reader">Reader used to read the instance data.</param>
  41. protected VeParticleGeneratorNode(Util.Eq2Reader reader, Util.StreamingContext context) : base(reader, context)
  42. {
  43. byte classVersion = context.ClassVersions[typeof(VeParticleGeneratorNode)];
  44. byte nodeClassVersion = classVersion;
  45. //Begin VeParticleGeneratorNode Deserialization
  46. if(classVersion >= 24)
  47. {
  48. classVersion = (byte)reader.ReadUInt16();
  49. if (classVersion != 0)
  50. {
  51. uint ver24BufferSize = reader.ReadUInt32();
  52. }
  53. }
  54. //Begin VeParticleGenerator Deserialization
  55. uint opCount1 = reader.ReadUInt32();
  56. unkOp0 = new VeParticleGeneratorOp[opCount1];
  57. for (uint i = 0; i < opCount1; ++i)
  58. {
  59. unkOp0[i] = reader.ReadParticleGeneratorOp(classVersion);
  60. }
  61. uint opCount2 = reader.ReadUInt32();
  62. unkOp1 = new VeParticleGeneratorOp[opCount2];
  63. for (uint i = 0; i < opCount2; ++i)
  64. {
  65. unkOp1[i] = reader.ReadParticleGeneratorOp(classVersion);
  66. }
  67. //reader.ReadBytes(15);
  68. if (classVersion >= 11)
  69. {
  70. uint opCount3 = reader.ReadUInt32();
  71. unkOp2 = new VeParticleGeneratorOp[opCount3];
  72. for (uint i = 0; i < opCount3; ++i)
  73. {
  74. unkOp2[i] = reader.ReadParticleGeneratorOp(classVersion);
  75. }
  76. }
  77. if (classVersion >= 2) unk0 = reader.ReadByte();
  78. if (classVersion >= 12) unk1 = reader.ReadByte();
  79. if (classVersion >= 3) unk2 = reader.ReadByte();
  80. if (classVersion >= 4) unk3 = reader.ReadByte();
  81. if (classVersion >= 5) unk4 = reader.ReadByte();
  82. if (classVersion >= 6)
  83. {
  84. unk5 = reader.ReadByte();
  85. unk6 = reader.ReadSingle();
  86. unk7 = reader.ReadSingle();
  87. }
  88. if (classVersion >= 7)
  89. {
  90. onTimeHour = reader.ReadByte();
  91. onTimeMinute = reader.ReadByte();
  92. offTimeHour = reader.ReadByte();
  93. offTimeMinute = reader.ReadByte();
  94. unk12 = reader.ReadString(2);
  95. }
  96. if (classVersion >= 8)
  97. {
  98. unk13 = reader.ReadByte();
  99. if (classVersion >= 14)
  100. {
  101. unk14 = reader.ReadSingle();
  102. unk15 = reader.ReadSingle();
  103. }
  104. if (classVersion >= 16) unk16 = reader.ReadByte();
  105. if (classVersion >= 17) unk17 = reader.ReadByte();
  106. unk18 = reader.ReadByte();
  107. unk19 = reader.ReadByte();
  108. unk20 = reader.ReadUInt32();
  109. unk21 = reader.ReadString(2);
  110. if (classVersion >= 17) unk22 = reader.ReadString(2);
  111. unk23 = reader.ReadByte();
  112. unk24 = reader.ReadUInt32();
  113. if (classVersion >= 9) unk25 = reader.ReadByte();
  114. if (classVersion >= 13) unk26 = reader.ReadByte();
  115. if (classVersion >= 19)
  116. {
  117. unk27 = reader.ReadByte();
  118. unk28 = reader.ReadByte();
  119. }
  120. if (classVersion >= 20)
  121. {
  122. unk29 = reader.ReadByte();
  123. unk30 = reader.ReadByte();
  124. }
  125. if (classVersion == 14) unk31 = reader.ReadByte();
  126. if (classVersion >= 16)
  127. {
  128. unk32 = reader.ReadSingle();
  129. unk33 = reader.ReadUInt32();
  130. if (classVersion >= 23)
  131. {
  132. float unk1337 = reader.ReadSingle();
  133. float unk1338 = reader.ReadSingle();
  134. }
  135. unk34 = reader.ReadSingle();
  136. unk35 = reader.ReadByte();
  137. }
  138. if (classVersion >= 18) unk36 = reader.ReadByte();
  139. }
  140. if (classVersion == 21)
  141. {
  142. byte unk1339 = reader.ReadByte();
  143. }
  144. //End VeParticleGenerator Deserialization
  145. if (nodeClassVersion >= 10) unk37 = reader.ReadSingle();
  146. //End VeParticleGeneratorNode Deserialization
  147. }
  148. public VeParticleGeneratorOp[] unkOp0;
  149. public VeParticleGeneratorOp[] unkOp1;
  150. public VeParticleGeneratorOp[] unkOp2;
  151. public byte unk0;
  152. public byte unk1;
  153. public byte unk2;
  154. public byte unk3;
  155. public byte unk4;
  156. public byte unk5;
  157. public float unk6;
  158. public float unk7;
  159. public byte onTimeHour;
  160. public byte onTimeMinute;
  161. public byte offTimeHour;
  162. public byte offTimeMinute;
  163. public string unk12;
  164. public byte unk13;
  165. public float unk14;
  166. public float unk15;
  167. public byte unk16;
  168. public byte unk17;
  169. public byte unk18;
  170. public byte unk19;
  171. public uint unk20;
  172. public string unk21;
  173. public string unk22;
  174. public byte unk23;
  175. public uint unk24;
  176. public byte unk25;
  177. public byte unk26;
  178. public byte unk27;
  179. public byte unk28;
  180. public byte unk29;
  181. public byte unk30;
  182. public byte unk31;
  183. public float unk32;
  184. public uint unk33;
  185. public float unk34;
  186. public byte unk35;
  187. public byte unk36;
  188. public float unk37;
  189. }
  190. }