void ShowItemInfo()
    {
        if (m_QueryInfo != null)
        {
            m_PlayerID        = m_QueryInfo.GetUserID();
            m_NickName.text   = m_QueryInfo.GetNickName();
            m_LevelLabel.text = string.Format("Lv." + m_QueryInfo.GetLevel().ToString());
            m_Address.text    = m_QueryInfo.GetIPAddress();;
            ShowQueryGender();
            //显示头像
            if (m_QueryInfo.GetFaceID() < ConstValue.CUSTOM_HEADER)
            {
                m_FaceTexture.mainTexture = GlobalHallUIMgr.Instance.m_HeadTextureUI[m_QueryInfo.GetFaceID()];
            }
            else
            {
                HeaderManager.Instance.GetPlayerHeader(m_QueryInfo.GetUserID(), m_QueryInfo.GetFaceID(), HeaderOptType.HEADER_FIND, null);
            }
        }
        else if (m_BlacklistInfo != null)
        {
            m_PlayerID        = m_BlacklistInfo.GetUserID();
            m_NickName.text   = m_BlacklistInfo.GetNickName();
            m_LevelLabel.text = string.Format("Lv." + m_BlacklistInfo.GetLevel().ToString());
            m_Address.text    = m_BlacklistInfo.GetIPAddress();
            ShowBlacklistGender();
            //显示头像
            if (m_BlacklistInfo.GetFaceID() < ConstValue.CUSTOM_HEADER)
            {
                m_FaceTexture.mainTexture = GlobalHallUIMgr.Instance.m_HeadTextureUI[m_BlacklistInfo.GetFaceID()];
            }
            else
            {
                HeaderManager.Instance.GetPlayerHeader(m_BlacklistInfo.GetUserID(), m_BlacklistInfo.GetFaceID(), HeaderOptType.HEADER_BLACK, null);
            }
        }


        //如果该玩家已经是好友了则添加好友按纽变灰
        if (PlayerRole.Instance.RelationManager.GetFriendMap() != null &&
            PlayerRole.Instance.RelationManager.GetFriendMap().ContainsKey(m_PlayerID) == true)
        {
            m_UIButton.isEnabled = false;
        }
    }
Exemple #2
0
    void ShowListItemInfo()
    {
        //头像显示
        //if (m_FriendItemInfo.GetFaceID() < ConstValue.CUSTOM_HEADER)
        //    m_FaceTexture.mainTexture = GlobalHallUIMgr.Instance.m_HeadTextureUI[m_FriendItemInfo.GetFaceID()];
        //else
        //    HeaderManager.Instance.GetPlayerHeader(m_FriendItemInfo.GetUserID(), m_FriendItemInfo.GetFaceID(), HeaderOptType.HEADER_FRIEND,
        //        (byte)WndType.Friend_Wnd);
        uint faceID   = m_FriendItemInfo.GetFaceID();
        uint playerID = m_FriendItemInfo.GetUserID();

        HeaderManager.Instance.SetHead(m_FaceTexture, faceID, playerID, faceID, HeaderOptType.HEADER_FRIEND, (byte)WndType.Friend_Wnd);

        m_NickName.text = m_FriendItemInfo.GetNickName();
        m_Level.text    = m_FriendItemInfo.GetLevel().ToString();

        if (m_FriendItemInfo.GetLeaveOnlineDay() == 255)
        {
            m_OnLineLast.text = StringTable.GetString("Relation_Online");
        }
        else
        {
            m_OnLineLast.text = StringTable.GetString("Relation_Offline");
        }

        if (m_FriendItemInfo.GetLeaveOnlineDay() != 255)
        {
            m_GenderSprite.spriteName = "offline";
        }
        //性别
        else if (!m_FriendItemInfo.GetGender())
        {
            m_GenderSprite.spriteName = "male";
        }
        else
        {
            m_GenderSprite.spriteName = "female";
        }

        //IP地址
        m_IPAddress.text = m_FriendItemInfo.GetIPAddress();

        //VIP
        if (m_FriendItemInfo.GetVipLevel() > 0)
        {
            m_VipIcon.gameObject.SetActive(true);
            m_VipIcon.spriteName = string.Format("Vip_Icon_0{0}", m_FriendItemInfo.GetVipLevel());
        }

        //检查该好友是否已经送赠送过了
        if (PlayerRole.Instance.GiffManager.GetNowDaySendGiffInfo() != null)
        {
            if (PlayerRole.Instance.GiffManager.GetNowDaySendGiffInfo().ContainsKey(m_FriendItemInfo.GetUserID()))
            {
                SetPressentBtn();
            }
            //m_UIPresentBtn.enabled = false;
        }
        //检查是否有新消息
        if (PlayerRole.Instance.RoleChar.GetCharList() != null)
        {
            if (PlayerRole.Instance.RoleChar.GetCharList().ContainsKey(m_FriendItemInfo.GetUserID()))
            {
                SetNewMsgSate();
            }
        }
    }
