Ejemplo n.º 1
0
        private void OnCraftBlueprintRequested(PlayerCrafting crafting, ref ushort itemId, ref byte blueprintIndex, ref bool shouldAllow)
        {
            UnturnedPlayer player = GetUnturnedPlayer(crafting.player);

            UnturnedPlayerCraftingEvent @event = new UnturnedPlayerCraftingEvent(player, itemId, blueprintIndex);

            Emit(@event);

            itemId         = @event.ItemId;
            blueprintIndex = @event.BlueprintIndex;
            shouldAllow    = [email protected];
        }
Ejemplo n.º 2
0
        private void OnCraftBlueprintRequested(PlayerCrafting crafting, ref ushort itemId, ref byte blueprintIndex, ref bool shouldAllow) // lgtm [cs/too-many-ref-parameters]
        {
            var player = GetUnturnedPlayer(crafting.player) !;
            var @event = new UnturnedPlayerCraftingEvent(player, itemId, blueprintIndex)
            {
                IsCancelled = !shouldAllow
            };

            Emit(@event);

            itemId         = @event.ItemId;
            blueprintIndex = @event.BlueprintIndex;
            shouldAllow    = [email protected];
        }