提交示例代码
This commit is contained in:
BIN
物品和背包的完整代码/Server/.DS_Store
vendored
Normal file
BIN
物品和背包的完整代码/Server/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
物品和背包的完整代码/Server/Entity/.DS_Store
vendored
Normal file
BIN
物品和背包的完整代码/Server/Entity/.DS_Store
vendored
Normal file
Binary file not shown.
41
物品和背包的完整代码/Server/Entity/AssemblyHelper.cs
Normal file
41
物品和背包的完整代码/Server/Entity/AssemblyHelper.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.Loader;
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
public static class AssemblyHelper
|
||||
{
|
||||
private const string HotfixDll = "Hotfix";
|
||||
private static AssemblyLoadContext? _assemblyLoadContext = null;
|
||||
|
||||
public static System.Reflection.Assembly[] Assemblies
|
||||
{
|
||||
get
|
||||
{
|
||||
var assemblies = new System.Reflection.Assembly[2];
|
||||
assemblies[0] = LoadEntityAssembly();
|
||||
assemblies[1] = LoadHotfixAssembly();
|
||||
return assemblies;
|
||||
}
|
||||
}
|
||||
|
||||
private static System.Reflection.Assembly LoadEntityAssembly()
|
||||
{
|
||||
return typeof(AssemblyHelper).Assembly;
|
||||
}
|
||||
|
||||
private static System.Reflection.Assembly LoadHotfixAssembly()
|
||||
{
|
||||
if (_assemblyLoadContext != null)
|
||||
{
|
||||
_assemblyLoadContext.Unload();
|
||||
System.GC.Collect();
|
||||
}
|
||||
|
||||
_assemblyLoadContext = new AssemblyLoadContext(HotfixDll, true);
|
||||
var dllBytes = File.ReadAllBytes(Path.Combine(Environment.CurrentDirectory, $"{HotfixDll}.dll"));
|
||||
var pdbBytes = File.ReadAllBytes(Path.Combine(Environment.CurrentDirectory, $"{HotfixDll}.pdb"));
|
||||
return _assemblyLoadContext.LoadFromStream(new MemoryStream(dllBytes), new MemoryStream(pdbBytes));
|
||||
}
|
||||
}
|
||||
}
|
||||
19
物品和背包的完整代码/Server/Entity/Entity.csproj
Normal file
19
物品和背包的完整代码/Server/Entity/Entity.csproj
Normal file
@@ -0,0 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Enum\" />
|
||||
<Folder Include="Generate\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Packages\Fantasy\Fantasy.Net\Fantasy.Net\Fantasy.Net.csproj" />
|
||||
<ProjectReference Include="..\..\Packages\Fantasy\Fantasy.Packages\Fantasy.ConfigTable\Net\Fantasy.ConfigTable.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
12
物品和背包的完整代码/Server/Entity/Gate/Components/BagComponent.cs
Normal file
12
物品和背包的完整代码/Server/Entity/Gate/Components/BagComponent.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Fantasy.Entitas;
|
||||
using Fantasy.Entitas.Interface;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson.Serialization.Options;
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public class BagComponent : Entity, ISupportedDataBase
|
||||
{
|
||||
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
||||
public Dictionary<long, Item> Items = new Dictionary<long, Item>();
|
||||
}
|
||||
240
物品和背包的完整代码/Server/Entity/Gate/Components/ItemUseComponent.cs
Normal file
240
物品和背包的完整代码/Server/Entity/Gate/Components/ItemUseComponent.cs
Normal file
@@ -0,0 +1,240 @@
|
||||
using Fantasy.Assembly;
|
||||
using Fantasy.Async;
|
||||
using Fantasy.DataStructure.Collection;
|
||||
using Fantasy.Entitas;
|
||||
#pragma warning disable CS8604 // Possible null reference argument.
|
||||
#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type.
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public class ItemUseComponent : Entity, IAssembly
|
||||
{
|
||||
private readonly Dictionary<int, IItemUse> _handlers = new Dictionary<int, IItemUse>();
|
||||
private readonly OneToManyList<long, int> _assemblyHandlers = new OneToManyList<long, int>();
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
base.Dispose();
|
||||
_handlers.Clear();
|
||||
_assemblyHandlers.Clear();
|
||||
}
|
||||
|
||||
#region Assembly
|
||||
|
||||
public async FTask Initialize()
|
||||
{
|
||||
await AssemblySystem.Register(this);
|
||||
}
|
||||
|
||||
public async FTask Load(long assemblyIdentity)
|
||||
{
|
||||
var tcs = FTask.Create(false);
|
||||
Scene.ThreadSynchronizationContext.Post(() =>
|
||||
{
|
||||
InnerLoad(assemblyIdentity);
|
||||
tcs.SetResult();
|
||||
});
|
||||
await tcs;
|
||||
}
|
||||
|
||||
public async FTask ReLoad(long assemblyIdentity)
|
||||
{
|
||||
var tcs = FTask.Create(false);
|
||||
Scene.ThreadSynchronizationContext.Post(() =>
|
||||
{
|
||||
InnerUnLoad(assemblyIdentity);
|
||||
InnerLoad(assemblyIdentity);
|
||||
tcs.SetResult();
|
||||
});
|
||||
await tcs;
|
||||
}
|
||||
|
||||
public async FTask OnUnLoad(long assemblyIdentity)
|
||||
{
|
||||
var tcs = FTask.Create(false);
|
||||
Scene.ThreadSynchronizationContext.Post(() =>
|
||||
{
|
||||
InnerUnLoad(assemblyIdentity);
|
||||
tcs.SetResult();
|
||||
});
|
||||
await tcs;
|
||||
}
|
||||
|
||||
private void InnerLoad(long assemblyIdentity)
|
||||
{
|
||||
foreach (var type in AssemblySystem.ForEach(assemblyIdentity,typeof(IItemUse)))
|
||||
{
|
||||
var customAttributes = type.GetCustomAttributes(typeof(ItemUseAttribute), false);
|
||||
if (customAttributes.Length == 0)
|
||||
{
|
||||
Log.Warning($"type {type.FullName} Implemented the interface of IItemUse, requiring the implementation of ItemUseAttribute");
|
||||
continue;
|
||||
}
|
||||
var instance = (IItemUse)Activator.CreateInstance(type);
|
||||
foreach (ItemUseAttribute customAttribute in customAttributes)
|
||||
{
|
||||
var customAttributeType = (int)customAttribute.Type;
|
||||
_handlers.Add(customAttributeType, instance);
|
||||
_assemblyHandlers.Add(assemblyIdentity, customAttributeType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void InnerUnLoad(long assemblyIdentity)
|
||||
{
|
||||
if (!_assemblyHandlers.TryGetValue(assemblyIdentity, out var assemblyHandlers))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var assemblyHandler in assemblyHandlers)
|
||||
{
|
||||
_handlers.Remove(assemblyHandler);
|
||||
}
|
||||
|
||||
_assemblyHandlers.RemoveByKey(assemblyIdentity);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public uint CanUse(Account account, ItemConfig config, ref int count)
|
||||
{
|
||||
var itemUseEffect = (ItemUseEffect)config.Effect;
|
||||
|
||||
if (itemUseEffect == ItemUseEffect.None)
|
||||
{
|
||||
Log.Error($"config.Effect is zero!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return CanUse(account, config, itemUseEffect, ref count);
|
||||
}
|
||||
|
||||
public void Use(Account account, ItemConfig config, ref int count)
|
||||
{
|
||||
var itemUseEffect = (ItemUseEffect)config.Effect;
|
||||
|
||||
if (itemUseEffect == ItemUseEffect.None)
|
||||
{
|
||||
Log.Error($"config.Effect is zero!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_handlers.TryGetValue((int)itemUseEffect, out var handler))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
handler.Use(account, config, ref count);
|
||||
}
|
||||
|
||||
public uint UseHandler(Account account, ItemConfig config, ref int count)
|
||||
{
|
||||
var itemUseEffect = (ItemUseEffect)config.Effect;
|
||||
|
||||
if (itemUseEffect == ItemUseEffect.None)
|
||||
{
|
||||
Log.Error($"config.Effect is zero!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!_handlers.TryGetValue((int)itemUseEffect, out var handler))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var canUse = handler.CanUse(account, config, ref count);
|
||||
if (canUse != 0)
|
||||
{
|
||||
return canUse;
|
||||
}
|
||||
|
||||
handler.Use(account, config, ref count);
|
||||
return 0;
|
||||
}
|
||||
|
||||
public uint CanUse(Account account, ItemConfig config, ItemUseEffect itemUseEffect, ref int count)
|
||||
{
|
||||
if (!_handlers.TryGetValue((int)itemUseEffect, out var handler))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return handler.CanUse(account, config, ref count);
|
||||
}
|
||||
|
||||
public void Use(Account account, ItemConfig config, ItemUseEffect itemUseEffect, ref int count)
|
||||
{
|
||||
if (!_handlers.TryGetValue((int)itemUseEffect, out var handler))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
handler.Use(account, config, ref count);
|
||||
}
|
||||
|
||||
public uint UseHandler(Account account, ItemConfig config, ItemUseEffect itemUseEffect, ref int count)
|
||||
{
|
||||
if (!_handlers.TryGetValue((int)itemUseEffect, out var handler))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var canUse = handler.CanUse(account, config, ref count);
|
||||
if (canUse != 0)
|
||||
{
|
||||
return canUse;
|
||||
}
|
||||
|
||||
handler.Use(account, config, ref count);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// public static class ItemUseHelper
|
||||
// {
|
||||
// private static readonly Dictionary<int, IItemUse> Handlers = new Dictionary<int, IItemUse>();
|
||||
//
|
||||
// public static void Init()
|
||||
// {
|
||||
// Handlers.Add((int)ItemType.Drug, new ItemUse_Drug());
|
||||
// Handlers.Add((int)ItemType.Equip , new ItemUse_Equip());
|
||||
// }
|
||||
//
|
||||
// public static uint CanUse(Account account, ItemConfig config, ref int count)
|
||||
// {
|
||||
// if (!Handlers.TryGetValue((int)config.Type, out var handler))
|
||||
// {
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
// return handler.CanUse(account, config, ref count);
|
||||
// }
|
||||
//
|
||||
// public static void Use(Account account, ItemConfig config, ref int count)
|
||||
// {
|
||||
// if (!Handlers.TryGetValue((int)config.Type, out var handler))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// handler.Use(account, config, ref count);
|
||||
// }
|
||||
//
|
||||
// public static uint UseHandler(Account account, ItemConfig config, ref int count)
|
||||
// {
|
||||
// if (!Handlers.TryGetValue((int)config.Type, out var handler))
|
||||
// {
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
// var canUse = handler.CanUse(account, config, ref count);
|
||||
// if (canUse != 0)
|
||||
// {
|
||||
// return canUse;
|
||||
// }
|
||||
//
|
||||
// handler.CanUse(account, config, ref count);
|
||||
// return 0;
|
||||
// }
|
||||
// }
|
||||
51
物品和背包的完整代码/Server/Entity/Gate/Container/Container.cs
Normal file
51
物品和背包的完整代码/Server/Entity/Gate/Container/Container.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using Fantasy.DataStructure.Collection;
|
||||
using Fantasy.Entitas;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson.Serialization.Options;
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
/// <summary>
|
||||
/// 代表一个容器的实体
|
||||
/// </summary>
|
||||
public sealed class Container : Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 配置表ID
|
||||
/// </summary>
|
||||
public uint ConfigId;
|
||||
/// <summary>
|
||||
/// 账户的实体
|
||||
/// </summary>
|
||||
[BsonIgnore]
|
||||
public Account Account;
|
||||
/// <summary>
|
||||
/// 对应的Config配置文件
|
||||
/// </summary>
|
||||
[BsonIgnore]
|
||||
public ContainerConfig Config => ContainerConfigData.Instance.Get(ConfigId);
|
||||
/// <summary>
|
||||
/// 当前已经使用的格子的数量
|
||||
/// </summary>
|
||||
public int CurrentCellCount;
|
||||
/// <summary>
|
||||
/// 容器内的物品
|
||||
/// </summary>
|
||||
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
||||
public Dictionary<long, Item> Items = new Dictionary<long, Item>();
|
||||
/// <summary>
|
||||
/// 容器内的物品,按照格子进行存储
|
||||
/// </summary>
|
||||
[BsonIgnore]
|
||||
public Dictionary<long, Item> ItemsByCell = new Dictionary<long, Item>();
|
||||
/// <summary>
|
||||
/// 容器内的物品,按照物品配置ID进行分组
|
||||
/// </summary>
|
||||
[BsonIgnore]
|
||||
public readonly OneToManyList<uint, Item> ItemsByConfigId = new OneToManyListPool<uint, Item>();
|
||||
/// <summary>
|
||||
/// 容器内的物品,按照物品类型进行分组
|
||||
/// </summary>
|
||||
[BsonIgnore]
|
||||
public readonly OneToManyList<uint, Item> ItemsByType = new OneToManyListPool<uint, Item>();
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using Fantasy.Entitas;
|
||||
using Fantasy.Entitas.Interface;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson.Serialization.Options;
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
/// <summary>
|
||||
/// 把用户的所有容器都放在一个组件里,这样保存的时候也会存储在一个文档里。
|
||||
/// 如果物品数据过多,可能会超过数据库单条的限制。
|
||||
/// MongoDB的数据库的单个文档的最大大小限制为16MB。
|
||||
/// 所以这个几乎不会出现的,完全不需要考虑这个大小的问题了。因为几乎把玩家可能有16MB的物品。
|
||||
/// </summary>
|
||||
public sealed class ContainerComponent : Entity, ISupportedDataBase
|
||||
{
|
||||
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
||||
public Dictionary<int, Container> Containers = new Dictionary<int, Container>();
|
||||
}
|
||||
// 如果不放心,可以把每个容器单独做一个组件存起来
|
||||
// 例如下面
|
||||
/// <summary>
|
||||
/// 背包容器组件
|
||||
/// </summary>
|
||||
public sealed class BagContainerComponent : Entity, ISupportedDataBase
|
||||
{
|
||||
public Container Container;
|
||||
}
|
||||
/// <summary>
|
||||
/// 装备容器组件
|
||||
/// </summary>
|
||||
public sealed class EquipContainerComponent : Entity, ISupportedDataBase
|
||||
{
|
||||
public Container Container;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using Fantasy.Entitas;
|
||||
using Fantasy.Entitas.Interface;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson.Serialization.Options;
|
||||
|
||||
namespace Fantasy;
|
||||
/// <summary>
|
||||
/// 代表装备的某一个属性
|
||||
/// </summary>
|
||||
public class EquipAttr : Entity
|
||||
{
|
||||
[BsonElement("K")]
|
||||
public int Key; // 属性数值对应的Key
|
||||
[BsonElement("V")]
|
||||
public int Value; // 属性对应额数值
|
||||
[BsonElement("S")]
|
||||
public int SValue; // 附加或强化属性的对应数值
|
||||
[BsonIgnore]
|
||||
public int ValidValue => Value + SValue; // 真实的数值
|
||||
}
|
||||
/// <summary>
|
||||
/// 挂载到Item下的组件,用来表示这个Item是一个装备
|
||||
/// </summary>
|
||||
public class EquipComponent : Entity, ISupportedDataBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 主属性
|
||||
/// </summary>
|
||||
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
||||
public Dictionary<int, EquipAttr> MainAttrs = new Dictionary<int, EquipAttr>();
|
||||
/// <summary>
|
||||
/// 附加(副)属性
|
||||
/// </summary>
|
||||
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
||||
public Dictionary<int, EquipAttr> EntryAttrs = new Dictionary<int, EquipAttr>();
|
||||
/// <summary>
|
||||
/// 词缀
|
||||
/// </summary>
|
||||
public List<uint> Affixs = new List<uint>();
|
||||
public int DurableMax; // 耐久度上限
|
||||
public int Durable; // 耐久度
|
||||
}
|
||||
|
||||
/*
|
||||
* {"sdfsdfsdfsdf":111}
|
||||
* {"s":111}
|
||||
* 2000,100 = 150 - 50 = 100
|
||||
* 2001,200
|
||||
*
|
||||
* 优化后的处理方式
|
||||
* 2000,100 ,50 = 100 + 50 = 150
|
||||
* 50 - 50 = 0 , 100 + 0 = 100
|
||||
* 力量 + 50 (+20)
|
||||
*/
|
||||
@@ -0,0 +1,30 @@
|
||||
namespace Fantasy;
|
||||
|
||||
public enum EquipPosition
|
||||
{
|
||||
None = 0,
|
||||
/// <summary>
|
||||
/// 武器
|
||||
/// </summary>
|
||||
Weapon = 1,
|
||||
/// <summary>
|
||||
/// 头盔
|
||||
/// </summary>
|
||||
Helmet = 2,
|
||||
/// <summary>
|
||||
/// 衣服
|
||||
/// </summary>
|
||||
Clothing = 3,
|
||||
/// <summary>
|
||||
/// 护腿
|
||||
/// </summary>
|
||||
Leggings = 4,
|
||||
/// <summary>
|
||||
/// 护腕
|
||||
/// </summary>
|
||||
Bracer = 5,
|
||||
/// <summary>
|
||||
/// 鞋子
|
||||
/// </summary>
|
||||
Shoe = 6,
|
||||
}
|
||||
21
物品和背包的完整代码/Server/Entity/Gate/Container/ItemReason.cs
Normal file
21
物品和背包的完整代码/Server/Entity/Gate/Container/ItemReason.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace Fantasy;
|
||||
|
||||
/// <summary>
|
||||
/// 物品操作原因
|
||||
/// </summary>
|
||||
public enum ItemReason
|
||||
{
|
||||
None = 0,
|
||||
ContainerAdd = 1, // 容器初始化添加物品
|
||||
ContainerRemove = 2, // 容器移除物品
|
||||
ContainerSplit = 3, // 容器拆分物品
|
||||
Drop = 4, // 掉落物品
|
||||
Mail = 5, // 邮件领取物品
|
||||
Sort = 6, // 物品排序
|
||||
ItemUse = 7, // 物品使用扣除
|
||||
ItemTestAdd = 8, // 测试添加物品
|
||||
UnMountEquipAdd = 9, // 卸载装备添加(一般是装备容器移除,然后添加到背包容器中)
|
||||
UnMountEquipRemove = 10, // 卸载装备移除(一般是在装备容器里移除掉)
|
||||
MountEquipAdd = 11, // 装备添加(一般是在装备容器里添加)
|
||||
MountEquipRemove = 12, // 装备移除(一般是在装备容器里添加,背包容器里移除)
|
||||
}
|
||||
16
物品和背包的完整代码/Server/Entity/Gate/Entity/Account.cs
Normal file
16
物品和背包的完整代码/Server/Entity/Gate/Entity/Account.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Fantasy.Entitas;
|
||||
using Fantasy.Network;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public sealed class Account : Entity
|
||||
{
|
||||
public string UserName;
|
||||
public string Password;
|
||||
public uint ConfigId;
|
||||
[BsonIgnore]
|
||||
public UnitConfig UnitConfig => UnitConfigData.Instance.Get(ConfigId);
|
||||
[BsonIgnore]
|
||||
public Session Session;
|
||||
}
|
||||
29
物品和背包的完整代码/Server/Entity/Gate/Entity/Item.cs
Normal file
29
物品和背包的完整代码/Server/Entity/Gate/Entity/Item.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Fantasy.Entitas;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
/// <summary>
|
||||
/// 代表游戏中的一个物品
|
||||
/// </summary>
|
||||
public class Item : Entity
|
||||
{
|
||||
public long CellId; // 格子Id x , y x | y = long
|
||||
public int Count; // 数量(叠加)
|
||||
public bool IsBind; // 是否绑定
|
||||
public uint ConfigId; // 配置表Id
|
||||
[BsonIgnore]
|
||||
public Container Container;
|
||||
[BsonIgnore]
|
||||
public ItemConfig Config => ItemConfigData.Instance.Get(ConfigId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用于创建Item使用
|
||||
/// </summary>
|
||||
public struct ItemCreateParams
|
||||
{
|
||||
public uint ConfigId;
|
||||
public int Count;
|
||||
public bool IsBind;
|
||||
}
|
||||
34
物品和背包的完整代码/Server/Entity/Gate/ItemUse/IItemUse.cs
Normal file
34
物品和背包的完整代码/Server/Entity/Gate/ItemUse/IItemUse.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using Fantasy;
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true,Inherited = false)]
|
||||
public sealed class ItemUseAttribute : Attribute
|
||||
{
|
||||
public ItemUseEffect Type { get; }
|
||||
|
||||
public ItemUseAttribute(ItemUseEffect type)
|
||||
{
|
||||
Type = type;
|
||||
}
|
||||
}
|
||||
|
||||
public interface IItemUse
|
||||
{
|
||||
/// <summary>
|
||||
/// 正常的情况下,应该是使用Unit,因为这个代表的是某一个单位。
|
||||
/// 由于课程中没有这个Unit,所以暂时用Account来代替。
|
||||
/// </summary>
|
||||
/// <param name="account"></param>
|
||||
/// <param name="config"></param>
|
||||
/// <param name="count"></param>
|
||||
/// <returns></returns>
|
||||
uint CanUse(Account account, ItemConfig config, ref int count);
|
||||
/// <summary>
|
||||
/// 使用物品的逻辑。
|
||||
/// </summary>
|
||||
/// <param name="account"></param>
|
||||
/// <param name="config"></param>
|
||||
/// <param name="count"></param>
|
||||
void Use(Account account, ItemConfig config, ref int count);
|
||||
}
|
||||
BIN
物品和背包的完整代码/Server/Entity/Generate/.DS_Store
vendored
Normal file
BIN
物品和背包的完整代码/Server/Entity/Generate/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using Fantasy.ConfigTable;
|
||||
using Fantasy.Serialize;
|
||||
// ReSharper disable CollectionNeverUpdated.Global
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||
#pragma warning disable CS0169
|
||||
#pragma warning disable CS8618
|
||||
#pragma warning disable CS8625
|
||||
#pragma warning disable CS8603
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class ContainerConfigData : ASerialize, IConfigTable, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public List<ContainerConfig> List { get; set; } = new List<ContainerConfig>();
|
||||
#if FANTASY_NET
|
||||
[ProtoIgnore]
|
||||
private readonly ConcurrentDictionary<uint, ContainerConfig> _configs = new ConcurrentDictionary<uint, ContainerConfig>();
|
||||
#else
|
||||
[ProtoIgnore]
|
||||
private readonly Dictionary<uint, ContainerConfig> _configs = new Dictionary<uint, ContainerConfig>();
|
||||
#endif
|
||||
private static ContainerConfigData _instance = null;
|
||||
|
||||
public static ContainerConfigData Instance
|
||||
{
|
||||
get { return _instance ??= ConfigTableHelper.Load<ContainerConfigData>(); }
|
||||
private set => _instance = value;
|
||||
}
|
||||
|
||||
public ContainerConfig Get(uint id, bool check = true)
|
||||
{
|
||||
if (_configs.ContainsKey(id))
|
||||
{
|
||||
return _configs[id];
|
||||
}
|
||||
|
||||
if (check)
|
||||
{
|
||||
throw new Exception($"ContainerConfig not find {id} Id");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public bool TryGet(uint id, out ContainerConfig config)
|
||||
{
|
||||
config = null;
|
||||
|
||||
if (!_configs.ContainsKey(id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
config = _configs[id];
|
||||
return true;
|
||||
}
|
||||
public override void AfterDeserialization()
|
||||
{
|
||||
foreach (var config in List)
|
||||
{
|
||||
#if FANTASY_NET
|
||||
_configs.TryAdd(config.Id, config);
|
||||
#else
|
||||
_configs.Add(config.Id, config);
|
||||
#endif
|
||||
config.AfterDeserialization();
|
||||
}
|
||||
|
||||
EndInit();
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
[ProtoContract]
|
||||
public sealed partial class ContainerConfig : ASerialize, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public uint Id { get; set; } // Id
|
||||
[ProtoMember(2)]
|
||||
public string Name { get; set; } // 名字
|
||||
[ProtoMember(3)]
|
||||
public int Type { get; set; } // 容器类型
|
||||
[ProtoMember(4)]
|
||||
public int CellCountMax { get; set; } // 容器最大的格子数
|
||||
[ProtoMember(5)]
|
||||
public int CellCount { get; set; } // 初始解锁格子
|
||||
[ProtoMember(6)]
|
||||
public bool CanSort { get; set; } // 是否可以整理
|
||||
[ProtoMember(7)]
|
||||
public int SortCD { get; set; } // 是否可以整理
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using Fantasy.ConfigTable;
|
||||
using Fantasy.Serialize;
|
||||
// ReSharper disable CollectionNeverUpdated.Global
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||
#pragma warning disable CS0169
|
||||
#pragma warning disable CS8618
|
||||
#pragma warning disable CS8625
|
||||
#pragma warning disable CS8603
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class EquipAffixConfigData : ASerialize, IConfigTable, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public List<EquipAffixConfig> List { get; set; } = new List<EquipAffixConfig>();
|
||||
#if FANTASY_NET
|
||||
[ProtoIgnore]
|
||||
private readonly ConcurrentDictionary<uint, EquipAffixConfig> _configs = new ConcurrentDictionary<uint, EquipAffixConfig>();
|
||||
#else
|
||||
[ProtoIgnore]
|
||||
private readonly Dictionary<uint, EquipAffixConfig> _configs = new Dictionary<uint, EquipAffixConfig>();
|
||||
#endif
|
||||
private static EquipAffixConfigData _instance = null;
|
||||
|
||||
public static EquipAffixConfigData Instance
|
||||
{
|
||||
get { return _instance ??= ConfigTableHelper.Load<EquipAffixConfigData>(); }
|
||||
private set => _instance = value;
|
||||
}
|
||||
|
||||
public EquipAffixConfig Get(uint id, bool check = true)
|
||||
{
|
||||
if (_configs.ContainsKey(id))
|
||||
{
|
||||
return _configs[id];
|
||||
}
|
||||
|
||||
if (check)
|
||||
{
|
||||
throw new Exception($"EquipAffixConfig not find {id} Id");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public bool TryGet(uint id, out EquipAffixConfig config)
|
||||
{
|
||||
config = null;
|
||||
|
||||
if (!_configs.ContainsKey(id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
config = _configs[id];
|
||||
return true;
|
||||
}
|
||||
public override void AfterDeserialization()
|
||||
{
|
||||
foreach (var config in List)
|
||||
{
|
||||
#if FANTASY_NET
|
||||
_configs.TryAdd(config.Id, config);
|
||||
#else
|
||||
_configs.Add(config.Id, config);
|
||||
#endif
|
||||
config.AfterDeserialization();
|
||||
}
|
||||
|
||||
EndInit();
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
[ProtoContract]
|
||||
public sealed partial class EquipAffixConfig : ASerialize, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public uint Id { get; set; } // Id
|
||||
[ProtoMember(2)]
|
||||
public uint BuffConfigId { get; set; } // 触发的Buff
|
||||
[ProtoMember(3)]
|
||||
public string Descride { get; set; } // 介绍
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using Fantasy.ConfigTable;
|
||||
using Fantasy.Serialize;
|
||||
// ReSharper disable CollectionNeverUpdated.Global
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||
#pragma warning disable CS0169
|
||||
#pragma warning disable CS8618
|
||||
#pragma warning disable CS8625
|
||||
#pragma warning disable CS8603
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class EquipEntryConfigData : ASerialize, IConfigTable, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public List<EquipEntryConfig> List { get; set; } = new List<EquipEntryConfig>();
|
||||
#if FANTASY_NET
|
||||
[ProtoIgnore]
|
||||
private readonly ConcurrentDictionary<uint, EquipEntryConfig> _configs = new ConcurrentDictionary<uint, EquipEntryConfig>();
|
||||
#else
|
||||
[ProtoIgnore]
|
||||
private readonly Dictionary<uint, EquipEntryConfig> _configs = new Dictionary<uint, EquipEntryConfig>();
|
||||
#endif
|
||||
private static EquipEntryConfigData _instance = null;
|
||||
|
||||
public static EquipEntryConfigData Instance
|
||||
{
|
||||
get { return _instance ??= ConfigTableHelper.Load<EquipEntryConfigData>(); }
|
||||
private set => _instance = value;
|
||||
}
|
||||
|
||||
public EquipEntryConfig Get(uint id, bool check = true)
|
||||
{
|
||||
if (_configs.ContainsKey(id))
|
||||
{
|
||||
return _configs[id];
|
||||
}
|
||||
|
||||
if (check)
|
||||
{
|
||||
throw new Exception($"EquipEntryConfig not find {id} Id");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public bool TryGet(uint id, out EquipEntryConfig config)
|
||||
{
|
||||
config = null;
|
||||
|
||||
if (!_configs.ContainsKey(id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
config = _configs[id];
|
||||
return true;
|
||||
}
|
||||
public override void AfterDeserialization()
|
||||
{
|
||||
foreach (var config in List)
|
||||
{
|
||||
#if FANTASY_NET
|
||||
_configs.TryAdd(config.Id, config);
|
||||
#else
|
||||
_configs.Add(config.Id, config);
|
||||
#endif
|
||||
config.AfterDeserialization();
|
||||
}
|
||||
|
||||
EndInit();
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
[ProtoContract]
|
||||
public sealed partial class EquipEntryConfig : ASerialize, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public uint Id { get; set; } // Id
|
||||
[ProtoMember(2)]
|
||||
public int Min { get; set; } // 词条最小数
|
||||
[ProtoMember(3)]
|
||||
public int Max { get; set; } // 词条最大数
|
||||
[ProtoMember(4)]
|
||||
public int AffixMin { get; set; } // 词缀最小数
|
||||
[ProtoMember(5)]
|
||||
public int AffixMax { get; set; } // 词缀最大数
|
||||
[ProtoMember(6)]
|
||||
public uint[] Affix { get; set; } = Array.Empty<uint>(); // 词缀列表
|
||||
[ProtoMember(7)]
|
||||
public int[] Attrs { get; set; } = Array.Empty<int>(); // 属性数组
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using Fantasy.ConfigTable;
|
||||
using Fantasy.Serialize;
|
||||
// ReSharper disable CollectionNeverUpdated.Global
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||
#pragma warning disable CS0169
|
||||
#pragma warning disable CS8618
|
||||
#pragma warning disable CS8625
|
||||
#pragma warning disable CS8603
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class EquipValueConfigData : ASerialize, IConfigTable, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public List<EquipValueConfig> List { get; set; } = new List<EquipValueConfig>();
|
||||
#if FANTASY_NET
|
||||
[ProtoIgnore]
|
||||
private readonly ConcurrentDictionary<uint, EquipValueConfig> _configs = new ConcurrentDictionary<uint, EquipValueConfig>();
|
||||
#else
|
||||
[ProtoIgnore]
|
||||
private readonly Dictionary<uint, EquipValueConfig> _configs = new Dictionary<uint, EquipValueConfig>();
|
||||
#endif
|
||||
private static EquipValueConfigData _instance = null;
|
||||
|
||||
public static EquipValueConfigData Instance
|
||||
{
|
||||
get { return _instance ??= ConfigTableHelper.Load<EquipValueConfigData>(); }
|
||||
private set => _instance = value;
|
||||
}
|
||||
|
||||
public EquipValueConfig Get(uint id, bool check = true)
|
||||
{
|
||||
if (_configs.ContainsKey(id))
|
||||
{
|
||||
return _configs[id];
|
||||
}
|
||||
|
||||
if (check)
|
||||
{
|
||||
throw new Exception($"EquipValueConfig not find {id} Id");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public bool TryGet(uint id, out EquipValueConfig config)
|
||||
{
|
||||
config = null;
|
||||
|
||||
if (!_configs.ContainsKey(id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
config = _configs[id];
|
||||
return true;
|
||||
}
|
||||
public override void AfterDeserialization()
|
||||
{
|
||||
foreach (var config in List)
|
||||
{
|
||||
#if FANTASY_NET
|
||||
_configs.TryAdd(config.Id, config);
|
||||
#else
|
||||
_configs.Add(config.Id, config);
|
||||
#endif
|
||||
config.AfterDeserialization();
|
||||
}
|
||||
|
||||
EndInit();
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
[ProtoContract]
|
||||
public sealed partial class EquipValueConfig : ASerialize, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public uint Id { get; set; } // Id
|
||||
[ProtoMember(2)]
|
||||
public uint ItemConfigId { get; set; } // ItemConfigId
|
||||
[ProtoMember(3)]
|
||||
public uint EquipEntryConfigId { get; set; } // EquipEntryConfigId
|
||||
[ProtoMember(4)]
|
||||
public int Quality { get; set; } // 品质
|
||||
[ProtoMember(5)]
|
||||
public IntDictionaryConfig MainAttrs { get; set; } // 法术强度
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using Fantasy.ConfigTable;
|
||||
using Fantasy.Serialize;
|
||||
// ReSharper disable CollectionNeverUpdated.Global
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||
#pragma warning disable CS0169
|
||||
#pragma warning disable CS8618
|
||||
#pragma warning disable CS8625
|
||||
#pragma warning disable CS8603
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class ErrorCodeData : ASerialize, IConfigTable, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public List<ErrorCode> List { get; set; } = new List<ErrorCode>();
|
||||
#if FANTASY_NET
|
||||
[ProtoIgnore]
|
||||
private readonly ConcurrentDictionary<uint, ErrorCode> _configs = new ConcurrentDictionary<uint, ErrorCode>();
|
||||
#else
|
||||
[ProtoIgnore]
|
||||
private readonly Dictionary<uint, ErrorCode> _configs = new Dictionary<uint, ErrorCode>();
|
||||
#endif
|
||||
private static ErrorCodeData _instance = null;
|
||||
|
||||
public static ErrorCodeData Instance
|
||||
{
|
||||
get { return _instance ??= ConfigTableHelper.Load<ErrorCodeData>(); }
|
||||
private set => _instance = value;
|
||||
}
|
||||
|
||||
public ErrorCode Get(uint id, bool check = true)
|
||||
{
|
||||
if (_configs.ContainsKey(id))
|
||||
{
|
||||
return _configs[id];
|
||||
}
|
||||
|
||||
if (check)
|
||||
{
|
||||
throw new Exception($"ErrorCode not find {id} Id");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public bool TryGet(uint id, out ErrorCode config)
|
||||
{
|
||||
config = null;
|
||||
|
||||
if (!_configs.ContainsKey(id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
config = _configs[id];
|
||||
return true;
|
||||
}
|
||||
public override void AfterDeserialization()
|
||||
{
|
||||
foreach (var config in List)
|
||||
{
|
||||
#if FANTASY_NET
|
||||
_configs.TryAdd(config.Id, config);
|
||||
#else
|
||||
_configs.Add(config.Id, config);
|
||||
#endif
|
||||
config.AfterDeserialization();
|
||||
}
|
||||
|
||||
EndInit();
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
[ProtoContract]
|
||||
public sealed partial class ErrorCode : ASerialize, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public uint Id { get; set; } // Id
|
||||
[ProtoMember(2)]
|
||||
public string Name { get; set; } // 名称
|
||||
[ProtoMember(3)]
|
||||
public string Text { get; set; } // 文本内容
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using Fantasy.ConfigTable;
|
||||
using Fantasy.Serialize;
|
||||
// ReSharper disable CollectionNeverUpdated.Global
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||
#pragma warning disable CS0169
|
||||
#pragma warning disable CS8618
|
||||
#pragma warning disable CS8625
|
||||
#pragma warning disable CS8603
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class ItemConfigData : ASerialize, IConfigTable, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public List<ItemConfig> List { get; set; } = new List<ItemConfig>();
|
||||
#if FANTASY_NET
|
||||
[ProtoIgnore]
|
||||
private readonly ConcurrentDictionary<uint, ItemConfig> _configs = new ConcurrentDictionary<uint, ItemConfig>();
|
||||
#else
|
||||
[ProtoIgnore]
|
||||
private readonly Dictionary<uint, ItemConfig> _configs = new Dictionary<uint, ItemConfig>();
|
||||
#endif
|
||||
private static ItemConfigData _instance = null;
|
||||
|
||||
public static ItemConfigData Instance
|
||||
{
|
||||
get { return _instance ??= ConfigTableHelper.Load<ItemConfigData>(); }
|
||||
private set => _instance = value;
|
||||
}
|
||||
|
||||
public ItemConfig Get(uint id, bool check = true)
|
||||
{
|
||||
if (_configs.ContainsKey(id))
|
||||
{
|
||||
return _configs[id];
|
||||
}
|
||||
|
||||
if (check)
|
||||
{
|
||||
throw new Exception($"ItemConfig not find {id} Id");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public bool TryGet(uint id, out ItemConfig config)
|
||||
{
|
||||
config = null;
|
||||
|
||||
if (!_configs.ContainsKey(id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
config = _configs[id];
|
||||
return true;
|
||||
}
|
||||
public override void AfterDeserialization()
|
||||
{
|
||||
foreach (var config in List)
|
||||
{
|
||||
#if FANTASY_NET
|
||||
_configs.TryAdd(config.Id, config);
|
||||
#else
|
||||
_configs.Add(config.Id, config);
|
||||
#endif
|
||||
config.AfterDeserialization();
|
||||
}
|
||||
|
||||
EndInit();
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
[ProtoContract]
|
||||
public sealed partial class ItemConfig : ASerialize, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public uint Id { get; set; } // Id
|
||||
[ProtoMember(2)]
|
||||
public string Name { get; set; } // 名称
|
||||
[ProtoMember(3)]
|
||||
public string Descride { get; set; } // 描述
|
||||
[ProtoMember(4)]
|
||||
public int Weight { get; set; } // 排序权重
|
||||
[ProtoMember(5)]
|
||||
public string Model2D { get; set; } // 对应模型
|
||||
[ProtoMember(6)]
|
||||
public bool Superposed { get; set; } // 是否可以叠加
|
||||
[ProtoMember(7)]
|
||||
public uint SuperposedMax { get; set; } // 叠加
|
||||
[ProtoMember(8)]
|
||||
public uint Type { get; set; } // 类型
|
||||
[ProtoMember(9)]
|
||||
public bool IsDeal { get; set; } // 是否可以交易
|
||||
[ProtoMember(10)]
|
||||
public bool IsSell { get; set; } // 是否可以出售
|
||||
[ProtoMember(11)]
|
||||
public int[] Sell { get; set; } = Array.Empty<int>(); // 出售价格
|
||||
[ProtoMember(12)]
|
||||
public int Effect { get; set; } // 使用效果
|
||||
[ProtoMember(13)]
|
||||
public string[] Params { get; set; } = Array.Empty<string>(); // 效果参数
|
||||
[ProtoMember(14)]
|
||||
public int Durable { get; set; } // 耐久度
|
||||
[ProtoMember(15)]
|
||||
public int Quality { get; set; } // 品质
|
||||
[ProtoMember(16)]
|
||||
public int Position { get; set; } // 装备位置
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using Fantasy.ConfigTable;
|
||||
using Fantasy.Serialize;
|
||||
// ReSharper disable CollectionNeverUpdated.Global
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||
#pragma warning disable CS0169
|
||||
#pragma warning disable CS8618
|
||||
#pragma warning disable CS8625
|
||||
#pragma warning disable CS8603
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class LevelConfigData : ASerialize, IConfigTable, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public List<LevelConfig> List { get; set; } = new List<LevelConfig>();
|
||||
#if FANTASY_NET
|
||||
[ProtoIgnore]
|
||||
private readonly ConcurrentDictionary<uint, LevelConfig> _configs = new ConcurrentDictionary<uint, LevelConfig>();
|
||||
#else
|
||||
[ProtoIgnore]
|
||||
private readonly Dictionary<uint, LevelConfig> _configs = new Dictionary<uint, LevelConfig>();
|
||||
#endif
|
||||
private static LevelConfigData _instance = null;
|
||||
|
||||
public static LevelConfigData Instance
|
||||
{
|
||||
get { return _instance ??= ConfigTableHelper.Load<LevelConfigData>(); }
|
||||
private set => _instance = value;
|
||||
}
|
||||
|
||||
public LevelConfig Get(uint id, bool check = true)
|
||||
{
|
||||
if (_configs.ContainsKey(id))
|
||||
{
|
||||
return _configs[id];
|
||||
}
|
||||
|
||||
if (check)
|
||||
{
|
||||
throw new Exception($"LevelConfig not find {id} Id");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public bool TryGet(uint id, out LevelConfig config)
|
||||
{
|
||||
config = null;
|
||||
|
||||
if (!_configs.ContainsKey(id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
config = _configs[id];
|
||||
return true;
|
||||
}
|
||||
public override void AfterDeserialization()
|
||||
{
|
||||
foreach (var config in List)
|
||||
{
|
||||
#if FANTASY_NET
|
||||
_configs.TryAdd(config.Id, config);
|
||||
#else
|
||||
_configs.Add(config.Id, config);
|
||||
#endif
|
||||
config.AfterDeserialization();
|
||||
}
|
||||
|
||||
EndInit();
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
[ProtoContract]
|
||||
public sealed partial class LevelConfig : ASerialize, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public uint Id { get; set; } // Id
|
||||
[ProtoMember(2)]
|
||||
public string Name { get; set; } // 名称
|
||||
[ProtoMember(3)]
|
||||
public string Model { get; set; } // 数据库类型
|
||||
[ProtoMember(4)]
|
||||
public uint Group { get; set; } // 分组
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using ProtoBuf;
|
||||
using Fantasy;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using Fantasy.ConfigTable;
|
||||
using Fantasy.Serialize;
|
||||
// ReSharper disable CollectionNeverUpdated.Global
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||
#pragma warning disable CS0169
|
||||
#pragma warning disable CS8618
|
||||
#pragma warning disable CS8625
|
||||
#pragma warning disable CS8603
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
[ProtoContract]
|
||||
public sealed partial class UnitConfigData : ASerialize, IConfigTable, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public List<UnitConfig> List { get; set; } = new List<UnitConfig>();
|
||||
#if FANTASY_NET
|
||||
[ProtoIgnore]
|
||||
private readonly ConcurrentDictionary<uint, UnitConfig> _configs = new ConcurrentDictionary<uint, UnitConfig>();
|
||||
#else
|
||||
[ProtoIgnore]
|
||||
private readonly Dictionary<uint, UnitConfig> _configs = new Dictionary<uint, UnitConfig>();
|
||||
#endif
|
||||
private static UnitConfigData _instance = null;
|
||||
|
||||
public static UnitConfigData Instance
|
||||
{
|
||||
get { return _instance ??= ConfigTableHelper.Load<UnitConfigData>(); }
|
||||
private set => _instance = value;
|
||||
}
|
||||
|
||||
public UnitConfig Get(uint id, bool check = true)
|
||||
{
|
||||
if (_configs.ContainsKey(id))
|
||||
{
|
||||
return _configs[id];
|
||||
}
|
||||
|
||||
if (check)
|
||||
{
|
||||
throw new Exception($"UnitConfig not find {id} Id");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public bool TryGet(uint id, out UnitConfig config)
|
||||
{
|
||||
config = null;
|
||||
|
||||
if (!_configs.ContainsKey(id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
config = _configs[id];
|
||||
return true;
|
||||
}
|
||||
public override void AfterDeserialization()
|
||||
{
|
||||
foreach (var config in List)
|
||||
{
|
||||
#if FANTASY_NET
|
||||
_configs.TryAdd(config.Id, config);
|
||||
#else
|
||||
_configs.Add(config.Id, config);
|
||||
#endif
|
||||
config.AfterDeserialization();
|
||||
}
|
||||
|
||||
EndInit();
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
[ProtoContract]
|
||||
public sealed partial class UnitConfig : ASerialize, IProto
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public uint Id { get; set; } // Id
|
||||
[ProtoMember(2)]
|
||||
public string Name { get; set; } // 名称
|
||||
[ProtoMember(3)]
|
||||
public string Model { get; set; } // 数据库类型
|
||||
[ProtoMember(4)]
|
||||
public uint Type { get; set; } // 类型
|
||||
[ProtoMember(5)]
|
||||
public uint MonsterPRange { get; set; } // 怪物追击范围
|
||||
[ProtoMember(6)]
|
||||
public uint TalkConfigId { get; set; } // NPC对话列表Id
|
||||
[ProtoMember(7)]
|
||||
public uint Camp { get; set; } // 玩家阵营
|
||||
[ProtoMember(8)]
|
||||
public uint[] MountContainer { get; set; } = Array.Empty<uint>(); // 挂载的容器列表
|
||||
[ProtoMember(9)]
|
||||
public uint[] Items { get; set; } = Array.Empty<uint>(); // 容器物品初始列表
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#pragma warning disable CS8601 // Possible null reference assignment.
|
||||
#pragma warning disable CS8603 // Possible null reference return.
|
||||
namespace Fantasy;
|
||||
|
||||
public sealed partial class ContainerConfigData
|
||||
{
|
||||
private readonly Dictionary<int, ContainerConfig> _configsByType = new Dictionary<int, ContainerConfig>();
|
||||
|
||||
public override void EndInit()
|
||||
{
|
||||
foreach (var containerConfig in List)
|
||||
{
|
||||
_configsByType.Add(containerConfig.Type, containerConfig);
|
||||
}
|
||||
}
|
||||
|
||||
public ContainerConfig GetConfig(ContainerType containerType)
|
||||
{
|
||||
if (!_configsByType.TryGetValue((int)containerType, out var config))
|
||||
{
|
||||
Log.Error($"containerType {containerType} not found!");
|
||||
return null;
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public bool TryGetConfig(ContainerType containerType, out ContainerConfig containerConfig)
|
||||
{
|
||||
if (!_configsByType.TryGetValue((int)containerType, out containerConfig))
|
||||
{
|
||||
Log.Error($"containerType {containerType} not found!");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
#pragma warning disable CS8601 // Possible null reference assignment.
|
||||
namespace Fantasy;
|
||||
|
||||
public partial class EquipValueConfigData
|
||||
{
|
||||
private readonly Dictionary<ulong, EquipValueConfig> _equipValueDic = new Dictionary<ulong, EquipValueConfig>();
|
||||
public override void EndInit()
|
||||
{
|
||||
foreach (var equipValueConfig in List)
|
||||
{
|
||||
var equipValueKey = GetEquipValueKey(equipValueConfig.ItemConfigId, equipValueConfig.Quality);
|
||||
_equipValueDic.Add(equipValueKey, equipValueConfig);
|
||||
}
|
||||
}
|
||||
|
||||
public bool TryGetValue(uint itemConfigId, int quality, out EquipValueConfig value)
|
||||
{
|
||||
var equipValueKey = GetEquipValueKey(itemConfigId, quality);
|
||||
|
||||
if (!_equipValueDic.TryGetValue(equipValueKey, out value))
|
||||
{
|
||||
Log.Error($"itemConfigId: {itemConfigId} and quality: {quality} not found in EquipValueConfig!");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private ulong GetEquipValueKey(uint itemConfigId, int quality)
|
||||
{
|
||||
return ((ulong)itemConfigId << 32) | (uint)quality;
|
||||
}
|
||||
}
|
||||
27
物品和背包的完整代码/Server/Entity/Generate/CustomExport/ConstValue.cs
Normal file
27
物品和背包的完整代码/Server/Entity/Generate/CustomExport/ConstValue.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
namespace Fantasy
|
||||
{
|
||||
// 生成器自动生成,请不要手动编辑,修改请在#ConstValue.xsl里。
|
||||
public partial class ConstValue
|
||||
{
|
||||
/// <summary>
|
||||
/// 游戏版本
|
||||
/// </summary>
|
||||
public const string Version = "v202501";
|
||||
/// <summary>
|
||||
/// JWT令牌加密密钥
|
||||
/// </summary>
|
||||
public const string JWTSecret = "6666";
|
||||
/// <summary>
|
||||
/// 客户端使用的网络类型
|
||||
/// </summary>
|
||||
public const string Network = "KCP";
|
||||
/// <summary>
|
||||
/// 客户端发送心跳的时间(毫秒单位)
|
||||
/// </summary>
|
||||
public const int Heartbeat = 2000;
|
||||
/// <summary>
|
||||
/// 服务器最大容纳玩家人数
|
||||
/// </summary>
|
||||
public const int PlayerCount = 5000;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
// 生成器自动生成,请不要手动编辑,修改请在ContainerConfig.xsl里。
|
||||
[Flags]
|
||||
public enum ContainerType : byte
|
||||
{
|
||||
None = 0,
|
||||
Bag = 1,// 背包
|
||||
Equip = 2,// 装备栏
|
||||
Trade = 4,// 交易
|
||||
Cell = Equip | Trade,// 按格子存储的容器
|
||||
Normal = Bag,// 正常的容器
|
||||
}
|
||||
}
|
||||
15
物品和背包的完整代码/Server/Entity/Generate/CustomExport/ErrorCode.cs
Normal file
15
物品和背包的完整代码/Server/Entity/Generate/CustomExport/ErrorCode.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace Fantasy
|
||||
{
|
||||
// 生成器自动生成,请不要手动编辑,修改请在ErrorCode.xsl里。
|
||||
public partial class ErrorCode
|
||||
{
|
||||
/// <summary>
|
||||
/// 登陆失败
|
||||
/// </summary>
|
||||
public const uint LoingError = 1;
|
||||
/// <summary>
|
||||
/// 角色登陆失败
|
||||
/// </summary>
|
||||
public const uint LoginRoleError = 2;
|
||||
}
|
||||
}
|
||||
12
物品和背包的完整代码/Server/Entity/Generate/CustomExport/ItemType.cs
Normal file
12
物品和背包的完整代码/Server/Entity/Generate/CustomExport/ItemType.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Fantasy
|
||||
{
|
||||
// 生成器自动生成,请不要手动编辑,修改请在#ItemType.xsl里。
|
||||
public enum ItemType
|
||||
{
|
||||
None = 0,
|
||||
Drug = 1,// 药品
|
||||
Equip = 2,// 装备
|
||||
Prop = 3,// 道具
|
||||
Garbage = 4,// 垃圾
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Fantasy
|
||||
{
|
||||
// 生成器自动生成,请不要手动编辑,修改请在#ItemUseEffect.xsl里。
|
||||
public enum ItemUseEffect
|
||||
{
|
||||
None = 0,
|
||||
Equip = 1,// 装备到身上
|
||||
UnEquip = 2,// 从身上卸下
|
||||
AddAttr = 3,// 增加属性
|
||||
CutAttr = 4,// 减少属性
|
||||
}
|
||||
}
|
||||
27
物品和背包的完整代码/Server/Entity/Generate/CustomExport/SceneType.cs
Normal file
27
物品和背包的完整代码/Server/Entity/Generate/CustomExport/SceneType.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
namespace Fantasy
|
||||
{
|
||||
// 生成器自动生成,请不要手动编辑。
|
||||
public static class SceneType
|
||||
{
|
||||
public const int Authentication = 1;
|
||||
public const int Addressable = 2;
|
||||
public const int Gate = 3;
|
||||
public const int Map = 4;
|
||||
public const int CopyDispatcher = 5;
|
||||
public const int CopyManager = 6;
|
||||
public const int Copy = 7;
|
||||
public const int Chat = 8;
|
||||
|
||||
public static readonly Dictionary<string, int> SceneTypeDic = new Dictionary<string, int>()
|
||||
{
|
||||
{ "Authentication", 1 },
|
||||
{ "Addressable", 2 },
|
||||
{ "Gate", 3 },
|
||||
{ "Map", 4 },
|
||||
{ "CopyDispatcher", 5 },
|
||||
{ "CopyManager", 6 },
|
||||
{ "Copy", 7 },
|
||||
{ "Chat", 8 },
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using ProtoBuf;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using Fantasy;
|
||||
using Fantasy.Network.Interface;
|
||||
using Fantasy.Serialize;
|
||||
// ReSharper disable InconsistentNaming
|
||||
// ReSharper disable RedundantUsingDirective
|
||||
// ReSharper disable RedundantOverriddenMember
|
||||
// ReSharper disable PartialTypeWithSinglePart
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable CheckNamespace
|
||||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
||||
#pragma warning disable CS8618
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
[ProtoContract]
|
||||
public partial class G2A_TestMessage : AMessage, IRouteMessage, IProto
|
||||
{
|
||||
public static G2A_TestMessage Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2A_TestMessage>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Tag = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2A_TestMessage>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.G2A_TestMessage; }
|
||||
[ProtoMember(1)]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class G2A_TestRequest : AMessage, IRouteRequest, IProto
|
||||
{
|
||||
public static G2A_TestRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2A_TestRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2A_TestRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public G2A_TestResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return InnerOpcode.G2A_TestRequest; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class G2A_TestResponse : AMessage, IRouteResponse, IProto
|
||||
{
|
||||
public static G2A_TestResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2A_TestResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2A_TestResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.G2A_TestResponse; }
|
||||
[ProtoMember(1)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Fantasy
|
||||
{
|
||||
public static partial class InnerOpcode
|
||||
{
|
||||
public const uint G2A_TestMessage = 939534097;
|
||||
public const uint G2A_TestRequest = 1073751825;
|
||||
public const uint G2A_TestResponse = 1207969553;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,350 @@
|
||||
using ProtoBuf;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using Fantasy;
|
||||
using Fantasy.Network.Interface;
|
||||
using Fantasy.Serialize;
|
||||
// ReSharper disable InconsistentNaming
|
||||
// ReSharper disable RedundantUsingDirective
|
||||
// ReSharper disable RedundantOverriddenMember
|
||||
// ReSharper disable PartialTypeWithSinglePart
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable CheckNamespace
|
||||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
||||
#pragma warning disable CS8618
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
/// <summary>
|
||||
/// 客户端登陆到服务器
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2G_LoginRequest : AMessage, IRequest, IProto
|
||||
{
|
||||
public static C2G_LoginRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2G_LoginRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
UserName = default;
|
||||
PassWord = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2G_LoginRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public G2C_LoginResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2G_LoginRequest; }
|
||||
[ProtoMember(1)]
|
||||
public string UserName { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public string PassWord { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 服务器返回登陆状态给客户端
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class G2C_LoginResponse : AMessage, IResponse, IProto
|
||||
{
|
||||
public static G2C_LoginResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2C_LoginResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2C_LoginResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.G2C_LoginResponse; }
|
||||
[ProtoMember(1)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 客户端请求服务器使用物品
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2G_UseItemRequest : AMessage, IRequest, IProto
|
||||
{
|
||||
public static C2G_UseItemRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2G_UseItemRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ItemId = default;
|
||||
Count = default;
|
||||
ContainerType = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2G_UseItemRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public G2C_UseItemResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2G_UseItemRequest; }
|
||||
[ProtoMember(1)]
|
||||
public long ItemId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public int Count { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public int ContainerType { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class G2C_UseItemResponse : AMessage, IResponse, IProto
|
||||
{
|
||||
public static G2C_UseItemResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2C_UseItemResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2C_UseItemResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.G2C_UseItemResponse; }
|
||||
[ProtoMember(1)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 装备基础信息类
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class EquipInfo : AMessage, IProto
|
||||
{
|
||||
public static EquipInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<EquipInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Durable = default;
|
||||
DurableMax = default;
|
||||
MainKeys.Clear();
|
||||
EquipAttrKeys.Clear();
|
||||
EquipAttrValues.Clear();
|
||||
EquipAttrSValues.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<EquipInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public int Durable { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public int DurableMax { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public List<int> MainKeys = new List<int>();
|
||||
[ProtoMember(4)]
|
||||
public List<int> EquipAttrKeys = new List<int>();
|
||||
[ProtoMember(5)]
|
||||
public List<int> EquipAttrValues = new List<int>();
|
||||
[ProtoMember(6)]
|
||||
public List<int> EquipAttrSValues = new List<int>();
|
||||
///<summary>
|
||||
/// 比如强化等级,副属性,词缀等。都可以在这里添加
|
||||
///</summary>
|
||||
}
|
||||
/// <summary>
|
||||
/// 物品基础信息类
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class ItemInfo : AMessage, IProto
|
||||
{
|
||||
public static ItemInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<ItemInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ItemId = default;
|
||||
Container = default;
|
||||
ConfigId = default;
|
||||
CellId = default;
|
||||
Count = default;
|
||||
IsBind = default;
|
||||
EquipInfo = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<ItemInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public long ItemId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public int Container { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public int ConfigId { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public long CellId { get; set; }
|
||||
[ProtoMember(5)]
|
||||
public int Count { get; set; }
|
||||
[ProtoMember(6)]
|
||||
public bool IsBind { get; set; }
|
||||
[ProtoMember(7)]
|
||||
public EquipInfo EquipInfo { get; set; }
|
||||
///<summary>
|
||||
/// 后面可能会有装备词条 也会在这里定义的,现在没有所以就是先不管了
|
||||
///</summary>
|
||||
}
|
||||
/// <summary>
|
||||
/// 容器信息类
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class ContainerInfo : AMessage, IProto
|
||||
{
|
||||
public static ContainerInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<ContainerInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
CurrentCellCount = default;
|
||||
ConfigId = default;
|
||||
Items.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<ContainerInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public int CurrentCellCount { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public int ConfigId { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public List<ItemInfo> Items = new List<ItemInfo>();
|
||||
}
|
||||
/// <summary>
|
||||
/// 物品变更协议(服务器推送给客户端)
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class G2C_UpdateItems : AMessage, IMessage, IProto
|
||||
{
|
||||
public static G2C_UpdateItems Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2C_UpdateItems>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ItemReason = default;
|
||||
Items.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2C_UpdateItems>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.G2C_UpdateItems; }
|
||||
[ProtoMember(1)]
|
||||
public int ItemReason { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public List<ItemInfo> Items = new List<ItemInfo>();
|
||||
}
|
||||
/// <summary>
|
||||
/// 通知服务器客户端初始化完成
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2G_GameInitCompleteRequest : AMessage, IRequest, IProto
|
||||
{
|
||||
public static C2G_GameInitCompleteRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2G_GameInitCompleteRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
PushContainer = default;
|
||||
PushUnitInfo = default;
|
||||
Aoi = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2G_GameInitCompleteRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public G2C_GameInitCompleteResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2G_GameInitCompleteRequest; }
|
||||
[ProtoMember(1)]
|
||||
public bool PushContainer { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public bool PushUnitInfo { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public bool Aoi { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class G2C_GameInitCompleteResponse : AMessage, IResponse, IProto
|
||||
{
|
||||
public static G2C_GameInitCompleteResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2C_GameInitCompleteResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2C_GameInitCompleteResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.G2C_GameInitCompleteResponse; }
|
||||
[ProtoMember(1)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 推送所有容器数据给客户端
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class G2C_PushAllContainerInfo : AMessage, IMessage, IProto
|
||||
{
|
||||
public static G2C_PushAllContainerInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2C_PushAllContainerInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Containers.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2C_PushAllContainerInfo>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.G2C_PushAllContainerInfo; }
|
||||
[ProtoMember(1)]
|
||||
public List<ContainerInfo> Containers = new List<ContainerInfo>();
|
||||
}
|
||||
/// <summary>
|
||||
/// 推送单个的容器数据给客户端
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class G2C_PushContainerInfo : AMessage, IMessage, IProto
|
||||
{
|
||||
public static G2C_PushContainerInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2C_PushContainerInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Container = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2C_PushContainerInfo>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.G2C_PushContainerInfo; }
|
||||
[ProtoMember(1)]
|
||||
public ContainerInfo Container { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 通知服务器创建一个物品到背包容器中。
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2G_StartCreateItem : AMessage, IMessage, IProto
|
||||
{
|
||||
public static C2G_StartCreateItem Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2G_StartCreateItem>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2G_StartCreateItem>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.C2G_StartCreateItem; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace Fantasy
|
||||
{
|
||||
public static partial class OuterOpcode
|
||||
{
|
||||
public const uint C2G_LoginRequest = 268445457;
|
||||
public const uint G2C_LoginResponse = 402663185;
|
||||
public const uint C2G_UseItemRequest = 268445458;
|
||||
public const uint G2C_UseItemResponse = 402663186;
|
||||
public const uint G2C_UpdateItems = 134227729;
|
||||
public const uint C2G_GameInitCompleteRequest = 268445459;
|
||||
public const uint G2C_GameInitCompleteResponse = 402663187;
|
||||
public const uint G2C_PushAllContainerInfo = 134227730;
|
||||
public const uint G2C_PushContainerInfo = 134227731;
|
||||
public const uint C2G_StartCreateItem = 134227732;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Fantasy
|
||||
{
|
||||
// Route协议定义(需要定义1000以上、因为1000以内的框架预留)
|
||||
public static class RouteType
|
||||
{
|
||||
public const int GateRoute = 1001; // Gate
|
||||
public const int ChatRoute = 1002; // Chat
|
||||
}
|
||||
}
|
||||
361
物品和背包的完整代码/Server/Entity/bin/Debug/net8.0/Entity.deps.json
Normal file
361
物品和背包的完整代码/Server/Entity/bin/Debug/net8.0/Entity.deps.json
Normal file
@@ -0,0 +1,361 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v8.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v8.0": {
|
||||
"Entity/1.0.0": {
|
||||
"dependencies": {
|
||||
"Fantasy-Net": "2024.2.24",
|
||||
"Fantasy-Net.ConfigTable": "2024.2.0",
|
||||
"Fantasy-Net.ConfigTable.Reference": "1.0.0.0",
|
||||
"Fantasy-Net.Reference": "1.0.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"Entity.dll": {}
|
||||
}
|
||||
},
|
||||
"CommandLineParser/2.9.1": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/CommandLine.dll": {
|
||||
"assemblyVersion": "2.9.1.0",
|
||||
"fileVersion": "2.9.1.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DnsClient/1.6.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Win32.Registry": "5.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net5.0/DnsClient.dll": {
|
||||
"assemblyVersion": "1.6.1.0",
|
||||
"fileVersion": "1.6.1.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Extensions.Logging.Abstractions/2.0.0": {},
|
||||
"Microsoft.NETCore.Platforms/5.0.0": {},
|
||||
"Microsoft.Win32.Registry/5.0.0": {
|
||||
"dependencies": {
|
||||
"System.Security.AccessControl": "5.0.0",
|
||||
"System.Security.Principal.Windows": "5.0.0"
|
||||
}
|
||||
},
|
||||
"MongoDB.Bson/3.1.0": {
|
||||
"dependencies": {
|
||||
"System.Memory": "4.5.5",
|
||||
"System.Runtime.CompilerServices.Unsafe": "5.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/MongoDB.Bson.dll": {
|
||||
"assemblyVersion": "3.1.0.0",
|
||||
"fileVersion": "3.1.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MongoDB.Driver/3.1.0": {
|
||||
"dependencies": {
|
||||
"DnsClient": "1.6.1",
|
||||
"Microsoft.Extensions.Logging.Abstractions": "2.0.0",
|
||||
"MongoDB.Bson": "3.1.0",
|
||||
"SharpCompress": "0.30.1",
|
||||
"Snappier": "1.0.0",
|
||||
"System.Buffers": "4.5.1",
|
||||
"ZstdSharp.Port": "0.7.3"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/MongoDB.Driver.dll": {
|
||||
"assemblyVersion": "3.1.0.0",
|
||||
"fileVersion": "3.1.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Newtonsoft.Json/13.0.3": {
|
||||
"runtime": {
|
||||
"lib/net6.0/Newtonsoft.Json.dll": {
|
||||
"assemblyVersion": "13.0.0.0",
|
||||
"fileVersion": "13.0.3.27908"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobuf-net/3.2.45": {
|
||||
"dependencies": {
|
||||
"protobuf-net.Core": "3.2.45"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/protobuf-net.dll": {
|
||||
"assemblyVersion": "3.0.0.0",
|
||||
"fileVersion": "3.2.45.36865"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobuf-net.Core/3.2.45": {
|
||||
"dependencies": {
|
||||
"System.Collections.Immutable": "7.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/protobuf-net.Core.dll": {
|
||||
"assemblyVersion": "3.0.0.0",
|
||||
"fileVersion": "3.2.45.36865"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SharpCompress/0.30.1": {
|
||||
"runtime": {
|
||||
"lib/net5.0/SharpCompress.dll": {
|
||||
"assemblyVersion": "0.30.1.0",
|
||||
"fileVersion": "0.30.1.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Snappier/1.0.0": {
|
||||
"runtime": {
|
||||
"lib/net5.0/Snappier.dll": {
|
||||
"assemblyVersion": "1.0.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Buffers/4.5.1": {},
|
||||
"System.Collections.Immutable/7.0.0": {},
|
||||
"System.IO.Pipelines/9.0.0": {
|
||||
"runtime": {
|
||||
"lib/net8.0/System.IO.Pipelines.dll": {
|
||||
"assemblyVersion": "9.0.0.0",
|
||||
"fileVersion": "9.0.24.52809"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Memory/4.5.5": {},
|
||||
"System.Runtime.CompilerServices.Unsafe/5.0.0": {},
|
||||
"System.Security.AccessControl/5.0.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "5.0.0",
|
||||
"System.Security.Principal.Windows": "5.0.0"
|
||||
}
|
||||
},
|
||||
"System.Security.Principal.Windows/5.0.0": {},
|
||||
"ZstdSharp.Port/0.7.3": {
|
||||
"runtime": {
|
||||
"lib/net7.0/ZstdSharp.dll": {
|
||||
"assemblyVersion": "0.7.3.0",
|
||||
"fileVersion": "0.7.3.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Fantasy-Net/2024.2.24": {
|
||||
"dependencies": {
|
||||
"CommandLineParser": "2.9.1",
|
||||
"MongoDB.Bson": "3.1.0",
|
||||
"MongoDB.Driver": "3.1.0",
|
||||
"Newtonsoft.Json": "13.0.3",
|
||||
"System.IO.Pipelines": "9.0.0",
|
||||
"protobuf-net": "3.2.45"
|
||||
},
|
||||
"runtime": {
|
||||
"Fantasy-Net.dll": {
|
||||
"assemblyVersion": "2024.2.24",
|
||||
"fileVersion": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"Fantasy-Net.ConfigTable/2024.2.0": {
|
||||
"dependencies": {
|
||||
"Fantasy-Net": "2024.2.24"
|
||||
},
|
||||
"runtime": {
|
||||
"Fantasy-Net.ConfigTable.dll": {
|
||||
"assemblyVersion": "2024.2.0",
|
||||
"fileVersion": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"Fantasy-Net.ConfigTable.Reference/1.0.0.0": {
|
||||
"runtime": {
|
||||
"Fantasy-Net.ConfigTable.dll": {
|
||||
"assemblyVersion": "1.0.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Fantasy-Net.Reference/1.0.0.0": {
|
||||
"runtime": {
|
||||
"Fantasy-Net.dll": {
|
||||
"assemblyVersion": "1.0.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"Entity/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"CommandLineParser/2.9.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-OE0sl1/sQ37bjVsPKKtwQlWDgqaxWgtme3xZz7JssWUzg5JpMIyHgCTY9MVMxOg48fJ1AgGT3tgdH5m/kQ5xhA==",
|
||||
"path": "commandlineparser/2.9.1",
|
||||
"hashPath": "commandlineparser.2.9.1.nupkg.sha512"
|
||||
},
|
||||
"DnsClient/1.6.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-4H/f2uYJOZ+YObZjpY9ABrKZI+JNw3uizp6oMzTXwDw6F+2qIPhpRl/1t68O/6e98+vqNiYGu+lswmwdYUy3gg==",
|
||||
"path": "dnsclient/1.6.1",
|
||||
"hashPath": "dnsclient.1.6.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Extensions.Logging.Abstractions/2.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-6ZCllUYGFukkymSTx3Yr0G/ajRxoNJp7/FqSxSB4fGISST54ifBhgu4Nc0ItGi3i6DqwuNd8SUyObmiC++AO2Q==",
|
||||
"path": "microsoft.extensions.logging.abstractions/2.0.0",
|
||||
"hashPath": "microsoft.extensions.logging.abstractions.2.0.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==",
|
||||
"path": "microsoft.netcore.platforms/5.0.0",
|
||||
"hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Win32.Registry/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==",
|
||||
"path": "microsoft.win32.registry/5.0.0",
|
||||
"hashPath": "microsoft.win32.registry.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"MongoDB.Bson/3.1.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-3dhaZhz18B5vUoEP13o2j8A6zQfkHdZhwBvLZEjDJum4BTLLv1/Z8bt25UQEtpqvYwLgde4R6ekWZ7XAYUMxuw==",
|
||||
"path": "mongodb.bson/3.1.0",
|
||||
"hashPath": "mongodb.bson.3.1.0.nupkg.sha512"
|
||||
},
|
||||
"MongoDB.Driver/3.1.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-+O7lKaIl7VUHptE0hqTd7UY1G5KDp/o8S4upG7YL4uChMNKD/U6tz9i17nMGHaD/L2AiPLgaJcaDe2XACsegGA==",
|
||||
"path": "mongodb.driver/3.1.0",
|
||||
"hashPath": "mongodb.driver.3.1.0.nupkg.sha512"
|
||||
},
|
||||
"Newtonsoft.Json/13.0.3": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==",
|
||||
"path": "newtonsoft.json/13.0.3",
|
||||
"hashPath": "newtonsoft.json.13.0.3.nupkg.sha512"
|
||||
},
|
||||
"protobuf-net/3.2.45": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-5UZ/ukUHcGbFSl7vNMrHsfjqdxusdd9w7w0fCEXzf3UUtsrGNVCzV5SmF+sCHAbnRV2qPcD1ixiDP7Aj8lX/HA==",
|
||||
"path": "protobuf-net/3.2.45",
|
||||
"hashPath": "protobuf-net.3.2.45.nupkg.sha512"
|
||||
},
|
||||
"protobuf-net.Core/3.2.45": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-PMWatW2NrT1uTXD7etJ4VdQ0wWZLFrIfdRGppD2QX7nzZ0+kIzqhq551u6ZiXJHWJgG4hWFEkSnUnt2aB6posg==",
|
||||
"path": "protobuf-net.core/3.2.45",
|
||||
"hashPath": "protobuf-net.core.3.2.45.nupkg.sha512"
|
||||
},
|
||||
"SharpCompress/0.30.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-XqD4TpfyYGa7QTPzaGlMVbcecKnXy4YmYLDWrU+JIj7IuRNl7DH2END+Ll7ekWIY8o3dAMWLFDE1xdhfIWD1nw==",
|
||||
"path": "sharpcompress/0.30.1",
|
||||
"hashPath": "sharpcompress.0.30.1.nupkg.sha512"
|
||||
},
|
||||
"Snappier/1.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-rFtK2KEI9hIe8gtx3a0YDXdHOpedIf9wYCEYtBEmtlyiWVX3XlCNV03JrmmAi/Cdfn7dxK+k0sjjcLv4fpHnqA==",
|
||||
"path": "snappier/1.0.0",
|
||||
"hashPath": "snappier.1.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Buffers/4.5.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
|
||||
"path": "system.buffers/4.5.1",
|
||||
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
|
||||
},
|
||||
"System.Collections.Immutable/7.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-dQPcs0U1IKnBdRDBkrCTi1FoajSTBzLcVTpjO4MBCMC7f4pDOIPzgBoX8JjG7X6uZRJ8EBxsi8+DR1JuwjnzOQ==",
|
||||
"path": "system.collections.immutable/7.0.0",
|
||||
"hashPath": "system.collections.immutable.7.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.IO.Pipelines/9.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-eA3cinogwaNB4jdjQHOP3Z3EuyiDII7MT35jgtnsA4vkn0LUrrSHsU0nzHTzFzmaFYeKV7MYyMxOocFzsBHpTw==",
|
||||
"path": "system.io.pipelines/9.0.0",
|
||||
"hashPath": "system.io.pipelines.9.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Memory/4.5.5": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
|
||||
"path": "system.memory/4.5.5",
|
||||
"hashPath": "system.memory.4.5.5.nupkg.sha512"
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-ZD9TMpsmYJLrxbbmdvhwt9YEgG5WntEnZ/d1eH8JBX9LBp+Ju8BSBhUGbZMNVHHomWo2KVImJhTDl2hIgw/6MA==",
|
||||
"path": "system.runtime.compilerservices.unsafe/5.0.0",
|
||||
"hashPath": "system.runtime.compilerservices.unsafe.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Security.AccessControl/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
|
||||
"path": "system.security.accesscontrol/5.0.0",
|
||||
"hashPath": "system.security.accesscontrol.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Security.Principal.Windows/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==",
|
||||
"path": "system.security.principal.windows/5.0.0",
|
||||
"hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"ZstdSharp.Port/0.7.3": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-U9Ix4l4cl58Kzz1rJzj5hoVTjmbx1qGMwzAcbv1j/d3NzrFaESIurQyg+ow4mivCgkE3S413y+U9k4WdnEIkRA==",
|
||||
"path": "zstdsharp.port/0.7.3",
|
||||
"hashPath": "zstdsharp.port.0.7.3.nupkg.sha512"
|
||||
},
|
||||
"Fantasy-Net/2024.2.24": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Fantasy-Net.ConfigTable/2024.2.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Fantasy-Net.ConfigTable.Reference/1.0.0.0": {
|
||||
"type": "reference",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Fantasy-Net.Reference/1.0.0.0": {
|
||||
"type": "reference",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
物品和背包的完整代码/Server/Entity/bin/Debug/net8.0/Entity.dll
Normal file
BIN
物品和背包的完整代码/Server/Entity/bin/Debug/net8.0/Entity.dll
Normal file
Binary file not shown.
BIN
物品和背包的完整代码/Server/Entity/bin/Debug/net8.0/Entity.pdb
Normal file
BIN
物品和背包的完整代码/Server/Entity/bin/Debug/net8.0/Entity.pdb
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
物品和背包的完整代码/Server/Entity/bin/Debug/net8.0/Fantasy-Net.dll
Normal file
BIN
物品和背包的完整代码/Server/Entity/bin/Debug/net8.0/Fantasy-Net.dll
Normal file
Binary file not shown.
BIN
物品和背包的完整代码/Server/Entity/bin/Debug/net8.0/Fantasy-Net.pdb
Normal file
BIN
物品和背包的完整代码/Server/Entity/bin/Debug/net8.0/Fantasy-Net.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Entity")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Entity")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Entity")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
b7ceabf79c524d6ee0475da740239235018950a5f2c92d51c77f832004e64e6c
|
||||
@@ -0,0 +1,15 @@
|
||||
is_global = true
|
||||
build_property.TargetFramework = net8.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = Entity
|
||||
build_property.ProjectDir = /Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
build_property.EffectiveAnalysisLevelStyle = 8.0
|
||||
build_property.EnableCodeStyleSeverity =
|
||||
@@ -0,0 +1,8 @@
|
||||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.IO;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Net.Http;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
||||
BIN
物品和背包的完整代码/Server/Entity/obj/Debug/net8.0/Entity.assets.cache
Normal file
BIN
物品和背包的完整代码/Server/Entity/obj/Debug/net8.0/Entity.assets.cache
Normal file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
e04100643a4962db8226f14c87608f61ef350431fd0164f615b9a90d5f481444
|
||||
@@ -0,0 +1,17 @@
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/bin/Debug/net8.0/Entity.deps.json
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/bin/Debug/net8.0/Entity.dll
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/bin/Debug/net8.0/Entity.pdb
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/obj/Debug/net8.0/Entity.GeneratedMSBuildEditorConfig.editorconfig
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/obj/Debug/net8.0/Entity.AssemblyInfoInputs.cache
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/obj/Debug/net8.0/Entity.AssemblyInfo.cs
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/obj/Debug/net8.0/Entity.csproj.CoreCompileInputs.cache
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/obj/Debug/net8.0/Entity.dll
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/obj/Debug/net8.0/refint/Entity.dll
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/obj/Debug/net8.0/Entity.pdb
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/obj/Debug/net8.0/ref/Entity.dll
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/bin/Debug/net8.0/Fantasy-Net.dll
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/bin/Debug/net8.0/Fantasy-Net.pdb
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/obj/Debug/net8.0/Entity.csproj.AssemblyReference.cache
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/obj/Debug/net8.0/Entity.csproj.Up2Date
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/bin/Debug/net8.0/Fantasy-Net.ConfigTable.dll
|
||||
/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/bin/Debug/net8.0/Fantasy-Net.ConfigTable.pdb
|
||||
BIN
物品和背包的完整代码/Server/Entity/obj/Debug/net8.0/Entity.dll
Normal file
BIN
物品和背包的完整代码/Server/Entity/obj/Debug/net8.0/Entity.dll
Normal file
Binary file not shown.
BIN
物品和背包的完整代码/Server/Entity/obj/Debug/net8.0/Entity.pdb
Normal file
BIN
物品和背包的完整代码/Server/Entity/obj/Debug/net8.0/Entity.pdb
Normal file
Binary file not shown.
BIN
物品和背包的完整代码/Server/Entity/obj/Debug/net8.0/ref/Entity.dll
Normal file
BIN
物品和背包的完整代码/Server/Entity/obj/Debug/net8.0/ref/Entity.dll
Normal file
Binary file not shown.
BIN
物品和背包的完整代码/Server/Entity/obj/Debug/net8.0/refint/Entity.dll
Normal file
BIN
物品和背包的完整代码/Server/Entity/obj/Debug/net8.0/refint/Entity.dll
Normal file
Binary file not shown.
282
物品和背包的完整代码/Server/Entity/obj/Entity.csproj.nuget.dgspec.json
Normal file
282
物品和背包的完整代码/Server/Entity/obj/Entity.csproj.nuget.dgspec.json
Normal file
@@ -0,0 +1,282 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/Entity.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Net/Fantasy.Net/Fantasy.Net.csproj": {
|
||||
"version": "2024.2.24",
|
||||
"restore": {
|
||||
"projectUniqueName": "/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Net/Fantasy.Net/Fantasy.Net.csproj",
|
||||
"projectName": "Fantasy-Net",
|
||||
"projectPath": "/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Net/Fantasy.Net/Fantasy.Net.csproj",
|
||||
"packagesPath": "/Users/fantasy/.nuget/packages/",
|
||||
"outputPath": "/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Net/Fantasy.Net/obj/",
|
||||
"projectStyle": "PackageReference",
|
||||
"crossTargeting": true,
|
||||
"configFilePaths": [
|
||||
"/Users/fantasy/.nuget/NuGet/NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net8.0",
|
||||
"net9.0"
|
||||
],
|
||||
"sources": {
|
||||
"/usr/local/share/dotnet/library-packs": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"projectReferences": {}
|
||||
},
|
||||
"net9.0": {
|
||||
"targetAlias": "net9.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"allWarningsAsErrors": true,
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "all"
|
||||
},
|
||||
"SdkAnalysisLevel": "9.0.100"
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"dependencies": {
|
||||
"CommandLineParser": {
|
||||
"target": "Package",
|
||||
"version": "[2.9.1, )"
|
||||
},
|
||||
"MongoDB.Bson": {
|
||||
"target": "Package",
|
||||
"version": "[3.1.0, )"
|
||||
},
|
||||
"MongoDB.Driver": {
|
||||
"target": "Package",
|
||||
"version": "[3.1.0, )"
|
||||
},
|
||||
"Newtonsoft.Json": {
|
||||
"target": "Package",
|
||||
"version": "[13.0.3, )"
|
||||
},
|
||||
"System.IO.Pipelines": {
|
||||
"target": "Package",
|
||||
"version": "[9.0.0, )"
|
||||
},
|
||||
"protobuf-net": {
|
||||
"target": "Package",
|
||||
"version": "[3.2.45, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.AspNetCore.App": {
|
||||
"privateAssets": "none"
|
||||
},
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/9.0.100/PortableRuntimeIdentifierGraph.json"
|
||||
},
|
||||
"net9.0": {
|
||||
"targetAlias": "net9.0",
|
||||
"dependencies": {
|
||||
"CommandLineParser": {
|
||||
"target": "Package",
|
||||
"version": "[2.9.1, )"
|
||||
},
|
||||
"MongoDB.Bson": {
|
||||
"target": "Package",
|
||||
"version": "[3.1.0, )"
|
||||
},
|
||||
"MongoDB.Driver": {
|
||||
"target": "Package",
|
||||
"version": "[3.1.0, )"
|
||||
},
|
||||
"Newtonsoft.Json": {
|
||||
"target": "Package",
|
||||
"version": "[13.0.3, )"
|
||||
},
|
||||
"protobuf-net": {
|
||||
"target": "Package",
|
||||
"version": "[3.2.45, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.AspNetCore.App": {
|
||||
"privateAssets": "none"
|
||||
},
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/9.0.100/PortableRuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Packages/Fantasy.ConfigTable/Net/Fantasy.ConfigTable.csproj": {
|
||||
"version": "2024.2.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Packages/Fantasy.ConfigTable/Net/Fantasy.ConfigTable.csproj",
|
||||
"projectName": "Fantasy-Net.ConfigTable",
|
||||
"projectPath": "/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Packages/Fantasy.ConfigTable/Net/Fantasy.ConfigTable.csproj",
|
||||
"packagesPath": "/Users/fantasy/.nuget/packages/",
|
||||
"outputPath": "/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Packages/Fantasy.ConfigTable/Net/obj/",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"/Users/fantasy/.nuget/NuGet/NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net8.0"
|
||||
],
|
||||
"sources": {
|
||||
"/usr/local/share/dotnet/library-packs": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "all"
|
||||
},
|
||||
"SdkAnalysisLevel": "9.0.100"
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"dependencies": {
|
||||
"Fantasy-Net": {
|
||||
"target": "Package",
|
||||
"version": "[2024.2.22, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/9.0.100/PortableRuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/Entity.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/Entity.csproj",
|
||||
"projectName": "Entity",
|
||||
"projectPath": "/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/Entity.csproj",
|
||||
"packagesPath": "/Users/fantasy/.nuget/packages/",
|
||||
"outputPath": "/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/obj/",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"/Users/fantasy/.nuget/NuGet/NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net8.0"
|
||||
],
|
||||
"sources": {
|
||||
"/usr/local/share/dotnet/library-packs": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"projectReferences": {
|
||||
"/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Net/Fantasy.Net/Fantasy.Net.csproj": {
|
||||
"projectPath": "/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Net/Fantasy.Net/Fantasy.Net.csproj"
|
||||
},
|
||||
"/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Packages/Fantasy.ConfigTable/Net/Fantasy.ConfigTable.csproj": {
|
||||
"projectPath": "/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Packages/Fantasy.ConfigTable/Net/Fantasy.ConfigTable.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "all"
|
||||
},
|
||||
"SdkAnalysisLevel": "9.0.100"
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/9.0.100/PortableRuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
15
物品和背包的完整代码/Server/Entity/obj/Entity.csproj.nuget.g.props
Normal file
15
物品和背包的完整代码/Server/Entity/obj/Entity.csproj.nuget.g.props
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/Users/fantasy/.nuget/packages/</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/Users/fantasy/.nuget/packages/</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.12.2</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="/Users/fantasy/.nuget/packages/" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
||||
956
物品和背包的完整代码/Server/Entity/obj/project.assets.json
Normal file
956
物品和背包的完整代码/Server/Entity/obj/project.assets.json
Normal file
@@ -0,0 +1,956 @@
|
||||
{
|
||||
"version": 3,
|
||||
"targets": {
|
||||
"net8.0": {
|
||||
"CommandLineParser/2.9.1": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/netstandard2.0/CommandLine.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/CommandLine.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DnsClient/1.6.1": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.Win32.Registry": "5.0.0"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net5.0/DnsClient.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net5.0/DnsClient.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Extensions.Logging.Abstractions/2.0.0": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/5.0.0": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/netstandard1.0/_._": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.0/_._": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.Win32.Registry/5.0.0": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"System.Security.AccessControl": "5.0.0",
|
||||
"System.Security.Principal.Windows": "5.0.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard2.0/Microsoft.Win32.Registry.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtimeTargets": {
|
||||
"runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
|
||||
"assetType": "runtime",
|
||||
"rid": "win"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MongoDB.Bson/3.1.0": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"System.Memory": "4.5.5",
|
||||
"System.Runtime.CompilerServices.Unsafe": "5.0.0"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net6.0/MongoDB.Bson.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/MongoDB.Bson.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MongoDB.Driver/3.1.0": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"DnsClient": "1.6.1",
|
||||
"Microsoft.Extensions.Logging.Abstractions": "2.0.0",
|
||||
"MongoDB.Bson": "3.1.0",
|
||||
"SharpCompress": "0.30.1",
|
||||
"Snappier": "1.0.0",
|
||||
"System.Buffers": "4.5.1",
|
||||
"ZstdSharp.Port": "0.7.3"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net6.0/MongoDB.Driver.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/MongoDB.Driver.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Newtonsoft.Json/13.0.3": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/net6.0/Newtonsoft.Json.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/Newtonsoft.Json.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobuf-net/3.2.45": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"protobuf-net.Core": "3.2.45"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net6.0/protobuf-net.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/protobuf-net.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobuf-net.Core/3.2.45": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"System.Collections.Immutable": "7.0.0"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net6.0/protobuf-net.Core.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/protobuf-net.Core.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SharpCompress/0.30.1": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/net5.0/SharpCompress.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net5.0/SharpCompress.dll": {}
|
||||
}
|
||||
},
|
||||
"Snappier/1.0.0": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/net5.0/Snappier.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net5.0/Snappier.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Buffers/4.5.1": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"ref/netcoreapp2.0/_._": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netcoreapp2.0/_._": {}
|
||||
}
|
||||
},
|
||||
"System.Collections.Immutable/7.0.0": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/net7.0/System.Collections.Immutable.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net7.0/System.Collections.Immutable.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"build": {
|
||||
"buildTransitive/net6.0/_._": {}
|
||||
}
|
||||
},
|
||||
"System.IO.Pipelines/9.0.0": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/net8.0/System.IO.Pipelines.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/System.IO.Pipelines.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"build": {
|
||||
"buildTransitive/net8.0/_._": {}
|
||||
}
|
||||
},
|
||||
"System.Memory/4.5.5": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"ref/netcoreapp2.1/_._": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netcoreapp2.1/_._": {}
|
||||
}
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/5.0.0": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"ref/netstandard2.1/System.Runtime.CompilerServices.Unsafe.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Security.AccessControl/5.0.0": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "5.0.0",
|
||||
"System.Security.Principal.Windows": "5.0.0"
|
||||
},
|
||||
"compile": {
|
||||
"ref/netstandard2.0/System.Security.AccessControl.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Security.AccessControl.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtimeTargets": {
|
||||
"runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll": {
|
||||
"assetType": "runtime",
|
||||
"rid": "win"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Security.Principal.Windows/5.0.0": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"ref/netcoreapp3.0/System.Security.Principal.Windows.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Security.Principal.Windows.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtimeTargets": {
|
||||
"runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
|
||||
"assetType": "runtime",
|
||||
"rid": "unix"
|
||||
},
|
||||
"runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
|
||||
"assetType": "runtime",
|
||||
"rid": "win"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ZstdSharp.Port/0.7.3": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/net7.0/ZstdSharp.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net7.0/ZstdSharp.dll": {}
|
||||
}
|
||||
},
|
||||
"Fantasy-Net/2024.2.24": {
|
||||
"type": "project",
|
||||
"framework": ".NETCoreApp,Version=v8.0",
|
||||
"dependencies": {
|
||||
"CommandLineParser": "2.9.1",
|
||||
"MongoDB.Bson": "3.1.0",
|
||||
"MongoDB.Driver": "3.1.0",
|
||||
"Newtonsoft.Json": "13.0.3",
|
||||
"System.IO.Pipelines": "9.0.0",
|
||||
"protobuf-net": "3.2.45"
|
||||
},
|
||||
"compile": {
|
||||
"bin/placeholder/Fantasy-Net.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"bin/placeholder/Fantasy-Net.dll": {}
|
||||
},
|
||||
"frameworkReferences": [
|
||||
"Microsoft.AspNetCore.App"
|
||||
]
|
||||
},
|
||||
"Fantasy-Net.ConfigTable/2024.2.0": {
|
||||
"type": "project",
|
||||
"framework": ".NETCoreApp,Version=v8.0",
|
||||
"dependencies": {
|
||||
"Fantasy-Net": "2024.2.22"
|
||||
},
|
||||
"compile": {
|
||||
"bin/placeholder/Fantasy-Net.ConfigTable.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"bin/placeholder/Fantasy-Net.ConfigTable.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"CommandLineParser/2.9.1": {
|
||||
"sha512": "OE0sl1/sQ37bjVsPKKtwQlWDgqaxWgtme3xZz7JssWUzg5JpMIyHgCTY9MVMxOg48fJ1AgGT3tgdH5m/kQ5xhA==",
|
||||
"type": "package",
|
||||
"path": "commandlineparser/2.9.1",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"CommandLine20.png",
|
||||
"License.md",
|
||||
"README.md",
|
||||
"commandlineparser.2.9.1.nupkg.sha512",
|
||||
"commandlineparser.nuspec",
|
||||
"lib/net40/CommandLine.dll",
|
||||
"lib/net40/CommandLine.xml",
|
||||
"lib/net45/CommandLine.dll",
|
||||
"lib/net45/CommandLine.xml",
|
||||
"lib/net461/CommandLine.dll",
|
||||
"lib/net461/CommandLine.xml",
|
||||
"lib/netstandard2.0/CommandLine.dll",
|
||||
"lib/netstandard2.0/CommandLine.xml"
|
||||
]
|
||||
},
|
||||
"DnsClient/1.6.1": {
|
||||
"sha512": "4H/f2uYJOZ+YObZjpY9ABrKZI+JNw3uizp6oMzTXwDw6F+2qIPhpRl/1t68O/6e98+vqNiYGu+lswmwdYUy3gg==",
|
||||
"type": "package",
|
||||
"path": "dnsclient/1.6.1",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"dnsclient.1.6.1.nupkg.sha512",
|
||||
"dnsclient.nuspec",
|
||||
"icon.png",
|
||||
"lib/net45/DnsClient.dll",
|
||||
"lib/net45/DnsClient.xml",
|
||||
"lib/net471/DnsClient.dll",
|
||||
"lib/net471/DnsClient.xml",
|
||||
"lib/net5.0/DnsClient.dll",
|
||||
"lib/net5.0/DnsClient.xml",
|
||||
"lib/netstandard1.3/DnsClient.dll",
|
||||
"lib/netstandard1.3/DnsClient.xml",
|
||||
"lib/netstandard2.0/DnsClient.dll",
|
||||
"lib/netstandard2.0/DnsClient.xml",
|
||||
"lib/netstandard2.1/DnsClient.dll",
|
||||
"lib/netstandard2.1/DnsClient.xml"
|
||||
]
|
||||
},
|
||||
"Microsoft.Extensions.Logging.Abstractions/2.0.0": {
|
||||
"sha512": "6ZCllUYGFukkymSTx3Yr0G/ajRxoNJp7/FqSxSB4fGISST54ifBhgu4Nc0ItGi3i6DqwuNd8SUyObmiC++AO2Q==",
|
||||
"type": "package",
|
||||
"path": "microsoft.extensions.logging.abstractions/2.0.0",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.dll",
|
||||
"lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.xml",
|
||||
"microsoft.extensions.logging.abstractions.2.0.0.nupkg.sha512",
|
||||
"microsoft.extensions.logging.abstractions.nuspec"
|
||||
]
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/5.0.0": {
|
||||
"sha512": "VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==",
|
||||
"type": "package",
|
||||
"path": "microsoft.netcore.platforms/5.0.0",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"Icon.png",
|
||||
"LICENSE.TXT",
|
||||
"THIRD-PARTY-NOTICES.TXT",
|
||||
"lib/netstandard1.0/_._",
|
||||
"microsoft.netcore.platforms.5.0.0.nupkg.sha512",
|
||||
"microsoft.netcore.platforms.nuspec",
|
||||
"runtime.json",
|
||||
"useSharedDesignerContext.txt",
|
||||
"version.txt"
|
||||
]
|
||||
},
|
||||
"Microsoft.Win32.Registry/5.0.0": {
|
||||
"sha512": "dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==",
|
||||
"type": "package",
|
||||
"path": "microsoft.win32.registry/5.0.0",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"Icon.png",
|
||||
"LICENSE.TXT",
|
||||
"THIRD-PARTY-NOTICES.TXT",
|
||||
"lib/net46/Microsoft.Win32.Registry.dll",
|
||||
"lib/net461/Microsoft.Win32.Registry.dll",
|
||||
"lib/net461/Microsoft.Win32.Registry.xml",
|
||||
"lib/netstandard1.3/Microsoft.Win32.Registry.dll",
|
||||
"lib/netstandard2.0/Microsoft.Win32.Registry.dll",
|
||||
"lib/netstandard2.0/Microsoft.Win32.Registry.xml",
|
||||
"microsoft.win32.registry.5.0.0.nupkg.sha512",
|
||||
"microsoft.win32.registry.nuspec",
|
||||
"ref/net46/Microsoft.Win32.Registry.dll",
|
||||
"ref/net461/Microsoft.Win32.Registry.dll",
|
||||
"ref/net461/Microsoft.Win32.Registry.xml",
|
||||
"ref/netstandard1.3/Microsoft.Win32.Registry.dll",
|
||||
"ref/netstandard1.3/Microsoft.Win32.Registry.xml",
|
||||
"ref/netstandard1.3/de/Microsoft.Win32.Registry.xml",
|
||||
"ref/netstandard1.3/es/Microsoft.Win32.Registry.xml",
|
||||
"ref/netstandard1.3/fr/Microsoft.Win32.Registry.xml",
|
||||
"ref/netstandard1.3/it/Microsoft.Win32.Registry.xml",
|
||||
"ref/netstandard1.3/ja/Microsoft.Win32.Registry.xml",
|
||||
"ref/netstandard1.3/ko/Microsoft.Win32.Registry.xml",
|
||||
"ref/netstandard1.3/ru/Microsoft.Win32.Registry.xml",
|
||||
"ref/netstandard1.3/zh-hans/Microsoft.Win32.Registry.xml",
|
||||
"ref/netstandard1.3/zh-hant/Microsoft.Win32.Registry.xml",
|
||||
"ref/netstandard2.0/Microsoft.Win32.Registry.dll",
|
||||
"ref/netstandard2.0/Microsoft.Win32.Registry.xml",
|
||||
"runtimes/win/lib/net46/Microsoft.Win32.Registry.dll",
|
||||
"runtimes/win/lib/net461/Microsoft.Win32.Registry.dll",
|
||||
"runtimes/win/lib/net461/Microsoft.Win32.Registry.xml",
|
||||
"runtimes/win/lib/netstandard1.3/Microsoft.Win32.Registry.dll",
|
||||
"runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll",
|
||||
"runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.xml",
|
||||
"useSharedDesignerContext.txt",
|
||||
"version.txt"
|
||||
]
|
||||
},
|
||||
"MongoDB.Bson/3.1.0": {
|
||||
"sha512": "3dhaZhz18B5vUoEP13o2j8A6zQfkHdZhwBvLZEjDJum4BTLLv1/Z8bt25UQEtpqvYwLgde4R6ekWZ7XAYUMxuw==",
|
||||
"type": "package",
|
||||
"path": "mongodb.bson/3.1.0",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"README.md",
|
||||
"lib/net472/MongoDB.Bson.dll",
|
||||
"lib/net472/MongoDB.Bson.xml",
|
||||
"lib/net6.0/MongoDB.Bson.dll",
|
||||
"lib/net6.0/MongoDB.Bson.xml",
|
||||
"lib/netstandard2.1/MongoDB.Bson.dll",
|
||||
"lib/netstandard2.1/MongoDB.Bson.xml",
|
||||
"mongodb.bson.3.1.0.nupkg.sha512",
|
||||
"mongodb.bson.nuspec",
|
||||
"packageIcon.png"
|
||||
]
|
||||
},
|
||||
"MongoDB.Driver/3.1.0": {
|
||||
"sha512": "+O7lKaIl7VUHptE0hqTd7UY1G5KDp/o8S4upG7YL4uChMNKD/U6tz9i17nMGHaD/L2AiPLgaJcaDe2XACsegGA==",
|
||||
"type": "package",
|
||||
"path": "mongodb.driver/3.1.0",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"README.md",
|
||||
"lib/net472/MongoDB.Driver.dll",
|
||||
"lib/net472/MongoDB.Driver.xml",
|
||||
"lib/net6.0/MongoDB.Driver.dll",
|
||||
"lib/net6.0/MongoDB.Driver.xml",
|
||||
"lib/netstandard2.1/MongoDB.Driver.dll",
|
||||
"lib/netstandard2.1/MongoDB.Driver.xml",
|
||||
"mongodb.driver.3.1.0.nupkg.sha512",
|
||||
"mongodb.driver.nuspec",
|
||||
"packageIcon.png"
|
||||
]
|
||||
},
|
||||
"Newtonsoft.Json/13.0.3": {
|
||||
"sha512": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==",
|
||||
"type": "package",
|
||||
"path": "newtonsoft.json/13.0.3",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"LICENSE.md",
|
||||
"README.md",
|
||||
"lib/net20/Newtonsoft.Json.dll",
|
||||
"lib/net20/Newtonsoft.Json.xml",
|
||||
"lib/net35/Newtonsoft.Json.dll",
|
||||
"lib/net35/Newtonsoft.Json.xml",
|
||||
"lib/net40/Newtonsoft.Json.dll",
|
||||
"lib/net40/Newtonsoft.Json.xml",
|
||||
"lib/net45/Newtonsoft.Json.dll",
|
||||
"lib/net45/Newtonsoft.Json.xml",
|
||||
"lib/net6.0/Newtonsoft.Json.dll",
|
||||
"lib/net6.0/Newtonsoft.Json.xml",
|
||||
"lib/netstandard1.0/Newtonsoft.Json.dll",
|
||||
"lib/netstandard1.0/Newtonsoft.Json.xml",
|
||||
"lib/netstandard1.3/Newtonsoft.Json.dll",
|
||||
"lib/netstandard1.3/Newtonsoft.Json.xml",
|
||||
"lib/netstandard2.0/Newtonsoft.Json.dll",
|
||||
"lib/netstandard2.0/Newtonsoft.Json.xml",
|
||||
"newtonsoft.json.13.0.3.nupkg.sha512",
|
||||
"newtonsoft.json.nuspec",
|
||||
"packageIcon.png"
|
||||
]
|
||||
},
|
||||
"protobuf-net/3.2.45": {
|
||||
"sha512": "5UZ/ukUHcGbFSl7vNMrHsfjqdxusdd9w7w0fCEXzf3UUtsrGNVCzV5SmF+sCHAbnRV2qPcD1ixiDP7Aj8lX/HA==",
|
||||
"type": "package",
|
||||
"path": "protobuf-net/3.2.45",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"lib/net462/protobuf-net.dll",
|
||||
"lib/net462/protobuf-net.xml",
|
||||
"lib/net6.0/protobuf-net.dll",
|
||||
"lib/net6.0/protobuf-net.xml",
|
||||
"lib/netstandard2.0/protobuf-net.dll",
|
||||
"lib/netstandard2.0/protobuf-net.xml",
|
||||
"lib/netstandard2.1/protobuf-net.dll",
|
||||
"lib/netstandard2.1/protobuf-net.xml",
|
||||
"protobuf-net.3.2.45.nupkg.sha512",
|
||||
"protobuf-net.nuspec",
|
||||
"protobuf-net.png",
|
||||
"readme.md"
|
||||
]
|
||||
},
|
||||
"protobuf-net.Core/3.2.45": {
|
||||
"sha512": "PMWatW2NrT1uTXD7etJ4VdQ0wWZLFrIfdRGppD2QX7nzZ0+kIzqhq551u6ZiXJHWJgG4hWFEkSnUnt2aB6posg==",
|
||||
"type": "package",
|
||||
"path": "protobuf-net.core/3.2.45",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"lib/net462/protobuf-net.Core.dll",
|
||||
"lib/net462/protobuf-net.Core.xml",
|
||||
"lib/net6.0/protobuf-net.Core.dll",
|
||||
"lib/net6.0/protobuf-net.Core.xml",
|
||||
"lib/netstandard2.0/protobuf-net.Core.dll",
|
||||
"lib/netstandard2.0/protobuf-net.Core.xml",
|
||||
"lib/netstandard2.1/protobuf-net.Core.dll",
|
||||
"lib/netstandard2.1/protobuf-net.Core.xml",
|
||||
"protobuf-net.core.3.2.45.nupkg.sha512",
|
||||
"protobuf-net.core.nuspec",
|
||||
"protobuf-net.png",
|
||||
"readme.md"
|
||||
]
|
||||
},
|
||||
"SharpCompress/0.30.1": {
|
||||
"sha512": "XqD4TpfyYGa7QTPzaGlMVbcecKnXy4YmYLDWrU+JIj7IuRNl7DH2END+Ll7ekWIY8o3dAMWLFDE1xdhfIWD1nw==",
|
||||
"type": "package",
|
||||
"path": "sharpcompress/0.30.1",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"lib/net461/SharpCompress.dll",
|
||||
"lib/net5.0/SharpCompress.dll",
|
||||
"lib/netcoreapp3.1/SharpCompress.dll",
|
||||
"lib/netstandard2.0/SharpCompress.dll",
|
||||
"lib/netstandard2.1/SharpCompress.dll",
|
||||
"sharpcompress.0.30.1.nupkg.sha512",
|
||||
"sharpcompress.nuspec"
|
||||
]
|
||||
},
|
||||
"Snappier/1.0.0": {
|
||||
"sha512": "rFtK2KEI9hIe8gtx3a0YDXdHOpedIf9wYCEYtBEmtlyiWVX3XlCNV03JrmmAi/Cdfn7dxK+k0sjjcLv4fpHnqA==",
|
||||
"type": "package",
|
||||
"path": "snappier/1.0.0",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"COPYING.txt",
|
||||
"lib/net5.0/Snappier.dll",
|
||||
"lib/net5.0/Snappier.xml",
|
||||
"lib/netcoreapp3.0/Snappier.dll",
|
||||
"lib/netcoreapp3.0/Snappier.xml",
|
||||
"lib/netstandard2.0/Snappier.dll",
|
||||
"lib/netstandard2.0/Snappier.xml",
|
||||
"lib/netstandard2.1/Snappier.dll",
|
||||
"lib/netstandard2.1/Snappier.xml",
|
||||
"snappier.1.0.0.nupkg.sha512",
|
||||
"snappier.nuspec"
|
||||
]
|
||||
},
|
||||
"System.Buffers/4.5.1": {
|
||||
"sha512": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
|
||||
"type": "package",
|
||||
"path": "system.buffers/4.5.1",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"LICENSE.TXT",
|
||||
"THIRD-PARTY-NOTICES.TXT",
|
||||
"lib/net461/System.Buffers.dll",
|
||||
"lib/net461/System.Buffers.xml",
|
||||
"lib/netcoreapp2.0/_._",
|
||||
"lib/netstandard1.1/System.Buffers.dll",
|
||||
"lib/netstandard1.1/System.Buffers.xml",
|
||||
"lib/netstandard2.0/System.Buffers.dll",
|
||||
"lib/netstandard2.0/System.Buffers.xml",
|
||||
"lib/uap10.0.16299/_._",
|
||||
"ref/net45/System.Buffers.dll",
|
||||
"ref/net45/System.Buffers.xml",
|
||||
"ref/netcoreapp2.0/_._",
|
||||
"ref/netstandard1.1/System.Buffers.dll",
|
||||
"ref/netstandard1.1/System.Buffers.xml",
|
||||
"ref/netstandard2.0/System.Buffers.dll",
|
||||
"ref/netstandard2.0/System.Buffers.xml",
|
||||
"ref/uap10.0.16299/_._",
|
||||
"system.buffers.4.5.1.nupkg.sha512",
|
||||
"system.buffers.nuspec",
|
||||
"useSharedDesignerContext.txt",
|
||||
"version.txt"
|
||||
]
|
||||
},
|
||||
"System.Collections.Immutable/7.0.0": {
|
||||
"sha512": "dQPcs0U1IKnBdRDBkrCTi1FoajSTBzLcVTpjO4MBCMC7f4pDOIPzgBoX8JjG7X6uZRJ8EBxsi8+DR1JuwjnzOQ==",
|
||||
"type": "package",
|
||||
"path": "system.collections.immutable/7.0.0",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"Icon.png",
|
||||
"LICENSE.TXT",
|
||||
"README.md",
|
||||
"THIRD-PARTY-NOTICES.TXT",
|
||||
"buildTransitive/net461/System.Collections.Immutable.targets",
|
||||
"buildTransitive/net462/_._",
|
||||
"buildTransitive/net6.0/_._",
|
||||
"buildTransitive/netcoreapp2.0/System.Collections.Immutable.targets",
|
||||
"lib/net462/System.Collections.Immutable.dll",
|
||||
"lib/net462/System.Collections.Immutable.xml",
|
||||
"lib/net6.0/System.Collections.Immutable.dll",
|
||||
"lib/net6.0/System.Collections.Immutable.xml",
|
||||
"lib/net7.0/System.Collections.Immutable.dll",
|
||||
"lib/net7.0/System.Collections.Immutable.xml",
|
||||
"lib/netstandard2.0/System.Collections.Immutable.dll",
|
||||
"lib/netstandard2.0/System.Collections.Immutable.xml",
|
||||
"system.collections.immutable.7.0.0.nupkg.sha512",
|
||||
"system.collections.immutable.nuspec",
|
||||
"useSharedDesignerContext.txt"
|
||||
]
|
||||
},
|
||||
"System.IO.Pipelines/9.0.0": {
|
||||
"sha512": "eA3cinogwaNB4jdjQHOP3Z3EuyiDII7MT35jgtnsA4vkn0LUrrSHsU0nzHTzFzmaFYeKV7MYyMxOocFzsBHpTw==",
|
||||
"type": "package",
|
||||
"path": "system.io.pipelines/9.0.0",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"Icon.png",
|
||||
"LICENSE.TXT",
|
||||
"PACKAGE.md",
|
||||
"THIRD-PARTY-NOTICES.TXT",
|
||||
"buildTransitive/net461/System.IO.Pipelines.targets",
|
||||
"buildTransitive/net462/_._",
|
||||
"buildTransitive/net8.0/_._",
|
||||
"buildTransitive/netcoreapp2.0/System.IO.Pipelines.targets",
|
||||
"lib/net462/System.IO.Pipelines.dll",
|
||||
"lib/net462/System.IO.Pipelines.xml",
|
||||
"lib/net8.0/System.IO.Pipelines.dll",
|
||||
"lib/net8.0/System.IO.Pipelines.xml",
|
||||
"lib/net9.0/System.IO.Pipelines.dll",
|
||||
"lib/net9.0/System.IO.Pipelines.xml",
|
||||
"lib/netstandard2.0/System.IO.Pipelines.dll",
|
||||
"lib/netstandard2.0/System.IO.Pipelines.xml",
|
||||
"system.io.pipelines.9.0.0.nupkg.sha512",
|
||||
"system.io.pipelines.nuspec",
|
||||
"useSharedDesignerContext.txt"
|
||||
]
|
||||
},
|
||||
"System.Memory/4.5.5": {
|
||||
"sha512": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
|
||||
"type": "package",
|
||||
"path": "system.memory/4.5.5",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"LICENSE.TXT",
|
||||
"THIRD-PARTY-NOTICES.TXT",
|
||||
"lib/net461/System.Memory.dll",
|
||||
"lib/net461/System.Memory.xml",
|
||||
"lib/netcoreapp2.1/_._",
|
||||
"lib/netstandard1.1/System.Memory.dll",
|
||||
"lib/netstandard1.1/System.Memory.xml",
|
||||
"lib/netstandard2.0/System.Memory.dll",
|
||||
"lib/netstandard2.0/System.Memory.xml",
|
||||
"ref/netcoreapp2.1/_._",
|
||||
"system.memory.4.5.5.nupkg.sha512",
|
||||
"system.memory.nuspec",
|
||||
"useSharedDesignerContext.txt",
|
||||
"version.txt"
|
||||
]
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/5.0.0": {
|
||||
"sha512": "ZD9TMpsmYJLrxbbmdvhwt9YEgG5WntEnZ/d1eH8JBX9LBp+Ju8BSBhUGbZMNVHHomWo2KVImJhTDl2hIgw/6MA==",
|
||||
"type": "package",
|
||||
"path": "system.runtime.compilerservices.unsafe/5.0.0",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"Icon.png",
|
||||
"LICENSE.TXT",
|
||||
"THIRD-PARTY-NOTICES.TXT",
|
||||
"lib/net45/System.Runtime.CompilerServices.Unsafe.dll",
|
||||
"lib/net45/System.Runtime.CompilerServices.Unsafe.xml",
|
||||
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.dll",
|
||||
"lib/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.xml",
|
||||
"lib/netstandard1.0/System.Runtime.CompilerServices.Unsafe.dll",
|
||||
"lib/netstandard1.0/System.Runtime.CompilerServices.Unsafe.xml",
|
||||
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll",
|
||||
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.xml",
|
||||
"ref/net461/System.Runtime.CompilerServices.Unsafe.dll",
|
||||
"ref/net461/System.Runtime.CompilerServices.Unsafe.xml",
|
||||
"ref/netstandard1.0/System.Runtime.CompilerServices.Unsafe.dll",
|
||||
"ref/netstandard1.0/System.Runtime.CompilerServices.Unsafe.xml",
|
||||
"ref/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll",
|
||||
"ref/netstandard2.0/System.Runtime.CompilerServices.Unsafe.xml",
|
||||
"ref/netstandard2.1/System.Runtime.CompilerServices.Unsafe.dll",
|
||||
"ref/netstandard2.1/System.Runtime.CompilerServices.Unsafe.xml",
|
||||
"system.runtime.compilerservices.unsafe.5.0.0.nupkg.sha512",
|
||||
"system.runtime.compilerservices.unsafe.nuspec",
|
||||
"useSharedDesignerContext.txt",
|
||||
"version.txt"
|
||||
]
|
||||
},
|
||||
"System.Security.AccessControl/5.0.0": {
|
||||
"sha512": "dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
|
||||
"type": "package",
|
||||
"path": "system.security.accesscontrol/5.0.0",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"Icon.png",
|
||||
"LICENSE.TXT",
|
||||
"THIRD-PARTY-NOTICES.TXT",
|
||||
"lib/net46/System.Security.AccessControl.dll",
|
||||
"lib/net461/System.Security.AccessControl.dll",
|
||||
"lib/net461/System.Security.AccessControl.xml",
|
||||
"lib/netstandard1.3/System.Security.AccessControl.dll",
|
||||
"lib/netstandard2.0/System.Security.AccessControl.dll",
|
||||
"lib/netstandard2.0/System.Security.AccessControl.xml",
|
||||
"lib/uap10.0.16299/_._",
|
||||
"ref/net46/System.Security.AccessControl.dll",
|
||||
"ref/net461/System.Security.AccessControl.dll",
|
||||
"ref/net461/System.Security.AccessControl.xml",
|
||||
"ref/netstandard1.3/System.Security.AccessControl.dll",
|
||||
"ref/netstandard1.3/System.Security.AccessControl.xml",
|
||||
"ref/netstandard1.3/de/System.Security.AccessControl.xml",
|
||||
"ref/netstandard1.3/es/System.Security.AccessControl.xml",
|
||||
"ref/netstandard1.3/fr/System.Security.AccessControl.xml",
|
||||
"ref/netstandard1.3/it/System.Security.AccessControl.xml",
|
||||
"ref/netstandard1.3/ja/System.Security.AccessControl.xml",
|
||||
"ref/netstandard1.3/ko/System.Security.AccessControl.xml",
|
||||
"ref/netstandard1.3/ru/System.Security.AccessControl.xml",
|
||||
"ref/netstandard1.3/zh-hans/System.Security.AccessControl.xml",
|
||||
"ref/netstandard1.3/zh-hant/System.Security.AccessControl.xml",
|
||||
"ref/netstandard2.0/System.Security.AccessControl.dll",
|
||||
"ref/netstandard2.0/System.Security.AccessControl.xml",
|
||||
"ref/uap10.0.16299/_._",
|
||||
"runtimes/win/lib/net46/System.Security.AccessControl.dll",
|
||||
"runtimes/win/lib/net461/System.Security.AccessControl.dll",
|
||||
"runtimes/win/lib/net461/System.Security.AccessControl.xml",
|
||||
"runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll",
|
||||
"runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.xml",
|
||||
"runtimes/win/lib/netstandard1.3/System.Security.AccessControl.dll",
|
||||
"runtimes/win/lib/uap10.0.16299/_._",
|
||||
"system.security.accesscontrol.5.0.0.nupkg.sha512",
|
||||
"system.security.accesscontrol.nuspec",
|
||||
"useSharedDesignerContext.txt",
|
||||
"version.txt"
|
||||
]
|
||||
},
|
||||
"System.Security.Principal.Windows/5.0.0": {
|
||||
"sha512": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==",
|
||||
"type": "package",
|
||||
"path": "system.security.principal.windows/5.0.0",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"Icon.png",
|
||||
"LICENSE.TXT",
|
||||
"THIRD-PARTY-NOTICES.TXT",
|
||||
"lib/net46/System.Security.Principal.Windows.dll",
|
||||
"lib/net461/System.Security.Principal.Windows.dll",
|
||||
"lib/net461/System.Security.Principal.Windows.xml",
|
||||
"lib/netstandard1.3/System.Security.Principal.Windows.dll",
|
||||
"lib/netstandard2.0/System.Security.Principal.Windows.dll",
|
||||
"lib/netstandard2.0/System.Security.Principal.Windows.xml",
|
||||
"lib/uap10.0.16299/_._",
|
||||
"ref/net46/System.Security.Principal.Windows.dll",
|
||||
"ref/net461/System.Security.Principal.Windows.dll",
|
||||
"ref/net461/System.Security.Principal.Windows.xml",
|
||||
"ref/netcoreapp3.0/System.Security.Principal.Windows.dll",
|
||||
"ref/netcoreapp3.0/System.Security.Principal.Windows.xml",
|
||||
"ref/netstandard1.3/System.Security.Principal.Windows.dll",
|
||||
"ref/netstandard1.3/System.Security.Principal.Windows.xml",
|
||||
"ref/netstandard1.3/de/System.Security.Principal.Windows.xml",
|
||||
"ref/netstandard1.3/es/System.Security.Principal.Windows.xml",
|
||||
"ref/netstandard1.3/fr/System.Security.Principal.Windows.xml",
|
||||
"ref/netstandard1.3/it/System.Security.Principal.Windows.xml",
|
||||
"ref/netstandard1.3/ja/System.Security.Principal.Windows.xml",
|
||||
"ref/netstandard1.3/ko/System.Security.Principal.Windows.xml",
|
||||
"ref/netstandard1.3/ru/System.Security.Principal.Windows.xml",
|
||||
"ref/netstandard1.3/zh-hans/System.Security.Principal.Windows.xml",
|
||||
"ref/netstandard1.3/zh-hant/System.Security.Principal.Windows.xml",
|
||||
"ref/netstandard2.0/System.Security.Principal.Windows.dll",
|
||||
"ref/netstandard2.0/System.Security.Principal.Windows.xml",
|
||||
"ref/uap10.0.16299/_._",
|
||||
"runtimes/unix/lib/netcoreapp2.0/System.Security.Principal.Windows.dll",
|
||||
"runtimes/unix/lib/netcoreapp2.0/System.Security.Principal.Windows.xml",
|
||||
"runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll",
|
||||
"runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.xml",
|
||||
"runtimes/win/lib/net46/System.Security.Principal.Windows.dll",
|
||||
"runtimes/win/lib/net461/System.Security.Principal.Windows.dll",
|
||||
"runtimes/win/lib/net461/System.Security.Principal.Windows.xml",
|
||||
"runtimes/win/lib/netcoreapp2.0/System.Security.Principal.Windows.dll",
|
||||
"runtimes/win/lib/netcoreapp2.0/System.Security.Principal.Windows.xml",
|
||||
"runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll",
|
||||
"runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.xml",
|
||||
"runtimes/win/lib/netstandard1.3/System.Security.Principal.Windows.dll",
|
||||
"runtimes/win/lib/uap10.0.16299/_._",
|
||||
"system.security.principal.windows.5.0.0.nupkg.sha512",
|
||||
"system.security.principal.windows.nuspec",
|
||||
"useSharedDesignerContext.txt",
|
||||
"version.txt"
|
||||
]
|
||||
},
|
||||
"ZstdSharp.Port/0.7.3": {
|
||||
"sha512": "U9Ix4l4cl58Kzz1rJzj5hoVTjmbx1qGMwzAcbv1j/d3NzrFaESIurQyg+ow4mivCgkE3S413y+U9k4WdnEIkRA==",
|
||||
"type": "package",
|
||||
"path": "zstdsharp.port/0.7.3",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"lib/net461/ZstdSharp.dll",
|
||||
"lib/net5.0/ZstdSharp.dll",
|
||||
"lib/net6.0/ZstdSharp.dll",
|
||||
"lib/net7.0/ZstdSharp.dll",
|
||||
"lib/netcoreapp3.1/ZstdSharp.dll",
|
||||
"lib/netstandard2.0/ZstdSharp.dll",
|
||||
"lib/netstandard2.1/ZstdSharp.dll",
|
||||
"zstdsharp.port.0.7.3.nupkg.sha512",
|
||||
"zstdsharp.port.nuspec"
|
||||
]
|
||||
},
|
||||
"Fantasy-Net/2024.2.24": {
|
||||
"type": "project",
|
||||
"path": "../../Packages/Fantasy/Fantasy.Net/Fantasy.Net/Fantasy.Net.csproj",
|
||||
"msbuildProject": "../../Packages/Fantasy/Fantasy.Net/Fantasy.Net/Fantasy.Net.csproj"
|
||||
},
|
||||
"Fantasy-Net.ConfigTable/2024.2.0": {
|
||||
"type": "project",
|
||||
"path": "../../Packages/Fantasy/Fantasy.Packages/Fantasy.ConfigTable/Net/Fantasy.ConfigTable.csproj",
|
||||
"msbuildProject": "../../Packages/Fantasy/Fantasy.Packages/Fantasy.ConfigTable/Net/Fantasy.ConfigTable.csproj"
|
||||
}
|
||||
},
|
||||
"projectFileDependencyGroups": {
|
||||
"net8.0": [
|
||||
"Fantasy-Net >= 2024.2.24",
|
||||
"Fantasy-Net.ConfigTable >= 2024.2.0"
|
||||
]
|
||||
},
|
||||
"packageFolders": {
|
||||
"/Users/fantasy/.nuget/packages/": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/Entity.csproj",
|
||||
"projectName": "Entity",
|
||||
"projectPath": "/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/Entity.csproj",
|
||||
"packagesPath": "/Users/fantasy/.nuget/packages/",
|
||||
"outputPath": "/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/obj/",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"/Users/fantasy/.nuget/NuGet/NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net8.0"
|
||||
],
|
||||
"sources": {
|
||||
"/usr/local/share/dotnet/library-packs": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"projectReferences": {
|
||||
"/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Net/Fantasy.Net/Fantasy.Net.csproj": {
|
||||
"projectPath": "/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Net/Fantasy.Net/Fantasy.Net.csproj"
|
||||
},
|
||||
"/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Packages/Fantasy.ConfigTable/Net/Fantasy.ConfigTable.csproj": {
|
||||
"projectPath": "/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Packages/Fantasy.ConfigTable/Net/Fantasy.ConfigTable.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "all"
|
||||
},
|
||||
"SdkAnalysisLevel": "9.0.100"
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/9.0.100/PortableRuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
30
物品和背包的完整代码/Server/Entity/obj/project.nuget.cache
Normal file
30
物品和背包的完整代码/Server/Entity/obj/project.nuget.cache
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "3mbwUg3kjU0=",
|
||||
"success": true,
|
||||
"projectFilePath": "/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/Entity.csproj",
|
||||
"expectedPackageFiles": [
|
||||
"/Users/fantasy/.nuget/packages/commandlineparser/2.9.1/commandlineparser.2.9.1.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/dnsclient/1.6.1/dnsclient.1.6.1.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/microsoft.extensions.logging.abstractions/2.0.0/microsoft.extensions.logging.abstractions.2.0.0.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/microsoft.netcore.platforms/5.0.0/microsoft.netcore.platforms.5.0.0.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/microsoft.win32.registry/5.0.0/microsoft.win32.registry.5.0.0.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/mongodb.bson/3.1.0/mongodb.bson.3.1.0.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/mongodb.driver/3.1.0/mongodb.driver.3.1.0.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/newtonsoft.json/13.0.3/newtonsoft.json.13.0.3.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/protobuf-net/3.2.45/protobuf-net.3.2.45.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/protobuf-net.core/3.2.45/protobuf-net.core.3.2.45.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/sharpcompress/0.30.1/sharpcompress.0.30.1.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/snappier/1.0.0/snappier.1.0.0.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/system.buffers/4.5.1/system.buffers.4.5.1.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/system.collections.immutable/7.0.0/system.collections.immutable.7.0.0.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/system.io.pipelines/9.0.0/system.io.pipelines.9.0.0.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/system.memory/4.5.5/system.memory.4.5.5.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/system.runtime.compilerservices.unsafe/5.0.0/system.runtime.compilerservices.unsafe.5.0.0.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/system.security.accesscontrol/5.0.0/system.security.accesscontrol.5.0.0.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/system.security.principal.windows/5.0.0/system.security.principal.windows.5.0.0.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/zstdsharp.port/0.7.3/zstdsharp.port.0.7.3.nupkg.sha512",
|
||||
"/Users/fantasy/.nuget/packages/fantasy-net/2024.2.24/fantasy-net.2024.2.24.nupkg.sha512"
|
||||
],
|
||||
"logs": []
|
||||
}
|
||||
1
物品和背包的完整代码/Server/Entity/obj/project.packagespec.json
Normal file
1
物品和背包的完整代码/Server/Entity/obj/project.packagespec.json
Normal file
@@ -0,0 +1 @@
|
||||
"restore":{"projectUniqueName":"/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/Entity.csproj","projectName":"Entity","projectPath":"/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/Entity.csproj","outputPath":"/Users/fantasy/Movies/物品背包开发之旅/B/Server/Entity/obj/","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"/usr/local/share/dotnet/library-packs":{},"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{"/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Net/Fantasy.Net/Fantasy.Net.csproj":{"projectPath":"/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Net/Fantasy.Net/Fantasy.Net.csproj"},"/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Packages/Fantasy.ConfigTable/Net/Fantasy.ConfigTable.csproj":{"projectPath":"/Users/fantasy/Movies/物品背包开发之旅/B/Packages/Fantasy/Fantasy.Packages/Fantasy.ConfigTable/Net/Fantasy.ConfigTable.csproj"}}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"all"},"SdkAnalysisLevel":"9.0.100"}"frameworks":{"net8.0":{"targetAlias":"net8.0","imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/usr/local/share/dotnet/sdk/9.0.100/PortableRuntimeIdentifierGraph.json"}}
|
||||
@@ -0,0 +1 @@
|
||||
17428701567253007
|
||||
1
物品和背包的完整代码/Server/Entity/obj/rider.project.restore.info
Normal file
1
物品和背包的完整代码/Server/Entity/obj/rider.project.restore.info
Normal file
@@ -0,0 +1 @@
|
||||
17428701567253007
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace Fantasy;
|
||||
|
||||
public static class BagComponentSystem
|
||||
{
|
||||
public static uint AddItem(this BagComponent self, Item item)
|
||||
{
|
||||
self.Items.Add(item.Id, item);
|
||||
Log.Debug($"add item:{item.Id}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static bool TryGetItem(this BagComponent self, long itemId, out Item item)
|
||||
{
|
||||
return self.Items.TryGetValue(itemId, out item);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
// using Fantasy.Entitas.Interface;
|
||||
//
|
||||
// namespace Fantasy;
|
||||
//
|
||||
// public sealed class ItemUseComponentDestroySystem : DestroySystem<ItemUseComponent>
|
||||
// {
|
||||
// protected override void Destroy(ItemUseComponent self)
|
||||
// {
|
||||
// self.Dispose();
|
||||
// self.Handlers.Clear();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public static class ItemUseComponentSystem
|
||||
// {
|
||||
// public static void Init(this ItemUseComponent self)
|
||||
// {
|
||||
// self.Handlers.Add((int)ItemType.Drug, new ItemUse_Drug());
|
||||
// self.Handlers.Add((int)ItemType.Equip , new ItemUse_Equip());
|
||||
// }
|
||||
//
|
||||
// public static uint CanUse(this ItemUseComponent self, Account account, ItemConfig config, ref int count)
|
||||
// {
|
||||
// if (!self.Handlers.TryGetValue((int)config.Type, out var handler))
|
||||
// {
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
// return handler.CanUse(account, config, ref count);
|
||||
// }
|
||||
//
|
||||
// public static void Use(this ItemUseComponent self, Account account, ItemConfig config, ref int count)
|
||||
// {
|
||||
// if (!self.Handlers.TryGetValue((int)config.Type, out var handler))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// handler.Use(account, config, ref count);
|
||||
// }
|
||||
//
|
||||
// public static uint UseHandler(this ItemUseComponent self, Account account, ItemConfig config, ref int count)
|
||||
// {
|
||||
// if (!self.Handlers.TryGetValue((int)config.Type, out var handler))
|
||||
// {
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
// var canUse = handler.CanUse(account, config, ref count);
|
||||
// if (canUse != 0)
|
||||
// {
|
||||
// return canUse;
|
||||
// }
|
||||
//
|
||||
// handler.CanUse(account, config, ref count);
|
||||
// return 0;
|
||||
// }
|
||||
// }
|
||||
@@ -0,0 +1,82 @@
|
||||
using Fantasy.Entitas.Interface;
|
||||
// ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public sealed class ContainerComponentDestroySystem : DestroySystem<ContainerComponent>
|
||||
{
|
||||
protected override void Destroy(ContainerComponent self)
|
||||
{
|
||||
foreach (var (_, container) in self.Containers)
|
||||
{
|
||||
container.Dispose();
|
||||
}
|
||||
|
||||
self.Containers.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ContainerComponentDeserializeSystem : DeserializeSystem<ContainerComponent>
|
||||
{
|
||||
protected override void Deserialize(ContainerComponent self)
|
||||
{
|
||||
var account = self.GetParent<Account>();
|
||||
foreach (var (key, container) in self.Containers)
|
||||
{
|
||||
container.Deserialize(self.Scene);
|
||||
container.Account = account;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ContainerComponentAwakeSystem : AwakeSystem<ContainerComponent>
|
||||
{
|
||||
protected override void Awake(ContainerComponent self)
|
||||
{
|
||||
var account = self.GetParent<Account>();
|
||||
var unitConfig = account.UnitConfig;
|
||||
// 根据角色的配置文件创建容器。
|
||||
foreach (var containerConfigId in unitConfig.MountContainer)
|
||||
{
|
||||
if (!ContainerConfigData.Instance.TryGet(containerConfigId, out var containerConfig))
|
||||
{
|
||||
Log.Error($"containerConfigId : {containerConfigId} not found");
|
||||
return;
|
||||
}
|
||||
|
||||
ContainerHelper.Create(account, (ContainerType)containerConfig.Type);
|
||||
}
|
||||
// 创建初始化物品到容器中。
|
||||
var unitConfigItems = unitConfig.Items;
|
||||
for (var itemArgs = 0; itemArgs < unitConfigItems.Length; itemArgs += 3)
|
||||
{
|
||||
try
|
||||
{
|
||||
var containerType = unitConfigItems[itemArgs];
|
||||
var itemConfigId = unitConfigItems[itemArgs + 1];
|
||||
var itemCount = (int)unitConfigItems[itemArgs + 2];
|
||||
var item = ItemFactory.Create(self.Scene, itemConfigId, itemCount, true);
|
||||
if (item == null)
|
||||
{
|
||||
// 这里创建物品失败,可以选择跳过这个物品,继续下一个创建。
|
||||
// 也可以直接停止全部的物品创建。
|
||||
continue;
|
||||
}
|
||||
// 添加物品到容器中。
|
||||
var addItemErrorCode = ContainerHelper.AddItem(account, (ContainerType)containerType, item, ItemReason.ContainerAdd, false);
|
||||
if (addItemErrorCode != 0)
|
||||
{
|
||||
Log.Error($"cant add item to container errorCode:{addItemErrorCode}");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Log.Error($"unitConfig :{unitConfig.Id} items参数不正确,要求是3个一组。");
|
||||
// 你可以选择如果有一个出错了,跳过、继续下一个创建。
|
||||
// 你还可以选择如果出错了,直接终止跳出。
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
291
物品和背包的完整代码/Server/Hotfix/Gate/Container/ContainerHelper.cs
Normal file
291
物品和背包的完整代码/Server/Hotfix/Gate/Container/ContainerHelper.cs
Normal file
@@ -0,0 +1,291 @@
|
||||
// ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
|
||||
|
||||
using Fantasy.Entitas;
|
||||
using Fantasy.Network;
|
||||
|
||||
#pragma warning disable CS8601 // Possible null reference assignment.
|
||||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
||||
|
||||
#pragma warning disable CS8603 // Possible null reference return.
|
||||
namespace Fantasy;
|
||||
|
||||
public static class ContainerHelper
|
||||
{
|
||||
#region Container
|
||||
|
||||
public static Container Create(Account account, ContainerType containerType)
|
||||
{
|
||||
if (!ContainerConfigData.Instance.TryGetConfig(containerType, out var containerConfig))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var containerComponent = account.GetComponent<ContainerComponent>();
|
||||
|
||||
if (containerComponent == null)
|
||||
{
|
||||
Log.Error($"account {account.Id} not found ContainerComponent!");
|
||||
return null;
|
||||
}
|
||||
|
||||
var containerTypeInt = (int)containerType;
|
||||
|
||||
if (containerComponent.Containers.ContainsKey(containerTypeInt))
|
||||
{
|
||||
Log.Error($"account {account.Id} containerType {containerType} already exists!");
|
||||
return null;
|
||||
}
|
||||
|
||||
var container = Entity.Create<Container>(account.Scene, true, true);
|
||||
container.ConfigId = containerConfig.Id;
|
||||
container.Account = account;
|
||||
container.CurrentCellCount = 0;
|
||||
containerComponent.Containers.Add(containerTypeInt, container);
|
||||
return container;
|
||||
}
|
||||
|
||||
public static uint TryGetContainer(Account account, ContainerType containerType, out Container container)
|
||||
{
|
||||
container = null;
|
||||
var containerComponent = account.GetComponent<ContainerComponent>();
|
||||
|
||||
if (containerComponent == null)
|
||||
{
|
||||
// 没有找到容器组件的错误码。
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!containerComponent.Containers.TryGetValue((int)containerType, out container))
|
||||
{
|
||||
// 在容器组件中没有找到该容器的错误码。
|
||||
return 2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetItem
|
||||
|
||||
public static bool GetItemById(Account account, ContainerType containerType, long id, out Item item)
|
||||
{
|
||||
if (TryGetContainer(account, containerType, out var container) != 0)
|
||||
{
|
||||
item = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
return container.GetItemById(id, out item);
|
||||
}
|
||||
|
||||
public static bool GetItemByCell(Account account, ContainerType containerType, long cell, out Item item)
|
||||
{
|
||||
if (TryGetContainer(account, containerType, out var container) != 0)
|
||||
{
|
||||
item = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
return container.GetItemByCell(cell, out item);
|
||||
}
|
||||
|
||||
public static void GetItemsByConfigId(Account account, ContainerType containerType, uint configId, List<Item> items)
|
||||
{
|
||||
if (TryGetContainer(account, containerType, out var container) != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
container.GetItemsByConfigId(configId, items);
|
||||
}
|
||||
|
||||
public static void GetItemsByType(Account account, ContainerType containerType, ItemType itemType, List<Item> items)
|
||||
{
|
||||
if (TryGetContainer(account, containerType, out var container) != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
container.GetItemsByType(itemType, items);
|
||||
}
|
||||
|
||||
public static bool IsFull(Account account, ContainerType containerType)
|
||||
{
|
||||
if (TryGetContainer(account, containerType, out var container) != 0)
|
||||
{
|
||||
// 这里的可以返回False,因为容器组件中可能这个容器。
|
||||
// 但是也可以返回true,是因为这个函数的语义是判断容器已满,如果找不到容器,也可以认为是满的。
|
||||
return true;
|
||||
}
|
||||
|
||||
return container.IsFull();
|
||||
}
|
||||
|
||||
public static int GetItemCount(Account account, ContainerType containerType, uint configId)
|
||||
{
|
||||
if (TryGetContainer(account, containerType, out var container) != 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return container.GetItemCount(configId);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region AddItem
|
||||
|
||||
public static uint AddItem(Account account, ContainerType containerType, Item item, ItemReason itemReason, bool isSendClient)
|
||||
{
|
||||
var tryGetContainer = TryGetContainer(account, containerType, out var container);
|
||||
|
||||
if (tryGetContainer != 0)
|
||||
{
|
||||
return tryGetContainer;
|
||||
}
|
||||
|
||||
return container.AddItem(item, itemReason, isSendClient);
|
||||
}
|
||||
|
||||
public static uint AddItem(Account account, ContainerType containerType, Item item, long cellId, ItemReason itemReason, bool isSendClient)
|
||||
{
|
||||
var tryGetContainer = TryGetContainer(account, containerType, out var container);
|
||||
|
||||
if (tryGetContainer != 0)
|
||||
{
|
||||
return tryGetContainer;
|
||||
}
|
||||
|
||||
return container.AddItem(item, cellId, itemReason, isSendClient);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region SplitItem
|
||||
|
||||
public static uint SplitItem(Account account, ContainerType containerType, long itemId, int count, out Item splitItem)
|
||||
{
|
||||
var tryGetContainer = TryGetContainer(account, containerType, out var container);
|
||||
|
||||
if (tryGetContainer != 0)
|
||||
{
|
||||
splitItem = null;
|
||||
return tryGetContainer;
|
||||
}
|
||||
|
||||
return container.SplitItem(itemId, count, out splitItem);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region RemoveItem
|
||||
|
||||
public static uint RemoveItem(Account account, ContainerType containerType, long itemId, ItemReason itemReason, bool isSendClient, bool isDispose = true)
|
||||
{
|
||||
var tryGetContainer = TryGetContainer(account, containerType, out var container);
|
||||
|
||||
if (tryGetContainer != 0)
|
||||
{
|
||||
return tryGetContainer;
|
||||
}
|
||||
|
||||
return container.RemoveItem(itemId, itemReason, isSendClient, isDispose);
|
||||
}
|
||||
|
||||
public static uint RemoveItem(Account account, ContainerType containerType, long itemId, int count, ItemReason itemReason, bool isSendClient, bool isDispose = true)
|
||||
{
|
||||
var tryGetContainer = TryGetContainer(account, containerType, out var container);
|
||||
|
||||
if (tryGetContainer != 0)
|
||||
{
|
||||
return tryGetContainer;
|
||||
}
|
||||
|
||||
return container.RemoveItem(itemId, count, itemReason, isSendClient, isDispose);
|
||||
}
|
||||
|
||||
public static uint RemoveItemByCell(Account account, ContainerType containerType, long cellId, ItemReason itemReason, bool isSendClient, bool isDispose = true)
|
||||
{
|
||||
var tryGetContainer = TryGetContainer(account, containerType, out var container);
|
||||
|
||||
if (tryGetContainer != 0)
|
||||
{
|
||||
return tryGetContainer;
|
||||
}
|
||||
|
||||
return container.RemoveItemByCell(cellId, itemReason, isSendClient, isDispose);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Sort
|
||||
|
||||
public static void Sort(Account account, ContainerType containerType)
|
||||
{
|
||||
if (TryGetContainer(account, containerType, out var container) != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
container.Sort();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ToProto
|
||||
|
||||
public static bool TryGetContainerInfo(Account account, ContainerType containerType, out ContainerInfo containerInfo)
|
||||
{
|
||||
var tryGetContainer = TryGetContainer(account, containerType, out var container);
|
||||
|
||||
if (tryGetContainer != 0)
|
||||
{
|
||||
containerInfo = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
containerInfo = container.ToContainerInfo();
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void SendAllContainerInfo(Account account)
|
||||
{
|
||||
var containerComponent = account.GetComponent<ContainerComponent>();
|
||||
|
||||
if (containerComponent == null)
|
||||
{
|
||||
Log.Error($"account {account.Id} not found ContainerComponent!");
|
||||
return;
|
||||
}
|
||||
|
||||
var g2CPushAllContainerInfo = new G2C_PushAllContainerInfo();
|
||||
foreach (var (_, container) in containerComponent.Containers)
|
||||
{
|
||||
g2CPushAllContainerInfo.Containers.Add(container.ToContainerInfo());
|
||||
}
|
||||
// 推送容器数据给客户端
|
||||
account.Session.Send(g2CPushAllContainerInfo);
|
||||
}
|
||||
|
||||
// public static void SendAllContainerInfo(Account account)
|
||||
// {
|
||||
// var containerComponent = account.GetComponent<ContainerComponent>();
|
||||
//
|
||||
// if (containerComponent == null)
|
||||
// {
|
||||
// Log.Error($"account {account.Id} not found ContainerComponent!");
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// foreach (var (_, container) in containerComponent.Containers)
|
||||
// {
|
||||
// account.Session.Send(new G2C_PushContainerInfo()
|
||||
// {
|
||||
// Container = container.ToContainerInfo()
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
#endregion
|
||||
}
|
||||
470
物品和背包的完整代码/Server/Hotfix/Gate/Container/ContainerSystem.cs
Normal file
470
物品和背包的完整代码/Server/Hotfix/Gate/Container/ContainerSystem.cs
Normal file
@@ -0,0 +1,470 @@
|
||||
using Fantasy.DataStructure.Collection;
|
||||
using Fantasy.Entitas.Interface;
|
||||
using Fantasy.Helper;
|
||||
using Fantasy.Network;
|
||||
using Fantasy.Network.Interface;
|
||||
|
||||
#pragma warning disable CS8602 // Dereference of a possibly null reference.
|
||||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
||||
#pragma warning disable CS8601 // Possible null reference assignment.
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public sealed class ContainerDestroySystem : DestroySystem<Container>
|
||||
{
|
||||
protected override void Destroy(Container self)
|
||||
{
|
||||
self.Account = null;
|
||||
self.ConfigId = 0;
|
||||
self.CurrentCellCount = 0;
|
||||
|
||||
foreach (var (_, item) in self.Items)
|
||||
{
|
||||
item.Dispose();
|
||||
}
|
||||
|
||||
self.Items.Clear();
|
||||
self.ItemsByCell.Clear();
|
||||
self.ItemsByConfigId.Clear();
|
||||
self.ItemsByType.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ContainerDeserializeSystem : DeserializeSystem<Container>
|
||||
{
|
||||
protected override void Deserialize(Container self)
|
||||
{
|
||||
foreach (var (_, item) in self.Items)
|
||||
{
|
||||
item.Deserialize(self.Scene);
|
||||
item.Container = self;
|
||||
|
||||
if (item.CellId > 0)
|
||||
{
|
||||
self.ItemsByCell.Add(item.CellId, item);
|
||||
}
|
||||
|
||||
self.ItemsByConfigId.Add(item.ConfigId, item);
|
||||
self.ItemsByType.Add(item.Config.Type, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class ContainerSystem
|
||||
{
|
||||
#region Get
|
||||
|
||||
public static bool GetItemById(this Container self, long id, out Item item)
|
||||
{
|
||||
return self.Items.TryGetValue(id, out item);
|
||||
}
|
||||
|
||||
public static bool GetItemByCell(this Container self, long cell, out Item item)
|
||||
{
|
||||
return self.ItemsByCell.TryGetValue(cell, out item);
|
||||
}
|
||||
|
||||
public static void GetItemsByConfigId(this Container self, uint configId, List<Item> items)
|
||||
{
|
||||
if (!self.ItemsByConfigId.TryGetValue(configId, out var itemList))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
items.AddRange(itemList);
|
||||
}
|
||||
|
||||
public static void GetItemsByType(this Container self, ItemType itemType, List<Item> items)
|
||||
{
|
||||
if (!self.ItemsByType.TryGetValue((uint)itemType, out var itemList))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
items.AddRange(itemList);
|
||||
}
|
||||
|
||||
public static bool IsFull(this Container self)
|
||||
{
|
||||
return self.CurrentCellCount >= self.Config.CellCount;
|
||||
}
|
||||
|
||||
public static int GetItemCount(this Container self, uint configId)
|
||||
{
|
||||
if (!self.ItemsByConfigId.TryGetValue(configId, out var itemList))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var count = 0;
|
||||
foreach (var item in itemList)
|
||||
{
|
||||
count += item.Count;
|
||||
}
|
||||
// return itemList.Sum(x => x.Count);
|
||||
return count;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Add
|
||||
|
||||
public static uint AddItem(this Container self, Item item, ItemReason itemReason, bool isSendClient)
|
||||
{
|
||||
var containerConfig = self.Config;
|
||||
if (!ContainerType.Normal.HasFlag((ContainerType)containerConfig.Type))
|
||||
{
|
||||
Log.Error($"{self.GetType().Name} is not normal container");
|
||||
return 1;
|
||||
}
|
||||
|
||||
var count = item.Count;
|
||||
var itemConfig = item.Config;
|
||||
var g2CUpdateItems = new G2C_UpdateItems();
|
||||
g2CUpdateItems.ItemReason = (int)itemReason;
|
||||
if (itemConfig.Superposed)
|
||||
{
|
||||
var superposedMax = (int)itemConfig.SuperposedMax;
|
||||
if (self.ItemsByConfigId.TryGetValue(itemConfig.Id, out var itemList))
|
||||
{
|
||||
var availableCount = superposedMax * itemList.Count;
|
||||
// 计算当前物品可以叠加的数量
|
||||
foreach (var haveItem in itemList)
|
||||
{
|
||||
availableCount -= haveItem.Count;
|
||||
}
|
||||
// 检查当前容器中是否还有空位。
|
||||
if (item.Count > availableCount && self.IsFull())
|
||||
{
|
||||
// 当前背包已满,无法添加该物品的错误码。
|
||||
// 无法叠加的数量大于物品的数量,那就表示当前物品不可以叠加到其他物品中了。
|
||||
return 2;
|
||||
}
|
||||
foreach (var haveItem in itemList)
|
||||
{
|
||||
var haveItemCount = superposedMax - haveItem.Count;
|
||||
// 如果当前物品叠加数量已经满了,那就直接找下一个同配置Id的物品。
|
||||
if (haveItemCount <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item.Count > haveItemCount)
|
||||
{
|
||||
// 如果添加的物品数量大于当前物品的可叠加数量,那就把可叠加的数量减去。
|
||||
item.Count -= haveItemCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 如果添加的物品数量小于当前物品的可叠加数量,那就表示当前物品可以把添加物品的全部叠加到当前物品中了。
|
||||
// 这样的话,只需要记录下添加物品的数量就可以了
|
||||
haveItemCount = item.Count;
|
||||
item.Count = 0;
|
||||
}
|
||||
|
||||
haveItem.Count += haveItemCount;
|
||||
g2CUpdateItems.Items.Add(haveItem.ToItemInfo());
|
||||
if (item.Count <= 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (self.IsFull())
|
||||
{
|
||||
// 当前背包已满,无法添加该物品的错误码。
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (item.Count <= 0)
|
||||
{
|
||||
item.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Container = self;
|
||||
self.CurrentCellCount++;
|
||||
self.Items.Add(item.Id, item);
|
||||
self.ItemsByType.Add(itemConfig.Type, item);
|
||||
self.ItemsByConfigId.Add(itemConfig.Id, item);
|
||||
g2CUpdateItems.Items.Add(item.ToItemInfo());
|
||||
}
|
||||
|
||||
if (isSendClient)
|
||||
{
|
||||
self.SendClient(g2CUpdateItems);
|
||||
}
|
||||
|
||||
Log.Debug($"AddItem itemReason:{itemReason} itemConfigId:{itemConfig.Id} Count:{count}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static uint AddItem(this Container self, Item item, long cellId, ItemReason itemReason, bool isSendClient)
|
||||
{
|
||||
var containerConfig = self.Config;
|
||||
if (!ContainerType.Cell.HasFlag((ContainerType)containerConfig.Type))
|
||||
{
|
||||
Log.Error($"{self.GetType().Name} is not cell container");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (self.IsFull())
|
||||
{
|
||||
// 当前背包已满,无法添加该物品的错误码。
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (self.ItemsByCell.ContainsKey(cellId))
|
||||
{
|
||||
// 该Cell已经存在物品了。
|
||||
return 3;
|
||||
}
|
||||
|
||||
var g2CUpdateItems = new G2C_UpdateItems();
|
||||
g2CUpdateItems.ItemReason = (int)itemReason;
|
||||
|
||||
var itemConfig = item.Config;
|
||||
var count = item.Count;
|
||||
item.CellId = cellId;
|
||||
item.Container = self;
|
||||
self.CurrentCellCount++;
|
||||
|
||||
self.Items.Add(item.Id, item);
|
||||
self.ItemsByCell.Add(cellId, item);
|
||||
self.ItemsByType.Add(itemConfig.Type, item);
|
||||
self.ItemsByConfigId.Add(item.ConfigId, item);
|
||||
|
||||
g2CUpdateItems.Items.Add(item.ToItemInfo());
|
||||
|
||||
if (isSendClient)
|
||||
{
|
||||
self.SendClient(g2CUpdateItems);
|
||||
}
|
||||
Log.Debug($"AddItem itemReason:{itemReason} itemConfigId:{itemConfig.Id} Count:{count}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Split
|
||||
|
||||
public static uint SplitItem(this Container self, long itemId, int count, out Item splitItem)
|
||||
{
|
||||
splitItem = null;
|
||||
|
||||
if (count <= 0)
|
||||
{
|
||||
// 要拆分的道具数量不可以小于等于0的错误码。
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (self.Items.TryGetValue(itemId, out var item))
|
||||
{
|
||||
// 没有找到物品的错误码。
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (item.Count == count)
|
||||
{
|
||||
// 要拆分的物品数量不可以和物品的数量相同的错误码。
|
||||
return 3;
|
||||
}
|
||||
|
||||
if (item.Count < count)
|
||||
{
|
||||
// 要拆分的物品数量不可以大于物品的数量的错误码。
|
||||
return 4;
|
||||
}
|
||||
|
||||
item.Count -= count;
|
||||
splitItem = ItemFactory.Create(self.Scene, item.ConfigId, count, item.IsBind);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Remove
|
||||
|
||||
public static uint RemoveItem(this Container self, Item item, ItemReason itemReason, bool isSendClient, bool isDispose = true)
|
||||
{
|
||||
var count = item.Count;
|
||||
var itemConfig = item.Config;
|
||||
self.Items.Remove(item.Id);
|
||||
self.ItemsByConfigId.RemoveValue(item.ConfigId,item);
|
||||
self.ItemsByType.RemoveValue(itemConfig.Type, item);
|
||||
var containerConfig = self.Config;
|
||||
if (ContainerType.Cell.HasFlag((ContainerType)containerConfig.Type))
|
||||
{
|
||||
self.ItemsByCell.Remove(item.CellId);
|
||||
}
|
||||
|
||||
var g2CUpdateItems = new G2C_UpdateItems();
|
||||
g2CUpdateItems.ItemReason = (int)itemReason;
|
||||
g2CUpdateItems.Items.Add(item.ToItemInfo());
|
||||
|
||||
if (isDispose)
|
||||
{
|
||||
item.Dispose();
|
||||
}
|
||||
|
||||
self.CurrentCellCount--;
|
||||
|
||||
if (isSendClient)
|
||||
{
|
||||
self.SendClient(g2CUpdateItems);
|
||||
}
|
||||
Log.Debug($"RemoveItem itemReason:{itemReason} itemConfigId:{itemConfig.Id} Count:{count}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static uint RemoveItem(this Container self, long itemId, ItemReason itemReason, bool isSendClient, bool isDispose = true)
|
||||
{
|
||||
if (!self.Items.TryGetValue(itemId, out var item))
|
||||
{
|
||||
// 移除的时候,容器里找不到该物品的错误码。
|
||||
return 1;
|
||||
}
|
||||
|
||||
return self.RemoveItem(item, itemReason, isSendClient, isDispose);
|
||||
}
|
||||
|
||||
public static uint RemoveItem(this Container self, long itemId, int count, ItemReason itemReason, bool isSendClient, bool isDispose = true)
|
||||
{
|
||||
if (!self.Items.TryGetValue(itemId, out var item))
|
||||
{
|
||||
// 移除的时候,容器里找不到该物品的错误码。
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (item.Count < count)
|
||||
{
|
||||
// 要移除的物品数量不足的错误码。
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (count < 1)
|
||||
{
|
||||
// 要移除物品的数量不能小于1的错误码。
|
||||
return 3;
|
||||
}
|
||||
|
||||
item.Count -= count;
|
||||
|
||||
if (item.Count <= 0)
|
||||
{
|
||||
return self.RemoveItem(item, itemReason, isSendClient, isDispose);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isSendClient)
|
||||
{
|
||||
var g2CUpdateItems = new G2C_UpdateItems();
|
||||
g2CUpdateItems.ItemReason = (int)itemReason;
|
||||
g2CUpdateItems.Items.Add(item.ToItemInfo());
|
||||
self.SendClient(g2CUpdateItems);
|
||||
}
|
||||
Log.Debug($"RemoveItem itemReason:{itemReason} itemConfigId:{item.ConfigId} Count:{count}");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static uint RemoveItemByCell(this Container self, long cellId, ItemReason itemReason, bool isSendClient, bool isDispose = true)
|
||||
{
|
||||
if (!self.ItemsByCell.TryGetValue(cellId, out var item))
|
||||
{
|
||||
// 移除的时候,容器里找不到该物品的错误码。
|
||||
return 1;
|
||||
}
|
||||
|
||||
return self.RemoveItem(item, itemReason, isSendClient, isDispose);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Sort
|
||||
|
||||
public static void Sort(this Container self)
|
||||
{
|
||||
// 这里排序一般服务器不会排序,也可以说是很少用排序.
|
||||
// 一般都是让客户端做好这个排序。
|
||||
// 如果用服务器排序会出现如下几种情况:
|
||||
// 1、排序好了后,要下发给客户端,很有可能会把当前容器里的所有物品全部下发给客户端。
|
||||
// 2、如果频繁排序的话,服务器的压力就会很大。
|
||||
// 3、因为移动端很少有那种格子空一个然后再有物品的情况,所以可以不用考虑空格子的情况。
|
||||
// 如果是PC端,需要格子有空位的,这时候服务器可以考虑排序了。
|
||||
using (var list = ListPool<Item>.Create())
|
||||
{
|
||||
list.AddRange(self.Items.Values);
|
||||
list.Sort(SortCompare);
|
||||
self.Items.Clear();
|
||||
for (var i = 0; i < list.Count; i++)
|
||||
{
|
||||
var item = list[i];
|
||||
self.Items.Add(item.Id,item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static int SortCompare(Item a, Item b)
|
||||
{
|
||||
// 升序排列(从小到大)
|
||||
// 3 1 2 排序后就是1 2 3
|
||||
// < 0 那就是a 在 b 的前面
|
||||
// = 0 那就是a 和 b 相等,顺序不变
|
||||
// > 0 那就 a 在 b 的后面
|
||||
var aConfig = a.Config;
|
||||
var bConfig = b.Config;
|
||||
var aWeight = aConfig.Weight;
|
||||
var bWeight = bConfig.Weight;
|
||||
// 这里还可以增加一些自定义的逻辑
|
||||
// 比如:按照物品创建时间、是否绑定、出售价格等等。
|
||||
// 这里的话就按照需求自己扩展把。
|
||||
if (a.IsBind != b.IsBind)
|
||||
{
|
||||
// 比如这里要做一个需求是绑定的排在前面.
|
||||
return a.IsBind ? -1 : 1;
|
||||
}
|
||||
if (aWeight == bWeight)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (aWeight > bWeight)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ToProto
|
||||
|
||||
public static ContainerInfo ToContainerInfo(this Container self)
|
||||
{
|
||||
var containerInfo = new ContainerInfo()
|
||||
{
|
||||
ConfigId = (int)self.ConfigId,
|
||||
CurrentCellCount = self.CurrentCellCount
|
||||
};
|
||||
|
||||
foreach (var (_, item) in self.Items)
|
||||
{
|
||||
containerInfo.Items.Add(item.ToItemInfo());
|
||||
}
|
||||
|
||||
return containerInfo;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private static void SendClient(this Container self, IMessage message)
|
||||
{
|
||||
self.Account.GetParent<Session>().Send(message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
using Fantasy.Entitas;
|
||||
using Fantasy.Entitas.Interface;
|
||||
using Fantasy.Helper;
|
||||
|
||||
namespace Fantasy.Equip;
|
||||
|
||||
public class EquipComponentAwakeSystem : AwakeSystem<EquipComponent>
|
||||
{
|
||||
protected override void Awake(EquipComponent self)
|
||||
{
|
||||
self.Awake();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class EquipComponentDestroySystem : DestroySystem<EquipComponent>
|
||||
{
|
||||
protected override void Destroy(EquipComponent self)
|
||||
{
|
||||
foreach (var (_, value) in self.MainAttrs)
|
||||
{
|
||||
value.Dispose();
|
||||
}
|
||||
foreach (var (_, value) in self.EntryAttrs)
|
||||
{
|
||||
value.Dispose();
|
||||
}
|
||||
self.Affixs.Clear();
|
||||
self.MainAttrs.Clear();
|
||||
self.EntryAttrs.Clear();
|
||||
self.Durable = 0;
|
||||
self.DurableMax = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class EquipAttrDestroySystem : DestroySystem<EquipAttr>
|
||||
{
|
||||
protected override void Destroy(EquipAttr self)
|
||||
{
|
||||
self.Key = 0;
|
||||
self.Value = 0;
|
||||
self.SValue = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static class EquipComponentSystem
|
||||
{
|
||||
public static void Awake(this EquipComponent self)
|
||||
{
|
||||
var item = self.GetParent<Item>();
|
||||
var itemConfig = item.Config;
|
||||
// 设置装备的耐久
|
||||
self.Durable = itemConfig.Durable;
|
||||
self.DurableMax = self.Durable;
|
||||
// 获取装备品质主属性方案
|
||||
if (!EquipValueConfigData.Instance.TryGetValue(itemConfig.Id, itemConfig.Quality, out var equipValueConfig))
|
||||
{
|
||||
// 没有找到主属性方案,需要检查代码或配置表是否正确。
|
||||
// 到这里的话就不需要继续执行了。
|
||||
return;
|
||||
}
|
||||
// 设置主属性
|
||||
self.InitMainAttrs(itemConfig, equipValueConfig);
|
||||
// 设置附加(副)属性
|
||||
self.InitEntryAttrs(itemConfig, equipValueConfig);
|
||||
// 设置词缀
|
||||
self.InitAffix(itemConfig, equipValueConfig);
|
||||
}
|
||||
|
||||
private static void InitMainAttrs(this EquipComponent self, ItemConfig itemConfig, EquipValueConfig equipValueConfig)
|
||||
{
|
||||
self.MainAttrs.Clear();
|
||||
// 循环遍历主属性。
|
||||
foreach (var (key, value) in equipValueConfig.MainAttrs.Dic)
|
||||
{
|
||||
var equipAttr = Entity.Create<EquipAttr>(self.Scene, true, true);
|
||||
equipAttr.Key = key;
|
||||
equipAttr.Value = value;
|
||||
self.MainAttrs.Add(key, equipAttr);
|
||||
}
|
||||
// 这里还可以加一些其他的需求。
|
||||
}
|
||||
|
||||
private static void InitEntryAttrs(this EquipComponent self, ItemConfig itemConfig, EquipValueConfig equipValueConfig)
|
||||
{
|
||||
var equipEntryConfigId = equipValueConfig.EquipEntryConfigId;
|
||||
// 很有可能当前的装备没有附加(副)属性,所以如果为默认值的情况下就不进行下面的逻辑。
|
||||
if (equipEntryConfigId == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// 还有一种可能是设置的副(附加)属性不存在,一般这样的情况下都是策划配置的错误,这里的话也不进行下面的逻辑了。
|
||||
if (!EquipEntryConfigData.Instance.TryGet(equipEntryConfigId, out var equipEntryConfig))
|
||||
{
|
||||
// 也可以在这里打印出一个错误,方便排查,找到这个错误告诉策划,让策划修改下。
|
||||
// (推荐做法)也可以一个单独的Scene,在这里Scene里把这些所有配置加载出来,按个的排查,如果有错误就打印出来。
|
||||
return;
|
||||
}
|
||||
self.EntryAttrs.Clear();
|
||||
// 这里可以用权重来控制随机的数量和属性,但是这里就不演示的。
|
||||
// 这里就是用直接的随机来做来了。
|
||||
var entryCount = RandomHelper.RandomNumber(equipEntryConfig.Min, equipEntryConfig.Max);
|
||||
// 获得当前随机附加属性的列表
|
||||
var configAttrs = equipEntryConfig.Attrs;
|
||||
var entryIndex = 0;
|
||||
for (var i = 0; i < entryCount; i++)
|
||||
{
|
||||
var equipAttr = Entity.Create<EquipAttr>(self.Scene, true, true);
|
||||
equipAttr.Key = configAttrs[entryIndex];
|
||||
equipAttr.Value = RandomHelper.RandomNumber(configAttrs[entryIndex + 1], configAttrs[entryIndex + 2]);
|
||||
self.EntryAttrs.Add(equipAttr.Key, equipAttr);
|
||||
}
|
||||
}
|
||||
|
||||
private static void InitAffix(this EquipComponent self, ItemConfig itemConfig, EquipValueConfig equipValueConfig)
|
||||
{
|
||||
var equipEntryConfigId = equipValueConfig.EquipEntryConfigId;
|
||||
|
||||
if (equipEntryConfigId == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!EquipEntryConfigData.Instance.TryGet(equipEntryConfigId, out var equipEntryConfig))
|
||||
{
|
||||
// 也可以在这里打印出一个错误,方便排查,找到这个错误告诉策划,让策划修改下。
|
||||
// (推荐做法)也可以一个单独的Scene,在这里Scene里把这些所有配置加载出来,按个的排查,如果有错误就打印出来。
|
||||
return;
|
||||
}
|
||||
|
||||
if (equipEntryConfig.Affix.Length == 0)
|
||||
{
|
||||
// 有可能没有词缀,所以这里就不进行下面的逻辑了。
|
||||
return;
|
||||
}
|
||||
|
||||
// 随机词缀的数量
|
||||
// 这里还是只做最简单的随机,如果想加权重的随机,可以自己实现下。
|
||||
var configAffix = equipEntryConfig.Affix;
|
||||
var affixCount = RandomHelper.RandomNumber(equipEntryConfig.AffixMin, equipEntryConfig.AffixMax);
|
||||
for (var i = 0; i < affixCount; i++)
|
||||
{
|
||||
self.Affixs.Add(configAffix[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public static EquipInfo ToEquipInfo(this EquipComponent self)
|
||||
{
|
||||
var equipInfo = new EquipInfo();
|
||||
equipInfo.Durable = self.Durable;
|
||||
equipInfo.DurableMax = self.DurableMax;
|
||||
|
||||
foreach (var (key,equipAttr) in self.MainAttrs)
|
||||
{
|
||||
equipInfo.MainKeys.Add(key);
|
||||
equipInfo.EquipAttrKeys.Add(key);
|
||||
equipInfo.EquipAttrValues.Add(equipAttr.Value);
|
||||
equipInfo.EquipAttrSValues.Add(equipAttr.SValue);
|
||||
}
|
||||
|
||||
return equipInfo;
|
||||
}
|
||||
}
|
||||
137
物品和背包的完整代码/Server/Hotfix/Gate/Container/Equip/EquipHelper.cs
Normal file
137
物品和背包的完整代码/Server/Hotfix/Gate/Container/Equip/EquipHelper.cs
Normal file
@@ -0,0 +1,137 @@
|
||||
namespace Fantasy;
|
||||
|
||||
public static class EquipHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 装载一个装备
|
||||
/// </summary>
|
||||
/// <param name="account"></param>
|
||||
/// <param name="mountEquipItem"></param>
|
||||
/// <returns></returns>
|
||||
public static uint MountEquip(Account account, Item mountEquipItem)
|
||||
{
|
||||
var itemConfig = mountEquipItem.Config;
|
||||
|
||||
if (!itemConfig.IsEquip())
|
||||
{
|
||||
// 这里返回的是不是装备的错误码。
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (mountEquipItem.Container.Config.Type != (int)ContainerType.Bag)
|
||||
{
|
||||
// 只有在背包里的物品才可以装备到装备栏里的错误码。
|
||||
return 2;
|
||||
}
|
||||
|
||||
var mountEquipPosition = itemConfig.Position;
|
||||
// 如果在目标装备栏上有装备,那就先卸载装备。
|
||||
UnMountEquip(account, (EquipPosition)mountEquipPosition, true);
|
||||
// 下面要执行把装备添加到装备栏上。
|
||||
// 先在背包中移除该装备,因为已经得到了装备了,所以可以直接通过物品拿到背包的容器。
|
||||
var removeItem = mountEquipItem.Container.RemoveItem(mountEquipItem, ItemReason.MountEquipRemove, true, false);
|
||||
if (removeItem != 0)
|
||||
{
|
||||
// 移除装备的时候,发生了错误,直接返回错误码。
|
||||
return removeItem;
|
||||
}
|
||||
// 把装备添加到对应的装备栏上。
|
||||
var addItem = ContainerHelper.AddItem(account, ContainerType.Equip, mountEquipItem, mountEquipPosition,
|
||||
ItemReason.MountEquipAdd, true);
|
||||
if (addItem != 0)
|
||||
{
|
||||
// 添加装备的时候,发生了错误,直接返回错误码。
|
||||
return addItem;
|
||||
}
|
||||
// 这里要执行添加装备后,因为装备有增加属性或词缀Buff,所以需要在添加的时候把这些也要给添加下。
|
||||
// 因为本课程胡总没有数值系统和Buff系统,所以这里就不处理了。
|
||||
Log.Debug($"执行了装备装备的效果逻辑。");
|
||||
Log.Debug($"装载装备完成。mountEquipItem:{mountEquipItem.Id}");
|
||||
// 可以合包优化下这个协议的数量,优化成一个,能节省流量。
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 卸载一个装备
|
||||
/// </summary>
|
||||
/// <param name="account"></param>
|
||||
/// <param name="equipPosition"></param>
|
||||
/// <param name="isSendClient"></param>
|
||||
/// <returns></returns>
|
||||
public static uint UnMountEquip(Account account, EquipPosition equipPosition, bool isSendClient)
|
||||
{
|
||||
if (!ContainerHelper.GetItemByCell(account, ContainerType.Equip, (long)equipPosition, out var unMountEquipItem))
|
||||
{
|
||||
// 没有找到该位置的装备的错误码。
|
||||
return 1;
|
||||
}
|
||||
|
||||
return UnMountEquip(account, unMountEquipItem, isSendClient);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 卸载一个装备
|
||||
/// </summary>
|
||||
/// <param name="account"></param>
|
||||
/// <param name="unMountEquipItem"></param>
|
||||
/// <param name="isSendClient"></param>
|
||||
/// <returns></returns>
|
||||
public static uint UnMountEquip(Account account, Item unMountEquipItem, bool isSendClient)
|
||||
{
|
||||
// 首先在装备栏容器中移除装备。
|
||||
var removeItem = unMountEquipItem.Container.RemoveItem(unMountEquipItem, ItemReason.UnMountEquipRemove, isSendClient, false);
|
||||
if (removeItem != 0)
|
||||
{
|
||||
// 移除失败了,要返回错误码,就不要执行后面的程序了。
|
||||
return removeItem;
|
||||
}
|
||||
// 这里要执行移除装备后,因为装备有增加属性或词缀Buff,所以需要在移除的时候把这些也要给移除下。
|
||||
// 因为本课程胡总没有数值系统和Buff系统,所以这里就不处理了。
|
||||
// 把移除成功的装备再次添加到背包容器中。
|
||||
Log.Debug("执行了装备卸载的效果逻辑。");
|
||||
return ContainerHelper.AddItem(account, ContainerType.Bag, unMountEquipItem, ItemReason.UnMountEquipAdd, isSendClient);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据装备的位置获取装备
|
||||
/// </summary>
|
||||
/// <param name="account"></param>
|
||||
/// <param name="equipPosition"></param>
|
||||
/// <param name="item"></param>
|
||||
/// <returns></returns>
|
||||
public static bool GetEquipItem(Account account, EquipPosition equipPosition, out Item item)
|
||||
{
|
||||
return ContainerHelper.GetItemByCell(account, ContainerType.Equip, (long)equipPosition, out item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否是装备
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsEquip(this Item item)
|
||||
{
|
||||
return item.Config.IsEquip();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得装备所在的装备栏位置
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <returns></returns>
|
||||
public static EquipPosition GetEquipPosition(this Item item)
|
||||
{
|
||||
return (EquipPosition)item.GetEquipPositionInt();
|
||||
}
|
||||
|
||||
private static int GetEquipPositionInt(this Item item)
|
||||
{
|
||||
return item.Config.Position;
|
||||
}
|
||||
|
||||
private static bool IsEquip(this ItemConfig itemConfig)
|
||||
{
|
||||
var configType = (ItemType)itemConfig.Type;
|
||||
return configType == ItemType.Equip;
|
||||
}
|
||||
}
|
||||
44
物品和背包的完整代码/Server/Hotfix/Gate/Container/ItemSystem.cs
Normal file
44
物品和背包的完整代码/Server/Hotfix/Gate/Container/ItemSystem.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using Fantasy.Entitas.Interface;
|
||||
using Fantasy.Equip;
|
||||
// ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
|
||||
#pragma warning disable CS8601 // Possible null reference assignment.
|
||||
|
||||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public sealed class ItemDestroySystem : DestroySystem<Item>
|
||||
{
|
||||
protected override void Destroy(Item self)
|
||||
{
|
||||
self.CellId = 0;
|
||||
self.Count = 0;
|
||||
self.ConfigId = 0;
|
||||
self.Container = null;
|
||||
self.IsBind = false;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ItemSystem
|
||||
{
|
||||
public static ItemInfo ToItemInfo(this Item self)
|
||||
{
|
||||
// 创建基础的物品信息
|
||||
var mItemInfo = new ItemInfo()
|
||||
{
|
||||
ItemId = self.Id,
|
||||
CellId = self.CellId,
|
||||
Count = self.Count,
|
||||
IsBind = self.IsBind,
|
||||
ConfigId = (int)self.ConfigId,
|
||||
Container = self.Container.Config.Type
|
||||
};
|
||||
// 添加装备信息
|
||||
var equipComponent = self.GetComponent<EquipComponent>();
|
||||
if (equipComponent != null)
|
||||
{
|
||||
mItemInfo.EquipInfo = equipComponent.ToEquipInfo();
|
||||
}
|
||||
return mItemInfo;
|
||||
}
|
||||
}
|
||||
73
物品和背包的完整代码/Server/Hotfix/Gate/Container/ItemUseHelper.cs
Normal file
73
物品和背包的完整代码/Server/Hotfix/Gate/Container/ItemUseHelper.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
||||
namespace Fantasy;
|
||||
|
||||
public static class ItemUseHelper
|
||||
{
|
||||
public static uint UseBagItem(Account account, long itemId, int count)
|
||||
{
|
||||
return UseItem(account, ContainerType.Bag, itemId, count);
|
||||
}
|
||||
|
||||
public static uint CanUseBagItem(Account account, long itemId, int count, out Container container, out ItemConfig itemConfig, out ItemUseComponent itemUseComponent)
|
||||
{
|
||||
return CanUseItem(account, ContainerType.Bag, itemId, count, out container, out itemConfig, out itemUseComponent);
|
||||
}
|
||||
|
||||
public static uint UseItem(Account account, ContainerType containerType, long itemId, int count)
|
||||
{
|
||||
var errorCode = CanUseItem(account, containerType, itemId, count, out var container, out var itemConfig, out var itemUseComponent);
|
||||
|
||||
if (errorCode != 0)
|
||||
{
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
errorCode = container.RemoveItem(itemId, count, ItemReason.ItemUse, true);
|
||||
|
||||
if (errorCode != 0)
|
||||
{
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
itemUseComponent.Use(account, itemConfig, ref count);
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static uint CanUseItem(Account account, ContainerType containerType, long itemId, int count, out Container container, out ItemConfig itemConfig, out ItemUseComponent itemUseComponent)
|
||||
{
|
||||
itemConfig = null;
|
||||
itemUseComponent = null;
|
||||
var errorCode = ContainerHelper.TryGetContainer(account, containerType, out container);
|
||||
|
||||
if (errorCode != 0)
|
||||
{
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
if (!container.GetItemById(itemId, out var item))
|
||||
{
|
||||
// 这里是找不到该物品的错误码。
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (item.Count < count)
|
||||
{
|
||||
// 这里是物品数量不足的错误码。
|
||||
return 2;
|
||||
}
|
||||
|
||||
itemConfig = item.Config;
|
||||
|
||||
if (itemConfig.Params.Length <= 0)
|
||||
{
|
||||
// 这里是物品没有配置参数的错误码。
|
||||
return 3;
|
||||
}
|
||||
|
||||
// 这里还可以增加一些其他的判定,比如物品是否过期,物品是否被锁定等。
|
||||
// 甚至还有物品使用的CD。
|
||||
// 使用物品效果来判定
|
||||
itemUseComponent = account.Scene.GetComponent<ItemUseComponent>();
|
||||
return itemUseComponent.CanUse(account, item.Config, ref count);
|
||||
}
|
||||
}
|
||||
14
物品和背包的完整代码/Server/Hotfix/Gate/Entity/AccountSystem.cs
Normal file
14
物品和背包的完整代码/Server/Hotfix/Gate/Entity/AccountSystem.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Fantasy.Entitas.Interface;
|
||||
|
||||
namespace Fantasy.Gate.Entity;
|
||||
|
||||
public sealed class AccountSystemDestroySystem : DestroySystem<Account>
|
||||
{
|
||||
protected override void Destroy(Account self)
|
||||
{
|
||||
self.Session = null;
|
||||
self.UserName = null;
|
||||
self.Password = null;
|
||||
self.ConfigId = 0;
|
||||
}
|
||||
}
|
||||
116
物品和背包的完整代码/Server/Hotfix/Gate/Helper/ItemFactory.cs
Normal file
116
物品和背包的完整代码/Server/Hotfix/Gate/Helper/ItemFactory.cs
Normal file
@@ -0,0 +1,116 @@
|
||||
using Fantasy.Entitas;
|
||||
#pragma warning disable CS8603 // Possible null reference return.
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public static class ItemFactory
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建一个物品
|
||||
/// </summary>
|
||||
/// <param name="scene"></param>
|
||||
/// <param name="configId"></param>
|
||||
/// <param name="count"></param>
|
||||
/// <param name="isBind"></param>
|
||||
/// <returns></returns>
|
||||
public static Item Create(Scene scene, uint configId, int count, bool isBind)
|
||||
{
|
||||
var itemConfig = ItemConfigData.Instance.Get(configId);
|
||||
|
||||
if (itemConfig.Superposed)
|
||||
{
|
||||
if (itemConfig.SuperposedMax < count)
|
||||
{
|
||||
Log.Error($"物品{itemConfig.Name} 最大叠加数量为{itemConfig.SuperposedMax},不能超过{count}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (count > 1)
|
||||
{
|
||||
Log.Error($"物品{itemConfig.Name} 不支持叠加,不能超过1个");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
var item = Entity.Create<Item>(scene, true, true);
|
||||
item.ConfigId = configId;
|
||||
item.Count = count;
|
||||
item.IsBind = isBind;
|
||||
|
||||
// 根据物品的类型单独的做一些处理
|
||||
|
||||
switch ((ItemType)itemConfig.Type)
|
||||
{
|
||||
case ItemType.Drug:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case ItemType.Equip:
|
||||
{
|
||||
// 装备的要挂载装备组件。
|
||||
item.AddComponent<EquipComponent>();
|
||||
break;
|
||||
}
|
||||
case ItemType.Prop:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case ItemType.Garbage:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量创建物品
|
||||
/// </summary>
|
||||
/// <param name="scene"></param>
|
||||
/// <param name="itemCreateParamsList"></param>
|
||||
/// <param name="items"></param>
|
||||
public static void Create(Scene scene, List<ItemCreateParams> itemCreateParamsList, List<Item> items)
|
||||
{
|
||||
// 也可以用Foreach,但是性能会差一点点。
|
||||
// for和Foreach性能差距非常小,尤其是在现在的CPU用,但如果在高频繁使用的场景下,for提升会明显一些。
|
||||
// 不要纠结到底是用for还是Foreach,因为两者性能差距非常小,而且Foreach更简洁。
|
||||
// 以下是一个简单性能对比(处理 1000 万元素的 List<int>):
|
||||
// for 循环 ~50 ms
|
||||
// foreach 循环 ~70 ms
|
||||
// for 循环快约 20-30%(因硬件和 .NET 版本而异)。
|
||||
|
||||
// 为什么 for 更快?
|
||||
// 直接索引访问:List<T> 底层是数组,索引访问是 O(1) 操作。
|
||||
// 避免迭代器开销:foreach 需要调用 MoveNext() 和 Current,隐含版本检查(防止遍历时集合被修改)。
|
||||
|
||||
// 什么时候用 foreach?
|
||||
// 代码简洁性优先:不需要索引时,foreach 更易读。
|
||||
// 复杂集合类型:对于非 List<T> 的集合(如 IEnumerable<T> 或字典),foreach 可能更高效,因为某些集合的索引访问是 O(n)(如 LinkedList<T>)。
|
||||
|
||||
// 优化建议
|
||||
// 优先选择 for:如果性能敏感且需要高频遍历大规模数据。
|
||||
// 使用 foreach:如果代码可读性更重要,或遍历非数组结构的集合。
|
||||
// 避免在 List<T> 中使用 foreach 的陷阱:
|
||||
// 如果遍历过程中修改集合(如增删元素),会触发 InvalidOperationException。
|
||||
// 对值类型集合(如 List<struct>),foreach 可能涉及装箱(但 List<T> 的 Enumerator 是结构体,不会发生装箱)。
|
||||
|
||||
// 高级场景
|
||||
// Span<T> 或数组:对于 Span<T> 或原生数组,for 循环可以进一步优化为 SIMD 指令。
|
||||
|
||||
// for (var index = 0; index < itemCreateParamsList.Count; index++)
|
||||
// {
|
||||
// var itemCreateParams = itemCreateParamsList[index];
|
||||
// var item = Create(scene, itemCreateParams.ConfigId, itemCreateParams.Count, itemCreateParams.IsBind);
|
||||
// items.Add(item);
|
||||
// }
|
||||
|
||||
foreach (var itemCreateParams in itemCreateParamsList)
|
||||
{
|
||||
var item = Create(scene, itemCreateParams.ConfigId, itemCreateParams.Count, itemCreateParams.IsBind);
|
||||
items.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
25
物品和背包的完整代码/Server/Hotfix/Gate/Helper/UnitFactory.cs
Normal file
25
物品和背包的完整代码/Server/Hotfix/Gate/Helper/UnitFactory.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Fantasy.Entitas;
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public static class UnitFactory
|
||||
{
|
||||
public static Account CreatePlayer(Scene scene, uint configId, string userName, string password)
|
||||
{
|
||||
var account = Entity.Create<Account>(scene, true, true);
|
||||
account.ConfigId = configId;
|
||||
account.UserName = userName;
|
||||
account.Password = password;
|
||||
// 挂载容器组件
|
||||
account.AddComponent<ContainerComponent>();
|
||||
return account;
|
||||
}
|
||||
|
||||
public static Account CreateMonster(Scene scene, uint configId)
|
||||
{
|
||||
var account = Entity.Create<Account>(scene, true, true);
|
||||
// 挂载容器组件
|
||||
account.AddComponent<ContainerComponent>();
|
||||
return account;
|
||||
}
|
||||
}
|
||||
27
物品和背包的完整代码/Server/Hotfix/Gate/ItemUseEffect/ItemUse_Drug.cs
Normal file
27
物品和背包的完整代码/Server/Hotfix/Gate/ItemUseEffect/ItemUse_Drug.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
namespace Fantasy;
|
||||
|
||||
[ItemUse(ItemUseEffect.AddAttr)]
|
||||
public class ItemUse_Drug_AddAttr : IItemUse
|
||||
{
|
||||
public uint CanUse(Account account, ItemConfig config, ref int count)
|
||||
{
|
||||
if (config.Params.Length < 2)
|
||||
{
|
||||
Log.Error($"configId:{config.Id} config.Params.Length({config.Params.Length}) < 2");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Log.Debug($"CanUse 使用了药品增加属性 configId:{config.Id} count:{count}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void Use(Account account, ItemConfig config, ref int count)
|
||||
{
|
||||
for (int i = 0; i < config.Params.Length; i += 2)
|
||||
{
|
||||
var attrKey = config.Params[i];
|
||||
var attrValue = config.Params[i + 1];
|
||||
Log.Debug($"Use 使用了药品增加属性 configId:{config.Id} attrKey:{attrKey} attrValue:{attrValue}");
|
||||
}
|
||||
}
|
||||
}
|
||||
16
物品和背包的完整代码/Server/Hotfix/Gate/ItemUseEffect/ItemUse_Equip.cs
Normal file
16
物品和背包的完整代码/Server/Hotfix/Gate/ItemUseEffect/ItemUse_Equip.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace Fantasy;
|
||||
|
||||
[ItemUse(ItemUseEffect.Equip)]
|
||||
public class ItemUse_Equip_Equip : IItemUse
|
||||
{
|
||||
public uint CanUse(Account account, ItemConfig config, ref int count)
|
||||
{
|
||||
Log.Debug($"CanUse 使用了装备装备到身上 configId:{config.Id} count:{count}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void Use(Account account, ItemConfig config, ref int count)
|
||||
{
|
||||
Log.Debug($"Use 使用了装备装备到身上 configId:{config.Id} count:{count}");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using Fantasy.Async;
|
||||
using Fantasy.Network;
|
||||
using Fantasy.Network.Interface;
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public sealed class C2G_GameInitCompleteRequestHandler : MessageRPC<C2G_GameInitCompleteRequest, G2C_GameInitCompleteResponse>
|
||||
{
|
||||
protected override async FTask Run(Session session, C2G_GameInitCompleteRequest request, G2C_GameInitCompleteResponse response, Action reply)
|
||||
{
|
||||
var account = session.GetComponent<Account>();
|
||||
var requestPushContainer = request.PushContainer;
|
||||
var requestPushUnitInfo = request.PushUnitInfo;
|
||||
var requestAoi = request.Aoi;
|
||||
// 当调用reply方法的时候,就会马上返回G2C_GameInitCompleteResponse消息给客户端了。
|
||||
// 这时候客户端await等待就会继续执行。
|
||||
reply();
|
||||
// 比如这个代码就是推送给客户端的。
|
||||
if (requestPushContainer)
|
||||
{
|
||||
// 推送容器的数据给客户端。
|
||||
ContainerHelper.SendAllContainerInfo(account);
|
||||
}
|
||||
await FTask.CompletedTask;
|
||||
}
|
||||
}
|
||||
41
物品和背包的完整代码/Server/Hotfix/Handler/C2G_LoginRequestHandler.cs
Normal file
41
物品和背包的完整代码/Server/Hotfix/Handler/C2G_LoginRequestHandler.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using Fantasy.Async;
|
||||
using Fantasy.Entitas;
|
||||
using Fantasy.Network;
|
||||
using Fantasy.Network.Interface;
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public class C2G_LoginRequestHandler : MessageRPC<C2G_LoginRequest, G2C_LoginResponse>
|
||||
{
|
||||
protected override async FTask Run(Session session, C2G_LoginRequest request, G2C_LoginResponse response, Action reply)
|
||||
{
|
||||
// 由于本课程中,主要讲解的是物品和背包的内容,所以这里就简单的创建了一个登陆逻辑。
|
||||
// 这个登陆逻辑,并不能用于商用,只是为了当前的课程服务的临时。
|
||||
// 如果想学习完整的注册登陆的流程,建议关注下我的注册登陆的课程。
|
||||
var scene = session.Scene;
|
||||
// 再数据库中查询用户名和密码是否存在。
|
||||
var account = await scene.World.DataBase.First<Account>(d =>
|
||||
d.UserName == request.UserName && d.Password == request.PassWord, true);
|
||||
if (account == null)
|
||||
{
|
||||
// 如果没有就创建一个新的实体,并且保存到数据库中。
|
||||
account = UnitFactory.CreatePlayer(scene, 1, request.UserName, request.PassWord);
|
||||
// account = Entity.Create<Account>(scene, true, true);
|
||||
// account.UserName = request.UserName;
|
||||
// account.Password = request.PassWord;
|
||||
// // 增加背包组件
|
||||
// var bagComponent = account.AddComponent<BagComponent>();
|
||||
// // 创建一个临时物品,并且放入到临时背包中
|
||||
// var item = ItemFactory.Create(scene, 1, 1, true);
|
||||
// bagComponent.AddItem(item);
|
||||
// 把实体保存到数据库中。
|
||||
await scene.World.DataBase.Save(account);
|
||||
}
|
||||
// 把当前账号添加到Session下,好处有下面的几个方面:
|
||||
// 1、客在Session下很方便的获得到当前账号。
|
||||
// 2、当Session断开了,也就是客户端跟服务器断开连接了,会自动执行小伙这个Account。
|
||||
account.Session = session;
|
||||
session.AddComponent(account);
|
||||
Log.Debug($"登陆成功 UserName:{request.UserName} Password:{request.PassWord}");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using Fantasy.Async;
|
||||
using Fantasy.Network;
|
||||
using Fantasy.Network.Interface;
|
||||
// ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public sealed class C2G_StartCreateItemHandler : Message<C2G_StartCreateItem>
|
||||
{
|
||||
// protected override async FTask Run(Session session, C2G_StartCreateItem message)
|
||||
// {
|
||||
// var account = session.GetComponent<Account>();
|
||||
//
|
||||
// if (account == null)
|
||||
// {
|
||||
// session.Dispose();
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// var item = ItemFactory.Create(session.Scene, 1000001, 1, true);
|
||||
// var addItemErrorCode = ContainerHelper.AddItem(account, ContainerType.Bag, item, ItemReason.ItemTestAdd, true);
|
||||
// Log.Debug($"addItemErrorCode:{addItemErrorCode}");
|
||||
// await session.Scene.World.DataBase.Save(account);
|
||||
// await FTask.CompletedTask;
|
||||
// }
|
||||
|
||||
protected override async FTask Run(Session session, C2G_StartCreateItem message)
|
||||
{
|
||||
var account = session.GetComponent<Account>();
|
||||
|
||||
if (account == null)
|
||||
{
|
||||
session.Dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
var items = new List<Item>();
|
||||
ContainerHelper.GetItemsByConfigId(account, ContainerType.Bag, 1000001, items);
|
||||
Log.Debug($"MountEquip:{EquipHelper.MountEquip(account, items[0])}");
|
||||
await session.Scene.World.DataBase.Save(account);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using Fantasy.Async;
|
||||
using Fantasy.Network;
|
||||
using Fantasy.Network.Interface;
|
||||
// ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public class C2G_UseItemRequestHandler : MessageRPC<C2G_UseItemRequest, G2C_UseItemResponse>
|
||||
{
|
||||
protected override async FTask Run(Session session, C2G_UseItemRequest request, G2C_UseItemResponse response, Action reply)
|
||||
{
|
||||
var account = session.GetComponent<Account>();
|
||||
|
||||
if (account == null)
|
||||
{
|
||||
session.Dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
response.ErrorCode = ItemUseHelper.UseItem(account, (ContainerType)request.ContainerType, request.ItemId, request.Count);
|
||||
await FTask.CompletedTask;
|
||||
}
|
||||
}
|
||||
13
物品和背包的完整代码/Server/Hotfix/Hotfix.csproj
Normal file
13
物品和背包的完整代码/Server/Hotfix/Hotfix.csproj
Normal file
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Entity\Entity.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
25
物品和背包的完整代码/Server/Hotfix/OnCreateScene_Init.cs
Normal file
25
物品和背包的完整代码/Server/Hotfix/OnCreateScene_Init.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Fantasy.Async;
|
||||
using Fantasy.Event;
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public sealed class OnCreateScene_Init : AsyncEventSystem<OnCreateScene>
|
||||
{
|
||||
protected override async FTask Handler(OnCreateScene self)
|
||||
{
|
||||
var scene = self.Scene;
|
||||
switch (scene.SceneType)
|
||||
{
|
||||
case SceneType.Gate:
|
||||
{
|
||||
// 添加物品使用分发的组件
|
||||
await scene.AddComponent<ItemUseComponent>().Initialize();
|
||||
break;
|
||||
}
|
||||
case SceneType.Chat:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
物品和背包的完整代码/Server/Hotfix/bin/Debug/net8.0/Entity.dll
Normal file
BIN
物品和背包的完整代码/Server/Hotfix/bin/Debug/net8.0/Entity.dll
Normal file
Binary file not shown.
BIN
物品和背包的完整代码/Server/Hotfix/bin/Debug/net8.0/Entity.pdb
Normal file
BIN
物品和背包的完整代码/Server/Hotfix/bin/Debug/net8.0/Entity.pdb
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
物品和背包的完整代码/Server/Hotfix/bin/Debug/net8.0/Fantasy-Net.dll
Normal file
BIN
物品和背包的完整代码/Server/Hotfix/bin/Debug/net8.0/Fantasy-Net.dll
Normal file
Binary file not shown.
BIN
物品和背包的完整代码/Server/Hotfix/bin/Debug/net8.0/Fantasy-Net.pdb
Normal file
BIN
物品和背包的完整代码/Server/Hotfix/bin/Debug/net8.0/Fantasy-Net.pdb
Normal file
Binary file not shown.
377
物品和背包的完整代码/Server/Hotfix/bin/Debug/net8.0/Hotfix.deps.json
Normal file
377
物品和背包的完整代码/Server/Hotfix/bin/Debug/net8.0/Hotfix.deps.json
Normal file
@@ -0,0 +1,377 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v8.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v8.0": {
|
||||
"Hotfix/1.0.0": {
|
||||
"dependencies": {
|
||||
"Entity": "1.0.0",
|
||||
"Fantasy-Net.ConfigTable.Reference": "1.0.0.0",
|
||||
"Fantasy-Net.Reference": "1.0.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"Hotfix.dll": {}
|
||||
}
|
||||
},
|
||||
"CommandLineParser/2.9.1": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/CommandLine.dll": {
|
||||
"assemblyVersion": "2.9.1.0",
|
||||
"fileVersion": "2.9.1.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DnsClient/1.6.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Win32.Registry": "5.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net5.0/DnsClient.dll": {
|
||||
"assemblyVersion": "1.6.1.0",
|
||||
"fileVersion": "1.6.1.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Extensions.Logging.Abstractions/2.0.0": {},
|
||||
"Microsoft.NETCore.Platforms/5.0.0": {},
|
||||
"Microsoft.Win32.Registry/5.0.0": {
|
||||
"dependencies": {
|
||||
"System.Security.AccessControl": "5.0.0",
|
||||
"System.Security.Principal.Windows": "5.0.0"
|
||||
}
|
||||
},
|
||||
"MongoDB.Bson/3.1.0": {
|
||||
"dependencies": {
|
||||
"System.Memory": "4.5.5",
|
||||
"System.Runtime.CompilerServices.Unsafe": "5.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/MongoDB.Bson.dll": {
|
||||
"assemblyVersion": "3.1.0.0",
|
||||
"fileVersion": "3.1.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MongoDB.Driver/3.1.0": {
|
||||
"dependencies": {
|
||||
"DnsClient": "1.6.1",
|
||||
"Microsoft.Extensions.Logging.Abstractions": "2.0.0",
|
||||
"MongoDB.Bson": "3.1.0",
|
||||
"SharpCompress": "0.30.1",
|
||||
"Snappier": "1.0.0",
|
||||
"System.Buffers": "4.5.1",
|
||||
"ZstdSharp.Port": "0.7.3"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/MongoDB.Driver.dll": {
|
||||
"assemblyVersion": "3.1.0.0",
|
||||
"fileVersion": "3.1.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Newtonsoft.Json/13.0.3": {
|
||||
"runtime": {
|
||||
"lib/net6.0/Newtonsoft.Json.dll": {
|
||||
"assemblyVersion": "13.0.0.0",
|
||||
"fileVersion": "13.0.3.27908"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobuf-net/3.2.45": {
|
||||
"dependencies": {
|
||||
"protobuf-net.Core": "3.2.45"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/protobuf-net.dll": {
|
||||
"assemblyVersion": "3.0.0.0",
|
||||
"fileVersion": "3.2.45.36865"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobuf-net.Core/3.2.45": {
|
||||
"dependencies": {
|
||||
"System.Collections.Immutable": "7.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/protobuf-net.Core.dll": {
|
||||
"assemblyVersion": "3.0.0.0",
|
||||
"fileVersion": "3.2.45.36865"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SharpCompress/0.30.1": {
|
||||
"runtime": {
|
||||
"lib/net5.0/SharpCompress.dll": {
|
||||
"assemblyVersion": "0.30.1.0",
|
||||
"fileVersion": "0.30.1.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Snappier/1.0.0": {
|
||||
"runtime": {
|
||||
"lib/net5.0/Snappier.dll": {
|
||||
"assemblyVersion": "1.0.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Buffers/4.5.1": {},
|
||||
"System.Collections.Immutable/7.0.0": {},
|
||||
"System.IO.Pipelines/9.0.0": {
|
||||
"runtime": {
|
||||
"lib/net8.0/System.IO.Pipelines.dll": {
|
||||
"assemblyVersion": "9.0.0.0",
|
||||
"fileVersion": "9.0.24.52809"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Memory/4.5.5": {},
|
||||
"System.Runtime.CompilerServices.Unsafe/5.0.0": {},
|
||||
"System.Security.AccessControl/5.0.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "5.0.0",
|
||||
"System.Security.Principal.Windows": "5.0.0"
|
||||
}
|
||||
},
|
||||
"System.Security.Principal.Windows/5.0.0": {},
|
||||
"ZstdSharp.Port/0.7.3": {
|
||||
"runtime": {
|
||||
"lib/net7.0/ZstdSharp.dll": {
|
||||
"assemblyVersion": "0.7.3.0",
|
||||
"fileVersion": "0.7.3.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Entity/1.0.0": {
|
||||
"dependencies": {
|
||||
"Fantasy-Net": "2024.2.24",
|
||||
"Fantasy-Net.ConfigTable": "2024.2.0"
|
||||
},
|
||||
"runtime": {
|
||||
"Entity.dll": {
|
||||
"assemblyVersion": "1.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Fantasy-Net/2024.2.24": {
|
||||
"dependencies": {
|
||||
"CommandLineParser": "2.9.1",
|
||||
"MongoDB.Bson": "3.1.0",
|
||||
"MongoDB.Driver": "3.1.0",
|
||||
"Newtonsoft.Json": "13.0.3",
|
||||
"System.IO.Pipelines": "9.0.0",
|
||||
"protobuf-net": "3.2.45"
|
||||
},
|
||||
"runtime": {
|
||||
"Fantasy-Net.dll": {
|
||||
"assemblyVersion": "2024.2.24",
|
||||
"fileVersion": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"Fantasy-Net.ConfigTable/2024.2.0": {
|
||||
"dependencies": {
|
||||
"Fantasy-Net": "2024.2.24"
|
||||
},
|
||||
"runtime": {
|
||||
"Fantasy-Net.ConfigTable.dll": {
|
||||
"assemblyVersion": "2024.2.0",
|
||||
"fileVersion": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"Fantasy-Net.ConfigTable.Reference/1.0.0.0": {
|
||||
"runtime": {
|
||||
"Fantasy-Net.ConfigTable.dll": {
|
||||
"assemblyVersion": "1.0.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Fantasy-Net.Reference/1.0.0.0": {
|
||||
"runtime": {
|
||||
"Fantasy-Net.dll": {
|
||||
"assemblyVersion": "1.0.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"Hotfix/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"CommandLineParser/2.9.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-OE0sl1/sQ37bjVsPKKtwQlWDgqaxWgtme3xZz7JssWUzg5JpMIyHgCTY9MVMxOg48fJ1AgGT3tgdH5m/kQ5xhA==",
|
||||
"path": "commandlineparser/2.9.1",
|
||||
"hashPath": "commandlineparser.2.9.1.nupkg.sha512"
|
||||
},
|
||||
"DnsClient/1.6.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-4H/f2uYJOZ+YObZjpY9ABrKZI+JNw3uizp6oMzTXwDw6F+2qIPhpRl/1t68O/6e98+vqNiYGu+lswmwdYUy3gg==",
|
||||
"path": "dnsclient/1.6.1",
|
||||
"hashPath": "dnsclient.1.6.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Extensions.Logging.Abstractions/2.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-6ZCllUYGFukkymSTx3Yr0G/ajRxoNJp7/FqSxSB4fGISST54ifBhgu4Nc0ItGi3i6DqwuNd8SUyObmiC++AO2Q==",
|
||||
"path": "microsoft.extensions.logging.abstractions/2.0.0",
|
||||
"hashPath": "microsoft.extensions.logging.abstractions.2.0.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==",
|
||||
"path": "microsoft.netcore.platforms/5.0.0",
|
||||
"hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Win32.Registry/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==",
|
||||
"path": "microsoft.win32.registry/5.0.0",
|
||||
"hashPath": "microsoft.win32.registry.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"MongoDB.Bson/3.1.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-3dhaZhz18B5vUoEP13o2j8A6zQfkHdZhwBvLZEjDJum4BTLLv1/Z8bt25UQEtpqvYwLgde4R6ekWZ7XAYUMxuw==",
|
||||
"path": "mongodb.bson/3.1.0",
|
||||
"hashPath": "mongodb.bson.3.1.0.nupkg.sha512"
|
||||
},
|
||||
"MongoDB.Driver/3.1.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-+O7lKaIl7VUHptE0hqTd7UY1G5KDp/o8S4upG7YL4uChMNKD/U6tz9i17nMGHaD/L2AiPLgaJcaDe2XACsegGA==",
|
||||
"path": "mongodb.driver/3.1.0",
|
||||
"hashPath": "mongodb.driver.3.1.0.nupkg.sha512"
|
||||
},
|
||||
"Newtonsoft.Json/13.0.3": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==",
|
||||
"path": "newtonsoft.json/13.0.3",
|
||||
"hashPath": "newtonsoft.json.13.0.3.nupkg.sha512"
|
||||
},
|
||||
"protobuf-net/3.2.45": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-5UZ/ukUHcGbFSl7vNMrHsfjqdxusdd9w7w0fCEXzf3UUtsrGNVCzV5SmF+sCHAbnRV2qPcD1ixiDP7Aj8lX/HA==",
|
||||
"path": "protobuf-net/3.2.45",
|
||||
"hashPath": "protobuf-net.3.2.45.nupkg.sha512"
|
||||
},
|
||||
"protobuf-net.Core/3.2.45": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-PMWatW2NrT1uTXD7etJ4VdQ0wWZLFrIfdRGppD2QX7nzZ0+kIzqhq551u6ZiXJHWJgG4hWFEkSnUnt2aB6posg==",
|
||||
"path": "protobuf-net.core/3.2.45",
|
||||
"hashPath": "protobuf-net.core.3.2.45.nupkg.sha512"
|
||||
},
|
||||
"SharpCompress/0.30.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-XqD4TpfyYGa7QTPzaGlMVbcecKnXy4YmYLDWrU+JIj7IuRNl7DH2END+Ll7ekWIY8o3dAMWLFDE1xdhfIWD1nw==",
|
||||
"path": "sharpcompress/0.30.1",
|
||||
"hashPath": "sharpcompress.0.30.1.nupkg.sha512"
|
||||
},
|
||||
"Snappier/1.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-rFtK2KEI9hIe8gtx3a0YDXdHOpedIf9wYCEYtBEmtlyiWVX3XlCNV03JrmmAi/Cdfn7dxK+k0sjjcLv4fpHnqA==",
|
||||
"path": "snappier/1.0.0",
|
||||
"hashPath": "snappier.1.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Buffers/4.5.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
|
||||
"path": "system.buffers/4.5.1",
|
||||
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
|
||||
},
|
||||
"System.Collections.Immutable/7.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-dQPcs0U1IKnBdRDBkrCTi1FoajSTBzLcVTpjO4MBCMC7f4pDOIPzgBoX8JjG7X6uZRJ8EBxsi8+DR1JuwjnzOQ==",
|
||||
"path": "system.collections.immutable/7.0.0",
|
||||
"hashPath": "system.collections.immutable.7.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.IO.Pipelines/9.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-eA3cinogwaNB4jdjQHOP3Z3EuyiDII7MT35jgtnsA4vkn0LUrrSHsU0nzHTzFzmaFYeKV7MYyMxOocFzsBHpTw==",
|
||||
"path": "system.io.pipelines/9.0.0",
|
||||
"hashPath": "system.io.pipelines.9.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Memory/4.5.5": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
|
||||
"path": "system.memory/4.5.5",
|
||||
"hashPath": "system.memory.4.5.5.nupkg.sha512"
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-ZD9TMpsmYJLrxbbmdvhwt9YEgG5WntEnZ/d1eH8JBX9LBp+Ju8BSBhUGbZMNVHHomWo2KVImJhTDl2hIgw/6MA==",
|
||||
"path": "system.runtime.compilerservices.unsafe/5.0.0",
|
||||
"hashPath": "system.runtime.compilerservices.unsafe.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Security.AccessControl/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
|
||||
"path": "system.security.accesscontrol/5.0.0",
|
||||
"hashPath": "system.security.accesscontrol.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Security.Principal.Windows/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==",
|
||||
"path": "system.security.principal.windows/5.0.0",
|
||||
"hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"ZstdSharp.Port/0.7.3": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-U9Ix4l4cl58Kzz1rJzj5hoVTjmbx1qGMwzAcbv1j/d3NzrFaESIurQyg+ow4mivCgkE3S413y+U9k4WdnEIkRA==",
|
||||
"path": "zstdsharp.port/0.7.3",
|
||||
"hashPath": "zstdsharp.port.0.7.3.nupkg.sha512"
|
||||
},
|
||||
"Entity/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Fantasy-Net/2024.2.24": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Fantasy-Net.ConfigTable/2024.2.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Fantasy-Net.ConfigTable.Reference/1.0.0.0": {
|
||||
"type": "reference",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Fantasy-Net.Reference/1.0.0.0": {
|
||||
"type": "reference",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
物品和背包的完整代码/Server/Hotfix/bin/Debug/net8.0/Hotfix.dll
Normal file
BIN
物品和背包的完整代码/Server/Hotfix/bin/Debug/net8.0/Hotfix.dll
Normal file
Binary file not shown.
BIN
物品和背包的完整代码/Server/Hotfix/bin/Debug/net8.0/Hotfix.pdb
Normal file
BIN
物品和背包的完整代码/Server/Hotfix/bin/Debug/net8.0/Hotfix.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Hotfix")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Hotfix")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Hotfix")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
28c7ffb99846e407a4d90a66ddc760b2a3412294f39e5810dd7ee1d10f0462a6
|
||||
@@ -0,0 +1,15 @@
|
||||
is_global = true
|
||||
build_property.TargetFramework = net8.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = Hotfix
|
||||
build_property.ProjectDir = /Users/fantasy/Movies/物品背包开发之旅/B/Server/Hotfix/
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
build_property.EffectiveAnalysisLevelStyle = 8.0
|
||||
build_property.EnableCodeStyleSeverity =
|
||||
@@ -0,0 +1,8 @@
|
||||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.IO;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Net.Http;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
||||
BIN
物品和背包的完整代码/Server/Hotfix/obj/Debug/net8.0/Hotfix.assets.cache
Normal file
BIN
物品和背包的完整代码/Server/Hotfix/obj/Debug/net8.0/Hotfix.assets.cache
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user