Demote item reference projection value
This commit is contained in:
parent
c2a8729c75
commit
d8cd07fd84
5 changed files with 33 additions and 22 deletions
|
|
@ -65,12 +65,12 @@ public class ItemManager
|
|||
public ItemData GetData(ItemInstance item)
|
||||
{
|
||||
Hydrate(item);
|
||||
return item?.Data?.Value;
|
||||
return item?.Data?.Projection;
|
||||
}
|
||||
|
||||
public void Hydrate(ItemInstance item)
|
||||
{
|
||||
if (item?.Data == null || item.Data.Value != null)
|
||||
if (item?.Data == null || item.Data.Projection != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -82,7 +82,7 @@ public class ItemManager
|
|||
return;
|
||||
}
|
||||
|
||||
item.Data.SetValue(data);
|
||||
item.Data.SetProjection(data);
|
||||
}
|
||||
|
||||
public void Log(string s)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public abstract class RuntimeItemProjectionEntry
|
|||
|
||||
public class RuntimeItemReference
|
||||
{
|
||||
public ItemData Value { get; private set; }
|
||||
public ItemData Projection { get; private set; }
|
||||
public Guid ItemId;
|
||||
|
||||
public RuntimeItemReference()
|
||||
|
|
@ -37,12 +37,12 @@ public class RuntimeItemReference
|
|||
|
||||
public RuntimeItemReference(ItemData value)
|
||||
{
|
||||
SetValue(value);
|
||||
SetProjection(value);
|
||||
}
|
||||
|
||||
public void SetValue(ItemData value)
|
||||
public void SetProjection(ItemData value)
|
||||
{
|
||||
Value = value;
|
||||
Projection = value;
|
||||
ItemId = value?.ID ?? Guid.Empty;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue