Beispiel #1
0
    public override void Execute(INotification notification)
    {
        MsgPlayerLevelChanged message = notification.Body as MsgPlayerLevelChanged;

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

        if (!message.m_IsSelf)
        {
            for (uint i = message.m_OldLevel + 1; i <= message.m_NewLevel; i++)
            {
                chatProxy.AddMessage(chatProxy.CurrentChannel, string.Format(languageProxy.GetLocalization(100055), message.m_PlayerName, i));
            }
        }
        else
        {
            for (uint i = message.m_OldLevel + 1; i <= message.m_NewLevel; i++)
            {
                chatProxy.AddMessage(chatProxy.CurrentChannel, string.Format(languageProxy.GetLocalization(100053), i));

                //UNDONE 调升级UI chw
                //EventDispatcher.Global.DispatchEvent(Notifications.MSG_CONFIRM_OPEN, NotifactionTypeEnum.NotifactionTypeEnum_UpgradePanel, true, true, i);
            }
        }
    }
Beispiel #2
0
        /// <summary>
        /// 收到聊天消息
        /// </summary>
        /// <param name="buf"></param>
        private void OnChatMessage(KProtoBuf buf)
        {
            S2C_CHAT_MESSAGE msg = buf as S2C_CHAT_MESSAGE;

            ChatProxy proxy = GameFacade.Instance.RetrieveProxy(ProxyName.ChatProxy) as ChatProxy;

            proxy.AddMessage(s2c_channel(msg.channel), msg.message, msg.fromID, msg.fromName);
        }
    public override void Execute(INotification notification)
    {
        MsgPlayerDanExpChanged message = (MsgPlayerDanExpChanged)notification.Body;

        ChatProxy chatProxy = Facade.RetrieveProxy(ProxyName.ChatProxy) as ChatProxy;

        chatProxy.AddMessage(ChatChannel.CombatLog, "Add dan exp " + message.m_Exp);
    }
Beispiel #4
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;
            }
        }
    public override void Execute(INotification notification)
    {
        MsgTeamErrorInfo message   = (MsgTeamErrorInfo)notification.Body;
        ChatProxy        chatProxy = Facade.RetrieveProxy(ProxyName.ChatProxy) as ChatProxy;

        chatProxy.AddMessage(chatProxy.CurrentChannel, message.m_Error);

        SendNotification(NotificationName.MSG_TEAM_ERROR_INFO, message.m_Error);
    }
Beispiel #6
0
    public override void Execute(INotification notification)
    {
        MsgPlayerShipExpChanged message = (MsgPlayerShipExpChanged)notification.Body;

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

        chatProxy.AddMessage(ChatChannel.CombatLog, string.Format(languageProxy.GetLocalization(100050), message.m_Exp));

        if (message.m_Exp > 0)
        {
            //UNDONE 获得道具提示  chw

            /*
             *          MsgItemGetting msg = MessageSingleton.Get<MsgItemGetting>();
             *          msg.m_IconName = MissionRewardIconName.GetItemName((int)PackageType.eSpecialAirExp, -1);
             *          msg.m_IconBundle = MissionRewardIconName.GetIconBundle((int)PackageType.eSpecialAirExp, -1);
             *          msg.m_IconName = MissionRewardIconName.GetName((int)PackageType.eSpecialAirExp, -1);
             *          msg.m_Count = message.m_Exp;
             *
             *          SendNotification(NotificationName.ItemGetting, msg);
             */
        }
    }