先修复一下,错误的场景 删除不必要的钓场资产 修复into场景 update:更新meta文件,修复报错 update:修复资源 修复第一章节建造 修复建造第三章 update:删除多余内容 update:更新README.md update:还原图标 update:更新README update:更新配置
71 lines
2.3 KiB
C#
71 lines
2.3 KiB
C#
//------------------------------------------------------------------------------
|
|
// <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 Bright.Serialization;
|
|
using System.Collections.Generic;
|
|
using SimpleJSON;
|
|
|
|
|
|
|
|
namespace cfg
|
|
{
|
|
|
|
public sealed partial class TbFishingEvent
|
|
{
|
|
/// <summary>
|
|
/// type map
|
|
/// </summary>
|
|
private readonly Dictionary<int, List<FishingEvent>> _typeDataMap = new Dictionary<int, List<FishingEvent>>();
|
|
private readonly Dictionary<int, List<FishingEvent>> _typeAndSubDataMap = new Dictionary<int, List<FishingEvent>>();
|
|
|
|
public List<FishingEvent> GetAllDataByType(int type)
|
|
{
|
|
if (_typeDataMap.ContainsKey(type))
|
|
return _typeDataMap[type];
|
|
var list = new List<FishingEvent>();
|
|
foreach (var v in DataList)
|
|
{
|
|
if (v.Type == type) list.Add(v);
|
|
}
|
|
_typeDataMap.Add(type, list);
|
|
return list;
|
|
}
|
|
|
|
public List<FishingEvent> GetAllDataByType(int type, int subType)
|
|
{
|
|
int key = RedirectType(type, subType);
|
|
if (_typeAndSubDataMap.ContainsKey(key))
|
|
return _typeAndSubDataMap[key];
|
|
var list = new List<FishingEvent>();
|
|
foreach (var v in DataList)
|
|
{
|
|
if (v.Type == type && v.SubType == subType) list.Add(v);
|
|
}
|
|
_typeAndSubDataMap.Add(key, list);
|
|
return list;
|
|
}
|
|
int RedirectType(int type, int subType)
|
|
{
|
|
return type * 1000 + subType;
|
|
}
|
|
partial void PostInit()
|
|
{
|
|
var dataList = new List<FishingEvent>(_dataList);
|
|
_dataMap.Clear();
|
|
_dataList.Clear();
|
|
foreach (FishingEvent _v in dataList)
|
|
{
|
|
if (_v.Channel.Count == 0 || _v.Channel.Contains(ChannelManager.CurrentChannel.ToString()))
|
|
{
|
|
_dataList.Add(_v);
|
|
_dataMap.Add(_v.ID, _v);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
} |