Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ItemDefinition() {
- cursor2op = -1;
- womanwearzoff = 0;
- femaleEquipModel1 = -1;
- getNotedItem = -1;
- femaleEquipModel2 = -1;
- icursor2 = -1;
- cursor2 = -1;
- manwearyoff = 0;
- itemIsStackable = 0;
- isMembersItem = false;
- womanwearxoff = 0;
- cursor1 = -1;
- certtemplate = -1;
- maleEquipModel3 = -1;
- contrast = 0;
- manwearxoff = 0;
- femaleHeadModel2 = -1;
- name = "null";
- scaleX = 128;
- maleHeadModel2 = -1;
- manwearzoff = 0;
- getItemValue = 1;
- scaleZ = 128;
- lenttemplate = -1;
- stockmarket = false;
- ambient = 0;
- icursor1 = -1;
- maleEquipModel1 = -1;
- modelOffsetY = 0;
- lentlink = -1;
- modelRotationY = 0;
- femaleEquipModel3 = -1;
- z_angle_2d = 0;
- scaleY = 128;
- cursor1op = -1;
- femaleHeadModel = -1;
- dummyObject = 0;
- maleEquipModel2 = -1;
- maleHeadModel = -1;
- modelZoom = 2000;
- womanwearyoff = 0;
- modelRotationX = 0;
- team = 0;
- cursor2iop = -1;
- modelOffsetX = 0;
- }
- final void decode(Packet stream) {
- anInt2617++;
- for (;;) {
- int opcode = stream.readUnsignedByte();
- if (opcode == 0)
- break;
- decode(2, stream, opcode);
- }
- }
- private final void decode(int i, Packet stream, int opcode) {
- if (opcode == 1) {
- this.invModelId = stream.readBigSmart();
- } else if (opcode == 2) {
- this.name = stream.readString();
- } else if (opcode == 4) {
- this.modelZoom = stream.readUShort();
- } else if (opcode == 5) {
- this.modelRotationX = stream.readUShort();
- } else if (opcode == 6) {
- this.modelRotationY = stream.readUShort();
- } else if (opcode == 7) {
- this.modelOffsetX = stream.readUShort();
- if (this.modelOffsetX > 32767) {
- this.modelOffsetX -= 65536;
- }
- } else if (opcode == 8) {
- this.modelOffsetY = stream.readUShort();
- if (this.modelOffsetY > 32767) {
- this.modelOffsetY -= 65536;
- }
- } else if (opcode == 11) {
- this.itemIsStackable = 1;
- } else if (opcode == 12) {
- this.getItemValue = stream.readInt();
- } else if (opcode == 16) {
- this.isMembersItem = true;
- } else if (opcode == 23) {
- this.maleEquipModel1 = stream.readBigSmart();
- } else if (opcode == 24) {
- maleEquipModel2 = stream.readBigSmart();
- } else if (opcode == 25) {
- this.femaleEquipModel1 = stream.readBigSmart();
- } else if (opcode == 26) {
- femaleEquipModel2 = stream.readBigSmart();
- } else if (opcode >= 30 && opcode < 35) {
- itemGroundOption[opcode - 30] = stream.readString();
- } else if (opcode >= 35 && opcode < 40) {
- inventoryOptions[opcode - 35] = stream.readString();
- } else if (opcode == 40) {
- int i_81_ = stream.readUnsignedByte();
- recolorOriginal = new short[i_81_];
- recolorModified = new short[i_81_];
- for (int i_82_ = 0; i_82_ < i_81_; i_82_++) {
- recolorModified[i_82_] = (short) (stream.readUShort());
- recolorOriginal[i_82_] = (short) (stream.readUShort());
- }
- } else if (opcode == 41) {
- int length = stream.readUnsignedByte();
- retextureOriginal = new short[length];
- retextureModified = new short[length];
- for (int i_80_ = 0; i_80_ < length; i_80_++) {
- retextureOriginal[i_80_] = (short) (stream.readUShort());
- retextureModified[i_80_] = (short) (stream.readUShort());
- }
- } else if (opcode == 42) {
- int recolourLen = stream.readUnsignedByte();
- recolorPalette = (new byte[recolourLen]);
- for (int id = 0; id < recolourLen; id++) {
- recolorPalette[id] = stream.readByte();
- }
- } else if (opcode == 65) {
- this.stockmarket = true;
- } else if (opcode == 78) {
- maleEquipModel3 = stream.readBigSmart();
- } else if (opcode == 79) {
- femaleEquipModel3 = stream.readBigSmart();
- } else if (opcode == 90) {
- maleHeadModel = stream.readUShort();
- } else if (opcode == 91) {
- femaleHeadModel = stream.readUShort();
- } else if (opcode == 92) {
- maleHeadModel2 = stream.readUShort();
- } else if (opcode == 93) {
- femaleHeadModel2 = stream.readUShort();
- } else if (opcode == 95) {
- this.z_angle_2d = stream.readUShort();
- } else if (opcode == 96) {
- this.dummyObject = stream.readUnsignedByte();
- } else if (opcode == 97) {
- this.getNotedItem = stream.readUShort();
- } else if (opcode == 98) {
- this.certtemplate = stream.readUShort();
- } else if (opcode >= 100 && opcode < 110) {
- if (countobjs == null) {
- countcounts = new int[10];
- countobjs = new int[10];
- }
- countobjs[opcode - 100] = stream.readUShort();
- countcounts[opcode - 100] = stream.readUShort();
- } else if (opcode == 110) {
- scaleX = stream.readUShort();
- } else if (opcode == 111) {
- scaleY = stream.readUShort();
- } else if (opcode == 112) {
- scaleZ = stream.readUShort();
- } else if (opcode == 113) {
- ambient = stream.readByte();
- } else if (opcode == 114) {
- contrast = 5 * stream.readByte();
- } else if (opcode == 115) {
- this.team = stream.readUnsignedByte();
- } else if (opcode == 121) {
- this.lentlink = stream.readUShort();
- } else if (opcode == 122) {
- this.lenttemplate = stream.readUShort();
- } else if (opcode == 125) {
- manwearxoff = stream.readByte() << 2;
- manwearyoff = stream.readByte() << 2;
- manwearzoff = stream.readByte() << 2;
- } else if (opcode == 126) {
- womanwearxoff = stream.readByte() << 2;
- womanwearyoff = stream.readByte() << 2;
- womanwearzoff = stream.readByte() << 2;
- } else if (opcode == 127) {
- this.cursor1op = stream.readUnsignedByte();
- this.cursor1 = stream.readUShort();
- } else if (opcode == 128) {
- this.cursor2op = stream.readUnsignedByte();
- this.cursor2 = stream.readUShort();
- } else if (opcode == 129) {
- this.cursor1iop = stream.readUnsignedByte();
- this.icursor1 = stream.readUShort();
- } else if (opcode == 130) {
- this.cursor2iop = stream.readUnsignedByte();
- this.icursor2 = stream.readUShort();
- } else if (opcode == 132) {
- int i_71_ = stream.readUnsignedByte();
- campaigns = new int[i_71_];
- for (int i_72_ = 0; i_71_ > i_72_; i_72_++)
- campaigns[i_72_] = stream.readUShort();
- } else if (opcode == 249) {
- int length = stream.readUnsignedByte();
- if (this.params == null) {
- int size = Class7.find_next_greater_pwr2(length);
- this.params = new HashTable(size);
- }
- for (int index = 0; index < length; index++) {
- boolean stringInstance = stream.readUnsignedByte() == 1;
- int key = stream.read24BitInt();
- Node node;
- if (stringInstance)
- node = new StringNode(stream.readString());
- else
- node = new IntegerNode(stream.readInt());
- this.params.put((long) key, i - 1, node);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement