cull(engine-cleanup): pass-8 phase-2 cascade round 5
[trim] fully-unreachable files deleted: 1 [trim] files edited: 4, files deleted: 0, nodes removed: 6 [type-trim] files edited: 0, types removed: 0 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -18,69 +18,6 @@ public class AICardDataAssetSet
|
||||
Set = new List<AICardDataAsset>();
|
||||
}
|
||||
|
||||
public void ConvertCsvTextToAsset(List<string[]> csv)
|
||||
{
|
||||
int latestRotationCardPack = GetRotationLatestCardPackNumber();
|
||||
Dictionary<int, AICardDataAssetTemporaryRecord> latestCardCandidateDic = new Dictionary<int, AICardDataAssetTemporaryRecord>();
|
||||
foreach (string[] item in csv)
|
||||
{
|
||||
if (IsRegister(item))
|
||||
{
|
||||
Set.Add(new AICardDataAsset(item));
|
||||
}
|
||||
}
|
||||
foreach (AICardDataAssetTemporaryRecord value2 in latestCardCandidateDic.Values)
|
||||
{
|
||||
Set.Add(new AICardDataAsset(value2.Data));
|
||||
}
|
||||
bool IsRegister(string[] cardData)
|
||||
{
|
||||
string text = cardData[0];
|
||||
int num;
|
||||
int key;
|
||||
if (text.Length > 9)
|
||||
{
|
||||
num = int.Parse(text.Substring(text.Length - 2));
|
||||
key = int.Parse(text.Substring(0, text.Length - 2));
|
||||
}
|
||||
else
|
||||
{
|
||||
key = int.Parse(text);
|
||||
num = 0;
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (num < latestRotationCardPack)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cardData[0] = key.ToString();
|
||||
if (latestCardCandidateDic.TryGetValue(key, out var value))
|
||||
{
|
||||
int num2 = num - latestRotationCardPack;
|
||||
if (num2 < value.DiffFromLatestRotationPack)
|
||||
{
|
||||
latestCardCandidateDic[key] = new AICardDataAssetTemporaryRecord
|
||||
{
|
||||
Data = cardData,
|
||||
DiffFromLatestRotationPack = num2
|
||||
};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
latestCardCandidateDic.Add(key, new AICardDataAssetTemporaryRecord
|
||||
{
|
||||
Data = cardData,
|
||||
DiffFromLatestRotationPack = num - latestRotationCardPack
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private int GetRotationLatestCardPackNumber()
|
||||
{
|
||||
return Data.Load.data.RotationLatestCardPackId % 100;
|
||||
|
||||
Reference in New Issue
Block a user