Drops now land on the ground as gadgets and are picked up with F instead of appearing in the bag out of nowhere. Chests, ore, crystals and plants all spawn and can be interacted with. Monsters load by scene group rather than by a radius around each one, so a camp shows up as a camp and nothing pops into existence mid fight. The group anchors come out of the scene Lua, which also killed four invented tuning constants. The gateway was creating a whole new session for every handshake datagram, and the client retransmits those until it gets an answer. That is where the piles of duplicated monsters and the chests coming back from the dead were coming from. Also: monster level scales to the party now, path queries return an actual two point path instead of an empty one, NpcTalk closes properly, and the ability and combat invocations are no longer echoed back to the client that sent them.
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
using System.Text.Json.Serialization;
|
|
using Yuanshen.Common.Data.Excel.Attributes;
|
|
|
|
namespace Yuanshen.Common.Data.Excel;
|
|
|
|
public sealed class MaterialItemUse
|
|
{
|
|
[JsonPropertyName("useOp")] public string UseOp { get; set; } = string.Empty;
|
|
[JsonPropertyName("useParam")] public List<string> UseParam { get; set; } = new();
|
|
}
|
|
|
|
[Excel(ExcelType.Material, "MaterialExcelConfigData.json")]
|
|
public sealed class MaterialExcel : ExcelItem
|
|
{
|
|
public const string GainAvatar = "ITEM_USE_GAIN_AVATAR";
|
|
|
|
[JsonPropertyName("id")] public uint Id { get; set; }
|
|
[JsonPropertyName("materialType")] public string MaterialType { get; set; } = string.Empty;
|
|
[JsonPropertyName("gadgetId")] public uint GadgetId { get; set; }
|
|
[JsonPropertyName("itemUse")] public List<MaterialItemUse> ItemUse { get; set; } = new();
|
|
|
|
public override uint ExcelId => Id;
|
|
|
|
public uint GainedAvatarId
|
|
{
|
|
get
|
|
{
|
|
foreach (MaterialItemUse use in ItemUse)
|
|
{
|
|
if (use.UseOp == GainAvatar && use.UseParam.Count != 0 && uint.TryParse(use.UseParam[0], out uint avatarId))
|
|
return avatarId;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
}
|
|
}
|