Ejemplo n.º 1
0
        public DedimaniaPlayerLeaveReply PlayerLeave(string game, string login)
        {
            object[] multiCallRawResult = Proxy.MultiCall(new[]
            {
                new RPCMethodInfo("dedimania.Authenticate", AuthParameters),
                new RPCMethodInfo("dedimania.PlayerLeave", game, login),
                new RPCMethodInfo("dedimania.WarningsAndTTR")
            });

            MultiCallResult multiCallResult = MultiCallResult.Parse(multiCallRawResult);

            if (multiCallResult == null)
            {
                return(null);
            }

            FaultInfo faultInfo = FaultInfo.Parse(multiCallRawResult[1]);

            if (faultInfo != null)
            {
                return(null);
            }

            return(DedimaniaPlayerLeaveReply.Parse(multiCallRawResult[1]));
        }
Ejemplo n.º 2
0
        public bool ValidateAccount()
        {
            object[] multiCallRawResult = Proxy.MultiCall(new[]
            {
                new RPCMethodInfo("dedimania.Authenticate", AuthParameters),
                new RPCMethodInfo("dedimania.ValidateAccount"),
                new RPCMethodInfo("dedimania.WarningsAndTTR")
            });

            MultiCallResult multiCallResult = MultiCallResult.Parse(multiCallRawResult);

            if (multiCallResult == null)
            {
                return(false);
            }

            FaultInfo faultInfo = FaultInfo.Parse(multiCallRawResult[1]);

            if (faultInfo != null)
            {
                return(false);
            }

            return(true);
        }
Ejemplo n.º 3
0
        public DedimaniaCurrentChallengeReply CurrentChallenge(string uid, string name, string environment, string author, string game, int mode, DedimaniaServerInfo serverInfo, int maxGetTimes, DedimaniaPlayerInfo[] players)
        {
            object[] multiCallRawResult = Proxy.MultiCall(new[]
            {
                new RPCMethodInfo("dedimania.Authenticate", AuthParameters),
                new RPCMethodInfo("dedimania.CurrentChallenge", uid, name, environment, author, game, mode, serverInfo, maxGetTimes, players),
                new RPCMethodInfo("dedimania.WarningsAndTTR")
            });

            MultiCallResult multiCallResult = MultiCallResult.Parse(multiCallRawResult);

            if (multiCallResult == null)
            {
                return(null);
            }

            FaultInfo faultInfo = FaultInfo.Parse(multiCallRawResult[1]);

            if (faultInfo != null)
            {
                return(null);
            }

            return(DedimaniaCurrentChallengeReply.Parse(multiCallRawResult[1]));
        }
Ejemplo n.º 4
0
        public DedimaniaChallengeRaceTimesReply ChallengeRaceTimes(string uid, string name, string environment, string author, string game, int mode, int numberOfChecks, int maxGetTimes, DedimaniaTime[] times)
        {
            object[] multiCallRawResult = Proxy.MultiCall(new[]
            {
                new RPCMethodInfo("dedimania.Authenticate", AuthParameters),
                new RPCMethodInfo("dedimania.ChallengeRaceTimes", uid, name, environment, author, game, mode, numberOfChecks, maxGetTimes, times),
                new RPCMethodInfo("dedimania.WarningsAndTTR")
            });

            MultiCallResult multiCallResult = MultiCallResult.Parse(multiCallRawResult);

            if (multiCallResult == null)
            {
                return(null);
            }

            FaultInfo faultInfo = FaultInfo.Parse(multiCallRawResult[1]);

            if (faultInfo != null)
            {
                return(null);
            }

            return(DedimaniaChallengeRaceTimesReply.Parse(multiCallRawResult[1]));
        }
Ejemplo n.º 5
0
        public bool UpdateServerPlayers(string game, int mode, DedimaniaServerInfo serverInfo, DedimaniaPlayerInfo[] players)
        {
            object[] multiCallRawResult = Proxy.MultiCall(new[]
            {
                new RPCMethodInfo("dedimania.Authenticate", AuthParameters),
                new RPCMethodInfo("dedimania.UpdateServerPlayers", game, mode, serverInfo, players),
                new RPCMethodInfo("dedimania.WarningsAndTTR")
            });

            MultiCallResult multiCallResult = MultiCallResult.Parse(multiCallRawResult);

            if (multiCallResult == null)
            {
                return(false);
            }

            FaultInfo faultInfo = FaultInfo.Parse(multiCallRawResult[1]);

            if (faultInfo != null)
            {
                return(false);
            }

            return(ParseBool(multiCallRawResult[1]));
        }