Guest User

Itemdef.java

a guest
Jul 18th, 2013
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.45 KB | None | 0 0
  1. import java.io.*;
  2.  
  3. public final class ItemDef {
  4.  
  5. public static void nullLoader() {
  6. mruNodes2 = null;
  7. mruNodes1 = null;
  8. streamIndices = null;
  9. cache = null;
  10. stream = null;
  11. }
  12.  
  13. public boolean method192(int j) {
  14. int k = anInt175;
  15. int l = anInt166;
  16. if(j == 1)
  17. {
  18. k = anInt197;
  19. l = anInt173;
  20. }
  21. if(k == -1)
  22. return true;
  23. boolean flag = true;
  24. if(!Model.method463(k))
  25. flag = false;
  26. if(l != -1 && !Model.method463(l))
  27. flag = false;
  28. return flag;
  29. }
  30.  
  31. /*public static void dumpStacks() {
  32. try {
  33. FileOutputStream out = new FileOutputStream(new File("stackable.dat"));
  34. for (int j = 0; j < 12000; j++) {
  35. ItemDef item = ItemDef.forID(j);
  36. out.write(item.stackable ? 1 : 0);
  37. }
  38. out.write(-1);
  39. out.close();
  40. } catch (IOException ioe) {ioe.printStackTrace();}
  41. }
  42.  
  43. public static void dumpNotes() {
  44. try {
  45. FileOutputStream out = new FileOutputStream(new File("notes.dat"));
  46. for (int j = 0; j < 12000; j++) {
  47. ItemDef item = ItemDef.forID(j);
  48. out.write(item.certTemplateID != -1 ? 0 : 1);
  49. }
  50. out.write(-1);
  51. out.close();
  52. } catch (IOException ioe) {ioe.printStackTrace();}
  53.  
  54.  
  55. }*/
  56.  
  57. public static void dumpPrices() {
  58. try {
  59. //FileOutputStream out = new FileOutputStream(new File("prices.dat"));
  60. FileWriter fw = new FileWriter("prices.txt");
  61. for (int j = 0; j < 12000; j++) {
  62. ItemDef item = ItemDef.forID(j);
  63. fw.write(item.id + " " + item.value + "\r\n");
  64. }
  65. fw.close();
  66. } catch (IOException ioe) {ioe.printStackTrace();}
  67.  
  68.  
  69. }
  70.  
  71. public static void unpackConfig(StreamLoader streamLoader) {
  72. stream = new Stream(streamLoader.getDataForName("obj.dat"));
  73. Stream stream = new Stream(streamLoader.getDataForName("obj.idx"));
  74. totalItems = stream.readUnsignedWord();
  75. streamIndices = new int[totalItems + 15000];
  76. int i = 2;
  77. for(int j = 0; j < totalItems; j++) {
  78. streamIndices[j] = i;
  79. i += stream.readUnsignedWord();
  80. }
  81. cache = new ItemDef[10];
  82. for(int k = 0; k < 10; k++)
  83. cache[k] = new ItemDef();
  84. //dumpStacks();
  85. //dumpNotes();
  86. dumpPrices();
  87. }
  88.  
  89. public Model method194(int j) {
  90. int k = anInt175;
  91. int l = anInt166;
  92. if(j == 1) {
  93. k = anInt197;
  94. l = anInt173;
  95. }
  96. if(k == -1)
  97. return null;
  98. Model model = Model.method462(k);
  99. if(l != -1) {
  100. Model model_1 = Model.method462(l);
  101. Model aclass30_sub2_sub4_sub6s[] = {
  102. model, model_1
  103. };
  104. model = new Model(2, aclass30_sub2_sub4_sub6s);
  105. }
  106. if (originalModelColors != null) {
  107. for (int i1 = 0; i1 < originalModelColors.length; i1++)
  108. model.method476(originalModelColors[i1], modifiedModelColors[i1]);
  109.  
  110. }
  111. return model;
  112. }
  113.  
  114. public boolean method195(int j) {
  115. int k = maleEquip1;
  116. int l = maleEquip2;
  117. int i1 = anInt185;
  118. if(j == 1) {
  119. k = femaleEquip1;
  120. l = femaleEquip2;
  121. i1 = anInt162;
  122. }
  123. if(k == -1)
  124. return true;
  125. boolean flag = true;
  126. if(!Model.method463(k))
  127. flag = false;
  128. if(l != -1 && !Model.method463(l))
  129. flag = false;
  130. if(i1 != -1 && !Model.method463(i1))
  131. flag = false;
  132. return flag;
  133. }
  134.  
  135. public Model method196(int i) {
  136. int j = maleEquip1;
  137. int k = maleEquip2;
  138. int l = anInt185;
  139. if(i == 1) {
  140. j = femaleEquip1;
  141. k = femaleEquip2;
  142. l = anInt162;
  143. }
  144. if(j == -1)
  145. return null;
  146. Model model = Model.method462(j);
  147. if(k != -1)
  148. if(l != -1) {
  149. Model model_1 = Model.method462(k);
  150. Model model_3 = Model.method462(l);
  151. Model aclass30_sub2_sub4_sub6_1s[] = {
  152. model, model_1, model_3
  153. };
  154. model = new Model(3, aclass30_sub2_sub4_sub6_1s);
  155. } else {
  156. Model model_2 = Model.method462(k);
  157. Model aclass30_sub2_sub4_sub6s[] = {
  158. model, model_2
  159. };
  160. model = new Model(2, aclass30_sub2_sub4_sub6s);
  161. }
  162. if(i == 0 && aByte205 != 0)
  163. model.method475(0, aByte205, 0);
  164. if(i == 1 && aByte154 != 0)
  165. model.method475(0, aByte154, 0);
  166. if (originalModelColors != null) {
  167. for (int i1 = 0; i1 < originalModelColors.length; i1++)
  168. model.method476(originalModelColors[i1], modifiedModelColors[i1]);
  169.  
  170. }
  171. return model;
  172. }
  173.  
  174.  
  175. public void setDefaults() {
  176. modelID = 0;
  177. name = null;
  178. description = null;
  179. originalModelColors = null;
  180. modifiedModelColors = null;
  181. modelZoom = 2000;
  182. modelRotation1 = 0;
  183. modelRotation2 = 0;
  184. anInt204 = 0;
  185. modelOffset1 = 0;
  186. modelOffset2 = 0;
  187. stackable = false;
  188. value = 1;
  189. membersObject = false;
  190. groundActions = null;
  191. actions = null;
  192. maleEquip1 = -1;
  193. maleEquip2 = -1;
  194. aByte205 = 0;
  195. femaleEquip1 = -1;
  196. femaleEquip2 = -1;
  197. aByte154 = 0;
  198. anInt185 = -1;
  199. anInt162 = -1;
  200. anInt175 = -1;
  201. anInt166 = -1;
  202. anInt197 = -1;
  203. anInt173 = -1;
  204. stackIDs = null;
  205. stackAmounts = null;
  206. certID = -1;
  207. certTemplateID = -1;
  208. anInt167 = 128;
  209. anInt192 = 128;
  210. anInt191 = 128;
  211. anInt196 = 0;
  212. anInt184 = 0;
  213. team = 0;
  214. }
  215.  
  216. public static ItemDef forID(int i) {
  217. for(int j = 0; j < 10; j++)
  218. if(cache[j].id == i)
  219. return cache[j];
  220. cacheIndex = (cacheIndex + 1) % 10;
  221. ItemDef itemDef = cache[cacheIndex];
  222. stream.currentOffset = streamIndices[i];
  223. itemDef.id = i;
  224. itemDef.setDefaults();
  225. itemDef.readValues(stream);
  226. if(itemDef.certTemplateID != -1)
  227. itemDef.toNote();
  228. if(!isMembers && itemDef.membersObject) {
  229. itemDef.name = "Members Object";
  230. itemDef.description = "Login to a members' server to use this object.".getBytes();
  231. itemDef.groundActions = null;
  232. itemDef.actions = null;
  233. itemDef.team = 0;
  234. }
  235. switch (itemDef.id) {
  236. case 11722:
  237. itemDef.femaleEquip1 = itemDef.maleEquip1;
  238. itemDef.femaleEquip2 = itemDef.maleEquip2;
  239. break;
  240.  
  241.  
  242.  
  243.  
  244. }
  245. /* Hardcoded items start here */
  246. /**/
  247. return itemDef;
  248.  
  249. case 15037:
  250. itemDef.actions = new String[5];
  251. itemDef.actions[1] = "Wield";
  252. itemDef.femaleEquip1 = 35085;//female
  253. itemDef.modelOffset1 = 9;
  254. itemDef.modelOffset2 = 13;
  255. itemDef.modelZoom = 1425;
  256. itemDef.modelRotation2 = 1300;
  257. itemDef.modelRotation1 = 700;
  258. itemDef.maleEquip1 = 35085;
  259. itemDef.modelID = 35084;
  260. itemDef.name = "Chaotic rapier";
  261. itemDef.aByte205 = -12;
  262. itemDef.aByte154 = -12;
  263. itemDef.anInt188 = -1;//female sleeve
  264. itemDef.anInt164 = -1;//male sleeve
  265. itemDef.description = "A razor-sharp rapier. (It doesnt look in good condition.)".getBytes();
  266. break;
  267. case 15038:
  268. itemDef.actions = new String[5];
  269. itemDef.actions[1] = "Wield";
  270. itemDef.femaleEquip1 = 35087;//female
  271. itemDef.modelOffset1 = 3;
  272. itemDef.modelOffset2 = 0;
  273. itemDef.modelZoom = 1650;
  274. itemDef.modelRotation2 = 1300;
  275. itemDef.modelRotation1 = 498;
  276. itemDef.maleEquip1 = 35087;
  277. itemDef.modelID = 35086;
  278. itemDef.name = "Chaotic longsword";
  279. itemDef.anInt188 = -1;//female sleeve
  280. itemDef.anInt164 = -1;//male sleeve
  281. itemDef.description = "A dangerously-sharp longsword. (It doesnt look in good condition.)".getBytes();
  282. break;
  283. case 15039:
  284. itemDef.actions = new String[5];
  285. itemDef.actions[1] = "Wield";
  286. itemDef.femaleEquip1 = 35089;//female
  287. itemDef.modelOffset1 = 4;
  288. itemDef.modelOffset2 = 2;
  289. itemDef.modelZoom = 1360;
  290. itemDef.modelRotation2 = 354;
  291. itemDef.modelRotation1 = 498;
  292. itemDef.maleEquip1 = 35089;
  293. itemDef.modelID = 35088;
  294. itemDef.name = "Chaotic maul";
  295. itemDef.anInt188 = -1;//female sleeve
  296. itemDef.anInt164 = -1;//male sleeve
  297. itemDef.description = "A dangerously-blunt maul. (It doesnt look in good condition.)".getBytes();
  298. break;
  299. case 15040:
  300. itemDef.actions = new String[5];
  301. itemDef.actions[1] = "Wield";
  302. itemDef.femaleEquip1 = 35091;//female
  303. itemDef.modelOffset1 = 5;
  304. itemDef.modelOffset2 = 0;
  305. itemDef.modelZoom = 1711;
  306. itemDef.modelRotation2 = 365;
  307. itemDef.modelRotation1 = 350;
  308. itemDef.maleEquip1 = 35091;
  309. itemDef.modelID = 35090;
  310. itemDef.name = "Chaotic staff";
  311. itemDef.aByte205 = -10;
  312. itemDef.aByte154 = -10;
  313. itemDef.anInt188 = -1;//female sleeve
  314. itemDef.anInt164 = -1;//male sleeve
  315. itemDef.description = "A staff used by the greatest of wizards. (It doesnt look in good condition.)".getBytes();
  316. break;
  317.  
  318. }
  319.  
  320. public void actionData(int a, String b) {
  321. actions = new String[5];
  322. actions[a] = b;
  323. }
  324.  
  325. public void totalColors(int total) {
  326. originalModelColors = new int[total];
  327. modifiedModelColors = new int[total];
  328. }
  329.  
  330. public void colors(int id, int original, int modified) {
  331. originalModelColors[id] = original;
  332. modifiedModelColors[id] = modified;
  333. }
  334. public void itemData(String n, String d) {
  335. name = n;
  336. description = d.getBytes();
  337. }
  338. public void models(int mID, int mE, int fE, int mE2, int fE2) {
  339. modelID = mID;
  340. maleEquip1 = mE;
  341. femaleEquip1 = fE;
  342. maleEquip2 = mE2;
  343. femaleEquip2 = fE2;
  344. }
  345. public void modelData(int mZ, int mR1, int mR2, int mO1, int mO2) {
  346. modelZoom = mZ;
  347. modelRotation1 = mR1;
  348. modelRotation2 = mR2;
  349. modelOffset1 = mO1;
  350. modelOffset2 = mO2;
  351. }
  352.  
  353. public void toNote() {
  354. ItemDef itemDef = forID(certTemplateID);
  355. modelID = itemDef.modelID;
  356. modelZoom = itemDef.modelZoom;
  357. modelRotation1 = itemDef.modelRotation1;
  358. modelRotation2 = itemDef.modelRotation2;
  359. anInt204 = itemDef.anInt204;
  360. modelOffset1 = itemDef.modelOffset1;
  361. modelOffset2 = itemDef.modelOffset2;
  362. originalModelColors = itemDef.originalModelColors;
  363. modifiedModelColors = itemDef.modifiedModelColors;
  364. ItemDef itemDef_1 = forID(certID);
  365. name = itemDef_1.name;
  366. membersObject = itemDef_1.membersObject;
  367. value = itemDef_1.value;
  368. String s = "a";
  369. char c = itemDef_1.name.charAt(0);
  370. if(c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U')
  371. s = "an";
  372. description = ("Swap this note at any bank for " + s + " " + itemDef_1.name + ".").getBytes();
  373. stackable = true;
  374. }
  375.  
  376. public static Sprite getSprite(int i, int j, int k) {
  377. if(k == 0) {
  378. Sprite sprite = (Sprite) mruNodes1.insertFromCache(i);
  379. if(sprite != null && sprite.anInt1445 != j && sprite.anInt1445 != -1) {
  380. sprite.unlink();
  381. sprite = null;
  382. }
  383. if(sprite != null)
  384. return sprite;
  385. }
  386. ItemDef itemDef = forID(i);
  387. if(itemDef.stackIDs == null)
  388. j = -1;
  389. if(j > 1) {
  390. int i1 = -1;
  391. for(int j1 = 0; j1 < 10; j1++)
  392. if(j >= itemDef.stackAmounts[j1] && itemDef.stackAmounts[j1] != 0)
  393. i1 = itemDef.stackIDs[j1];
  394. if(i1 != -1)
  395. itemDef = forID(i1);
  396. }
  397. Model model = itemDef.method201(1);
  398. if(model == null)
  399. return null;
  400. Sprite sprite = null;
  401. if(itemDef.certTemplateID != -1) {
  402. sprite = getSprite(itemDef.certID, 10, -1);
  403. if(sprite == null)
  404. return null;
  405. }
  406. Sprite sprite2 = new Sprite(32, 32);
  407. int k1 = Texture.textureInt1;
  408. int l1 = Texture.textureInt2;
  409. int ai[] = Texture.anIntArray1472;
  410. int ai1[] = DrawingArea.pixels;
  411. int i2 = DrawingArea.width;
  412. int j2 = DrawingArea.height;
  413. int k2 = DrawingArea.topX;
  414. int l2 = DrawingArea.bottomX;
  415. int i3 = DrawingArea.topY;
  416. int j3 = DrawingArea.bottomY;
  417. Texture.aBoolean1464 = false;
  418. DrawingArea.initDrawingArea(32, 32, sprite2.myPixels);
  419. DrawingArea.drawPixels(32, 0, 0, 0, 32);
  420. Texture.method364();
  421. int k3 = itemDef.modelZoom;
  422. if(k == -1)
  423. k3 = (int)((double)k3 * 1.5D);
  424. if(k > 0)
  425. k3 = (int)((double)k3 * 1.04D);
  426. int l3 = Texture.anIntArray1470[itemDef.modelRotation1] * k3 >> 16;
  427. int i4 = Texture.anIntArray1471[itemDef.modelRotation1] * k3 >> 16;
  428. model.method482(itemDef.modelRotation2, itemDef.anInt204, itemDef.modelRotation1, itemDef.modelOffset1, l3 + model.modelHeight / 2 + itemDef.modelOffset2, i4 + itemDef.modelOffset2);
  429. for(int i5 = 31; i5 >= 0; i5--) {
  430. for(int j4 = 31; j4 >= 0; j4--)
  431. if(sprite2.myPixels[i5 + j4 * 32] == 0)
  432. if(i5 > 0 && sprite2.myPixels[(i5 - 1) + j4 * 32] > 1)
  433. sprite2.myPixels[i5 + j4 * 32] = 1;
  434. else if(j4 > 0 && sprite2.myPixels[i5 + (j4 - 1) * 32] > 1)
  435. sprite2.myPixels[i5 + j4 * 32] = 1;
  436. else if(i5 < 31 && sprite2.myPixels[i5 + 1 + j4 * 32] > 1)
  437. sprite2.myPixels[i5 + j4 * 32] = 1;
  438. else if(j4 < 31 && sprite2.myPixels[i5 + (j4 + 1) * 32] > 1)
  439. sprite2.myPixels[i5 + j4 * 32] = 1;
  440. }
  441. if(k > 0) {
  442. for(int j5 = 31; j5 >= 0; j5--) {
  443. for(int k4 = 31; k4 >= 0; k4--)
  444. if(sprite2.myPixels[j5 + k4 * 32] == 0)
  445. if(j5 > 0 && sprite2.myPixels[(j5 - 1) + k4 * 32] == 1)
  446. sprite2.myPixels[j5 + k4 * 32] = k;
  447. else if(k4 > 0 && sprite2.myPixels[j5 + (k4 - 1) * 32] == 1)
  448. sprite2.myPixels[j5 + k4 * 32] = k;
  449. else if(j5 < 31 && sprite2.myPixels[j5 + 1 + k4 * 32] == 1)
  450. sprite2.myPixels[j5 + k4 * 32] = k;
  451. else if(k4 < 31 && sprite2.myPixels[j5 + (k4 + 1) * 32] == 1)
  452. sprite2.myPixels[j5 + k4 * 32] = k;
  453. }
  454. } else if(k == 0) {
  455. for(int k5 = 31; k5 >= 0; k5--) {
  456. for(int l4 = 31; l4 >= 0; l4--)
  457. if(sprite2.myPixels[k5 + l4 * 32] == 0 && k5 > 0 && l4 > 0 && sprite2.myPixels[(k5 - 1) + (l4 - 1) * 32] > 0)
  458. sprite2.myPixels[k5 + l4 * 32] = 0x302020;
  459. }
  460. }
  461. if(itemDef.certTemplateID != -1) {
  462. int l5 = sprite.anInt1444;
  463. int j6 = sprite.anInt1445;
  464. sprite.anInt1444 = 32;
  465. sprite.anInt1445 = 32;
  466. sprite.drawSprite(0, 0);
  467. sprite.anInt1444 = l5;
  468. sprite.anInt1445 = j6;
  469. }
  470. if(k == 0)
  471. mruNodes1.removeFromCache(sprite2, i);
  472. DrawingArea.initDrawingArea(j2, i2, ai1);
  473. DrawingArea.setDrawingArea(j3, k2, l2, i3);
  474. Texture.textureInt1 = k1;
  475. Texture.textureInt2 = l1;
  476. Texture.anIntArray1472 = ai;
  477. Texture.aBoolean1464 = true;
  478. if(itemDef.stackable)
  479. sprite2.anInt1444 = 33;
  480. else
  481. sprite2.anInt1444 = 32;
  482. sprite2.anInt1445 = j;
  483. return sprite2;
  484. }
  485.  
  486. public Model method201(int i) {
  487. if(stackIDs != null && i > 1) {
  488. int j = -1;
  489. for(int k = 0; k < 10; k++)
  490. if(i >= stackAmounts[k] && stackAmounts[k] != 0)
  491. j = stackIDs[k];
  492. if(j != -1)
  493. return forID(j).method201(1);
  494. }
  495. Model model = (Model) mruNodes2.insertFromCache(id);
  496. if(model != null)
  497. return model;
  498. model = Model.method462(modelID);
  499. if(model == null)
  500. return null;
  501. if(anInt167 != 128 || anInt192 != 128 || anInt191 != 128)
  502. model.method478(anInt167, anInt191, anInt192);
  503. if (originalModelColors != null) {
  504. for (int l = 0; l < originalModelColors.length; l++)
  505. model.method476(originalModelColors[l], modifiedModelColors[l]);
  506.  
  507. }
  508. model.method479(64 + anInt196, 768 + anInt184, -50, -10, -50, true);
  509. model.aBoolean1659 = true;
  510. mruNodes2.removeFromCache(model, id);
  511. return model;
  512. }
  513.  
  514. public Model method202(int i) {
  515. if(stackIDs != null && i > 1) {
  516. int j = -1;
  517. for(int k = 0; k < 10; k++)
  518. if(i >= stackAmounts[k] && stackAmounts[k] != 0)
  519. j = stackIDs[k];
  520. if(j != -1)
  521. return forID(j).method202(1);
  522. }
  523. Model model = Model.method462(modelID);
  524. if(model == null)
  525. return null;
  526. if (originalModelColors != null) {
  527. for (int l = 0; l < originalModelColors.length; l++)
  528. model.method476(originalModelColors[l], modifiedModelColors[l]);
  529.  
  530. }
  531. return model;
  532. }
  533.  
  534. public void readValues(Stream stream) {
  535. do {
  536. int i = stream.readUnsignedByte();
  537. if(i == 0)
  538. return;
  539. if(i == 1)
  540. modelID = stream.readUnsignedWord();
  541. else if(i == 2)
  542. name = stream.readString();
  543. else if(i == 3)
  544. description = stream.readBytes();
  545. else if(i == 4)
  546. modelZoom = stream.readUnsignedWord();
  547. else if(i == 5)
  548. modelRotation1 = stream.readUnsignedWord();
  549. else if(i == 6)
  550. modelRotation2 = stream.readUnsignedWord();
  551. else if(i == 7) {
  552. modelOffset1 = stream.readUnsignedWord();
  553. if(modelOffset1 > 32767)
  554. modelOffset1 -= 0x10000;
  555. } else if(i == 8) {
  556. modelOffset2 = stream.readUnsignedWord();
  557. if(modelOffset2 > 32767)
  558. modelOffset2 -= 0x10000;
  559. } else if(i == 10)
  560. stream.readUnsignedWord();
  561. else if(i == 11)
  562. stackable = true;
  563. else if(i == 12)
  564. value = stream.readDWord();
  565. else if(i == 16)
  566. membersObject = true;
  567. else if(i == 23) {
  568. maleEquip1 = stream.readUnsignedWord();
  569. aByte205 = stream.readSignedByte();
  570. } else if(i == 24)
  571. maleEquip2 = stream.readUnsignedWord();
  572. else if(i == 25) {
  573. femaleEquip1 = stream.readUnsignedWord();
  574. aByte154 = stream.readSignedByte();
  575. } else if(i == 26)
  576. femaleEquip2 = stream.readUnsignedWord();
  577. else if(i >= 30 && i < 35) {
  578. if(groundActions == null)
  579. groundActions = new String[5];
  580. groundActions[i - 30] = stream.readString();
  581. if(groundActions[i - 30].equalsIgnoreCase("hidden"))
  582. groundActions[i - 30] = null;
  583. } else if(i >= 35 && i < 40) {
  584. if(actions == null)
  585. actions = new String[5];
  586. actions[i - 35] = stream.readString();
  587. } else if(i == 40) {
  588. int j = stream.readUnsignedByte();
  589. originalModelColors = new int[j];
  590. modifiedModelColors = new int[j];
  591. for(int k = 0; k < j; k++) {
  592. originalModelColors[k] = stream.readUnsignedWord();
  593. modifiedModelColors[k] = stream.readUnsignedWord();
  594. }
  595. } else if(i == 78)
  596. anInt185 = stream.readUnsignedWord();
  597. else if(i == 79)
  598. anInt162 = stream.readUnsignedWord();
  599. else if(i == 90)
  600. anInt175 = stream.readUnsignedWord();
  601. else if(i == 91)
  602. anInt197 = stream.readUnsignedWord();
  603. else if(i == 92)
  604. anInt166 = stream.readUnsignedWord();
  605. else if(i == 93)
  606. anInt173 = stream.readUnsignedWord();
  607. else if(i == 95)
  608. anInt204 = stream.readUnsignedWord();
  609. else if(i == 97)
  610. certID = stream.readUnsignedWord();
  611. else if(i == 98)
  612. certTemplateID = stream.readUnsignedWord();
  613. else if(i >= 100 && i < 110) {
  614. if(stackIDs == null) {
  615. stackIDs = new int[10];
  616. stackAmounts = new int[10];
  617. }
  618. stackIDs[i - 100] = stream.readUnsignedWord();
  619. stackAmounts[i - 100] = stream.readUnsignedWord();
  620. } else if(i == 110)
  621. anInt167 = stream.readUnsignedWord();
  622. else if(i == 111)
  623. anInt192 = stream.readUnsignedWord();
  624. else if(i == 112)
  625. anInt191 = stream.readUnsignedWord();
  626. else if(i == 113)
  627. anInt196 = stream.readSignedByte();
  628. else if(i == 114)
  629. anInt184 = stream.readSignedByte() * 5;
  630. else if(i == 115)
  631. team = stream.readUnsignedByte();
  632. } while(true);
  633. }
  634.  
  635. public ItemDef() {
  636. id = -1;
  637. }
  638.  
  639. public byte aByte154;
  640. public int value;
  641. public int[] modifiedModelColors;
  642. public int id;
  643. static MRUNodes mruNodes1 = new MRUNodes(100);
  644. public static MRUNodes mruNodes2 = new MRUNodes(50);
  645. public int[] originalModelColors;
  646. public boolean membersObject;
  647. public int anInt162;
  648. public int certTemplateID;
  649. public int femaleEquip2;
  650. public int maleEquip1;
  651. public int anInt166;
  652. public int anInt167;
  653. public String groundActions[];
  654. public int modelOffset1;
  655. public String name;
  656. public static ItemDef[] cache;
  657. public int anInt173;
  658. public int modelID;
  659. public int anInt175;
  660. public boolean stackable;
  661. public byte description[];
  662. public int certID;
  663. public static int cacheIndex;
  664. public int modelZoom;
  665. public static boolean isMembers = true;
  666. public static Stream stream;
  667. public int anInt184;
  668. public int anInt185;
  669. public int maleEquip2;
  670. public String actions[];
  671. public int modelRotation1;
  672. public int anInt191;
  673. public int anInt192;
  674. public int[] stackIDs;
  675. public int modelOffset2;
  676. public static int[] streamIndices;
  677. public int anInt196;
  678. public int anInt197;
  679. public int modelRotation2;
  680. public int femaleEquip1;
  681. public int[] stackAmounts;
  682. public int team;
  683. public static int totalItems;
  684. public int anInt204;
  685. public byte aByte205;
  686. public int anInt164;
  687. public int anInt199;
  688. public int anInt188;
  689. }
Advertisement
Add Comment
Please, Sign In to add comment