示例#1
0
    //点击头像响应函数
    void ChatInfoItemOnClick()
    {
        //匿名的头像点击没反应也在此处理了,直接比较字典里的“匿名”二字。
        if (Singleton <ObjManager> .Instance.MainPlayer == null || m_SpeakerName.Equals(StrDictionary.GetClientDictionaryString("#{10566}")))
        {
            return;
        }
        //自己不能查看自己的
        if (Singleton <ObjManager> .Instance.MainPlayer.GUID == m_SpeakerGuid || m_SpeakerGuid == GlobeVar.INVALID_GUID)
        {
            return;
        }

        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        if (ChatInfoLogic.Instance() != null)
        {
            ChatInfoLogic.Instance().m_LastSpeakerChatLogic.gameObject.SetActive(true);
            // ChatInfoLogic.Instance().ShowSpeakerMenu();
            if (LastSpeakerChatLogic.Instance() != null)
            {
                LastSpeakerChatLogic.Instance().ShowButtonMenu(m_SpeakerGuid, m_SpeakerName);
                LastSpeakerChatLogic.Instance().SetOtherPlayerInfo(m_Profession, m_SpeakerLevel, m_SpeakerName);
            }

            // LastSpeakerChatLogic.Instance().ShowButtonMenu(m_SpeakerGuid, m_SpeakerName, m_SpeakerLevel, m_SpeakerProfession);
        }
    }
示例#2
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_CHAT packet = (GC_CHAT )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic

            if (null == GameManager.gameManager.PlayerDataPool.BlackList)
            {
                return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
            }

            if (packet.HasSenderguid)
            {
                if (GameManager.gameManager.PlayerDataPool.BlackList.IsExist(packet.Senderguid))
                {
                    return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
                }
            }

            if (true == GameManager.gameManager.PlayerDataPool.ChatHistory.OnReceiveChat(packet))
            {
                if (ChatFrameLogic.Instance() != null)
                {
                    ChatFrameLogic.Instance().OnReceiveChat(packet);
                }
                if (ChatInfoLogic.Instance() != null)
                {
                    ChatInfoLogic.Instance().OnReceiveChat();
                }
                if (LastSpeakerChatLogic.Instance() != null)
                {
                    LastSpeakerChatLogic.Instance().OnReceiveChat();
                }
            }

            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }