예제 #1
0
        private ObjectDef method457()
        {
            int i = -1;

            if (anInt1601 != -1)
            {
                try{
                    VarBit varBit = VarBit.cache[anInt1601];
                    int    k      = varBit.anInt648;
                    int    l      = varBit.anInt649;
                    int    i1     = varBit.anInt650;
                    int    j1     = UnityClient.anIntArray1232[i1 - l];
                    i = clientInstance.variousSettings[k] >> l & j1;
                } catch (Exception ex) {}
            }
//			else
//				if (anInt1602 != -1)
//					i = clientInstance.variousSettings[anInt1602];
            if (i < 0 || i >= anIntArray1600.Length || anIntArray1600[i] == -1)
            {
                return(null);
            }
            else
            {
                return(ObjectDef.forID(anIntArray1600[i]));
            }
        }
예제 #2
0
        public static void unpackConfig(StreamLoader streamLoader)
        {
            Stream stream    = new Stream(streamLoader.getDataForName("varbit.dat"));
            int    cacheSize = stream.readUnsignedWord();

            if (cache == null)
            {
                cache = new VarBit[cacheSize];
            }
            for (int j = 0; j < cacheSize; j++)
            {
                if (cache[j] == null)
                {
                    cache[j] = new VarBit();
                }
                cache[j].readValues(stream);
                if (cache[j].aBoolean651)
                {
                    Varp.cache[cache[j].anInt648].aBoolean713 = true;
                }
            }

            if (stream.currentOffset != stream.buffer.Length)
            {
                UnityEngine.Debug.Log("varbit load mismatch");
            }
        }
예제 #3
0
        public ObjectDef method580()
        {
            int i = -1;

            if (anInt774 != -1)
            {
                VarBit varBit = VarBit.cache[anInt774];
                int    j      = varBit.anInt648;
                int    k      = varBit.anInt649;
                int    l      = varBit.anInt650;
                int    i1     = UnityClient.anIntArray1232[l - k];
                i = clientInstance.variousSettings[j] >> k & i1;
            }
            else
            if (anInt749 != -1)
            {
                i = clientInstance.variousSettings[anInt749];
            }
            if (i < 0 || i >= childrenIDs.Length || childrenIDs[i] == -1)
            {
                return(null);
            }
            else
            {
                return(forID(childrenIDs[i]));
            }
        }
예제 #4
0
 public EntityDef method161()
 {
     try {
         int j = -1;
         if (anInt57 != -1)
         {
             VarBit varBit = VarBit.cache[anInt57];
             int    k      = varBit.anInt648;
             int    l      = varBit.anInt649;
             int    i1     = varBit.anInt650;
             int    j1     = UnityClient.anIntArray1232[i1 - l];
             j = clientInstance.variousSettings[k] >> l & j1;
         }
         else
         if (anInt59 != -1)
         {
             j = clientInstance.variousSettings[anInt59];
         }
         if (j < 0 || j >= childrenIDs.Length || childrenIDs[j] == -1)
         {
             return(null);
         }
         else
         {
             return(forID(childrenIDs[j]));
         }
     } catch (Exception e) {
         return(null);
     }
 }