Esempio n. 1
0
        public Collision(RoomItem item, WiredHandler handler, RoomUserManager roomUserManager)
        {
            this.item    = item;
            this.handler = handler;

            handler.RequestCycle(this);
            this.disposed = false;
        }
Esempio n. 2
0
        public Repeater(WiredHandler handler, RoomItem item, int cyclesRequired)
        {
            this.handler = handler;
            this.cyclesRequired = cyclesRequired;
            this.item = item;

            handler.RequestCycle(this);
            this.disposed = false;
        }
Esempio n. 3
0
        public LongRepeater(WiredHandler handler, RoomItem item, int cyclesRequired)
        {
            this.handler        = handler;
            this.cyclesRequired = cyclesRequired;
            this.item           = item;

            handler.RequestCycle(this);
            disposed = false;
        }
Esempio n. 4
0
 public Timer(RoomItem item, WiredHandler handler, int cycleCount, GameManager gameManager)
 {
     this.item      = item;
     this.handler   = handler;
     requiredCycles = cycleCount;
     currentCycle   = 0;
     handler.RequestCycle(this);
     disposed = false;
 }
Esempio n. 5
0
 private void itemTriggered(object sender, ItemTriggeredArgs e)
 {
     if (delay > 0)
     {
         triggeringQueue.Enqueue(e);
         handler.RequestCycle(this);
     }
     else
     {
         onTrigger(e);
     }
 }
Esempio n. 6
0
 public void Handle(RoomUser user, Team team, RoomItem item)
 {
     if (delay > 0)
     {
         cycles = 0;
         handler.RequestCycle(this);
     }
     else
     {
         ResetTimers();
     }
 }
Esempio n. 7
0
 public void Handle(RoomUser user, Team team, RoomItem item)
 {
     cycles = 0;
     if (delay == 0)
     {
         HandleItems();
     }
     else
     {
         handler.RequestCycle(this);
     }
 }
Esempio n. 8
0
 public bool Handle(RoomUnit unit, Team team, RoomItem item)
 {
     cycles = 0;
     if (delay == 0)
     {
         return(HandleItems());
     }
     else
     {
         handler.RequestCycle(this);
     }
     return(false);
 }
Esempio n. 9
0
        public bool Handle(RoomUser user, Team team, RoomItem item)
        {
            if (delay > 0)
            {
                cycles = 0;
                handler.RequestCycle(this);
            }
            else
            {
                return(ResetTimers());
            }

            return(false);
        }
Esempio n. 10
0
        public void Handle(RoomUser user, Team team, RoomItem item)
        {
            InteractorGenericSwitch.DoAnimation(itemID);

            cycles = 0;
            if (delay == 0)
            {
                HandleItems();
            }
            else
            {
                handler.RequestCycle(this);
            }
        }
Esempio n. 11
0
        public void Handle(RoomUser user, Team team, RoomItem item)
        {
            if (disposed)
            {
                return;
            }
            user.fastWalk = true;
            user.WhisperComposer("Fast walk ativado!");

            lock (delayedUsers.SyncRoot)
            {
                delayedUsers.Enqueue(user);
            }
            handler.RequestCycle(this);
        }
Esempio n. 12
0
 public void Handle(RoomUser user, Team team, RoomItem item)
 {
     try
     {
         cycles = 0;
         if (delay == 0 && user != null)
         {
             MoveToItem();
         }
         else
         {
             handler.RequestCycle(this);
         }
     }
     catch { }
 }
Esempio n. 13
0
        public void Handle(RoomUser user, Team team, RoomItem item)
        {
            if (disposed)
            {
                return;
            }

            cycles = 0;
            if (time == 0 && user != null)
            {
                DoAction();
            }
            else
            {
                handler.RequestCycle(this);
            }
        }
Esempio n. 14
0
 public bool Handle(RoomUser user, Team team, RoomItem item)
 {
     cycles = 0;
     if (delay == 0 && user != null)
     {
         return(TeleportUser(user));
     }
     else
     {
         lock (delayedUsers.SyncRoot)
         {
             delayedUsers.Enqueue(user);
         }
         handler.RequestCycle(this);
     }
     return(false);
 }
Esempio n. 15
0
        public void Handle(RoomUser user, Team team, RoomItem item)
        {
            if (disposed)
            {
                return;
            }
            user.CanWalk       = false;
            user.comandoFreeze = true;
            user.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(12);
            user.WhisperComposer("Você foi freezado!");

            lock (delayedUsers.SyncRoot)
            {
                delayedUsers.Enqueue(user);
            }
            handler.RequestCycle(this);
        }
