47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
namespace GameServer.Dungeon;
|
|
|
|
/// <summary>
|
|
/// Runtime instance of a personal loot chest (from death overflow)
|
|
/// Only visible to the owner player
|
|
/// </summary>
|
|
public class LootChestInstance
|
|
{
|
|
public int Id { get; set; }
|
|
public ulong DatabaseId { get; set; } // Reference to DeathChest in DB
|
|
|
|
public float X { get; set; }
|
|
public float Y { get; set; }
|
|
|
|
/// <summary>
|
|
/// Character ID who can see/access this chest
|
|
/// </summary>
|
|
public ulong OwnerCharacterId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gold stored in this chest
|
|
/// </summary>
|
|
public long Gold { get; set; }
|
|
|
|
/// <summary>
|
|
/// Items in the chest (100 slots max)
|
|
/// </summary>
|
|
public List<LootChestItem> Items { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// Whether the chest is currently open by the owner
|
|
/// </summary>
|
|
public bool IsOpen { get; set; }
|
|
|
|
/// <summary>
|
|
/// Check if chest is empty and can be removed
|
|
/// </summary>
|
|
public bool IsEmpty => Items.Count == 0 && Gold == 0;
|
|
}
|
|
|
|
public class LootChestItem
|
|
{
|
|
public int SlotIndex { get; set; }
|
|
public int ItemDefinitionId { get; set; }
|
|
public int Quantity { get; set; }
|
|
}
|