public void Init_NameLink(UInt64 playerGUID, string playerName) { m_playerGUID = playerGUID; m_playerName = playerName; m_LinkType = GC_CHAT.LINKTYPE.LINK_TYPE_INVALID; m_bNameLink = true; }
public void Init(ChatHistoryItem history, int linkindex) { if (linkindex < 0 || linkindex >= history.ELinkType.Count) { return; } m_chatHistoryItem = history; m_LinkType = history.ELinkType[linkindex]; m_LinkTypeList.Add(m_LinkType); if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_ITEM) { Utils.ReadLinkFromHistory_Item(history, m_EquipOrItemLink, linkindex); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_EQUIP) { Utils.ReadLinkFromHistory_Equip(history, m_EquipOrItemLink, linkindex); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_COPYTEAM) { Utils.ReadLinkFromHistory_Team(history, out m_playerGUID); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_MOVETO) { Utils.ReadLinkFromHistory_MoveTo(history, ref m_MoveToLink, linkindex); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_PLAYERINFO) { Utils.ReadLinkFromHistory_PlayerInfo(history, out m_playerInfoGUID, linkindex); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_SWORDSMAN) { Utils.ReadLinkFromHistory_SwordsMan(history, m_SwordsManLink, linkindex); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_GUILDCRUITE) { Utils.ReadLinkFromHistory_GuildInfo(history, out m_guildIdForRecruit, linkindex); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_HONGBAO) { Utils.ReadLinkFromHistory_HongBaoInfo(history, ref m_HongBaoInfoLink, linkindex); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_PROPAGATE) { Utils.ReadLinkFromHistory_Propagate(history, m_fellow, linkindex); if (ChatInfoLogic.Instance() != null) { ChatInfoLogic.Instance().SelectFellowName = m_fellow.Name; } } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_MISSION) { Utils.ReadLinkFromHistory_MissionInfo(history, ref m_missionLink, linkindex); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_PROPAGATE_AGREE) { //do nothing Debug.Log("fanzhipeng ===== has received GC_CHAT.LINKTYPE.LINK_TYPE_PROPAGATE_AGREE"); } }
void LinkOnClick(GameObject obj) { int index = 0; if (obj != null && int.TryParse(obj.name, out index) && index >= 0 && index < m_LinkTypeList.Count) { m_LinkType = m_LinkTypeList[index]; } if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_ITEM) { ItemTooltipsLogic.ShowItemTooltip(m_EquipOrItemLink, ItemTooltipsLogic.ShowType.ChatLink); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_EQUIP) { EquipTooltipsLogic.ShowEquipTooltip(m_EquipOrItemLink, EquipTooltipsLogic.ShowType.ChatLink); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_COPYTEAM) { //检查自己 if (GameManager.gameManager.PlayerDataPool.IsHaveTeam()) { Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{2179}"); return; } //Singleton<ObjManager>.GetInstance().MainPlayer.SendNoticMsg(false, "#{2178}"); //发送请求 CG_REQ_TEAM_JOIN packet = (CG_REQ_TEAM_JOIN)PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_TEAM_JOIN); packet.SetTeamMemberGuid(m_playerGUID); packet.SendPacket(); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_MOVETO) { AutoSearchPoint point = new AutoSearchPoint(m_MoveToLink.SceneClassID, m_MoveToLink.PosX, m_MoveToLink.PosZ); GameManager.gameManager.AutoSearch.ProcessAutoSearch(point); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_SWORDSMAN) { // SwordsManToolTipsLogic.ShowSwordsManTooltip(m_SwordsManLink, SwordsManToolTipsLogic.SwordsMan_ShowType.ChatLink); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_PLAYERINFO) { if (null == Singleton <ObjManager> .GetInstance().MainPlayer) { return; } Singleton <ObjManager> .GetInstance().MainPlayer.ReqViewOtherPlayer(m_playerInfoGUID, OtherRoleViewLogic.OPEN_TYPE.OPEN_TYPE_LASTSPEAKER); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_GUILDCRUITE) { //如果符合要求,则发送申请加入帮会的请求 ApplyToJoinGuild(); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_HONGBAO) { CG_ASK_HONGBAO_ROB Pak = (CG_ASK_HONGBAO_ROB)PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASK_HONGBAO_ROB); Pak.SetHongbaoguid(m_HongBaoInfoLink.m_HongBaoGuid); Pak.SetSenderguid(m_HongBaoInfoLink.m_SenderGuid); Pak.SendPacket(); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_PROPAGATE) { LogModule.DebugLog("m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_PROPAGATE " + m_fellow.Name); ChatInfoLinkFellowTipLogic.ShowTooltips(m_fellow); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_MISSION) { LogModule.DebugLog("m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_MISSION " + m_missionLink.missionId); MissionTooltipsLogic.ShowTooltips(m_missionLink); } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_SUB_PROPAGATE) { LogModule.DebugLog("m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_SUB_PROPAGATE "); if (null != ChatInfoLogic.Instance()) { if (m_chatHistoryItem.SenderGuid == Singleton <ObjManager> .GetInstance().MainPlayer.GUID) { Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{11054}"); return; } ChatInfoSelectLinkLogic.M_OPEN_TYPE = ChatInfoSelectLinkLogic.OPEN_TYPE.PROPAGATE; ChatInfoLogic.Instance().BeginChat(m_chatHistoryItem.SenderGuid, m_chatHistoryItem.SenderName); ChatInfoLogic.Instance().ShowEmotionRoot(); } } else if (m_LinkType == GC_CHAT.LINKTYPE.LINK_TYPE_PROPAGATE_AGREE) { // do send add a team ReqAddTeam(); } else { if (m_bNameLink) { if (Singleton <ObjManager> .GetInstance().MainPlayer == null) { return; } if (m_playerGUID == GlobeVar.INVALID_GUID) { return; } if (m_playerGUID == Singleton <ObjManager> .GetInstance().MainPlayer.GUID) { return; } if (null == ChatInfoLogic.Instance()) { UIManager.ShowUI(UIInfo.ChatInfoRoot, ShowChatInfoRootOver); } else { ChatInfoLogic.Instance().BeginChat(m_playerGUID, m_playerName); } } } }