Use typed item keys in behavior item refs
This commit is contained in:
parent
df59a9da62
commit
95bd76ee91
10 changed files with 48 additions and 24 deletions
|
|
@ -38,6 +38,11 @@ public class AetheriaRuntimeItemReference
|
|||
return legacyItemId == Guid.Empty ? "" : $"{LegacyItemDefinitionPrefix}{legacyItemId:D}";
|
||||
}
|
||||
|
||||
public static Guid ToLegacyId(string itemKey)
|
||||
{
|
||||
return TryParseLegacyId(itemKey, out var itemId) ? itemId : Guid.Empty;
|
||||
}
|
||||
|
||||
private static bool TryParseLegacyId(string itemKey, out Guid itemId)
|
||||
{
|
||||
itemId = Guid.Empty;
|
||||
|
|
|
|||
Loading…
Reference in a new issue