Esempio n. 1
0
 public static string GetFriendSourceDesc(ulong friendUid, COMDT_FRIEND_SOURCE friendSource)
 {
     if (friendSource != null)
     {
         COM_ADD_FRIEND_TYPE bAddFriendType = friendSource.bAddFriendType;
         if (bAddFriendType == 1)
         {
             string heroName = CHeroInfo.GetHeroName(friendSource.stAddFriendInfo.get_stPvp().dwHeroID);
             if (!string.IsNullOrEmpty(heroName))
             {
                 return(Singleton <CTextManager> .GetInstance().GetText("Friend_Apply_Play_With_You_Tip", new string[]
                 {
                     heroName
                 }));
             }
             DebugHelper.Assert(false, "好友来源是PVP,但却获取不了英雄名,heroId={0}", new object[]
             {
                 friendSource.stAddFriendInfo.get_stPvp().dwHeroID
             });
         }
         else
         {
             if (CGuildHelper.IsInSameGuild(friendUid))
             {
                 return(Singleton <CTextManager> .GetInstance().GetText("Friend_Apply_Same_Guild_Tip"));
             }
             if (bAddFriendType == 2)
             {
                 return(Singleton <CTextManager> .GetInstance().GetText("Friend_Apply_Nearby_You_Tip"));
             }
         }
     }
     return(string.Empty);
 }
        private void SetName(CUIListElementScript elemt, HeroKDA p)
        {
            Text component = elemt.transform.FindChild("Name").GetComponent <Text>();

            component.set_text(CHeroInfo.GetHeroName((uint)p.HeroId));
        }