Ejemplo n.º 1
0
    public void JoinClanRoom()
    {
        if (DataManager.Manager <ClanManger>().IsJoinClan == false)
        {
            TipsManager.Instance.ShowTips(LocalTextType.Talk_ActualTime_haiweijiarushizuwufajinruliaotianshi);
            return;
        }
        bool manager = false;

        if (DataManager.Manager <ClanManger>().ClanInfo != null)
        {
            GameCmd.stClanMemberInfo clanInfo = DataManager.Manager <ClanManger>().ClanInfo.GetMemberInfo((uint)MainPlayerHelper.GetPlayerID());

            if (clanInfo != null)
            {
                manager = clanInfo.duty != GameCmd.enumClanDuty.CD_Member;
            }
        }
        SetModel(gcloud_voice.GCloudVoiceMode.RealTime);


        string strRoomName = DataManager.Manager <LoginDataManager>().CurSelectZoneID.ToString() + DataManager.Manager <ClanManger>().ClanInfo.Id.ToString();

        JoinNationalRoom(strRoomName, GCloudVoiceRole.ANCHOR);
    }
Ejemplo n.º 2
0
    //void OnVoiceEvent(int nEventId, object param)
    //{
    //    if (nEventId == (int)Client.GameEventID.TEAM_JOIN)
    //    {
    //        Client.stTeamJoin tj = (Client.stTeamJoin)param;
    //        if (string.IsNullOrEmpty(GVoiceManger.Instance.JoinRoomName))
    //        {
    //            GVoiceManger.Instance.JoinTeamRoom();
    //        }
    //    }
    //    else if (nEventId == (int)Client.GameEventID.TEAM_LEAVE)
    //    {
    //        if (GVoiceManger.Instance.JoinRoomType == JoinRoomEnum.Team && !string.IsNullOrEmpty(GVoiceManger.Instance.JoinRoomName))
    //        {
    //            GVoiceManger.Instance.QuitRoom(GVoiceManger.Instance.JoinRoomName);
    //        }
    //    }
    //    else if (nEventId == (int)Client.GameEventID.CLANQUIT)
    //    {
    //        Client.stClanQuit cq = (Client.stClanQuit)param;
    //        if (cq.uid == MainPlayerHelper.GetPlayerUID())
    //        {
    //            if (GVoiceManger.Instance.JoinRoomType == JoinRoomEnum.Nation && !string.IsNullOrEmpty(GVoiceManger.Instance.JoinRoomName))
    //            {
    //                GVoiceManger.Instance.QuitRoom(GVoiceManger.Instance.JoinRoomName);
    //            }
    //        }
    //    }
    //    else if (nEventId == (int)Client.GameEventID.CLANJOIN)
    //    {
    //        Client.stClanJoin cj = (Client.stClanJoin)param;

    //    }
    //    else if (nEventId == (int)Client.GameEventID.CHAT_LEVELROOM)
    //    {
    //        TipsManager.Instance.ShowTips(LocalTextType.Talk_ActualTime_tuichusuoyouliaotianshi);
    //        SetStatus("mute");
    //    }
    //    else if (nEventId == (int)Client.GameEventID.CHAT_JOINROOM)
    //    {
    //        Client.stVoiceJoinRoom jr = (Client.stVoiceJoinRoom)param;
    //        if (jr.succ)
    //        {

    //            if (GVoiceManger.Instance.JoinRoomType == JoinRoomEnum.Team)
    //            {
    //                TipsManager.Instance.ShowTips(LocalTextType.Talk_ActualTime_jinruduiwuliaotianshi);
    //                SetStatus("team");
    //                GVoiceManger.Instance.OpenSpeaker();
    //            }
    //            else if (GVoiceManger.Instance.JoinRoomType == JoinRoomEnum.Nation)
    //            {
    //                TipsManager.Instance.ShowTips(LocalTextType.Talk_ActualTime_jinrushizuliaotianshi);
    //                SetStatus("clan");
    //                //氏族聊天 所有人都打开喇叭 管理员打开麦克风
    //                GVoiceManger.Instance.OpenSpeaker();
    //                bool manager = false;
    //                if (DataManager.Manager<ClanManger>().ClanInfo != null)
    //                {
    //                    GameCmd.stClanMemberInfo clanInfo = DataManager.Manager<ClanManger>().ClanInfo.GetMemberInfo((uint)MainPlayerHelper.GetPlayerID());

    //                    if (clanInfo != null && clanInfo.duty != GameCmd.enumClanDuty.CD_Member)
    //                    {
    //                        GVoiceManger.Instance.OpenMic();
    //                    }
    //                }
    //            }
    //        }
    //    }
    //    else if (nEventId == (int)Client.GameEventID.CHAT_SETMICBTN)
    //    {
    //        bool show = (bool)param;

    //        //           if (show)
    //        //             {
    //        //                 if (DataManager.Manager<ClanManger>().ClanInfo != null)
    //        //                 {
    //        //                     GameCmd.stClanMemberInfo clanInfo = DataManager.Manager<ClanManger>().ClanInfo.GetMemberInfo((uint)MainPlayerHelper.GetPlayerID());
    //        //
    //        //                     if (clanInfo != null)
    //        //                     {
    //        //                         m_btn_voiceBtn.gameObject.SetActive(true);
    //        //                         if (clanInfo.duty == GameCmd.enumClanDuty.CD_Member)
    //        //                         {
    //        //                             if (GVoiceManger.Instance.IsOpenMic)
    //        //                             {
    //        //                                 m_spreteEx.ChangeSprite(3);
    //        //                             }
    //        //                             else
    //        //                             {
    //        //                                 m_spreteEx.ChangeSprite(2);
    //        //                             }
    //        //                         }
    //        //                         else
    //        //                         {
    //        //                             m_spreteEx.ChangeSprite(1);
    //        //                         }
    //        //                     }
    //        //                 }
    //        //             }
    //        //             else
    //        //             {
    //        //                 if (DataManager.Manager<ClanManger>().ClanInfo != null)
    //        //                 {
    //        //                     GameCmd.stClanMemberInfo clanInfo = DataManager.Manager<ClanManger>().ClanInfo.GetMemberInfo((uint)MainPlayerHelper.GetPlayerID());
    //        //
    //        //                     if (clanInfo != null)
    //        //                     {
    //        //                         if (clanInfo.duty == GameCmd.enumClanDuty.CD_Member)
    //        //                         {
    //        //                         }
    //        //                     }
    //        //                 }
    //        //
    //        //                 GVoiceManger.Instance.CloseMic();
    //        //             }
    //    }
    //    else if (nEventId == (int)Client.GameEventID.CHAT_SPEEKERNOW)
    //    {
    //        string name = (string)param;

    //    }
    //}

    void SetStatus(string status)
    {
        if (m_goClan != null && m_goteam != null && m_gomute != null)
        {
            bool mute = status.Equals("mute");

            m_goClan.SetActive(status.Equals("clan"));
            m_goteam.SetActive(status.Equals("team"));
            m_gomute.SetActive(mute);

            SetSettingBtn(status);


            bool showSetting = false;
            if (DataManager.Manager <ClanManger>().ClanInfo != null)
            {
                GameCmd.stClanMemberInfo clanInfo = DataManager.Manager <ClanManger>().ClanInfo.GetMemberInfo((uint)MainPlayerHelper.GetPlayerID());

                if (clanInfo != null)
                {
                    showSetting = clanInfo.duty != GameCmd.enumClanDuty.CD_Member;
                }
            }
        }
    }
Ejemplo n.º 3
0
    public override void SetGridData(object data)
    {
        base.SetGridData(data);
        if (null != data)
        {
            GameCmd.stClanMemberInfo m_data = (GameCmd.stClanMemberInfo)data;
            m_uint_userId = m_data.id;
            if (null != m_pro)
            {
                m_pro.spriteName = DataManager.GetIconByProfession(m_data.job);
            }
            if (null != m_name)
            {
                m_name.text = m_data.name + "";
            }
            if (null != m_lv)
            {
                m_lv.text = m_data.level + "";
            }
            if (null != m_honor)
            {
                //m_honor.text = string.Format("{0}/{1}/{2}",m_data.credit,m_data.credit_7day,m_data.credit_total);
                m_honor.text = m_data.credit_total.ToString();
            }
            if (null != m_duty)
            {
                m_duty.text = DataManager.Manager <ClanManger>().GetNameByClanDuty(m_data.duty);
            }
            if (null != m_joinTime)
            {
//                 DateTime date = new DateTime(1970, 1, 1, 0, 0, 0);
//                 date = date.AddSeconds(m_data.join_time);
//                 m_joinTime.text = date.ToString("yyyy-MM-dd");
                m_joinTime.text = m_data.fight.ToString();
            }
            if (null != m_outlineTime)
            {
                if (m_data.is_online == 1)
                {
                    m_outlineTime.text = "在线";
                }
                else
                {
                    DateTime date = new DateTime(1970, 1, 1, 0, 0, 0);
                    date = date.AddSeconds(m_data.offline_time);
                    m_outlineTime.text = date.ToString("yyyy-MM-dd");;
                }
            }
            MaskSelf();
        }
    }
Ejemplo n.º 4
0
    /// <summary>
    /// 设置按钮 打开设置面板 开关麦克风
    /// </summary>
    /// <param name="caster"></param>
    void OnClickVoicesetting(GameObject caster)
    {
        if (GVoiceManger.Instance.JoinRoomType == JoinRoomEnum.None)
        {
            return;
        }

        if (GVoiceManger.Instance.JoinRoomType == JoinRoomEnum.Nation)
        {
            bool manager = false;
            if (DataManager.Manager <ClanManger>().ClanInfo == null)
            {
                SetSettingBtnStatus(0);
                return;
            }

            GameCmd.stClanMemberInfo clanInfo = DataManager.Manager <ClanManger>().ClanInfo.GetMemberInfo((uint)MainPlayerHelper.GetPlayerID());

            if (clanInfo != null && clanInfo.duty != GameCmd.enumClanDuty.CD_Member)
            {
                DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.VoiceSetting);
            }
            else
            {
                if (GVoiceManger.Instance.IsOpenMicInRoom)
                {
                    GVoiceManger.Instance.CloseMicInRoom_Small();
                }
                else
                {
                    GVoiceManger.Instance.OpenMicInRoom_Small();
                }
            }
        }
        else if (GVoiceManger.Instance.JoinRoomType == JoinRoomEnum.Team)
        {
            if (DataManager.Manager <TeamDataManager>().IsJoinTeam)
            {
                if (GVoiceManger.Instance.IsOpenMicInRoom)
                {
                    GVoiceManger.Instance.CloseMicInRoom_Small();
                }
                else
                {
                    GVoiceManger.Instance.OpenMicInRoom_Small();
                }
            }
        }
    }
Ejemplo n.º 5
0
 public override void SetGridData(object data)
 {
     base.SetGridData(data);
     if (null == data)
     {
         return;
     }
     m_data = (ClanDefine.LocalClanInfo)data;
     if (null != idLabel)
     {
         idLabel.text = m_data.Id.ToString();
     }
     if (null != m_lab_ClanName)
     {
         m_lab_ClanName.text = m_data.Name;
     }
     if (null != m_lab_lv)
     {
         m_lab_lv.text = m_data.Lv.ToString();
     }
     if (null != m_label_ClanNum)
     {
         uint max = 0;
         if (m_data.IsFormal)
         {
             ClanMemberDataBase tab = GameTableManager.Instance.GetTableItem <ClanMemberDataBase>(m_data.Lv);
             if (tab != null)
             {
                 max = tab.memberNum;
             }
         }
         else
         {
             max = ClanManger.TempClanSupporter;
         }
         m_label_ClanNum.text = m_data.MemberCount + "/" + max;
     }
     if (null != m_label_ClanShaikh)
     {
         GameCmd.stClanMemberInfo member = m_data.GetMemberInfo(m_data.ShaikhId);
         m_label_ClanShaikh.text = (null != member) ? member.name : "";
     }
 }
Ejemplo n.º 6
0
    /// <summary>
    /// 联系族长
    /// </summary>
    private void ContactShaikh()
    {
        ClanDefine.LocalClanInfo localClanInfo = ClanData;
        if (null == localClanInfo)
        {
            TipsManager.Instance.ShowTips("无效氏族信息");
            return;
        }
        GameCmd.stClanMemberInfo member = localClanInfo.GetMemberInfo(localClanInfo.Creator);
        if (null == member)
        {
            TipsManager.Instance.ShowTips("氏族族长信息错误");
            return;
        }

        RoleRelation data = new RoleRelation()
        {
            uid = member.id, name = member.name
        };

        DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.FriendPanel);
        DataManager.Manager <UIPanelManager>().SendMsg(PanelID.FriendPanel, UIMsgID.eChatWithPlayer, data);
    }
