Пример #1
0
 // Token: 0x06000B4B RID: 2891 RVA: 0x00031D04 File Offset: 0x0002FF04
 private void OnTriggerStay(Collider other)
 {
     if (NetworkServer.active && this.waitStartTime.timeSince >= this.waitDuration && !this.consumed)
     {
         CharacterBody component = other.GetComponent <CharacterBody>();
         if (component)
         {
             ItemIndex itemIndex = this.pickupIndex.itemIndex;
             if (itemIndex != ItemIndex.None && ItemCatalog.GetItemDef(itemIndex).tier == ItemTier.Lunar)
             {
                 return;
             }
             EquipmentIndex equipmentIndex = this.pickupIndex.equipmentIndex;
             if (equipmentIndex != EquipmentIndex.None)
             {
                 if (EquipmentCatalog.GetEquipmentDef(equipmentIndex).isLunar)
                 {
                     return;
                 }
                 if (component.inventory && component.inventory.currentEquipmentIndex != EquipmentIndex.None)
                 {
                     return;
                 }
             }
             if (this.pickupIndex.coinValue != 0U)
             {
                 return;
             }
             if (GenericPickupController.BodyHasPickupPermission(component))
             {
                 this.AttemptGrant(component);
             }
         }
     }
 }
Пример #2
0
        // Token: 0x06000B57 RID: 2903 RVA: 0x000320E0 File Offset: 0x000302E0
        public Interactability GetInteractability(Interactor activator)
        {
            if (!base.enabled)
            {
                return(Interactability.Disabled);
            }
            if (this.waitStartTime.timeSince < this.waitDuration || this.consumed)
            {
                return(Interactability.Disabled);
            }
            CharacterBody component = activator.GetComponent <CharacterBody>();

            if (!component)
            {
                return(Interactability.Disabled);
            }
            if (!GenericPickupController.BodyHasPickupPermission(component))
            {
                return(Interactability.Disabled);
            }
            return(Interactability.Available);
        }