Ejemplo n.º 1
0
        public static SL_ItemFilter ParseItemFilter(ItemFilter itemFilter)
        {
            if (itemFilter == null)
            {
                return(null);
            }

            var ret = new SL_ItemFilter
            {
                MatchOnEmpty = itemFilter.MatchOnEmpty,
            };

            ret.EquipmentTypes = (List <EquipmentSlot.EquipmentSlotIDs>)At.GetField(itemFilter, "m_equipmentTypes");
            ret.TagTypes       = (List <Tag.TagTypes>)At.GetField(itemFilter, "m_tagTypeFilters");

            return(ret);
        }
Ejemplo n.º 2
0
        public override void SerializeItem(Item item)
        {
            base.SerializeItem(item);

            var comp = item as ItemContainer;

            this.BaseContainerCapacity = (float)At.GetField(comp, "m_baseContainerCapacity");

            this.SpecialType              = comp.SpecialType;
            this.OpenSound                = comp.OpenSoundOverride;
            this.AllowOverCapacity        = comp.AllowOverCapacity;
            this.CanContainMoney          = comp.CanContainMoney;
            this.CanReceiveCharacterItems = comp.CanReceiveCharacterItems;
            this.CanRemoveItems           = comp.CanRemoveItems;
            this.NonSavableContent        = comp.NonSavableContent;
            this.ShowMoneyIfEmpty         = comp.ShowMoneyIfEmpty;
            this.VisibleIfEmpty           = comp.VisibleIfEmpty;
            this.ItemFilter               = SL_ItemFilter.ParseItemFilter(comp.GetComponent <ItemFilter>());
        }