Beispiel #1
0
        private static Sprite method207(int i, StreamLoader streamLoader, String s)
        {
            long   l      = (TextClass.method585(s) << 8) + (long)i;
            Sprite sprite = (Sprite)aMRUNodes_238.insertFromCache(l);

            if (sprite != null)
            {
                return(sprite);
            }
            try
            {
                sprite = new Sprite(streamLoader, s, i);
                aMRUNodes_238.removeFromCache(sprite, l);
            }
            catch (Exception _ex)
            {
                return(null);
            }
            return(sprite);
        }
Beispiel #2
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;
        }