Example #1
2
        public VarList.VarData QueryRecord(string name, int row, int col)
        {
            VarList.VarData result = new VarList.VarData();
            try
            {
                if (!mRecordSet.ContainsKey(name))
                {
                    return(result);
                }

                GameRecord record = mRecordSet[name];
                if (record == null)
                {
                    return(result);
                }

                if (!record.GetValue(row, col, ref result))
                {
                    //Log.Trace("Error,GameObject.QueryRecord GetValue Failed");
                }
            }
            catch (Exception ex)
            {
                //Log.Trace("Error:GameObject.QueryRecord Exception :" + ex.ToString());
            }

            return(result);
        }
Example #2
1
        public bool QueryRecordObject(string name, int row, int col, ref ObjectID oResult)
        {
            try
            {
                if (!mRecordSet.ContainsKey(name))
                {
                    return(false);
                }

                GameRecord record = mRecordSet[name];
                if (record == null)
                {
                    return(false);
                }

                VarList.VarData result = FreeAllocManager.GetInstance.GetVarObject();
                result.nType = VarType.Object;
                if (!record.GetValue(row, col, ref result))
                {
                    FreeAllocManager.GetInstance.SetVarData(result);
                    return(false);
                }

                oResult = (result.Data as ObjectID).Clone();
                FreeAllocManager.GetInstance.SetVarData(result);
            }
            catch (Exception ex)
            {
                //Log.Trace("Error:GameObject.QueryRecord Exception :" + ex.ToString());
            }
            return(true);
        }
Example #3
0
        public bool QueryRecordObject(string name, int row, int col, ref ObjectID oResult)
        {
            try
            {
                if (!mRecordSet.ContainsKey(name))
                {
                    return(false);
                }

                GameRecord record = mRecordSet[name];
                if (record == null)
                {
                    return(false);
                }
                Var result = Var.zero;

                if (!record.GetValue(row, col, ref result))
                {
                    return(false);
                }
                oResult = result.GetObject();
            }
            catch (Exception ex)
            {
                LogSystem.Log("Error:GameObject.QueryRecord Exception :", ex.ToString());
            }
            return(true);
        }
Example #4
0
        public Var QueryRecord(string name, int row, int col)
        {
            Var result = Var.zero;

            try
            {
                if (!mRecordSet.ContainsKey(name))
                {
                    return(result);
                }

                GameRecord record = mRecordSet[name];
                if (record == null)
                {
                    return(result);
                }

                if (!record.GetValue(row, col, ref result))
                {
                    LogSystem.Log("Error,GameObject.QueryRecord GetValue Failed");
                }
            }
            catch (Exception ex)
            {
                LogSystem.Log("Error:GameObject.QueryRecord Exception :", ex.ToString());
            }

            return(result);
        }