Commit f0e9928d authored by mercury233's avatar mercury233

fix strSetName not updated after loading strings

parent fca13ca3
......@@ -395,6 +395,8 @@ public class Program : MonoBehaviour
GameStringManager.initialize("config/strings.conf");
YGOSharp.BanlistManager.initialize("config/lflist.conf");
YGOSharp.CardsManager.updateSetNames();
if (Directory.Exists("pack"))
{
fileInfos = (new DirectoryInfo("pack")).GetFiles();
......
......@@ -138,7 +138,6 @@ namespace YGOSharp
{
this.Str[ii] = reader.GetString(14 + ii);
}
this.strSetName = GameStringHelper.getSetName(Setcode);
}
public Card()
......
......@@ -88,6 +88,15 @@ namespace YGOSharp
}
}
internal static void updateSetNames()
{
foreach (var item in _cards)
{
Card card = item.Value;
card.strSetName = GameStringHelper.getSetName(card.Setcode);
}
}
internal static List<Card> searchAdvanced(
string getName,
int getLevel,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment