Ejemplo n.º 1
0
 private void InitGuildList()
 {
     if (m_RequestGuilds != null && m_RequestGuilds.Count > 0)
     {
         GuildInfoItemPrefabManager.Clear();
         GuildInfoItem first = null;
         foreach (var guild_info in m_RequestGuilds)
         {
             var item = GuildInfoItemPrefabManager.GetNewObject <GuildInfoItem>(m_GridGuild.transform, Vector3.zero);
             item.Init(new pd_GuildInfoDetail(guild_info.guild_info), OnClickGuild);
             if (first == null)
             {
                 first = item;
             }
         }
         m_GridGuild.Reposition();
         m_ScrollGuild.ResetPosition();
         first.OnClickGuild();
         m_LabelRequestCount.text = Localization.Format("GuildMemberCountFormat", m_RequestGuilds.Count, GuildInfoManager.Config.RequestCount);
     }
     else
     {
         Tooltip.Instance.ShowMessageKey("NotExistRequestGuild");
         var guild_menu = GameMain.Instance.GetCurrentMenu().GetComponent <Guild>();
         if (guild_menu != null)
         {
             guild_menu.SetTab(eGuildTabMode.GuildJoin);
         }
     }
 }
Ejemplo n.º 2
0
 void OnGuildListForJoin(C2G.GuildListForJoin packet, C2G.GuildListForJoinAck ack)
 {
     if (ack.guild_join_info != null && ack.guild_join_info.Count > 0)
     {
         GuildInfoItemPrefabManager.Clear();
         GuildInfoItem first = null;
         foreach (var guild_info in ack.guild_join_info)
         {
             var item = GuildInfoItemPrefabManager.GetNewObject <GuildInfoItem>(m_GridGuild.transform, Vector3.zero);
             item.Init(new pd_GuildInfoDetail(guild_info.guild_info), OnSelectedGuild);
             if (first == null)
             {
                 first = item;
             }
         }
         m_GridGuild.Reposition();
         m_ScrollGuild.ResetPosition();
         first.OnClickGuild();
     }
     else
     {
         Tooltip.Instance.ShowMessageKey("NotExistJoinableGuild");
         OnClickFilterAll();
     }
     RequestGuilds = ack.request_guilds;
     UpdateRequestCount();
 }
Ejemplo n.º 3
0
    //////////////////////////////////////////////////////////////////////////
    void OnGuildListRank(C2G.GuildListRank packet, C2G.GuildListRankAck ack)
    {
        m_Total = ack.total;
        if (ack.guild_infos != null && ack.guild_infos.Count > 0)
        {
            GuildInfoItemPrefabManager.Clear();
            GuildInfoItem first = null;
            foreach (var guild_info in ack.guild_infos)
            {
                var item = GuildInfoItemPrefabManager.GetNewObject <GuildInfoItem>(m_GridGuild.transform, Vector3.zero);
                item.Init(new pd_GuildInfoDetail(guild_info), OnSelectedGuild);
                if (first == null)
                {
                    first = item;
                }
            }
            m_GridGuild.Reposition();
            m_ScrollGuild.ResetPosition();

            first.OnClickGuild();
        }
    }