Esempio n. 1
0
        public List <Structs.MapList> GetMapList(int MaxResults, int StartIndex)
        {
            List <Structs.MapList> Result = new List <Structs.MapList>();

            GbxCall request = Client.Request("GetMapList", new object[] { MaxResults, StartIndex });

            GbxCall response = Client.GetResponse(request.Handle);

            if (response.Params.Count == 1 &&
                response.Params[0].GetType() == typeof(ArrayList))
            {
                foreach (Hashtable ht in (ArrayList)response.Params[0])
                {
                    Structs.MapList ml = new Structs.MapList();
                    ml.Author        = (string)ht["Author"];
                    ml.Environnement = (string)ht["Environnement"];
                    ml.FileName      = (string)ht["FileName"];
                    ml.MapStyle      = (string)ht["MapStyle"];
                    ml.Name          = (string)ht["Name"];
                    ml.UId           = (string)ht["UId"];
                    ml.GoldTime      = (int)ht["GoldTime"];
                    ml.CopperPrice   = (int)ht["CopperPrice"];
                    Result.Add(ml);
                }
            }

            return(Result);
        }
Esempio n. 2
0
        public List<Structs.MapList> GetMapList(int MaxResults, int StartIndex)
        {
            List<Structs.MapList> Result = new List<Structs.MapList>();

            GbxCall request = Client.Request("GetMapList", new object[] { MaxResults, StartIndex });

            GbxCall response = Client.GetResponse(request.Handle);

            if (response.Params.Count == 1 &&
                response.Params[0].GetType() == typeof(ArrayList))
            {
                foreach (Hashtable ht in (ArrayList)response.Params[0])
                {
                    Structs.MapList ml = new Structs.MapList();
                    ml.Author = (string)ht["Author"];
                    ml.Environnement = (string)ht["Environnement"];
                    ml.FileName = (string)ht["FileName"];
                    ml.MapStyle = (string)ht["MapStyle"];
                    ml.Name = (string)ht["Name"];
                    ml.UId = (string)ht["UId"];
                    ml.GoldTime = (int)ht["GoldTime"];
                    ml.CopperPrice = (int)ht["CopperPrice"];
                    Result.Add(ml);
                }
            }

            return Result;
        }