Example #1
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]));
        }
Example #2
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]));
        }