Exemplo n.º 1
0
        public ShootManiaXMLRPC.Structs.CurrentMapInfo GetCurrentMapInfo()
        {
            GbxCall request = Client.Request("GetCurrentMapInfo", new object[] { });

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

            if (response.Params.Count == 1 &&
                response.Params[0].GetType() == typeof(Hashtable))
            {
                Hashtable ht = (Hashtable)response.Params[0];
                Structs.CurrentMapInfo cmi = new Structs.CurrentMapInfo();
                cmi.Author        = (string)ht["Author"];
                cmi.Environnement = (string)ht["Environnement"];
                cmi.FileName      = (string)ht["FileName"];
                cmi.MapStyle      = (string)ht["MapStyle"];
                cmi.Name          = (string)ht["Name"];
                cmi.UId           = (string)ht["UId"];
                cmi.GoldTime      = (int)ht["GoldTime"];
                cmi.CopperPrice   = (int)ht["CopperPrice"];
                return(cmi);
            }

            return(new Structs.CurrentMapInfo());
        }
Exemplo n.º 2
0
        public ShootManiaXMLRPC.Structs.CurrentMapInfo GetCurrentMapInfo()
        {
            GbxCall request = Client.Request("GetCurrentMapInfo", new object[] { });

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

            if (response.Params.Count == 1 &&
                response.Params[0].GetType() == typeof(Hashtable))
            {
                Hashtable ht = (Hashtable)response.Params[0];
                Structs.CurrentMapInfo cmi = new Structs.CurrentMapInfo();
                cmi.Author = (string)ht["Author"];
                cmi.Environnement = (string)ht["Environnement"];
                cmi.FileName = (string)ht["FileName"];
                cmi.MapStyle = (string)ht["MapStyle"];
                cmi.Name = (string)ht["Name"];
                cmi.UId = (string)ht["UId"];
                cmi.GoldTime = (int)ht["GoldTime"];
                cmi.CopperPrice = (int)ht["CopperPrice"];
                return cmi;
            }

            return new Structs.CurrentMapInfo();
        }