Ejemplo n.º 7
0
    //-----------------------------------------------------------------------------------------------
    public void AddTransmitMsg(GameCmd.stInviteGoMapRequestUserCmd_CS cmd)
    {
        PushMsg msg = new PushMsg();

        if (cmd.type == (int)GameCmd.FeiLeiType.FeiLeiType_Clan)
        {
            msg.msgType = PushMsg.MsgType.ClanTransmit;
            msg.cd      = (float)GameTableManager.Instance.GetGlobalConfig <int>("ClanTransmitMsgCD");
        }
        else if (cmd.type == (int)GameCmd.FeiLeiType.FeiLeiType_Couple)
        {
            msg.msgType = PushMsg.MsgType.CoupleTransmit;
            msg.cd      = (float)GameTableManager.Instance.GetGlobalConfig <int>("CoupleTransmitMsgCD");
        }
        else if (cmd.type == (int)GameCmd.FeiLeiType.FeiLeiType_Team)
        {
            msg.msgType = PushMsg.MsgType.TeamTransmit;
            msg.cd      = (float)GameTableManager.Instance.GetGlobalConfig <int>("TeamTransmitMsgCD");
        }
        else if (cmd.type == (int)GameCmd.FeiLeiType.CallUp_CityWarClan)
        {
            msg.msgType = PushMsg.MsgType.CityWarClan;
            msg.cd      = (float)GameTableManager.Instance.GetGlobalConfig <int>("ClanTransmitMsgCD");
        }
        else if (cmd.type == (int)GameCmd.FeiLeiType.CallUp_CityWarTeam)
        {
            msg.msgType = PushMsg.MsgType.CityWarTeam;
            msg.cd      = (float)GameTableManager.Instance.GetGlobalConfig <int>("ClanTransmitMsgCD");
        }

        msg.senderId = cmd.userid;
        msg.sendName = cmd.username;
        msg.sendTime = UnityEngine.Time.realtimeSinceStartup;
        msg.vector   = cmd.pos;
        table.MapDataBase mdb = GameTableManager.Instance.GetTableItem <table.MapDataBase>(cmd.mapid);
        if (mdb != null)
        {
            msg.map   = mdb.strName;
            msg.mapId = cmd.mapid;
        }
        if (DataManager.Manager <ClanManger>().ClanInfo != null)
        {
            GameCmd.stClanMemberInfo clanInfo = DataManager.Manager <ClanManger>().ClanInfo.GetMemberInfo(cmd.userid);
            if (clanInfo != null)
            {
                msg.level = (int)clanInfo.level;
                SelectRoleDataBase data = table.SelectRoleDataBase.Where((GameCmd.enumProfession)clanInfo.job, (GameCmd.enmCharSex) 1);
                if (data != null)
                {
                    msg.profession = data.professionName;
                }
            }
        }
        TeamMemberInfo info = DataManager.Manager <TeamDataManager>().GetTeamMember(cmd.userid);

        if (info != null)
        {
            msg.level = (int)info.lv;
            SelectRoleDataBase data = table.SelectRoleDataBase.Where((GameCmd.enumProfession)info.job, (GameCmd.enmCharSex) 1);
            if (data != null)
            {
                msg.profession = data.professionName;
            }
        }
        AddSysMsg(msg);
        if (DataManager.Manager <UIPanelManager>().IsShowPanel(PanelID.MessagePushPanel) == false)
        {
            if (!DataManager.Manager <ComBatCopyDataManager>().IsEnterCopy)
            {
                DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.MessagePushPanel);
            }
        }
        Engine.Utility.EventEngine.Instance().DispatchEvent((int)Client.GameEventID.REFRESHTRANSMITPUSHMSGSTATUS, null);
    }