Exemple #3
0
    void SetCardsInfo()
    {
        //m_CardsInfo.m_UIAddFriendBtn.enabled = false;
        if (m_bMysSelf)
        {
            if (!PlayerRole.Instance.RoleInfo.RoleMe.GetGender())
            {
                m_CardsInfo.m_UIGender.spriteName = "male";
            }
            else
            {
                m_CardsInfo.m_UIGender.spriteName = "female";
            }
            m_CardsInfo.m_UICardsInfo[0].text = PlayerRole.Instance.RoleInfo.RoleMe.GetNickName();
            m_CardsInfo.m_UICardsInfo[1].text = "Lv." + PlayerRole.Instance.RoleInfo.RoleMe.GetLevel().ToString();
            if (FishConfig.Instance.m_TitleInfo.m_TileMap.ContainsKey(PlayerRole.Instance.RoleInfo.RoleMe.GetTitleID()))
            {
                m_CardsInfo.m_UICardsInfo[2].text = FishConfig.Instance.m_TitleInfo.m_TileMap[PlayerRole.Instance.RoleInfo.RoleMe.GetTitleID()].TitleName;
            }
            m_CardsInfo.m_UICardsInfo[4].text = PlayerRole.Instance.RoleInfo.RoleMe.GetAchievementPoint().ToString();
            m_CardsInfo.m_UICardsInfo[3].text = PlayerRole.Instance.CharmManager.GetCharmValue().ToString();
            m_CardsInfo.m_UICardsInfo[5].text = PlayerRole.Instance.RoleInfo.RoleMe.GetIPAddress();
            m_CardsInfo.m_labelgameid.text    = PlayerRole.Instance.RoleInfo.RoleMe.GetGameID().ToString();
            m_CardsInfo.m_UIWarring.text      = StringTable.GetString("Charm_My_Recv");
            ShowGif();
            m_CardsInfo.m_UIFace.mainTexture = m_FaceTex;
            if (PlayerRole.Instance.RoleInfo.RoleMe.GetVipLevel() > 0)
            {
                m_VipLevelIcon.gameObject.SetActive(true);
                m_VipLevelIcon.spriteName = string.Format("Vip_Icon_{0}", PlayerRole.Instance.RoleInfo.RoleMe.GetVipLevel());
            }
        }
        else if (m_ParentType == CardsParentUIType.Scene_Head)
        {
            if (PlayerRole.Instance.TableManager.GetTableRole(m_PlayerID) == null)
            {
                ShutDown();
                return;
            }
            if (PlayerRole.Instance.TableManager.GetTableRole(m_PlayerID).GetFaceID() < ConstValue.CUSTOM_HEADER)
            {
                m_CardsInfo.m_UIFace.mainTexture = GlobalHallUIMgr.Instance.m_HeadTextureUI[PlayerRole.Instance.TableManager.GetTableRole(m_PlayerID).GetFaceID()];
            }
            else
            {
                HeaderManager.Instance.GetPlayerHeader(m_PlayerID, PlayerRole.Instance.TableManager.GetTableRole(m_PlayerID).GetFaceID(), HeaderOptType.HEADER_CARDS, null);
            }
            if (!PlayerRole.Instance.TableManager.GetTableRole(m_PlayerID).GetGender())
            {
                m_CardsInfo.m_UIGender.spriteName = "male";
            }
            else
            {
                m_CardsInfo.m_UIGender.spriteName = "female";
            }
            m_CardsInfo.m_UICardsInfo[0].text = PlayerRole.Instance.TableManager.GetTableRole(m_PlayerID).GetNickName();
            m_CardsInfo.m_UICardsInfo[1].text = "Lv." + PlayerRole.Instance.TableManager.GetTableRole(m_PlayerID).GetLevel().ToString();
            if (FishConfig.Instance.m_TitleInfo.m_TileMap.ContainsKey(PlayerRole.Instance.TableManager.GetTableRole(m_PlayerID).GetTitleID()))
            {
                m_CardsInfo.m_UICardsInfo[2].text = FishConfig.Instance.m_TitleInfo.m_TileMap[PlayerRole.Instance.TableManager.GetTableRole(m_PlayerID).GetTitleID()].TitleName;
            }
            m_CardsInfo.m_UICardsInfo[4].text = PlayerRole.Instance.TableManager.GetTableRole(m_PlayerID).GetAchievementPoint().ToString();
            ChangeCharmColor(PlayerRole.Instance.CharmManager.GetCharmValue(m_PlayerID));
            m_CardsInfo.m_UICardsInfo[5].text = PlayerRole.Instance.TableManager.GetTableRole(m_PlayerID).GetIPAddress();
            m_CardsInfo.m_labelgameid.text    = PlayerRole.Instance.TableManager.GetTableRole(m_PlayerID).GetGameID().ToString();

            m_CardsInfo.m_UIWarring.text = StringTable.GetString("Charm_Tips");
            ShowGif();
            if (PlayerRole.Instance.TableManager.GetTableRole(m_PlayerID).GetVipLevel() > 0)
            {
                m_VipLevelIcon.gameObject.SetActive(true);
                m_VipLevelIcon.spriteName = string.Format("Vip_Icon_{0}", PlayerRole.Instance.TableManager.GetTableRole(m_PlayerID).GetVipLevel());
            }
        }
        else if (m_ParentType == CardsParentUIType.Friend_Head)
        {
            // m_CardsInfo.m_UIAddFriendBtn.isEnabled = true;
            RelationRole pRelation = PlayerRole.Instance.RelationManager.GetFriendMap()[m_PlayerID];
            if (pRelation.GetFaceID() < ConstValue.CUSTOM_HEADER)
            {
                m_CardsInfo.m_UIFace.mainTexture = GlobalHallUIMgr.Instance.m_HeadTextureUI[pRelation.GetFaceID()];
            }
            else
            {
                HeaderManager.Instance.GetPlayerHeader(m_PlayerID, pRelation.GetFaceID(), HeaderOptType.HEADER_CARDS, null);
            }
            if (!pRelation.GetGender())
            {
                m_CardsInfo.m_UIGender.spriteName = "male";
            }
            else
            {
                m_CardsInfo.m_UIGender.spriteName = "female";
            }
            m_CardsInfo.m_UICardsInfo[0].text = pRelation.GetNickName();
            m_CardsInfo.m_UICardsInfo[1].text = "Lv." + pRelation.GetLevel().ToString();
            if (FishConfig.Instance.m_TitleInfo.m_TileMap.ContainsKey(pRelation.GetTitleID()))
            {
                m_CardsInfo.m_UICardsInfo[2].text = FishConfig.Instance.m_TitleInfo.m_TileMap[pRelation.GetTitleID()].TitleName;
            }
            m_CardsInfo.m_UICardsInfo[4].text = pRelation.GetAchievementPoint().ToString();
            // m_CardsInfo.m_UICardsInfo[3].text = PlayerRole.Instance.CharmManager.GetCharmValue(pRelation.GetCharmInfo()).ToString();
            ChangeCharmColor(PlayerRole.Instance.CharmManager.GetCharmValue(pRelation.GetCharmInfo()));

            m_CardsInfo.m_UICardsInfo[5].text = pRelation.GetIPAddress();
            m_CardsInfo.m_labelgameid.text    = pRelation.GetGameID().ToString();
            m_CardsInfo.m_UIWarring.text      = StringTable.GetString("Charm_Tips");
            ShowGif();
            if (pRelation.GetVipLevel() > 0)
            {
                m_VipLevelIcon.gameObject.SetActive(true);
                m_VipLevelIcon.spriteName = string.Format("Vip_Icon_{0}", pRelation.GetVipLevel());
            }
        }
        else
        {
            m_CardsInfo.m_UIFace.mainTexture = m_FaceTex;
            ShowGif();
        }
    }