Exemple #1
0
    //队伍频道
    CommandCallbackType ReceiveTeamMsgHandle(byte[] dataBuffer, int socketID)
    {
        SMsgChat_SC sMsgChat_SC = SMsgChat_SC.ParsePackage(dataBuffer);

        sMsgChat_SC.L_LabelChat = ChatRecordManager.Instance.ParseColorChat(Chat.WindowType.Team, sMsgChat_SC);
        sMsgChat_SC.L_Channel   = (int)Chat.WindowType.Team;
        ChatRecordManager.Instance.AddPublicRecord(Chat.WindowType.Team, sMsgChat_SC);
        UIEventManager.Instance.TriggerUIEvent(UIEventType.WorldChatMsg, sMsgChat_SC);
        return(CommandCallbackType.Continue);
    }
Exemple #2
0
    //私人频道
    CommandCallbackType ReceivePrivateMsgHandle(byte[] dataBuffer, int socketID)
    {
        SMsgChat_SC sMsgChat_SC = SMsgChat_SC.ParsePackage(dataBuffer);

        sMsgChat_SC.L_LabelChat = ChatRecordManager.Instance.ParseColorChat(Chat.WindowType.Private, sMsgChat_SC);
        sMsgChat_SC.L_Channel   = (int)Chat.WindowType.Private;
        sMsgChat_SC.L_ChaterID  = PlayerManager.Instance.FindHeroDataModel().ActorID == sMsgChat_SC.senderActorID ? sMsgChat_SC.accepterActorID : sMsgChat_SC.senderActorID;
        ChatRecordManager.Instance.AddPrivateRecord(sMsgChat_SC);
        UIEventManager.Instance.TriggerUIEvent(UIEventType.PrivateChatMsg, sMsgChat_SC);
        return(CommandCallbackType.Continue);
    }
Exemple #3
0
    //世界频道
    CommandCallbackType ReceiveWorldMsgHandle(byte[] dataBuffer, int socketID)
    {
        SMsgChat_SC sMsgChat_SC = SMsgChat_SC.ParsePackage(dataBuffer);

        sMsgChat_SC.L_LabelChat = ChatRecordManager.Instance.ParseColorChat(Chat.WindowType.World, sMsgChat_SC);
        sMsgChat_SC.L_Channel   = (int)Chat.WindowType.World;
        if (GameManager.Instance.CurrentState == GameManager.GameState.GAME_STATE_TOWN)
        {
            UI.GoodsMessageManager.Instance.AddNoticeMessage(sMsgChat_SC);
        }
        ChatRecordManager.Instance.AddPublicRecord(Chat.WindowType.World, sMsgChat_SC);
        UIEventManager.Instance.TriggerUIEvent(UIEventType.WorldChatMsg, sMsgChat_SC);
        return(CommandCallbackType.Continue);
    }
Exemple #4
0
    CommandCallbackType ReceiveSpaceMsgHandle(byte[] dataBuffer, int socketID)
    {
        SMsgChat_SC sMsgChat_SC = SMsgChat_SC.ParsePackage(dataBuffer);

        sMsgChat_SC.L_LabelChat = ChatRecordManager.Instance.ParseColorChat(Chat.WindowType.Town, sMsgChat_SC);
        sMsgChat_SC.L_Channel   = (int)Chat.WindowType.Town;
        if (sMsgChat_SC.senderActorID == PlayerManager.Instance.FindHeroDataModel().ActorID&& sMsgChat_SC.bChatType == 1)
        {
            return(CommandCallbackType.Continue);
        }
        ChatRecordManager.Instance.AddPublicRecord(Chat.WindowType.Town, sMsgChat_SC);
        UIEventManager.Instance.TriggerUIEvent(UIEventType.WorldChatMsg, sMsgChat_SC);
        return(CommandCallbackType.Continue);
    }
Exemple #5
0
    CommandCallbackType ReceiveGetItemtipHandle(byte[] dataBuffer, int socketID)
    {
        SMsgChat_SC    sMsgChat_SC    = SMsgChat_SC.ParsePackage(dataBuffer);
        SMsgTipChat_SC sMsgTipChat_SC = SMsgTipChat_SC.ParsePackage(sMsgChat_SC.tipsMessage);

        if (sMsgTipChat_SC.byTipLevel == (byte)SMsgTipChat_SC.CHAT_TIPS_LEVEL.CHAT_TIPS_LEVEL3)
        {
            if (UI.GoodsMessageManager.Instance != null)
            {
                for (int i = 0; i < sMsgTipChat_SC.byNumber; i++)
                {
                    UI.GoodsMessageManager.Instance.Show(sMsgTipChat_SC.ShowGoodsInfos[i].dwGoodsID,
                                                         sMsgTipChat_SC.ShowGoodsInfos[i].dwGoodsNum);
                }
            }
        }

        return(CommandCallbackType.Continue);
    }