Remove unnecessary dependency injection from DoAfters (#15170)
This commit is contained in:
@@ -87,7 +87,7 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
|
|||||||
// I feel like this is somewhat cursed, but its the only way I can think of without having to just send
|
// I feel like this is somewhat cursed, but its the only way I can think of without having to just send
|
||||||
// redundant data over the network and increasing DoAfter boilerplate.
|
// redundant data over the network and increasing DoAfter boilerplate.
|
||||||
var evType = typeof(DoAfterAttemptEvent<>).MakeGenericType(args.Event.GetType());
|
var evType = typeof(DoAfterAttemptEvent<>).MakeGenericType(args.Event.GetType());
|
||||||
doAfter.AttemptEvent = _factory.CreateInstance(evType, new object[] { doAfter, args.Event });
|
doAfter.AttemptEvent = _factory.CreateInstance(evType, new object[] { doAfter, args.Event }, inject: false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.EventTarget != null)
|
if (args.EventTarget != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user