//邀请入队
    public void OnInvitedTeamClick()
    {
        if (Singleton <ObjManager> .GetInstance() == null)
        {
            return;
        }
        if (playerGUID == GlobeVar.INVALID_GUID || playerGUID == Singleton <ObjManager> .GetInstance().MainPlayer.GUID)
        {
            Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{1930}");

            return;
        }
        if (CG_REQ_TEAM_INVITESend == false)
        {
            return;
        }
        CG_REQ_TEAM_INVITESend = false;
        if (Singleton <ObjManager> .GetInstance().MainPlayer)
        {
            Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{3170}");
        }
        CG_REQ_TEAM_INVITE packet = (CG_REQ_TEAM_INVITE)PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_TEAM_INVITE);

        packet.SetGuid(playerGUID);
        packet.SendPacket();
    }
Exemple #2
0
        //邀请某个玩家入队
        public void ReqInviteTeam(UInt64 playerGuid)
        {
            //检查被邀请者GUID是否为空(由于可以创建单人队伍,所以发空guid说明是单人组队,可以认为合法)
            //if (GlobeVar.INVALID_GUID == playerGuid)
            //{
            //    return;
            //}

            //判断队伍是否已满
            if (GameManager.gameManager.PlayerDataPool.IsHaveTeam())
            {
                if (GameManager.gameManager.PlayerDataPool.TeamInfo.IsFull())
                {
                    SendNoticMsg(false, "#{1145}");
                }
            }

            //非单人组队,增加提示“邀请已发送”
            if (playerGuid != GlobeVar.INVALID_GUID)
            {
                SendNoticMsg(false, "#{3170}");
            }

            //向服务器发送邀请某人加入队伍消息
            CG_REQ_TEAM_INVITE msg = (CG_REQ_TEAM_INVITE)PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_TEAM_INVITE);

            msg.Guid = playerGuid;
            msg.SendPacket();
        }
Exemple #3
0
    public void OnHanRenClick()
    {
        if (Time.realtimeSinceStartup - OnHanRentimeSend < 30)
        {
            Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{2163}");

            return;
        }
        OnHanRentimeSend = Time.realtimeSinceStartup;
        if (GameDefine_Globe.CopyScene_PlayType.MULTIPLE != CopyScenePlayerMode)
        {
            return;
        }
        Tab_SceneClass pSceneClass = TableManager.GetSceneClassByID(CopySceneId, 0);

        if (pSceneClass == null)
        {
            return;
        }
        //判断队伍是否已满
        if (GameManager.gameManager.PlayerDataPool.IsHaveTeam())
        {
            if (GameManager.gameManager.PlayerDataPool.TeamInfo.IsFull())
            {
                Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{1145}");

                return;
            }
        }
        else
        {
            if (Singleton <ObjManager> .GetInstance().MainPlayer)
            {
                Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{3170}");
            }

            CG_REQ_TEAM_INVITE msg = (CG_REQ_TEAM_INVITE)PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_TEAM_INVITE);
            if (msg != null)
            {
                msg.Guid = GlobeVar.INVALID_GUID;
                msg.SendPacket();
            }
        }

        string text = StrDictionary.GetClientDictionaryString("#{11184}");

        if (null != Singleton <ObjManager> .GetInstance().MainPlayer)
        {
            CG_CHAT packet = (CG_CHAT)PacketDistributed.CreatePacket(MessageID.PACKET_CG_CHAT);
            packet.Chattype = (int)CG_CHAT.CHATTYPE.CHAT_TYPE_WORLD;
            packet.Chatinfo = text;
            packet.Linktype = (int)GC_CHAT.LINKTYPE.LINK_TYPE_COPYTEAM;
            packet.AddIntdata(CopySceneId);
            packet.AddIntdata(1);
            packet.SendPacket();
        }
    }
Exemple #4
0
    public void OnGuYongClick()
    {
        if (GlobeVar.INVALID_ID == GameManager.gameManager.PlayerDataPool.TeamInfo.TeamID)
        {
            if (Singleton <ObjManager> .GetInstance().MainPlayer)
            {
                Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{3170}");
            }
            //向服务器发送邀请某人加入队伍消息
            CG_REQ_TEAM_INVITE msg = (CG_REQ_TEAM_INVITE)PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_TEAM_INVITE);
            if (msg != null)
            {
                msg.Guid = GlobeVar.INVALID_GUID;
                msg.SendPacket();
            }
        }

        HuaShanPVPData.MercenarySceneClass = CopySceneId;
        CG_MERCENARY_LIST_REQ packet = (CG_MERCENARY_LIST_REQ)PacketDistributed.CreatePacket(MessageID.PACKET_CG_MERCENARY_LIST_REQ);

        packet.Sceneclass = CopySceneId;
        packet.Diffcult   = Diffcult;
        packet.SendPacket();
    }