コード例 #1
0
    void OnEnable()
    {
        m_Instance = this;

        if (null != Singleton <ObjManager> .GetInstance().MainPlayer)
        {
            if (Singleton <ObjManager> .GetInstance().MainPlayer.NeedRequestGuildInfo)
            {
                Singleton <ObjManager> .GetInstance().MainPlayer.ReqGuildInfo();
            }
            if (Singleton <ObjManager> .GetInstance().MainPlayer.NeedRequestMasterInfo)
            {
                Singleton <ObjManager> .GetInstance().MainPlayer.ReqMasterInfo();
            }
        }

        if (m_LastSpeakerItem == null)
        {
            UIManager.LoadItem(UIInfo.LastSpeakerItem, OnLoadLastSpeakerItem);
        }
        else
        {
            UpdateSpeakers();
        }
    }
コード例 #2
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);
        }
    }
コード例 #3
0
    public void CopyFrom(LastSpeakerItemLogic item)
    {
        if (m_SpeakerNameLabel != null)
        {
            m_SpeakerGuid           = item.SpeakerGuid;
            m_SpeakerName           = item.SpeakerName;
            m_SpeakerNameLabel.text = m_SpeakerName.ToString();
            m_ChatInfoLogic         = item.ChatInfoLogic;
            m_LastSpeakerChatLogic  = item.LastSpeakerChatLogic;

            if (m_ChatInfoLogic.CurChannelType == ChatInfoLogic.CHANNEL_TYPE.CHAT_TYPE_FRIEND)
            {
                if (GameManager.gameManager.PlayerDataPool.ChatHistory.FriendSendList.Contains(m_SpeakerGuid))
                {
                    ShowInform();
                }
            }
        }
    }
コード例 #4
0
    public void Init(UInt64 nSpeakerGuid, string strSpeakerName, ChatInfoLogic chatinfo, LastSpeakerChatLogic parentLogic)
    {
        if (m_SpeakerNameLabel != null)
        {
            m_SpeakerGuid           = nSpeakerGuid;
            m_SpeakerName           = strSpeakerName;
            m_SpeakerNameLabel.text = strSpeakerName.ToString();
            m_ChatInfoLogic         = chatinfo;
            m_LastSpeakerChatLogic  = parentLogic;

            if (m_ChatInfoLogic.CurChannelType == ChatInfoLogic.CHANNEL_TYPE.CHAT_TYPE_FRIEND)
            {
                if (GameManager.gameManager.PlayerDataPool.ChatHistory.FriendSendList.Contains(m_SpeakerGuid))
                {
                    ShowInform();
                }
            }
        }
    }
コード例 #5
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);
        }
コード例 #6
0
 void OnDisable()
 {
     ClearData();
     m_Instance = null;
 }
コード例 #7
0
 void Awake()
 {
     m_Instance = this;
 }