Exemple #1
0
        public virtual void Handle(GameClient session, ClientMessage message)
        {
            RoomUnitUser user = session?.GetHabbo()?.GetRoomSession()?.CurrentRoomRoomUser;

            if (user != null)
            {
                user.Unidle();

                if (this.X != user.X || this.Y != user.Y)
                {
                    user.SetRotation(WalkRotation.Walk(user.X, user.Y, this.X, this.Y), false);
                }
            }
        }
Exemple #2
0
        public void Handle(GameClient session, ClientMessage message)
        {
            if (session != null && session.GetHabbo() != null && session.GetHabbo().GetRoomSession() != null)
            {
                RoomUnitUser user = session.GetHabbo().GetRoomSession().CurrentRoomRoomUser;
                if (user != null)
                {
                    user.Unidle();

                    int x = message.PopWiredInt32();
                    int y = message.PopWiredInt32();
                    if (x != user.X || y != user.Y)
                    {
                        int rotation = WalkRotation.Walk(user.X, user.Y, x, y);
                        user.SetRotation(rotation, false);
                    }
                }
            }
        }