// Token: 0x0600130A RID: 4874 RVA: 0x000048AA File Offset: 0x00002AAA
 internal void method_36(object object_0, Class56 class56_0)
 {
     if (this.delegate151_0 != null)
     {
         this.delegate151_0(object_0, class56_0);
     }
 }
示例#2
0
        public static void OnPlayerMove(NetUser netUser, ref Vector3 newpos, ref TruthDetector.ActionTaken taken)
        {
            Predicate <EventTimer> match   = null;
            ElapsedEventHandler    handler = null;
            Class56 class2 = new Class56 {
                netUser_0 = netUser
            };

            if (((class2.netUser_0 != null) && (class2.netUser_0.playerClient != null)) && (class2.netUser_0.playerClient.controllable != null))
            {
                Vector3 position = class2.netUser_0.playerClient.controllable.character.transform.position;
                if ((position != newpos) && ((position.x != newpos.x) || (position.z != newpos.z)))
                {
                    class2.userData_0 = Users.GetBySteamID(class2.netUser_0.userID);
                    if (class2.userData_0 != null)
                    {
                        if (!class2.userData_0.HasFlag(UserFlags.onevent))
                        {
                            class2.userData_0.Position = newpos;
                        }
                        class2.worldZone_0 = Get(newpos);
                        if (class2.userData_0.Zone != class2.worldZone_0)
                        {
                            EventTimer timer = null;
                            if (class2.userData_0.Zone != null)
                            {
                                if (match == null)
                                {
                                    match = new Predicate <EventTimer>(class2.method_0);
                                }
                                timer = Events.Timer.Find(match);
                            }
                            if (timer != null)
                            {
                                Broadcast.Notice(class2.netUser_0, "☢", Config.GetMessageTeleport("Player.WarpZone.Interrupt", class2.netUser_0, class2.userData_0.Zone, null), 2f);
                                timer.Dispose();
                            }
                            if (class2.userData_0.Zone != null)
                            {
                                if ((class2.userData_0.Zone.NoLeave && !class2.netUser_0.admin) && ((class2.worldZone_0 == null) || !class2.userData_0.Zone.Internal.Contains(class2.worldZone_0)))
                                {
                                    newpos = position;
                                    taken  = TruthDetector.ActionTaken.Moved;
                                    return;
                                }
                                if (!string.IsNullOrEmpty(class2.userData_0.Zone.Notice_OnLeave))
                                {
                                    Broadcast.Notice(class2.netUser_0, "☢", class2.userData_0.Zone.Notice_OnLeave, 5f);
                                }
                                foreach (string str in class2.userData_0.Zone.Message_OnLeave)
                                {
                                    Broadcast.Message(class2.netUser_0, str, null, 0f);
                                }
                            }
                            if (class2.worldZone_0 != null)
                            {
                                if ((class2.worldZone_0.NoEnter && !class2.netUser_0.admin) && ((class2.userData_0.Zone == null) || !class2.worldZone_0.Internal.Contains(class2.userData_0.Zone)))
                                {
                                    newpos = position;
                                    taken  = TruthDetector.ActionTaken.Moved;
                                    return;
                                }
                                if (!string.IsNullOrEmpty(class2.worldZone_0.Notice_OnEnter))
                                {
                                    Broadcast.Notice(class2.netUser_0, "☢", class2.worldZone_0.Notice_OnEnter, 5f);
                                }
                                foreach (string str2 in class2.worldZone_0.Message_OnEnter)
                                {
                                    Broadcast.Message(class2.netUser_0, str2, null, 0f);
                                }
                            }
                            class2.userData_0.Zone = class2.worldZone_0;
                            if (((class2.worldZone_0 != null) && (class2.worldZone_0.WarpZone != null)) && (class2.worldZone_0.WarpZone.Spawns.Count > 0))
                            {
                                if (class2.worldZone_0.WarpTime > 0L)
                                {
                                    timer = new EventTimer {
                                        Interval  = class2.worldZone_0.WarpTime * 0x3e8L,
                                        AutoReset = false
                                    };
                                    if (handler == null)
                                    {
                                        handler = new ElapsedEventHandler(class2.method_1);
                                    }
                                    timer.Elapsed += handler;
                                    timer.Sender   = class2.netUser_0;
                                    timer.Command  = class2.worldZone_0.Defname;
                                    timer.Start();
                                    Broadcast.Notice(class2.netUser_0, "☢", Config.GetMessageTeleport("Player.WarpZone.Start", class2.netUser_0, class2.worldZone_0, null), 2f);
                                }
                                else
                                {
                                    PlayerWarp(class2.netUser_0, class2.userData_0, class2.worldZone_0);
                                }
                            }
                        }
                    }
                }
            }
        }
示例#3
0
 static Class52()
 {
     Class56.smethod_0();
     module_0 = typeof(Class52).Assembly.ManifestModule;
 }
示例#4
0
        // Token: 0x06001458 RID: 5208 RVA: 0x000250C0 File Offset: 0x000232C0
        public void OpenStateChange(int NewState)
        {
            Class56 class56_ = new Class56(NewState);

            this.class24_0.method_36(this.class24_0, class56_);
        }
示例#5
0
 public Class52()
 {
     Class56.smethod_0();
 }