Use typed payloads for behavior construction
This commit is contained in:
parent
48178a969b
commit
18dc4a61ce
5 changed files with 37 additions and 8 deletions
|
|
@ -1217,7 +1217,7 @@ public class ConsumableItemEffect
|
|||
Data = entity.ItemManager.GetData(item) as ConsumableItemData;
|
||||
RemainingDuration = Data.Duration;
|
||||
|
||||
Behaviors = Data.Behaviors
|
||||
Behaviors = entity.ItemManager.GetRuntimeBehaviorProjections(item)
|
||||
.Select(bd => bd.CreateInstance(this))
|
||||
.ToArray();
|
||||
}
|
||||
|
|
@ -1391,7 +1391,7 @@ public class EquippedItem
|
|||
.CombineLatest(Online, (enabled, online) => enabled && online).DistinctUntilChanged());
|
||||
|
||||
|
||||
Behaviors = Data.Behaviors
|
||||
Behaviors = ItemManager.GetRuntimeBehaviorProjections(item)
|
||||
.Select(bd => bd.CreateInstance(this))
|
||||
.ToArray();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue