| | |
| | |
|
| | | public partial class ItemPlusConfig : IConfigPostProcess
|
| | | {
|
| | | private static Dictionary<string, ItemPlusConfig> ItemPlus = new Dictionary<string, ItemPlusConfig>();
|
| | | private static Dictionary<int, ItemPlusConfig> ItemPlus = new Dictionary<int, ItemPlusConfig>();
|
| | | public void OnConfigParseCompleted()
|
| | | {
|
| | | ItemPlus.Add(StringUtility.Contact(type, level).ToString(), this);
|
| | | var key = type * 100 + level;
|
| | | ItemPlus[key] = this;
|
| | | }
|
| | |
|
| | | public static ItemPlusConfig GetTypeAndLevel(int type, int level)
|
| | | {
|
| | | var key = type * 100 + level;
|
| | | ItemPlusConfig itemPlus = null;
|
| | | ItemPlus.TryGetValue(StringUtility.Contact(type, level).ToString(), out itemPlus);
|
| | | ItemPlus.TryGetValue(key, out itemPlus);
|
| | | return itemPlus;
|
| | | }
|
| | | }
|