mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-04-22 20:19:34 +08:00

* 添加了 SQLHelperFactory;完善了物品的描述信息;一些代码风格修改 * 构造的物品默认 1 级;为服务器插件添加控制器;添加邮件发送器的工厂;在物品中添加魔法技能组
24 lines
618 B
C#
24 lines
618 B
C#
using Milimoe.FunGame.Core.Api.Utility;
|
|
using Milimoe.FunGame.Core.Entity;
|
|
|
|
namespace Milimoe.FunGame.Core.Api.OpenEntityAdapter
|
|
{
|
|
public class OpenItemAdapter
|
|
{
|
|
public static void Adaptation<T>(EntityModuleConfig<T> config) where T : BaseEntity
|
|
{
|
|
foreach (string key in config.Keys)
|
|
{
|
|
if (config[key] is Item prev)
|
|
{
|
|
Item next = prev.Copy();
|
|
if (next is T t)
|
|
{
|
|
config[key] = t;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|