예제 #1
0
    void RobHongBao()
    {
        CG_ASK_HONGBAO_ROB Pak = (CG_ASK_HONGBAO_ROB)PacketDistributed.CreatePacket(MessageID.PACKET_CG_ASK_HONGBAO_ROB);

        Pak.SetHongbaoguid(m_Guid);
        Pak.SetSenderguid(m_SenderGuid);
        Pak.SendPacket();
    }
예제 #2
0
    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);
                }
            }
        }
    }