Project behavior item refs as typed keys
This commit is contained in:
parent
2d3172887b
commit
e173989b3d
160 changed files with 314 additions and 211 deletions
|
|
@ -415,9 +415,8 @@ public class ItemManager
|
|||
public string ItemKey(int key, string fallback = "")
|
||||
{
|
||||
return _fields.TryGetValue(key, out var value) &&
|
||||
System.Guid.TryParse(value.LegacyIdValue, out var itemId) &&
|
||||
itemId != System.Guid.Empty
|
||||
? AetheriaRuntimeItemReference.FromLegacyId(itemId)
|
||||
!string.IsNullOrWhiteSpace(value.ItemKeyValue)
|
||||
? value.ItemKeyValue
|
||||
: fallback;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue