armark1ng

Untitled

Sep 20th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.58 KB | None | 0 0
  1. package com.rs.cache.loaders;
  2.  
  3. import java.io.IOException;
  4. import java.lang.reflect.Field;
  5. import java.util.Arrays;
  6. import java.util.Hashtable;
  7.  
  8. import com.rs.cache.Cache;
  9. import com.rs.io.InputStream;
  10. import com.rs.utils.Utils;
  11.  
  12. @SuppressWarnings("unused")
  13. public class IComponentDefinitions {
  14.  
  15. private static IComponentDefinitions[][] icomponentsdefs;
  16. private static IComponentSettings GLOBAL_SETTINGS = new IComponentSettings(0, -1);
  17.  
  18. protected int anInt4679;
  19. protected Object[] anObjectArray4680;
  20. protected int anInt4681;
  21. protected int anInt4682;
  22. protected int anInt4683;
  23. protected String[] aStringArray4686;
  24. protected int anInt4687;
  25. protected Object[] anObjectArray4688;
  26. protected boolean hidden;
  27. private short[] aShortArray4690;
  28. protected int anInt4691;
  29. protected int parentId;
  30. public int anInt4693;
  31. protected int anInt4694 = -1;
  32. protected int anInt4695;
  33. protected int anInt4697;
  34. protected int anInt4698;
  35. protected int anInt4700;
  36. protected Object[] anObjectArray4701;
  37. protected int anInt4703;
  38. protected int[] anIntArray4705;
  39. protected Object[] anObjectArray4706;
  40. protected boolean aBoolean4707;
  41. protected int anInt4708;
  42. protected int anInt4709 = 0;
  43. protected boolean aBoolean4710;
  44. protected Object[] anObjectArray4711;
  45. protected Object[] anObjectArray4712;
  46. protected int anInt4714;
  47. private short[] aShortArray4717;
  48. protected int anInt4718;
  49. protected int anInt4719;
  50. protected byte aByte4720;
  51. protected boolean aBoolean4721;
  52. public int anInt4722;
  53. protected boolean aBoolean4723;
  54. protected int anInt4724;
  55. // protected EntityNode_Sub4 anEntityNode_Sub4_4726;
  56. protected boolean aBoolean4727;
  57. protected int anInt4728;
  58. protected boolean aBoolean4730;
  59. protected boolean aBoolean4732;
  60. protected byte[] aByteArray4733;
  61. protected int anInt4734;
  62. protected int anInt4735;
  63. protected boolean aBoolean4738;
  64. protected Object[] anObjectArray4740;
  65. protected byte aByte4741;
  66. protected Object[] anObjectArray4742;
  67. protected boolean aBoolean4743;
  68. protected int anInt4744;
  69. protected Object[] anObjectArray4745;
  70. protected int anInt4746;
  71. protected int anInt4747;
  72. protected int anInt4748;
  73. protected byte aByte4750;
  74. protected Object[] anObjectArray4751;
  75. protected int anInt4752;
  76. protected Object[] anObjectArray4753;
  77. protected int anInt4754;
  78. // protected Animator anAnimator4755;
  79. protected Object[] anObjectArray4756;
  80. protected int anInt4757;
  81. public Object[] anObjectArray4758;
  82. protected int anInt4759;
  83. protected int anInt4760;
  84. protected int anInt4761;
  85. protected int anInt4762;
  86. protected int anInt4764;
  87. public String aString4765;
  88. protected int anInt4767;
  89. protected Object[] anObjectArray4768;
  90. protected boolean aBoolean4769;
  91. protected Object[] anObjectArray4770;
  92. protected Object[] anObjectArray4771;
  93. protected int[] anIntArray4772;
  94. protected int anInt4773;
  95. protected Object[] anObjectArray4774;
  96. protected Object[] anObjectArray4775;
  97. protected Object[] anObjectArray4777;
  98. protected Object[] anObjectArray4778;
  99. public String aString4779;
  100. protected int anInt4780;
  101. protected boolean aBoolean4782;
  102. protected int anInt4783;
  103. protected String aString4784;
  104. private short[] aShortArray4785;
  105. protected String aString4786;
  106. protected int anInt4787;
  107. protected Object[] anObjectArray4788;
  108. protected int[] anIntArray4789;
  109. public String aString4790;
  110. protected int anInt4792;
  111. protected IComponentDefinitions[] aWidgetArray4793;
  112. protected int anInt4794;
  113. protected int anInt4795;
  114. protected int anInt4796;
  115. protected int anInt4797;
  116. protected Object[] anObjectArray4798;
  117. protected Object[] anObjectArray4799;
  118. protected int anInt4800;
  119. protected int anInt4801;
  120. protected boolean aBoolean4802;
  121. protected Object[] anObjectArray4803;
  122. protected IComponentDefinitions[] aWidgetArray4804;
  123. protected int[] anIntArray4805;
  124. protected byte[] aByteArray4806;
  125. protected Object[] anObjectArray4807;
  126. protected boolean hasScripts;
  127. protected int anInt4809;
  128. protected int anInt4810;
  129. protected int anInt4811;
  130. protected int[] anIntArray4812;
  131. protected int anInt4813;
  132. protected int anInt4814;
  133. protected int anInt4815;
  134. public int anInt4816;
  135. protected int anInt4817;
  136. protected Object[] anObjectArray4818;
  137. protected boolean aBoolean4819;
  138. protected int anInt4820;
  139. protected int anInt4821;
  140. protected int ihash;
  141. @SuppressWarnings("rawtypes")
  142. public Hashtable aHashTable4823;
  143. protected int anInt4824;
  144. protected int anInt4825;
  145. protected int anInt4826;
  146. protected Object[] anObjectArray4828;
  147. protected int[] anIntArray4829;
  148. protected int anInt4831;
  149. protected boolean aBoolean4832;
  150. protected int[] anIntArray4833;
  151. protected Object[] anObjectArray4834;
  152. protected int anInt4835;
  153. protected IComponentDefinitions aWidget4836;
  154. private short[] aShortArray4837;
  155. protected int[] anIntArray4838;
  156. protected int anInt4839;
  157. protected IComponentSettings aNode_Sub35_4840;
  158. public int type;
  159. protected int anInt4842;
  160. protected int modelType;
  161. protected Object[] anObjectArray4846;
  162. protected int anInt4848;
  163. protected int anInt4849;
  164. public int anInt4850;
  165. protected byte aByte4851;
  166. protected Object[] anObjectArray4852;
  167. protected Object[] anObjectArray4854;
  168. protected Object[] anObjectArray4856;
  169. protected Object[] anObjectArray4857;
  170. protected boolean aBoolean4858;
  171. protected int anInt4860;
  172. protected boolean aBoolean4861;
  173. protected Object[] anObjectArray4862;
  174. protected int[] anIntArray4863;
  175. protected int anInt4864;
  176. protected boolean aBoolean4865;
  177.  
  178. static {
  179. try {
  180. Cache.init();
  181. } catch (IOException e) {
  182. e.printStackTrace();
  183. }
  184. icomponentsdefs = new IComponentDefinitions[Utils.getInterfaceDefinitionsSize()][];
  185. }
  186.  
  187. public static void main(String[] args) throws IOException {
  188. System.out.println("component id size is " + (Utils.getInterfaceDefinitionsComponentsSize(1515) - 1));
  189. IComponentDefinitions[] defs = getInterface(1515);// put inter id in
  190. // here and ru
  191.  
  192. }
  193.  
  194. public static IComponentDefinitions getInterfaceComponent(int id, int component) {
  195. IComponentDefinitions[] inter = getInterface(id);
  196. if (inter == null || component >= inter.length)
  197. return null;
  198. return inter[component];
  199. }
  200.  
  201. public static IComponentDefinitions[] getInterface(int id) {
  202. if (id >= icomponentsdefs.length)
  203. return null;
  204. if (icomponentsdefs[id] == null) {
  205. icomponentsdefs[id] = new IComponentDefinitions[Utils.getInterfaceDefinitionsComponentsSize(id)];
  206. for (int i = 0; i < icomponentsdefs[id].length; i++) {
  207. byte[] data = Cache.STORE.getIndexes()[3].getFile(id, i);
  208. if (data != null) {
  209. IComponentDefinitions defs = icomponentsdefs[id][i] = new IComponentDefinitions();
  210. defs.ihash = i + (id << 16);
  211. if (data[0] != -1) {
  212. // throw new IllegalStateException("if1");
  213. }
  214. defs.decode(new InputStream(data));
  215. }
  216. }
  217. }
  218. return icomponentsdefs[id];
  219. }
  220.  
  221. @SuppressWarnings("unchecked")
  222. final void decode(InputStream stream) {
  223. int newInt = stream.readUnsignedByte();
  224. if (newInt == 255) {
  225. newInt = -1;
  226. }
  227. type = stream.readUnsignedByte();
  228. if ((type & 0x80 ^ 0xffffffff) != -1) {
  229. type &= 0x7f;
  230. aString4765 = stream.readString();
  231. }
  232. anInt4814 = stream.readUnsignedShort();
  233. anInt4850 = stream.readShort();
  234. anInt4816 = stream.readShort();
  235. anInt4693 = stream.readUnsignedShort();
  236. anInt4722 = stream.readUnsignedShort();
  237. aByte4750 = (byte) stream.readByte();
  238. aByte4741 = (byte) stream.readByte();
  239. aByte4720 = (byte) stream.readByte();
  240. aByte4851 = (byte) stream.readByte();
  241. parentId = stream.readUnsignedShort();
  242. if (parentId != 65535) {
  243. parentId = parentId + (ihash & ~0xffff);
  244. } else {
  245. parentId = -1;
  246. }
  247. int i_17_ = stream.readUnsignedByte();
  248. hidden = (0x1 & i_17_ ^ 0xffffffff) != -1;
  249. if (hidden)
  250. System.err.println("hidden [" + (ihash >> 16) + "," + (ihash & 0xFFF) + "]: true");
  251. if (newInt >= 0) {
  252. aBoolean4858 = (i_17_ & 0x2 ^ 0xffffffff) != -1;
  253. if (aBoolean4858)
  254. System.err.println("hidden [" + (ihash >> 16) + "," + (ihash & 0xFFF) + "]: true");
  255. }
  256. if (type == 0) {
  257. anInt4735 = stream.readUnsignedShort();
  258. anInt4691 = stream.readUnsignedShort();
  259. if ((newInt ^ 0xffffffff) > -1) {
  260. aBoolean4858 = stream.readUnsignedByte() == 1;
  261. }
  262. }
  263. if (type == 5) {
  264. anInt4820 = stream.readInt();
  265. anInt4728 = stream.readUnsignedShort();
  266. int i_18_ = stream.readUnsignedByte();
  267. aBoolean4861 = (i_18_ & 0x1 ^ 0xffffffff) != -1;
  268. aBoolean4738 = (i_18_ & 0x2) != 0;
  269. anInt4757 = stream.readUnsignedByte();
  270. anInt4744 = stream.readUnsignedByte();
  271. anInt4796 = stream.readInt();
  272. aBoolean4732 = stream.readUnsignedByte() == 1;
  273. aBoolean4743 = stream.readUnsignedByte() == 1;
  274. anInt4754 = stream.readInt();
  275. if ((newInt ^ 0xffffffff) <= -4) {
  276. aBoolean4782 = (stream.readUnsignedByte() ^ 0xffffffff) == -2;
  277. }
  278. }
  279. if (type == 6) {
  280. modelType = 1;
  281. if ((ihash >> 16) > 1144)
  282. anInt4864 = stream.readBigSmart();
  283. else {
  284. anInt4864 = stream.readUnsignedShort();
  285. if ((anInt4864 ^ 0xffffffff) == -65536) {
  286. anInt4864 = -1;
  287. }
  288. }
  289. int i_19_ = stream.readUnsignedByte();
  290. aBoolean4707 = (0x4 & i_19_) == 4;
  291. boolean bool = (0x1 & i_19_) == 1;
  292. aBoolean4865 = (i_19_ & 0x2 ^ 0xffffffff) == -3;
  293. aBoolean4727 = (0x8 & i_19_ ^ 0xffffffff) == -9;
  294. if (bool) {
  295. anInt4709 = stream.readShort();
  296. anInt4797 = stream.readShort();
  297. anInt4815 = stream.readUnsignedShort();
  298. anInt4821 = stream.readUnsignedShort();
  299. anInt4682 = stream.readUnsignedShort();
  300. anInt4787 = stream.readUnsignedShort();
  301. } else if (aBoolean4865) {
  302. anInt4709 = stream.readShort();
  303. anInt4797 = stream.readShort();
  304. anInt4842 = stream.readShort();
  305. anInt4815 = stream.readUnsignedShort();
  306. anInt4821 = stream.readUnsignedShort();
  307. anInt4682 = stream.readUnsignedShort();
  308. anInt4787 = stream.readShort();
  309. }
  310. if ((ihash >> 16) > 1144)
  311. anInt4773 = stream.readBigSmart();
  312. else {
  313. anInt4773 = stream.readUnsignedShort();
  314. if ((anInt4773 ^ 0xffffffff) == -65536) {
  315. anInt4773 = -1;
  316. }
  317. }
  318. if (aByte4750 != 0) {
  319. anInt4800 = stream.readUnsignedShort();
  320. }
  321. if ((aByte4741 ^ 0xffffffff) != -1) {
  322. anInt4849 = stream.readUnsignedShort();
  323. }
  324. }
  325. if (type == 4) {
  326. // if ((ihash >> 16) > 1144)
  327. anInt4759 = stream.readBigSmart();
  328. /*
  329. * else { anInt4759 = stream.readUnsignedShort(); if ((anInt4759 ^
  330. * 0xffffffff) == -65536) { anInt4759 = -1; } }
  331. */
  332. if ((newInt ^ 0xffffffff) <= -3) {
  333. aBoolean4832 = (stream.readUnsignedByte() ^ 0xffffffff) == -2;
  334. }
  335. aString4790 = stream.readString();
  336. System.err.println("text [" + (ihash >> 16) + "," + (ihash & 0xFFF) + "]:" + aString4790);
  337. anInt4697 = stream.readUnsignedByte();
  338. anInt4835 = stream.readUnsignedByte();
  339. anInt4825 = stream.readUnsignedByte();
  340. aBoolean4710 = (stream.readUnsignedByte() ^ 0xffffffff) == -2;
  341. anInt4754 = stream.readInt();
  342. anInt4757 = stream.readUnsignedByte();
  343. if ((newInt ^ 0xffffffff) <= -1) {
  344. anInt4767 = stream.readUnsignedByte();
  345. }
  346.  
  347. }
  348. if ((type ^ 0xffffffff) == -4) {
  349. anInt4754 = stream.readInt();
  350. aBoolean4769 = (stream.readUnsignedByte() ^ 0xffffffff) == -2;
  351. anInt4757 = stream.readUnsignedByte();
  352. }
  353. if ((type ^ 0xffffffff) == -10) {
  354. anInt4752 = stream.readUnsignedByte();
  355. anInt4754 = stream.readInt();
  356. aBoolean4721 = stream.readUnsignedByte() == 1;
  357. }
  358. int i_20_ = stream.read24BitInt();
  359. int i_21_ = stream.readUnsignedByte();
  360. if ((i_21_ ^ 0xffffffff) != -1) {
  361. aByteArray4806 = new byte[11];
  362. aByteArray4733 = new byte[11];
  363. anIntArray4705 = new int[11];
  364. for (/**/; i_21_ != 0; i_21_ = stream.readUnsignedByte()) {
  365. int i_22_ = (i_21_ >> 4) - 1;
  366. i_21_ = stream.readUnsignedByte() | i_21_ << 8;
  367. i_21_ &= 0xfff;
  368. if (i_21_ == 4095) {
  369. i_21_ = -1;
  370. }
  371. byte b_23_ = (byte) stream.readByte();
  372. if ((b_23_ ^ 0xffffffff) != -1) {
  373. aBoolean4802 = true;
  374. }
  375. byte b_24_ = (byte) stream.readByte();
  376. if (i_22_ != 14)
  377. anIntArray4705[i_22_] = i_21_;
  378. aByteArray4806[i_22_] = b_23_;
  379. aByteArray4733[i_22_] = b_24_;
  380. }
  381. }
  382. aString4779 = stream.readString();
  383. int i_25_ = stream.readUnsignedByte();
  384. int i_26_ = 0xf & i_25_;
  385. if (i_26_ > 0) {
  386. aStringArray4686 = new String[i_26_];
  387. for (int i_27_ = 0; (i_27_ ^ 0xffffffff) > (i_26_ ^ 0xffffffff); i_27_++)
  388. aStringArray4686[i_27_] = stream.readString();
  389. }
  390. if (aStringArray4686 != null) {
  391. System.err.println("has options [" + (ihash >> 16) + "," + (ihash & 0xFFF) + "]: "
  392. + Arrays.toString(aStringArray4686));
  393. }
  394. int i_28_ = i_25_ >> 4;
  395. if ((i_28_ ^ 0xffffffff) < -1) {
  396. int i_29_ = stream.readUnsignedByte();
  397. anIntArray4863 = new int[i_29_ - -1];
  398. for (int i_30_ = 0; (i_30_ ^ 0xffffffff) > (anIntArray4863.length ^ 0xffffffff); i_30_++)
  399. anIntArray4863[i_30_] = -1;
  400. anIntArray4863[i_29_] = stream.readUnsignedShort();
  401. }
  402. if ((i_28_ ^ 0xffffffff) < -2) {
  403. int i_31_ = stream.readUnsignedByte();
  404. anIntArray4863[i_31_] = stream.readUnsignedShort();
  405. }
  406. if (anIntArray4863 != null) {
  407. System.err.println(
  408. "has music [" + (ihash >> 16) + "," + (ihash & 0xFFF) + "]: " + Arrays.toString(anIntArray4863));
  409. }
  410. aString4784 = stream.readString();
  411. if (aString4784.equals("")) {
  412. aString4784 = null;
  413. }
  414. if (aString4784 != null)
  415. System.err.println("hidden string [" + (ihash >> 16) + "," + (ihash & 0xFFF) + "]: " + aString4784);
  416. anInt4708 = stream.readUnsignedByte();
  417. anInt4795 = stream.readUnsignedByte();
  418. anInt4860 = stream.readUnsignedByte();
  419. aString4786 = stream.readString();
  420. int i_32_ = -1;
  421. if ((method925(i_20_) ^ 0xffffffff) != -1) {
  422. i_32_ = stream.readUnsignedShort();
  423. if (i_32_ == 65535) {
  424. i_32_ = -1;
  425. }
  426. anInt4698 = stream.readUnsignedShort();
  427. if ((anInt4698 ^ 0xffffffff) == -65536) {
  428. anInt4698 = -1;
  429. }
  430. anInt4839 = stream.readUnsignedShort();
  431. if (anInt4839 == 65535) {
  432. anInt4839 = -1;
  433. }
  434. System.err.println("has settings [" + (ihash >> 16) + "," + (ihash & 0xFFF) + "]: " + i_32_ + ", "
  435. + anInt4698 + ", " + anInt4839);
  436. }
  437. if (newInt >= 0) {
  438. anInt4761 = stream.readUnsignedShort();
  439. if (anInt4761 == 65535) {
  440. anInt4761 = -1;
  441. }
  442. }
  443. aNode_Sub35_4840 = new IComponentSettings(i_20_, i_32_);
  444. if (newInt >= 0) {
  445. int i_33_ = stream.readUnsignedByte();
  446. for (int i_34_ = 0; i_33_ > i_34_; i_34_++) {
  447. int i_35_ = stream.read24BitInt();
  448. int i_36_ = stream.readInt();
  449. aHashTable4823.put((long) i_35_, i_36_);
  450. System.err.println(
  451. "has unknown [" + (ihash >> 16) + "," + (ihash & 0xFFF) + "]: " + (long) i_35_ + ", " + i_36_);
  452. }
  453. int i_37_ = stream.readUnsignedByte();
  454. for (int i_38_ = 0; i_38_ < i_37_; i_38_++) {
  455. int i_39_ = stream.read24BitInt();
  456. String string = stream.readVersionedString();
  457. aHashTable4823.put((long) i_39_, string);
  458. System.err.println(
  459. "has unknown [" + (ihash >> 16) + "," + (ihash & 0xFFF) + "]: " + (long) i_39_ + ", " + string);
  460. }
  461. }
  462.  
  463. anObjectArray4758 = decodeScript(stream, true);
  464. anObjectArray4706 = decodeScript(stream);
  465. anObjectArray4818 = decodeScript(stream);
  466. anObjectArray4771 = decodeScript(stream);
  467. anObjectArray4768 = decodeScript(stream);
  468. anObjectArray4807 = decodeScript(stream);
  469. anObjectArray4742 = decodeScript(stream);
  470. anObjectArray4788 = decodeScript(stream);
  471. anObjectArray4701 = decodeScript(stream);
  472. anObjectArray4770 = decodeScript(stream);
  473. if ((newInt ^ 0xffffffff) <= -1) {
  474. anObjectArray4751 = decodeScript(stream);
  475. }
  476. anObjectArray4834 = decodeScript(stream, true);
  477. anObjectArray4774 = decodeScript(stream, true);
  478. anObjectArray4803 = decodeScript(stream, true);
  479. anObjectArray4680 = decodeScript(stream, true);
  480. anObjectArray4856 = decodeScript(stream, true);
  481. anObjectArray4852 = decodeScript(stream, true);
  482. anObjectArray4711 = decodeScript(stream, true);
  483. anObjectArray4753 = decodeScript(stream, true);
  484. anObjectArray4688 = decodeScript(stream);
  485. anObjectArray4775 = decodeScript(stream);
  486. anIntArray4838 = method4150(stream);
  487. anIntArray4833 = method4150(stream);
  488. anIntArray4789 = method4150(stream);
  489. anIntArray4829 = method4150(stream);
  490. anIntArray4805 = method4150(stream);
  491. }
  492.  
  493. private final Object[] decodeScript(InputStream buffer) {
  494. int i = buffer.readUnsignedByte();
  495. if ((i ^ 0xffffffff) == -1) {
  496. return null;
  497. }
  498. Object[] objects = new Object[i];
  499. for (int i_3_ = 0; i > i_3_; i_3_++) {
  500. int i_4_ = buffer.readUnsignedByte();
  501. if (i_4_ == 0) {
  502. objects[i_3_] = new Integer(buffer.readInt());
  503. } else if ((i_4_ ^ 0xffffffff) == -2) {
  504. objects[i_3_] = buffer.readString();
  505. }
  506. }
  507. hasScripts = true;
  508. System.err.println("Call found[" + (ihash >> 16) + "," + (ihash & 0xFFF) + "]:" + Arrays.toString(objects));
  509. return objects;
  510. }
  511.  
  512. private final Object[] decodeScript(InputStream buffer, boolean text) {
  513. int i = buffer.readUnsignedByte();
  514. if ((i ^ 0xffffffff) == -1) {
  515. return null;
  516. }
  517. Object[] objects = new Object[i];
  518. for (int i_3_ = 0; i > i_3_; i_3_++) {
  519. int i_4_ = buffer.readUnsignedByte();
  520. if (i_4_ == 0) {
  521. objects[i_3_] = new Integer(buffer.readInt());
  522. } else if ((i_4_ ^ 0xffffffff) == -2) {
  523. objects[i_3_] = buffer.readString();
  524. }
  525. }
  526. hasScripts = true;
  527. // if (text)
  528. System.err.println("Call found[" + (ihash >> 16) + "," + (ihash & 0xFFF) + "]:" + Arrays.toString(objects));
  529. return objects;
  530. }
  531.  
  532. private final int[] method4150(InputStream buffer) {
  533. int i = buffer.readUnsignedByte();
  534. if (i == 0) {
  535. return null;
  536. }
  537. int[] is = new int[i];
  538. for (int i_60_ = 0; i_60_ < i; i_60_++)
  539. is[i_60_] = buffer.readInt();
  540. System.err.println("Trigger found:" + Arrays.toString(is));
  541. return is;
  542. }
  543.  
  544. static final int method925(int i) {
  545. return (i & 0x3fda8) >> 11;
  546. }
  547.  
  548. public IComponentDefinitions() {
  549. anInt4698 = -1;
  550. aBoolean4730 = false;
  551. anInt4747 = 0;
  552. aBoolean4707 = false;
  553. anInt4682 = 0;
  554. anInt4752 = 1;
  555. anInt4728 = 0;
  556. anInt4759 = -1;
  557. aBoolean4727 = false;
  558. aBoolean4769 = false;
  559. anInt4693 = 0;
  560. anInt4767 = 0;
  561. aByte4750 = (byte) 0;
  562. anInt4679 = 0;
  563. anInt4761 = -1;
  564. aString4779 = "";
  565. aByte4741 = (byte) 0;
  566. anInt4780 = 0;
  567. aBoolean4782 = true;
  568. anInt4757 = 0;
  569. anInt4754 = 0;
  570. anInt4687 = -1;
  571. anInt4783 = -1;
  572. anInt4773 = -1;
  573. anInt4795 = 0;
  574. anInt4796 = 0;
  575. anInt4681 = 0;
  576. anInt4714 = 2;
  577. aBoolean4802 = false;
  578. hasScripts = false;
  579. anInt4744 = 0;
  580. aString4786 = "";
  581. anInt4700 = 1;
  582. anInt4697 = 0;
  583. aBoolean4819 = false;
  584. ihash = -1;
  585. anInt4821 = 0;
  586. anInt4815 = 0;
  587. anInt4718 = -1;
  588. anInt4820 = -1;
  589. aBoolean4721 = false;
  590. aByte4720 = (byte) 0;
  591. anInt4817 = 0;
  592. anInt4708 = 0;
  593. anInt4810 = 0;
  594. anInt4787 = 100;
  595. aBoolean4738 = false;
  596. anInt4691 = 0;
  597. aBoolean4710 = false;
  598. anInt4825 = 0;
  599. anInt4719 = 0;
  600. anInt4734 = 0;
  601. aString4790 = "";
  602. aBoolean4832 = true;
  603. anInt4762 = 0;
  604. anInt4792 = 1;
  605. anInt4735 = 0;
  606. anInt4831 = 0;
  607. anInt4800 = 0;
  608. anInt4748 = -1;
  609. anInt4809 = 0;
  610. anInt4835 = 0;
  611. anInt4695 = 0;
  612. anInt4813 = 0;
  613. modelType = 1;
  614. aNode_Sub35_4840 = GLOBAL_SETTINGS;
  615. anInt4814 = 0;
  616. anInt4811 = 0;
  617. anInt4722 = 0;
  618. anInt4849 = 0;
  619. anInt4683 = -1;
  620. parentId = -1;
  621. anInt4801 = 0;
  622. anInt4824 = -1;
  623. aWidget4836 = null;
  624. anInt4703 = -1;
  625. aBoolean4858 = false;
  626. hidden = false;
  627. anInt4850 = 0;
  628. aBoolean4861 = false;
  629. anInt4848 = -1;
  630. anInt4797 = 0;
  631. anInt4860 = 0;// Class339_Sub4.anInt8679;
  632. aBoolean4723 = false;
  633. aByte4851 = (byte) 0;
  634. anInt4816 = 0;
  635. anInt4842 = 0;
  636. anInt4839 = -1;
  637. }
  638.  
  639. public void printFields() {
  640. for (Field field : getClass().getDeclaredFields()) {
  641. if ((field.getModifiers() & 8) != 0) {
  642. continue;
  643. }
  644. try {
  645. System.out.println(field.getName() + ": " + getValue(field));
  646. } catch (Throwable e) {
  647. e.printStackTrace();
  648. }
  649. }
  650. System.out.println("-- end of " + getClass().getSimpleName() + " fields --");
  651. }
  652.  
  653. private Object getValue(Field field) throws Throwable {
  654. field.setAccessible(true);
  655. Class<?> type = field.getType();
  656. if (type == int[][].class) {
  657. return Arrays.toString((int[][]) field.get(this));
  658. } else if (type == int[].class) {
  659. return Arrays.toString((int[]) field.get(this));
  660. } else if (type == byte[].class) {
  661. return Arrays.toString((byte[]) field.get(this));
  662. } else if (type == short[].class) {
  663. return Arrays.toString((short[]) field.get(this));
  664. } else if (type == double[].class) {
  665. return Arrays.toString((double[]) field.get(this));
  666. } else if (type == float[].class) {
  667. return Arrays.toString((float[]) field.get(this));
  668. } else if (type == Object[].class) {
  669. return Arrays.toString((Object[]) field.get(this));
  670. }
  671. return field.get(this);
  672. }
  673.  
  674. }
Advertisement
Add Comment
Please, Sign In to add comment