Example #1
0
        public void save()
        {
            Block block = new Block();

            block.writeByte(PlayerSkills.SAVEDATA_VERSION);
            block.writeUInt32(this.experience);
            block.writeInt32(this.reputation);
            block.writeByte((byte)this.boost);
            byte b = 0;

            while ((int)b < this.skills.Length)
            {
                if (this.skills[(int)b] != null)
                {
                    byte b2 = 0;
                    while ((int)b2 < this.skills[(int)b].Length)
                    {
                        block.writeByte(this.skills[(int)b][(int)b2].level);
                        b2 += 1;
                    }
                }
                b += 1;
            }
            PlayerSavedata.writeBlock(base.channel.owner.playerID, "/Player/Skills.dat", block);
        }
Example #2
0
		// Token: 0x06002AF5 RID: 10997 RVA: 0x0010C6EC File Offset: 0x0010AAEC
		public void save()
		{
			if (base.player.life.isDead)
			{
				if (PlayerSavedata.fileExists(base.channel.owner.playerID, "/Player/Anim.dat"))
				{
					PlayerSavedata.deleteFile(base.channel.owner.playerID, "/Player/Anim.dat");
				}
			}
			else
			{
				Block block = new Block();
				block.writeByte(PlayerAnimator.SAVEDATA_VERSION);
				block.writeByte((byte)this.gesture);
				block.writeSteamID(this.captorID);
				block.writeUInt16(this.captorItem);
				block.writeUInt16(this.captorStrength);
				PlayerSavedata.writeBlock(base.channel.owner.playerID, "/Player/Anim.dat", block);
			}
		}
Example #3
0
 // Token: 0x06002ABF RID: 10943 RVA: 0x001093AC File Offset: 0x001077AC
 public void save()
 {
     if (this.life.isDead)
     {
         if (PlayerSavedata.fileExists(this.channel.owner.playerID, "/Player/Player.dat"))
         {
             PlayerSavedata.deleteFile(this.channel.owner.playerID, "/Player/Player.dat");
         }
     }
     else
     {
         Block block = new Block();
         block.writeByte(Player.SAVEDATA_VERSION);
         block.writeSingleVector3(base.transform.position);
         block.writeByte((byte)(base.transform.rotation.eulerAngles.y / 2f));
         PlayerSavedata.writeBlock(this.channel.owner.playerID, "/Player/Player.dat", block);
     }
     this.clothing.save();
     this.inventory.save();
     this.life.save();
     this.skills.save();
     this.animator.save();
     this.quests.save();
 }