예제 #1
0
        private void OnVestUpdated(Player nativePlayer, ushort id, byte quality, byte[] state)
        {
            var player = GetUnturnedPlayer(nativePlayer) !;

            IEvent @event;

            if (id == 0)
            {
                @event = new UnturnedPlayerClothingUnequippedEvent(player, ClothingType.Vest);
            }
            else
            {
                var item = new Item(id, 1, quality, state);
                @event = new UnturnedPlayerClothingEquippedEvent(player, new UnturnedClothingItem(item, player, ClothingType.Vest));
            }

            Emit(@event);
        }
        private void OnShirtUpdated(Player nativePlayer, ushort id, byte quality, byte[] state)
        {
            UnturnedPlayer player = GetUnturnedPlayer(nativePlayer);

            IEvent @event;

            if (id == 0)
            {
                @event = new UnturnedPlayerClothingUnequippedEvent(player, ClothingType.Shirt);
            }
            else
            {
                Item item = new Item(id, 1, quality, state);

                @event = new UnturnedPlayerClothingEquippedEvent(player, new UnturnedItem(item), ClothingType.Shirt);
            }

            Emit(@event);
        }