Ejemplo n.º 8
0
    void OnVoiceEvent(int nEventId, object param)
    {
        if (nEventId == (int)Client.GameEventID.TEAM_JOIN)
        {
            Client.stTeamJoin tj = (Client.stTeamJoin)param;
        }
        else if (nEventId == (int)Client.GameEventID.TEAM_LEAVE)
        {
            //当玩家退出队伍时,如果玩家当前在队伍聊天室,则会自动退出队伍聊天室。
            if (GVoiceManger.Instance.JoinRoomType == JoinRoomEnum.Team)
            {
                GVoiceManger.Instance.QuitRoom(GVoiceManger.Instance.JoinRoomName);
            }
        }
        else if (nEventId == (int)Client.GameEventID.CLANQUIT)
        {
            Client.stClanQuit cq = (Client.stClanQuit)param;
            if (Client.ClientGlobal.Instance().IsMainPlayer(cq.uid))
            {
                if (GVoiceManger.Instance.JoinRoomType == JoinRoomEnum.Nation)
                {
                    GVoiceManger.Instance.QuitRoom(GVoiceManger.Instance.JoinRoomName);
                }
            }
        }
        else if (nEventId == (int)Client.GameEventID.CHAT_LEVELROOM)
        {
            SetMuteBtn(true);
        }
        else if (nEventId == (int)Client.GameEventID.CHAT_JOINROOM)
        {
            Client.stVoiceJoinRoom jr = (Client.stVoiceJoinRoom)param;
            SetMuteBtn(!jr.succ);

            if (jr.succ)
            {
                if (GVoiceManger.Instance.JoinRoomType == JoinRoomEnum.Team)
                {
                    TipsManager.Instance.ShowTips(LocalTextType.Talk_ActualTime_jinruduiwuliaotianshi);
                    //打开扬声器 收听语音
                    GVoiceManger.Instance.OpenSpeaker();
                    GVoiceManger.Instance.CloseMicInRoom();
                    SetSettingBtnStatus(1);
                    SetSpeek("队伍频道");
                }
                else if (GVoiceManger.Instance.JoinRoomType == JoinRoomEnum.Nation)
                {
                    SetSpeek("氏族频道");

                    TipsManager.Instance.ShowTips(LocalTextType.Talk_ActualTime_jinrushizuliaotianshi);
                    //氏族聊天 所有人都打开喇叭 管理员打开麦克风
                    GVoiceManger.Instance.OpenSpeaker();
                    bool manager = false;
                    if (DataManager.Manager <ClanManger>().ClanInfo == null)
                    {
                        SetSettingBtnStatus(1);
                        return;
                    }
                    GameCmd.stClanMemberInfo clanInfo = DataManager.Manager <ClanManger>().ClanInfo.GetMemberInfo((uint)MainPlayerHelper.GetPlayerID());

                    if (clanInfo != null && clanInfo.duty != GameCmd.enumClanDuty.CD_Member)
                    {
                        //管理员打开麦克风
                        GVoiceManger.Instance.OpenMicInRoom();
                        SetSettingBtnStatus(3);
                    }
                    else
                    {
                        GVoiceManger.Instance.CloseMicInRoom();
                        SetSettingBtnStatus(1);
                    }
                }
            }
        }
        else if (nEventId == (int)Client.GameEventID.CHAT_SPEEKERNOW)
        {
            string name = (string)param;
            SetSpeek(name);
            StartPlayAnimation();
        }
        else if (nEventId == (int)Client.GameEventID.CHAT_MICKSTATE)
        {
            bool state = (bool)param;
            if (GVoiceManger.Instance.JoinRoomType == JoinRoomEnum.Team)
            {
                SetSettingBtnStatus(state ? 2 : 1);
            }
            else if (GVoiceManger.Instance.JoinRoomType == JoinRoomEnum.Nation)
            {
                if (DataManager.Manager <ClanManger>().ClanInfo == null)
                {
                    SetSettingBtnStatus(0);
                    return;
                }

                GameCmd.stClanMemberInfo clanInfo = DataManager.Manager <ClanManger>().ClanInfo.GetMemberInfo((uint)MainPlayerHelper.GetPlayerID());

                if (clanInfo != null)
                {
                    if (clanInfo.duty == GameCmd.enumClanDuty.CD_Member)
                    {
                        SetSettingBtnStatus(state ? 2 : 1);
                    }
                    else
                    {
                        SetSettingBtnStatus(3);
                    }
                }
            }
        }
        else if (nEventId == (int)Client.GameEventID.CHAT_SETMICBTN)
        {
            bool show = (bool)param;

            if (show)
            {
                if (DataManager.Manager <ClanManger>().ClanInfo != null)
                {
                    GameCmd.stClanMemberInfo clanInfo = DataManager.Manager <ClanManger>().ClanInfo.GetMemberInfo((uint)MainPlayerHelper.GetPlayerID());

                    if (clanInfo != null)
                    {
                        if (clanInfo.duty == GameCmd.enumClanDuty.CD_Member)
                        {
                            SetSettingBtnStatus(1);
                        }
                        else
                        {
                            SetSettingBtnStatus(3);
                        }
                    }
                }
            }
            else
            {
                GVoiceManger.Instance.CloseMic();

                if (DataManager.Manager <ClanManger>().ClanInfo != null)
                {
                    GameCmd.stClanMemberInfo clanInfo = DataManager.Manager <ClanManger>().ClanInfo.GetMemberInfo((uint)MainPlayerHelper.GetPlayerID());

                    if (clanInfo != null)
                    {
                        if (clanInfo.duty == GameCmd.enumClanDuty.CD_Member)
                        {
                            SetSettingBtnStatus(0);
                        }
                        else
                        {
                            SetSettingBtnStatus(3);
                        }
                    }
                }
            }
        }


        switch (nEventId)
        {
        case (int)Client.GameEventID.TEAM_JOIN:
        case (int)Client.GameEventID.TEAM_LEAVE:
        case (int)Client.GameEventID.CLANJOIN:
        case (int)Client.GameEventID.CLANQUIT:
            if (m_nLastNpcId != 0)
            {
                stRefreshNPCBelongParam npcbelongdata = NpcAscription.Instance.GetNpcBelongByNpcID(m_nLastNpcId);
                UpdateTargetStatus(npcbelongdata.npcid, npcbelongdata.teamid, npcbelongdata.ownerid, npcbelongdata.clanid, npcbelongdata.ownerName);
            }
            break;
        }
    }
