Gadgets are streamed alongside monsters now, so chests and ore nodes show up in the world and can be interacted with. The two flows differ: for a chest the client sends the finish request itself and the loot is granted on that one, for ore it sends nothing more so the server has to close everything on the first request. Artifacts used to be silently dropped on the floor because the item ids that actually roll were not in the reliquary table at all. Added the missing rows and gave them real main stat and substat rolls instead of the fixed four. Dropped items survive a relogin. The inventory is still rebuilt from the tables on every login, so the trick is to remember where the default set ends and only persist what was found in the world. Gacha and shop weapons were disappearing the same way and are fixed by the same change.
69 lines
2.7 KiB
C#
69 lines
2.7 KiB
C#
namespace Yuanshen.Gameserver.Database;
|
|
|
|
internal sealed class PlayerRecord
|
|
{
|
|
public uint Uid { get; set; }
|
|
public string Nickname { get; set; } = "Traveler";
|
|
public uint CurrentTeamId { get; set; } = 1;
|
|
public ulong CurrentAvatarGuid { get; set; }
|
|
public List<ulong> TeamAvatarGuids { get; set; } = new();
|
|
public List<uint> TeamAvatarIds { get; set; } = new();
|
|
public uint CurrentAvatarId { get; set; }
|
|
public Dictionary<uint, ulong> EquippedWeapons { get; set; } = new();
|
|
public Dictionary<uint, Dictionary<uint, ulong>> EquippedReliquaries { get; set; } = new();
|
|
public Dictionary<uint, AvatarProgress> AvatarProgress { get; set; } = new();
|
|
public Dictionary<uint, uint> Materials { get; set; } = new();
|
|
public List<uint> KilledNodes { get; set; } = new();
|
|
public List<uint> OpenedGadgets { get; set; } = new();
|
|
public List<DroppedWeapon> DroppedWeapons { get; set; } = new();
|
|
public List<DroppedReliquary> DroppedReliquaries { get; set; } = new();
|
|
public uint SpawnDataVersion { get; set; }
|
|
public Dictionary<uint, uint> GachaPity { get; set; } = new();
|
|
public Dictionary<uint, uint> GachaGuarantee { get; set; } = new();
|
|
public List<GachaLogEntry> GachaLog { get; set; } = new();
|
|
public Dictionary<uint, uint> BoughtGoods { get; set; } = new();
|
|
public uint Hcoin { get; set; }
|
|
public uint Scoin { get; set; }
|
|
public float PosX { get; set; }
|
|
public float PosY { get; set; }
|
|
public float PosZ { get; set; }
|
|
public DateTimeOffset LastSeen { get; set; }
|
|
}
|
|
|
|
internal sealed class AvatarProgress
|
|
{
|
|
public uint Level { get; set; } = 90;
|
|
public uint PromoteLevel { get; set; } = 6;
|
|
public uint TalentLevel { get; set; } = 10;
|
|
public uint Constellation { get; set; }
|
|
public uint WeaponLevel { get; set; } = 90;
|
|
public uint WeaponPromote { get; set; } = 6;
|
|
public uint WeaponRefinement { get; set; }
|
|
}
|
|
internal sealed class GachaLogEntry
|
|
{
|
|
public uint GachaType { get; set; }
|
|
public uint ItemId { get; set; }
|
|
public uint RankLevel { get; set; }
|
|
public string Name { get; set; } = string.Empty;
|
|
public string Kind { get; set; } = string.Empty;
|
|
public long Time { get; set; }
|
|
}
|
|
|
|
internal sealed class DroppedWeapon
|
|
{
|
|
public uint ItemId { get; set; }
|
|
public uint Level { get; set; } = 1;
|
|
public uint PromoteLevel { get; set; }
|
|
public uint Refinement { get; set; }
|
|
}
|
|
|
|
internal sealed class DroppedReliquary
|
|
{
|
|
public uint ItemId { get; set; }
|
|
public uint EquipType { get; set; }
|
|
public uint MainPropId { get; set; }
|
|
public uint Level { get; set; } = 1;
|
|
public uint PromoteLevel { get; set; }
|
|
public List<uint> AppendPropIds { get; set; } = new();
|
|
}
|