2023-10-21 06:34:12 +00:00
|
|
|
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;
|
2023-10-21 06:34:12 +00:00
|
|
|
|
|
|
|
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!;
|
2023-10-21 06:34:12 +00:00
|
|
|
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; }
|
2023-10-21 06:34:12 +00:00
|
|
|
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-10-21 06:34:12 +00:00
|
|
|
{
|
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);
|
2023-10-21 06:34:12 +00:00
|
|
|
}
|
|
|
|
}
|