Beispiel #1
0
        private Model method206(int i, int j)
        {
            Model model = (Model)aMRUNodes_264.insertFromCache((i << 16) + j);

            if (model != null)
            {
                return(model);
            }
            if (i == 1)
            {
                model = Model.method462(j);
            }
            if (i == 2)
            {
                model = EntityDef.forID(j).method160();
            }
            if (i == 3)
            {
                model = UnityClient.myPlayer.method453();
            }
            if (i == 4)
            {
                model = ItemDef.forID(j).method202(50);
            }
            if (i == 5)
            {
                model = null;
            }
            if (model != null)
            {
                aMRUNodes_264.removeFromCache(model, (i << 16) + j);
            }
            return(model);
        }
Beispiel #2
0
        public Model method453()
        {
            if (!visible)
            {
                return(null);
            }
            if (desc != null)
            {
                return(desc.method160());
            }
            bool flag = false;

            for (int i = 0; i < 12; i++)
            {
                int j = equipment[i];
                if (j >= 256 && j < 512 && !IDK.cache[j - 256].method539())
                {
                    flag = true;
                }
                if (j >= 512 && !ItemDef.forID(j - 512).method192(anInt1702))
                {
                    flag = true;
                }
            }

            if (flag)
            {
                return(null);
            }
            Model[] aclass30_sub2_sub4_sub6s = new Model[12];
            int     k = 0;

            for (int l = 0; l < 12; l++)
            {
                int i1 = equipment[l];
                if (i1 >= 256 && i1 < 512)
                {
                    Model model_1 = IDK.cache[i1 - 256].method540();
                    if (model_1 != null)
                    {
                        aclass30_sub2_sub4_sub6s[k++] = model_1;
                    }
                }
                if (i1 >= 512)
                {
                    Model model_2 = ItemDef.forID(i1 - 512).method194(anInt1702);
                    if (model_2 != null)
                    {
                        aclass30_sub2_sub4_sub6s[k++] = model_2;
                    }
                }
            }

            Model model = new Model(k, aclass30_sub2_sub4_sub6s);

            for (int j1 = 0; j1 < 5; j1++)
            {
                if (anIntArray1700[j1] != 0)
                {
                    model.method476(UnityClient.anIntArrayArray1003[j1][0], UnityClient.anIntArrayArray1003[j1][anIntArray1700[j1]]);
                    if (j1 == 1)
                    {
                        model.method476(UnityClient.anIntArray1204[0], UnityClient.anIntArray1204[anIntArray1700[j1]]);
                    }
                }
            }
            return(model);
        }
Beispiel #3
0
        public void updatePlayer(Stream stream)
        {
            stream.currentOffset = 0;
            anInt1702            = stream.readUnsignedByte();
            headIcon             = stream.readUnsignedByte();
            skullIcon            = stream.readUnsignedByte();
            desc = null;
            team = 0;
            for (int j = 0; j < 12; j++)
            {
                int k = stream.readUnsignedByte();
                if (k == 0)
                {
                    equipment[j] = 0;
                    continue;
                }
                int i1 = stream.readUnsignedByte();
                equipment[j] = (k << 8) + i1;
                if (j == 0 && equipment[0] == 65535)
                {
                    desc = EntityDef.forID(stream.readUnsignedWord());
                    break;
                }
                if (equipment[j] >= 512 && equipment[j] - 512 < ItemDef.totalItems)
                {
                    int l1 = ItemDef.forID(equipment[j] - 512).team;
                    if (l1 != 0)
                    {
                        team = l1;
                    }
                }
            }

            for (int l = 0; l < 5; l++)
            {
                int j1 = stream.readUnsignedByte();
                if (j1 < 0 || j1 >= UnityClient.anIntArrayArray1003[l].Length)
                {
                    j1 = 0;
                }
                anIntArray1700[l] = j1;
            }

            base.anInt1511 = stream.readUnsignedWord();
            if (base.anInt1511 == 65535)
            {
                base.anInt1511 = -1;
            }
            base.anInt1512 = stream.readUnsignedWord();
            if (base.anInt1512 == 65535)
            {
                base.anInt1512 = -1;
            }
            base.anInt1554 = stream.readUnsignedWord();
            if (base.anInt1554 == 65535)
            {
                base.anInt1554 = -1;
            }
            base.anInt1555 = stream.readUnsignedWord();
            if (base.anInt1555 == 65535)
            {
                base.anInt1555 = -1;
            }
            base.anInt1556 = stream.readUnsignedWord();
            if (base.anInt1556 == 65535)
            {
                base.anInt1556 = -1;
            }
            base.anInt1557 = stream.readUnsignedWord();
            if (base.anInt1557 == 65535)
            {
                base.anInt1557 = -1;
            }
            base.anInt1505 = stream.readUnsignedWord();
            if (base.anInt1505 == 65535)
            {
                base.anInt1505 = -1;
            }
            name        = TextClass.fixName(TextClass.nameForLong(stream.readQWord()));
            combatLevel = stream.readUnsignedByte();
            skill       = stream.readUnsignedWord();
            visible     = true;
            aLong1718   = 0L;
            for (int k1 = 0; k1 < 12; k1++)
            {
                aLong1718 <<= 4;
                if (equipment[k1] >= 256)
                {
                    aLong1718 += equipment[k1] - 256;
                }
            }

            if (equipment[0] >= 256)
            {
                aLong1718 += equipment[0] - 256 >> 4;
            }
            if (equipment[1] >= 256)
            {
                aLong1718 += equipment[1] - 256 >> 8;
            }
            for (int i2 = 0; i2 < 5; i2++)
            {
                aLong1718 <<= 3;
                aLong1718  += anIntArray1700[i2];
            }

            aLong1718 <<= 1;
            aLong1718  += anInt1702;
        }
