Exemplo n.º 1
0
		// Token: 0x06002AF4 RID: 10996 RVA: 0x0010C614 File Offset: 0x0010AA14
		public void load()
		{
			if (PlayerSavedata.fileExists(base.channel.owner.playerID, "/Player/Anim.dat") && Level.info.type == ELevelType.SURVIVAL)
			{
				Block block = PlayerSavedata.readBlock(base.channel.owner.playerID, "/Player/Anim.dat", 0);
				byte b = block.readByte();
				this._gesture = (EPlayerGesture)block.readByte();
				this.captorID = block.readSteamID();
				if (b > 1)
				{
					this.captorItem = block.readUInt16();
				}
				else
				{
					this.captorItem = 0;
				}
				this.captorStrength = block.readUInt16();
				if (this.gesture != EPlayerGesture.ARREST_START)
				{
					this._gesture = EPlayerGesture.NONE;
				}
				return;
			}
			this._gesture = EPlayerGesture.NONE;
			this.captorID = CSteamID.Nil;
			this.captorItem = 0;
			this.captorStrength = 0;
		}
Exemplo n.º 2
0
 public void load()
 {
     if (PlayerSavedata.fileExists(base.channel.owner.playerID, "/Player/Skills.dat") && Level.info.type == ELevelType.SURVIVAL)
     {
         Block block = PlayerSavedata.readBlock(base.channel.owner.playerID, "/Player/Skills.dat", 0);
         byte  b     = block.readByte();
         if (b > 4)
         {
             this._experience = block.readUInt32();
             if (b >= 7)
             {
                 this._reputation = block.readInt32();
             }
             else
             {
                 this._reputation = 0;
             }
             this._boost = (EPlayerBoost)block.readByte();
             if (b >= 6)
             {
                 byte b2 = 0;
                 while ((int)b2 < this.skills.Length)
                 {
                     if (this.skills[(int)b2] != null)
                     {
                         byte b3 = 0;
                         while ((int)b3 < this.skills[(int)b2].Length)
                         {
                             this.skills[(int)b2][(int)b3].level = block.readByte();
                             if (this.skills[(int)b2][(int)b3].level > this.skills[(int)b2][(int)b3].max)
                             {
                                 this.skills[(int)b2][(int)b3].level = this.skills[(int)b2][(int)b3].max;
                             }
                             b3 += 1;
                         }
                     }
                     b2 += 1;
                 }
             }
         }
     }
 }