Beispiel #1
0
    /// <summary>
    /// 请求商城信息的消息处理
    /// </summary>
    /// <param name="token"></param>
    /// <param name="model"></param>
    private void OnReqMallInfo(UserToken token, SocketModel model)
    {
        ReqMallInfo req = SerializeUtil.Deserialize <ReqMallInfo>(model.message);

        RspMallInfo rsp = new RspMallInfo();

        foreach (MallCfg item in ConfigManager.instance.mallCfgs.Values)
        {
            rsp.goods.Add((uint)item.ID);
        }

        NetworkManager.Send(token, (int)MsgID.MallInfo_SRES, rsp);
    }
Beispiel #2
0
    private void OnMallInfoRsp(SocketModel model)
    {
        RspMallInfo rsp = SerializeUtil.Deserialize <RspMallInfo>(model.message);

        WindowManager.instance.Open <MallWnd>().Init(rsp.goods);
    }