卡牌更新
This commit is contained in:
@@ -164,11 +164,9 @@ namespace Continentis.MainGame.Character
|
||||
[GUIColor(0.7f, 1f, 0.7f)]
|
||||
public void PasteDefaultAttributes()
|
||||
{
|
||||
if (coreAttributes == null) coreAttributes = new SLSUtilities.General.SerializedDictionary<string, float, CharacterAttributePair>();
|
||||
if (generalAttributes == null) generalAttributes = new SLSUtilities.General.SerializedDictionary<string, float, CharacterAttributePair>();
|
||||
if (runtimeGeneralAttributes == null) runtimeGeneralAttributes = new SLSUtilities.General.SerializedDictionary<string, string>();
|
||||
|
||||
coreAttributes.Clear();
|
||||
generalAttributes.Clear();
|
||||
runtimeGeneralAttributes.Clear();
|
||||
|
||||
@@ -181,18 +179,6 @@ namespace Continentis.MainGame.Character
|
||||
|
||||
foreach (var coll in collections)
|
||||
{
|
||||
if (coll.characterCoreAttributes != null)
|
||||
{
|
||||
foreach (var kvp in coll.characterCoreAttributes)
|
||||
{
|
||||
if (!coreAttributes.ContainsKey(kvp.Key))
|
||||
{
|
||||
float defaultVal = kvp.Key.Contains("Multiplier") ? 1f : 0f;
|
||||
coreAttributes.Add(kvp.Key, defaultVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (coll.characterGeneralAttributes != null)
|
||||
{
|
||||
foreach (var kvp in coll.characterGeneralAttributes)
|
||||
@@ -220,7 +206,7 @@ namespace Continentis.MainGame.Character
|
||||
}
|
||||
|
||||
EditorUtility.SetDirty(this);
|
||||
Debug.Log($"[CharacterData] '{this.name}' 提取完毕。从 {collections.Count} 个主库中提取了 {coreAttributes.Count} 个核心属性,{generalAttributes.Count} 个通用属性以及 {runtimeGeneralAttributes.Count} 个运行时约束!");
|
||||
Debug.Log($"[CharacterData] '{this.name}' 提取完毕。从 {collections.Count} 个主库中提取了 {generalAttributes.Count} 个属性以及 {runtimeGeneralAttributes.Count} 个运行时约束!");
|
||||
}
|
||||
|
||||
// ── 内部共享辅助方法 ─────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user