TigerEmu/Game/Rooms/Room.cs

37 lines
1.4 KiB
C#
Raw Normal View History

using Tiger.Communication.Messages.Types;
using Tiger.Game.Habbos;
2023-11-10 13:55:42 +00:00
using Tiger.Game.Navigator.Nodes;
using Tiger.Game.Rooms.Models;
namespace Tiger.Game.Rooms;
public class Room
{
public virtual int Id { get; set; }
2023-11-10 13:55:42 +00:00
public virtual Habbo? Owner { get; set; }
public virtual NavigatorNode Category { get; set; } = null!;
public virtual string Name { get; set; } = null!;
public virtual string Description { get; set; } = null!;
public virtual int ModelId { get; set; }
2023-11-10 13:55:42 +00:00
public virtual RoomModel Model { get; set; } = null!;
public virtual string Ccts { get; } = null!;
public virtual int Wallpaper { get; set; }
public virtual int Floor { get; set; }
public virtual bool ShowOwner { get; set; }
public virtual bool Superusers { get; set; }
public virtual RoomAccessType AccessType { get; set; }
public virtual string Password { get; set; } = null!;
public virtual int UsersIn { get; set; }
public virtual int UsersMax { get; set; }
2023-11-10 13:55:42 +00:00
public virtual void ParseNode(ServerMessage message)
{
2023-11-10 13:55:42 +00:00
message.AppendWire(Id);
message.AppendString(Name);
message.AppendString(ShowOwner ? Owner?.Username ?? "-" : "-");
message.AppendString(AccessType.ToString().ToLower());
message.AppendWire(UsersIn);
message.AppendWire(UsersMax);
message.AppendString(Description);
}
}