Ejemplo n.º 9
0
    /// <summary>
    /// 更新详情
    /// </summary>
    private void UpdateDetail()
    {
        ClanDefine.LocalClanInfo clanInfo = ClanInfo;
        //氏族名称
        if (null != m_label_DetailClanTitle)
        {
            m_label_DetailClanTitle.text = (null != clanInfo) ? clanInfo.Name : "";
        }
        //氏族id
        if (null != m_trans_DetailInfoClanId)
        {
            m_trans_DetailInfoClanId.Find("Value").GetComponent <UILabel>().text
                = (null != clanInfo) ? clanInfo.Id.ToString() : "";
        }
        //族长
        if (null != m_trans_DetailInfoShaikh)
        {
            GameCmd.stClanMemberInfo shaikh = (null != clanInfo) ? clanInfo.GetMemberInfo(clanInfo.ShaikhId) : null;
            m_trans_DetailInfoShaikh.Find("Value").GetComponent <UILabel>().text
                = (null != shaikh) ? shaikh.name : "";
        }
        //等级
        if (null != m_trans_DetailInfoClanLv)
        {
            m_trans_DetailInfoClanLv.Find("Value").GetComponent <UILabel>().text
                = (null != clanInfo) ? clanInfo.Lv.ToString() : "";
        }
        //资金
        if (null != m_trans_DetailInfoClanMoney)
        {
            m_trans_DetailInfoClanMoney.Find("Value").GetComponent <UILabel>().text
                = (null != clanInfo) ? clanInfo.Money.ToString() : "";
        }
        //总族贡
        if (null != m_trans_DetailInfoClanConb)
        {
            m_trans_DetailInfoClanConb.Find("Value").GetComponent <UILabel>().text
                = (null != clanInfo) ? clanInfo.TotalZG.ToString() : "";
        }
        //战力
        if (null != m_trans_DetailInfoClanFgt)
        {
            m_trans_DetailInfoClanFgt.Find("Value").GetComponent <UILabel>().text
                = (null != clanInfo) ? clanInfo.Fight.ToString() : "";
        }
        //7日族贡
        if (null != m_trans_DetailInfoClanSpT)
        {
            m_trans_DetailInfoClanSpT.Find("Value").GetComponent <UILabel>().text
                = (null != clanInfo) ? clanInfo.SevenDayZG.ToString() : "";
        }
        //人数
        if (null != m_trans_DetailInfoClanNum)
        {
            uint membercount = 0;
            uint totalCount  = 0;
            if (null != clanInfo)
            {
                membercount = (uint)clanInfo.MemberCount;
                totalCount  = m_mgr.GetClanMemberMaxLimit(clanInfo.Lv);
            }
            m_trans_DetailInfoClanNum.Find("Value").GetComponent <UILabel>().text
                = string.Format("{0}/{1}", membercount, totalCount);
        }
        //日消耗族贡
        if (null != m_trans_DetailInfoClanDaySpT)
        {
            ClanDefine.LocalClanMemberDB db = ClanManger.GetLocalCalnMemberDB(clanInfo.Lv);
            m_trans_DetailInfoClanDaySpT.Find("Value").GetComponent <UILabel>().text
                = (null != db) ? db.CostZiJin.ToString() : "";
        }
        //shengwang
        m_label_ShengWangLabel.text = UserData.Reputation.ToString();
        //公告

        UpdateGG();
    }
