public Task Dispatch(ServerServiceImplement impl, ServiceMethod method) { switch (method.MethodId) { case 1001: return((impl as IDbSyncNotifyImpl).NotifyPlayerLoaded((ulong)method.Args[0])); case 2001: return((impl as ILoginNotifyImpl).NotifyPlayerLogin((ulong)method.Args[0])); case 3001: return((impl as ILogicClientImpl).AskChangeName((ulong)method.Args[0], (string)method.Args[1])); case 3002: return((impl as ILogicClientImpl).AskAddMoney((ulong)method.Args[0], (uint)method.Args[1])); case 3003: return((impl as ILogicClientImpl).AskLearnSkill((ulong)method.Args[0], (uint)method.Args[1])); case 4001: return((impl as ILoginClientImpl).AskLogin((ulong)method.Args[0])); } return(Task.Run(() => { })); }
public Task Dispatch(ServerServiceImplement impl, ServiceMethod method) { switch (method.MethodId) { case 1001: return (impl as IDbSyncNotifyImpl).NotifyPlayerLoaded((ulong)method.Args[0]); case 2001: return (impl as ILoginNotifyImpl).NotifyPlayerLogin((ulong)method.Args[0]); case 3001: return (impl as ILogicClientImpl).AskChangeName((ulong)method.Args[0], (string)method.Args[1]); case 3002: return (impl as ILogicClientImpl).AskAddMoney((ulong)method.Args[0], (uint)method.Args[1]); case 3003: return (impl as ILogicClientImpl).AskLearnSkill((ulong)method.Args[0], (uint)method.Args[1]); case 4001: return (impl as ILoginClientImpl).AskLogin((ulong)method.Args[0]); } return Task.Run(() => { }); }