Exemplo n.º 1
0
 public static Task <IItemDrop> SpawnItemAsync(this IItemSpawner spawner,
                                               Vector3 position,
                                               IItemAsset asset,
                                               [CanBeNull] IItemState state = null)
 {
     return(spawner.SpawnItemAsync(position, asset.ItemAssetId, state));
 }
Exemplo n.º 2
0
 public static Task <IInventoryItem> GiveItemAsync(this IItemSpawner spawner,
                                                   IInventory inventory,
                                                   IItemAsset asset,
                                                   [CanBeNull] IItemState state = null)
 {
     return(spawner.GiveItemAsync(inventory, asset.ItemAssetId, state));
 }
Exemplo n.º 3
0
 public CombatSimulator(ICombatRegistry combatRegistry, IDiceRoller diceRoller, IPlayArea playArea,
                        IMessageDispatcher messageDispatcher, IItemSpawner itemSpawner)
 {
     _combatRegistry    = combatRegistry;
     _diceRoller        = diceRoller;
     _playArea          = playArea;
     _messageDispatcher = messageDispatcher;
     _itemSpawner       = itemSpawner;
 }
Exemplo n.º 4
0
        /// See <see cref="IItemSpawner.GiveItemAsync"/>.
        public static Task <IItemInstance?> GiveItemAsync(this IItemSpawner spawner,
                                                          IInventory inventory,
                                                          IItemAsset asset,
                                                          IItemState?state = null)
        {
            if (spawner == null)
            {
                throw new ArgumentNullException(nameof(spawner));
            }

            return(spawner.GiveItemAsync(inventory, asset.ItemAssetId, state));
        }
Exemplo n.º 5
0
        /// See <see cref="IItemSpawner.GiveItemAsync"/>.
        public static Task <IItemDrop?> SpawnItemAsync(this IItemSpawner spawner,
                                                       Vector3 position,
                                                       IItemAsset asset,
                                                       IItemState?state = null)
        {
            if (spawner == null)
            {
                throw new ArgumentNullException(nameof(spawner));
            }

            return(spawner.SpawnItemAsync(position, asset.ItemAssetId, state));
        }
Exemplo n.º 6
0
 public CKitRoot(IDataStore dataStore,
                 IStringLocalizer stringLocalizer,
                 IPermissionChecker permissionChecker,
                 IItemSpawner itemSpawner,
                 ICooldownManager cooldownManager,
                 IServiceProvider serviceProvider) : base(serviceProvider)
 {
     m_DataStore         = dataStore;
     m_StringLocalizer   = stringLocalizer;
     m_PermissionChecker = permissionChecker;
     m_ItemSpawner       = itemSpawner;
     m_CooldownManager   = cooldownManager;
 }
Exemplo n.º 7
0
        public ItemShop(
            IEconomyProvider economyProvider,
            IItemDirectory itemDirectory,
            IItemSpawner itemSpawner,
            IStringLocalizer stringLocalizer,
            ItemShopModel itemShopModel)
        {
            _economyProvider = economyProvider;
            _itemDirectory   = itemDirectory;
            _itemSpawner     = itemSpawner;
            _stringLocalizer = stringLocalizer;

            ShopData = itemShopModel;
        }