Esempio n. 16
0
        private void targetItem_OnUserWalksOffFurni(object sender, UserWalksOnArgs e)
        {
            if (requiredCycles > 0)
            {
                UserWalksFurniValue obj = new UserWalksFurniValue(e.user, (RoomItem)sender);
                lock (requestQueue.SyncRoot)
                {
                    requestQueue.Enqueue(obj);
                }

                handler.RequestCycle(this);
            }
            else
            {
                handler.RequestStackHandle(item.Coordinate, (RoomItem)sender, e.user, Games.Team.none);
                handler.OnEvent(item.Id);
            }
        }
Esempio n. 17
0
 public void Handle(RoomUser user, Team team, RoomItem item)
 {
     try
     {
         cycles = 0;
         if (delay == 0 && user != null)
         {
             user.WhisperComposer(message);
             itemID.GetRoom().AddMute(user.HabboId, (int)mutetime);
         }
         else
         {
             lock (delayedUsers.SyncRoot)
             {
                 delayedUsers.Enqueue(user);
             }
             handler.RequestCycle(this);
         }
     }
     catch { }
 }
Esempio n. 18
0
 public bool Handle(RoomUnit unit, Team team, RoomItem i)
 {
     if (disposed)
     {
         return(false);
     }
     cycles = 0;
     if (delay == 0 && unit != null)
     {
         return(ToggleItems(unit));
     }
     else
     {
         lock (delayedTriggeringUsers.SyncRoot)
         {
             delayedTriggeringUsers.Enqueue(unit);
         }
         handler.RequestCycle(this);
     }
     return(false);
 }
Esempio n. 19
0
        public void Handle(RoomUser user, Team team, RoomItem i)
        {
            if (disposed)
            {
                return;
            }

            cycles = 0;
            if (delay == 0 && user != null)
            {
                ToggleItems(user);
            }
            else
            {
                lock (delayedTriggeringUsers.SyncRoot)
                {
                    delayedTriggeringUsers.Enqueue(user);
                }
                handler.RequestCycle(this);
            }
        }
Esempio n. 20
0
 public void Handle(RoomUser user, Team team, RoomItem item)
 {
     try
     {
         user.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(4);
         cycles = 0;
         if (delay == 0 && user != null)
         {
             TeleportUser(user);
         }
         else
         {
             lock (delayedUsers.SyncRoot)
             {
                 delayedUsers.Enqueue(user);
             }
             handler.RequestCycle(this);
         }
     }
     catch { }
 }
Esempio n. 21
0
        public void Handle(RoomUser user, Team team, RoomItem item)
        {
            InteractorGenericSwitch.DoAnimation(itemID);

            if (user == null || user.IsBot || user.GetClient() == null || disposed || user.GetClient().GetHabbo() == null || user.GetClient().GetHabbo().Rank >= 3)
            {
                return;
            }

            var servermsg = new ServerMessage(Outgoing.Whisp);

            servermsg.AppendInt32(user.VirtualId);
            if (user.HabboId == itemID.GetRoom().RoomData.OwnerId)
            {
                servermsg.AppendString("Wired kick exception: Room owner");
            }
            else
            {
                servermsg.AppendString(message);
            }
            servermsg.AppendInt32(0);
            servermsg.AppendInt32(0); // color
            servermsg.AppendInt32(0);
            servermsg.AppendInt32(-1);
            user.GetClient().SendMessage(servermsg);

            if (user.HabboId == itemID.GetRoom().RoomData.OwnerId)
            {
                return;
            }

            user.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(4);

            lock (delayedUsers.SyncRoot)
            {
                delayedUsers.Enqueue(user);
            }
            handler.RequestCycle(this);
        }
Esempio n. 22
0
        public void Handle(RoomUser user, Team team, RoomItem item)
        {
            if (disposed)
            {
                return;
            }

            cycles = 0;
            if (time == 0 && user != null)
            {
                DoAction(user);
            }
            else
            {
                lock (delayedUsers.SyncRoot)
                {
                    delayedUsers.Enqueue(user);
                }

                handler.RequestCycle(this);
            }
        }
Esempio n. 23
0
 public bool Handle(RoomUser user, Team team, RoomItem item)
 {
     if (user == null)
     {
         return(false);
     }
     user.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(4);
     cycles = 0;
     if (delay == 0 && user != null)
     {
         return(TeleportUser(user));
     }
     else
     {
         lock (delayedUsers.SyncRoot)
         {
             delayedUsers.Enqueue(user);
         }
         handler.RequestCycle(this);
     }
     return(false);
 }
Esempio n. 24
0
 private void continueTimer()
 {
     handler.RequestCycle(this);
 }