Beispiel #4
0
        public Model method452()
        {
            if (desc != null)
            {
                int j = -1;
                if (base.anim >= 0 && base.anInt1529 == 0)
                {
                    j = Animation.anims[base.anim].anIntArray353[base.anInt1527];
                }
                else
                if (base.anInt1517 >= 0)
                {
                    j = Animation.anims[base.anInt1517].anIntArray353[base.anInt1518];
                }
                Model model = desc.method164(-1, j, null);
                return(model);
            }
            long l  = aLong1718;
            int  k  = -1;
            int  i1 = -1;
            int  j1 = -1;
            int  k1 = -1;

            if (base.anim >= 0 && base.anInt1529 == 0)
            {
                Animation animation = Animation.anims[base.anim];
                k = animation.anIntArray353[base.anInt1527];
                if (base.anInt1517 >= 0 && base.anInt1517 != base.anInt1511)
                {
                    i1 = Animation.anims[base.anInt1517].anIntArray353[base.anInt1518];
                }
                if (animation.anInt360 >= 0)
                {
                    j1 = animation.anInt360;
                    l += j1 - equipment[5] << 40;
                }
                if (animation.anInt361 >= 0)
                {
                    k1 = animation.anInt361;
                    l += k1 - equipment[3] << 48;
                }
            }
            else
            if (base.anInt1517 >= 0)
            {
                k = Animation.anims[base.anInt1517].anIntArray353[base.anInt1518];
            }
            Model model_1 = (Model)mruNodes.insertFromCache(l);

            if (model_1 == null)
            {
                bool flag = false;
                for (int i2 = 0; i2 < 12; i2++)
                {
                    int k2 = equipment[i2];
                    if (k1 >= 0 && i2 == 3)
                    {
                        k2 = k1;
                    }
                    if (j1 >= 0 && i2 == 5)
                    {
                        k2 = j1;
                    }
                    if (k2 >= 256 && k2 < 512 && !IDK.cache[k2 - 256].method537())
                    {
                        flag = true;
                    }
                    if (k2 >= 512 && !ItemDef.forID(k2 - 512).method195(anInt1702))
                    {
                        flag = true;
                    }
                }

                if (flag)
                {
                    if (aLong1697 != -1L)
                    {
                        model_1 = (Model)mruNodes.insertFromCache(aLong1697);
                    }
                    if (model_1 == null)
                    {
                        return(null);
                    }
                }
            }
            if (model_1 == null)
            {
                Model[] aclass30_sub2_sub4_sub6s = new Model[12];
                int     j2 = 0;
                for (int l2 = 0; l2 < 12; l2++)
                {
                    int i3 = equipment[l2];
                    if (k1 >= 0 && l2 == 3)
                    {
                        i3 = k1;
                    }
                    if (j1 >= 0 && l2 == 5)
                    {
                        i3 = j1;
                    }
                    if (i3 >= 256 && i3 < 512)
                    {
                        Model model_3 = IDK.cache[i3 - 256].method538();
                        if (model_3 != null)
                        {
                            aclass30_sub2_sub4_sub6s[j2++] = model_3;
                        }
                    }
                    if (i3 >= 512)
                    {
                        Model model_4 = ItemDef.forID(i3 - 512).method196(anInt1702);
                        if (model_4 != null)
                        {
                            aclass30_sub2_sub4_sub6s[j2++] = model_4;
                        }
                    }
                }
                model_1 = new Model(j2, aclass30_sub2_sub4_sub6s);
                for (int j3 = 0; j3 < 5; j3++)
                {
                    if (anIntArray1700[j3] != 0)
                    {
                        model_1.method476(UnityClient.anIntArrayArray1003[j3][0], UnityClient.anIntArrayArray1003[j3][anIntArray1700[j3]]);
                        if (j3 == 1)
                        {
                            model_1.method476(UnityClient.anIntArray1204[0], UnityClient.anIntArray1204[anIntArray1700[j3]]);
                        }
                    }
                }

                model_1.method469();
                model_1.method479(64, 850, -30, -50, -30, true);
                mruNodes.removeFromCache(model_1, l);
                aLong1697 = l;
            }
            if (aBoolean1699)
            {
                return(model_1);
            }
            Model model_2 = Model.aModel_1621;

            model_2.method464(model_1, Class36.method532(k) & Class36.method532(i1));
            if (k != -1 && i1 != -1)
            {
                model_2.method471(Animation.anims[base.anim].anIntArray357, i1, k);
            }
            else
            if (k != -1)
            {
                model_2.method470(k);
            }
            model_2.method466();
            model_2.anIntArrayArray1658 = null;
            model_2.anIntArrayArray1657 = null;
            return(model_2);
        }
Beispiel #5
0
		public override Model getRotatedModel()
		{
			ItemDef itemDef = ItemDef.forID(ID);
			return itemDef.method201(anInt1559);
		}