From f191a2d48b3a2195fb7c9ed7194576e28cdf45ed Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 31 十月 2025 15:24:42 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/Config/PartialConfigs/ItemCompoundConfig.cs | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Main/Config/PartialConfigs/ItemCompoundConfig.cs b/Main/Config/PartialConfigs/ItemCompoundConfig.cs
index 64d1d64..3324b85 100644
--- a/Main/Config/PartialConfigs/ItemCompoundConfig.cs
+++ b/Main/Config/PartialConfigs/ItemCompoundConfig.cs
@@ -2,11 +2,13 @@
public partial class ItemCompoundConfig : ConfigBase<int, ItemCompoundConfig>
{
- public static Dictionary<int, ItemCompoundConfig> itemCompoundDict = new Dictionary<int, ItemCompoundConfig>();
+ static Dictionary<int, ItemCompoundConfig> itemCompoundDict = new Dictionary<int, ItemCompoundConfig>();
+ static Dictionary<int, int> materialToItemDict = new Dictionary<int, int>(); //鍚堟垚鏉愭枡鍒扮墿鍝佺殑鏄犲皠
protected override void OnConfigParseCompleted()
{
itemCompoundDict.Add(makeID, this);
+ materialToItemDict[itemID] = makeID;
}
public static ItemCompoundConfig GetItemCompoundConfig(int makeID)
@@ -20,7 +22,13 @@
{
return itemCompoundDict.ContainsKey(itemID);
}
-
+
+ public static int GetMakeIDByMaterial(int itemID)
+ {
+ int makeID = 0;
+ materialToItemDict.TryGetValue(itemID, out makeID);
+ return makeID;
+ }
}
--
Gitblit v1.8.0