예제 #1
0
 private static bool ParseOursServerEntryId(byte[] entryId, out long fid, out long mid, out int instanceNum)
 {
     if (entryId == null || entryId.Length != 21 || entryId[0] != 1)
     {
         fid         = 0L;
         mid         = 0L;
         instanceNum = 0;
         return(false);
     }
     fid         = ParseSerialize.ParseInt64(entryId, 1);
     mid         = ParseSerialize.ParseInt64(entryId, 9);
     instanceNum = ParseSerialize.ParseInt32(entryId, 17);
     return(true);
 }
예제 #2
0
        public static void ParseByElementType(byte[] buffer, ref int pos, IPropertyProcess process)
        {
            var property = (UInt32)ParseSerialize.ParseInt32(buffer, pos);
            ElementTypeProcessBase elementTypeProcess = null;

            if (MetaProperty.JudgePropIsMetaProp(property))
            {
                elementTypeProcess = new MetaPropertyProcess(process);
            }
            else if (Marker.JudgeIsMarker(property))
            {
                elementTypeProcess = new MarkerProcess(process);
            }
            else
            {
                elementTypeProcess = new PropValueProcess(process);
            }
            elementTypeProcess.Parse(buffer, ref pos);
        }