Esempio n. 1
0
        private int GetProp(IBaseClientDLL.RecvTable *RecvTable, string PropName, IBaseClientDLL.RecvProp **Prop)
        {
            int ExtraOffset = 0;

            for (int Index = 0; Index < RecvTable->propCount; Index++)
            {
                IBaseClientDLL.RecvProp * RecvProp = &RecvTable->props[Index];
                IBaseClientDLL.RecvTable *Child    = RecvProp->dataTable;

                if (Child != null && (Child->propCount > 0))
                {
                    int Temp = GetProp(Child, PropName, Prop);

                    if (Temp != 0)
                    {
                        ExtraOffset += RecvProp->offset + Temp;
                    }
                }

                if (Marshal.PtrToStringAnsi((IntPtr)RecvProp->name) != PropName)
                {
                    continue;
                }

                if (Prop != null)
                {
                    *Prop = RecvProp;
                }

                return(RecvProp->offset + ExtraOffset);
            }

            return(ExtraOffset);
        }
Esempio n. 2
0
        private int GetProp(string TableName, string PropName, IBaseClientDLL.RecvProp **Prop = null)
        {
            IBaseClientDLL.RecvTable *RecvTable = GetTable(TableName);
            if (RecvTable == null)
            {
                return(0);
            }

            return(GetProp(RecvTable, PropName, Prop));
        }