Example #1
0
        /// <summary>
        /// 收到错误提示
        /// </summary>
        /// <param name="buf"></param>
        private void OnErrorCode(KProtoBuf buf)
        {
            S2C_ERROR_CODE msg = buf as S2C_ERROR_CODE;

            ChatProxy        chatProxy     = GameFacade.Instance.RetrieveProxy(ProxyName.ChatProxy) as ChatProxy;
            CfgLanguageProxy languageProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgLanguageProxy) as CfgLanguageProxy;

            switch ((KErrorCode)msg.error)
            {
            case KErrorCode.errSendBlackMsg:
                chatProxy.AddMessage(chatProxy.CurrentChannel, languageProxy.GetLocalization(3007));
                break;

            case KErrorCode.errSendNotOnLineMsg:
                chatProxy.AddMessage(chatProxy.CurrentChannel, languageProxy.GetLocalization(3006));
                break;
            }
        }
Example #2
0
    private void OnErrorCode(KProtoBuf buffer)
    {
        S2C_ERROR_CODE respond = buffer as S2C_ERROR_CODE;

        Debug.LogErrorFormat("!!!!!!!!! OnErrorCode {0}", (KErrorCode)respond.error);
    }