Ejemplo n.º 10
0
 /// <summary>
 /// 格子UI点击响应事件
 /// </summary>
 /// <param name="eventType"></param>
 /// <param name="data"></param>
 /// <param name="param"></param>
 private void OnUIGridEventDlg(UIEventType eventType, object data, object param)
 {
     if (eventType == UIEventType.Click)
     {
         if (data is UIClanTaskGrid)
         {
             UIClanTaskGrid taskGrid = data as UIClanTaskGrid;
         }
         else if (data is UIClanApplyGrid)
         {
             UIClanApplyGrid aGrid = data as UIClanApplyGrid;
             if (null != param && param is bool)
             {
                 bool agree = (bool)param;
                 DealClanApplyInfo(aGrid.UserId, agree);
             }
             else
             {
                 GameCmd.stRequestListClanUserCmd_S.Data member = m_mgr.GetClanApplyUserInfo(aGrid.UserId);
                 DataManager.Instance.Sender.RequestPlayerInfoForOprate(aGrid.UserId, PlayerOpreatePanel.ViewType.Normal);
             }
         }
         else if (data is UIClanDonateGrid)
         {
         }
         else if (data is UIClanDeclareWarGrid)
         {
             UIClanDeclareWarGrid dwg = data as UIClanDeclareWarGrid;
             dwg.SetSelect(true);
             if (previousDeclareGrid == null)
             {
                 previousDeclareGrid = dwg;
             }
             else
             {
                 if (previousDeclareGrid.Id == dwg.Id)
                 {
                     return;
                 }
                 else
                 {
                     previousDeclareGrid.SetSelect(false);
                     previousDeclareGrid = dwg;
                 }
             }
         }
         else if (data is UIClanMemberGrid)
         {
             UIClanMemberGrid         mGrid  = data as UIClanMemberGrid;
             GameCmd.stClanMemberInfo member = (null != ClanInfo) ? ClanInfo.GetMemberInfo(mGrid.UserId) : null;
             if (null != member)
             {
                 if (member.id != DataManager.Instance.UserId)
                 {
                     SetSelectMemberId(member);
                     DataManager.Instance.Sender.RequestPlayerInfoForOprate(mGrid.UserId, PlayerOpreatePanel.ViewType.Clan);
                 }
             }
             else
             {
                 Engine.Utility.Log.Error("GetClanMemberInfo null userid={0}", mGrid.UserId);
             }
         }
         else if (data is UIClanSkillGrid)
         {
             UIClanSkillGrid skillGrid = data as UIClanSkillGrid;
             SetSelectSkillId(skillGrid.Id);
         }
         else if (data is UITabGrid)
         {
             UITabGrid tabGrid = data as UITabGrid;
             if (tabGrid.Data is ClanPanelMode)
             {
                 SetMode((ClanPanelMode)tabGrid.Data);
             }
         }
         else if (data is UIClanTabGrid)
         {
             UIClanTabGrid tab = data as UIClanTabGrid;
             SetInfoMode((ClanInfoMode)tab.Data + 1);
         }
     }
 }