VeParticleGeneratorNode.cs 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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. uint ver24BufferSize = reader.ReadUInt32();
  50. }
  51. //Begin VeParticleGenerator Deserialization
  52. uint opCount1 = reader.ReadUInt32();
  53. unkOp0 = new VeParticleGeneratorOp[opCount1];
  54. for (uint i = 0; i < opCount1; ++i)
  55. {
  56. unkOp0[i] = reader.ReadParticleGeneratorOp(classVersion);
  57. }
  58. uint opCount2 = reader.ReadUInt32();
  59. unkOp1 = new VeParticleGeneratorOp[opCount2];
  60. for (uint i = 0; i < opCount2; ++i)
  61. {
  62. unkOp1[i] = reader.ReadParticleGeneratorOp(classVersion);
  63. }
  64. if (classVersion >= 11)
  65. {
  66. uint opCount3 = reader.ReadUInt32();
  67. unkOp2 = new VeParticleGeneratorOp[opCount3];
  68. for (uint i = 0; i < opCount3; ++i)
  69. {
  70. unkOp2[i] = reader.ReadParticleGeneratorOp(classVersion);
  71. }
  72. }
  73. if (classVersion >= 2) unk0 = reader.ReadByte();
  74. if (classVersion >= 12) unk1 = reader.ReadByte();
  75. if (classVersion >= 3) unk2 = reader.ReadByte();
  76. if (classVersion >= 4) unk3 = reader.ReadByte();
  77. if (classVersion >= 5) unk4 = reader.ReadByte();
  78. if (classVersion >= 6)
  79. {
  80. unk5 = reader.ReadByte();
  81. unk6 = reader.ReadSingle();
  82. unk7 = reader.ReadSingle();
  83. }
  84. if (classVersion >= 7)
  85. {
  86. onTimeHour = reader.ReadByte();
  87. onTimeMinute = reader.ReadByte();
  88. offTimeHour = reader.ReadByte();
  89. offTimeMinute = reader.ReadByte();
  90. unk12 = reader.ReadString(2);
  91. }
  92. if (classVersion >= 8)
  93. {
  94. unk13 = reader.ReadByte();
  95. if (classVersion >= 14)
  96. {
  97. unk14 = reader.ReadSingle();
  98. unk15 = reader.ReadSingle();
  99. }
  100. if (classVersion >= 16) unk16 = reader.ReadByte();
  101. if (classVersion >= 17) unk17 = reader.ReadByte();
  102. unk18 = reader.ReadByte();
  103. unk19 = reader.ReadByte();
  104. unk20 = reader.ReadUInt32();
  105. unk21 = reader.ReadString(2);
  106. if (classVersion >= 17) unk22 = reader.ReadString(2);
  107. unk23 = reader.ReadByte();
  108. unk24 = reader.ReadUInt32();
  109. if (classVersion >= 9) unk25 = reader.ReadByte();
  110. if (classVersion >= 13) unk26 = reader.ReadByte();
  111. if (classVersion >= 19)
  112. {
  113. unk27 = reader.ReadByte();
  114. unk28 = reader.ReadByte();
  115. }
  116. if (classVersion >= 20)
  117. {
  118. unk29 = reader.ReadByte();
  119. unk30 = reader.ReadByte();
  120. }
  121. if (classVersion == 14) unk31 = reader.ReadByte();
  122. if (classVersion >= 16)
  123. {
  124. unk32 = reader.ReadSingle();
  125. unk33 = reader.ReadUInt32();
  126. if (classVersion >= 23)
  127. {
  128. float unk1337 = reader.ReadSingle();
  129. float unk1338 = reader.ReadSingle();
  130. }
  131. unk34 = reader.ReadSingle();
  132. unk35 = reader.ReadByte();
  133. }
  134. if (classVersion >= 18) unk36 = reader.ReadByte();
  135. }
  136. if (classVersion == 21)
  137. {
  138. byte unk1339 = reader.ReadByte();
  139. }
  140. //End VeParticleGenerator Deserialization
  141. if (nodeClassVersion >= 10) unk37 = reader.ReadSingle();
  142. //End VeParticleGeneratorNode Deserialization
  143. }
  144. public VeParticleGeneratorOp[] unkOp0;
  145. public VeParticleGeneratorOp[] unkOp1;
  146. public VeParticleGeneratorOp[] unkOp2;
  147. public byte unk0;
  148. public byte unk1;
  149. public byte unk2;
  150. public byte unk3;
  151. public byte unk4;
  152. public byte unk5;
  153. public float unk6;
  154. public float unk7;
  155. public byte onTimeHour;
  156. public byte onTimeMinute;
  157. public byte offTimeHour;
  158. public byte offTimeMinute;
  159. public string unk12;
  160. public byte unk13;
  161. public float unk14;
  162. public float unk15;
  163. public byte unk16;
  164. public byte unk17;
  165. public byte unk18;
  166. public byte unk19;
  167. public uint unk20;
  168. public string unk21;
  169. public string unk22;
  170. public byte unk23;
  171. public uint unk24;
  172. public byte unk25;
  173. public byte unk26;
  174. public byte unk27;
  175. public byte unk28;
  176. public byte unk29;
  177. public byte unk30;
  178. public byte unk31;
  179. public float unk32;
  180. public uint unk33;
  181. public float unk34;
  182. public byte unk35;
  183. public byte unk36;
  184. public float unk37;
  185. }
  186. }