Exemple #1
0
        private static bool GetIsTeamLeader()
        {
            IntPtr pTeamViewModule = TeamViewModule_c.GetInstanceIfAny();

            if (pTeamViewModule == IntPtr.Zero)
            {
                return(false);
            }

            return(TeamViewModule_c.IsTeamLeader(pTeamViewModule) == 1);
        }
Exemple #2
0
        private static unsafe void OnJoinTeamRequest(Identity identity, IntPtr pName)
        {
            TeamRequestEventArgs args = new TeamRequestEventArgs(identity);

            TeamRequest?.Invoke(null, args);

            //Kinda weird but basically this is to call the original event that spawns the team dialog box.
            //We only want to spawn the dialog box if we didn't reply immediately via event.
            if (!args.Responded)
            {
                IntPtr pTeamViewModule = TeamViewModule_c.GetInstanceIfAny();

                if (pTeamViewModule == IntPtr.Zero)
                {
                    return;
                }

                TeamViewModule_c.SlotJoinTeamRequest(pTeamViewModule, &identity, pName);
            }
        }