Beispiel #1
0
        public Item(ushort newID, EItemOrigin origin, byte newQuality)
        {
            this._id     = newID;
            this.quality = newQuality;
            ItemAsset itemAsset = (ItemAsset)Assets.find(EAssetType.ITEM, this.id);

            if (itemAsset == null)
            {
                this.state = new byte[0];
                return;
            }
            if (origin == EItemOrigin.WORLD && !Provider.modeConfigData.Items.Has_Durability)
            {
                origin = EItemOrigin.CRAFT;
            }
            if (origin != EItemOrigin.WORLD)
            {
                this.amount = itemAsset.amount;
            }
            else
            {
                this.amount = itemAsset.count;
            }
            this.state = itemAsset.getState(origin);
        }
Beispiel #2
0
 public override byte[] getState(EItemOrigin origin)
 {
     if (this.isDisplay)
     {
         return(new byte[21]);
     }
     return(new byte[17]);
 }
Beispiel #3
0
 public override byte[] getState(EItemOrigin origin)
 {
     byte[] array = new byte[2];
     if (origin == EItemOrigin.ADMIN)
     {
         array[0] = this.resourceState[0];
         array[1] = this.resourceState[1];
     }
     return(array);
 }
Beispiel #4
0
 public override byte[] getState(EItemOrigin origin)
 {
     if (this.isLight)
     {
         return(new byte[]
         {
             1
         });
     }
     return(new byte[0]);
 }
 // Token: 0x06001AAD RID: 6829 RVA: 0x00095032 File Offset: 0x00093432
 public override byte[] getState(EItemOrigin origin)
 {
     if (this.vision != ELightingVision.NONE)
     {
         return(new byte[]
         {
             1
         });
     }
     return(new byte[0]);
 }
Beispiel #6
0
 public override byte[] getState(EItemOrigin origin)
 {
     byte[] array = new byte[1];
     if (origin == EItemOrigin.ADMIN)
     {
         array[0] = 1;
     }
     else
     {
         array[0] = 0;
     }
     return(array);
 }
Beispiel #7
0
 public override byte[] getState(EItemOrigin origin)
 {
     byte[] magazineState = this.getMagazineState(this.getMagazineID());
     byte[] array         = new byte[]
     {
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         1,
         100,
         100,
         100,
         100,
         100
     };
     array[0]  = this.sightState[0];
     array[1]  = this.sightState[1];
     array[2]  = this.tacticalState[0];
     array[3]  = this.tacticalState[1];
     array[4]  = this.gripState[0];
     array[5]  = this.gripState[1];
     array[6]  = this.barrelState[0];
     array[7]  = this.barrelState[1];
     array[8]  = magazineState[0];
     array[9]  = magazineState[1];
     array[10] = ((origin == EItemOrigin.WORLD && Random.value >= ((Provider.modeConfigData == null) ? 0.9f : Provider.modeConfigData.Items.Gun_Bullets_Full_Chance)) ? ((byte)Mathf.CeilToInt((float)Random.Range((int)this.ammoMin, (int)(this.ammoMax + 1)) * ((Provider.modeConfigData == null) ? 1f : Provider.modeConfigData.Items.Gun_Bullets_Multiplier))) : this.ammoMax);
     array[11] = (byte)this.firemode;
     return(array);
 }
 public override byte[] getState(EItemOrigin origin)
 {
     if (this.build == EBuild.DOOR || this.build == EBuild.GATE || this.build == EBuild.SHUTTER || this.build == EBuild.HATCH)
     {
         return(new byte[17]);
     }
     if (this.build == EBuild.BED)
     {
         return(new byte[8]);
     }
     if (this.build == EBuild.FARM)
     {
         return(new byte[4]);
     }
     if (this.build == EBuild.TORCH || this.build == EBuild.CAMPFIRE || this.build == EBuild.OVEN || this.build == EBuild.SPOT || this.build == EBuild.SAFEZONE || this.build == EBuild.OXYGENATOR || this.build == EBuild.BARREL_RAIN || this.build == EBuild.CAGE)
     {
         return(new byte[1]);
     }
     if (this.build == EBuild.OIL)
     {
         return(new byte[2]);
     }
     if (this.build == EBuild.SIGN || this.build == EBuild.SIGN_WALL || this.build == EBuild.NOTE)
     {
         return(new byte[17]);
     }
     if (this.build == EBuild.STEREO)
     {
         return(new byte[17]);
     }
     if (this.build == EBuild.MANNEQUIN)
     {
         return(new byte[73]);
     }
     return(new byte[0]);
 }
 public override byte[] getState(EItemOrigin origin)
 {
     return(new byte[3]);
 }
Beispiel #10
0
 // Token: 0x06001A2D RID: 6701 RVA: 0x00092F2E File Offset: 0x0009132E
 public virtual byte[] getState(EItemOrigin origin)
 {
     return(new byte[0]);
 }