[FIX] - Room Map (:Floor)

Pollak

Active Member
Oct 12, 2017
161
51
Today I'm going to give you a fix for your Habbo. What does it consist of?
On the floor :) floor) you can change, add, remove, climb, etc ... squares
of your room. Only when they have mobis and you run the floor command for editing
the mobis (all) are in the same form (1x1, following the print).
Then, you will have to have access to your emulator to follow the next steps.
Floor2.PNG

Go to the folder: Plus> Communication> Packets> Incoming> Rooms> FloorPlan
and look for the file: FloorPlanEditorRoomPropertiesEvent.cs
Delete everything and enter this new code:​
Code:
Código:
using System.Linq;
using System.Collections.Generic;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Items;
using Plus.Communication.Packets.Outgoing.Rooms.FloorPlan;
using Plus.Communication.Packets.Outgoing.Rooms.Engine;
using System.Drawing;

namespace Plus.Communication.Packets.Incoming.Rooms.FloorPlan
{
    class FloorPlanEditorRoomPropertiesEvent : IPacketEvent
    {
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (!Session.GetHabbo().InRoom)
                return;

            Room Room = Session.GetHabbo().CurrentRoom;
            if (Room == null)
                return;

            if (Room.GetGameMap().Model == null)
                return;

            List<Point> Squares = new List<Point>();
            Room.GetRoomItemHandler().GetFloor.ToList().ForEach(Item =>
            {
                Item.GetCoords.ForEach(Point =>
                {
                    if (!Squares.Contains(Point))
                        Squares.Add(Point);
                });
            });

            Session.SendMessage(new FloorPlanFloorMapComposer(Squares));
            Session.SendMessage(new FloorPlanSendDoorComposer(Room.GetGameMap().Model.DoorX, Room.GetGameMap().Model.DoorY, Room.GetGameMap().Model.DoorOrientation));
            Session.SendMessage(new RoomVisualizationSettingsComposer(Room.WallThickness, Room.FloorThickness, PlusEnvironment.EnumToBool(Room.Hidewall.ToString())));

            Squares.Clear();
            Squares = null;
        }
    }
}
Then go to the folder: Plus> Communication> Packets> Outgoing> Rooms> FloorPlan
and look for the file: FloorPlanFloorMapComposer.cs
Delete everything and enter this new code:​
Code:
using System.Linq;
using System.Collections.Generic;
using Plus.HabboHotel.Items;
using System.Drawing;

namespace Plus.Communication.Packets.Outgoing.Rooms.FloorPlan
{
    class FloorPlanFloorMapComposer : ServerPacket
    {
        public FloorPlanFloorMapComposer(List<Point> Items)
            : base(ServerPacketHeader.FloorPlanFloorMapMessageComposer)
        {
            base.WriteInteger(Items.Count);
            foreach (Point Item in Items.ToList())
            {
                base.WriteInteger(Item.X);
                base.WriteInteger(Item.Y);
            }
        }
    }
}
After inserting these two new codes, debug, one by one!
Then it will look like this (print below) and you will not have any more problems! : D
Floor1.png

* The furnis will occupy the right squares!
CREDITS:
Snaiker (Pollak) - Fix complete
Devbest (45% to fix)
:)
 

Users who are viewing this thread

Top