protected override void Activate(IEntity user, InventoryComponent component) { if (!CanCommand(user)) { return; } var target = component.Owner; var entityId = target.Uid.ToString(); var command = new SetOutfitCommand(); var shell = IoCManager.Resolve <IConsoleShell>(); var args = new string[] { entityId }; command.Execute(shell, user.PlayerSession(), args); }
protected override void Activate(IEntity user, InventoryComponent component) { if (!CanCommand(user)) { return; } var target = component.Owner; var entityId = target.Uid.ToString(); var command = new SetOutfitCommand(); var host = IoCManager.Resolve <IServerConsoleHost>(); var args = new string[] { entityId }; var session = user.PlayerSession(); command.Execute(new ConsoleShell(host, session), $"{command.Command} {entityId}", args); }