Esempio n. 1
0
    public static void OnClickRole(long uuid, string name, Transform root, long guildId)
    {
        if (uuid <= 0L)
        {
            return;
        }
        if (uuid == EntityWorld.Instance.EntSelf.ID)
        {
            return;
        }
        if (uuid == -1L)
        {
            return;
        }
        List <ButtonInfoData> list = new List <ButtonInfoData>();

        list.Add(PopButtonTabsManager.GetButtonData2Show(uuid, null));
        if (!FriendManager.Instance.IsRelationOfBuddy(uuid))
        {
            list.Add(PopButtonTabsManager.GetButtonData2AddFriend(uuid));
        }
        list.Add(PopButtonTabsManager.GetButtonData2PrivateTalk(uuid, name));
        list.Add(PopButtonTabsManager.GetButtonData2Black(uuid));
        if (SystemOpenManager.IsSystemOn(59))
        {
            list.Add(PopButtonTabsManager.GetButtonData2TeamInvite(uuid));
        }
        if (ChatManager.CanSender2Invitation())
        {
            list.Add(PopButtonTabsManager.GetButtonData2GuildInvitation(uuid));
        }
        else if (ChatManager.CanSender2Application())
        {
            list.Add(PopButtonTabsManager.GetButtonData2GuildApplication(guildId));
        }
        if (list.get_Count() > 0 && root != null)
        {
            PopButtonsAdjustUIViewModel.Open(UINodesManager.MiddleUIRoot);
            PopButtonsAdjustUIViewModel.Instance.get_transform().set_position(root.get_position());
            PopButtonsAdjustUIViewModel.Instance.SetButtonInfos(list);
        }
    }