using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x020001C3 RID: 451
[Token(Token = "0x20001C3")]
public class Save : SceneEvent
{
	// Token: 0x06001344 RID: 4932 RVA: 0x0002C400 File Offset: 0x0002A600
	[Token(Token = "0x6001344")]
	[Address(RVA = "0x432540", Offset = "0x431340", VA = "0x180432540")]
	protected void Update()
	{
		if (this.g_bSaveing)
		{
			this.g_bSaveing = false;
			GameObject gameObject = base.gameObject;
			int num = 0;
			gameObject.SetActive(num != 0);
			return;
		}
	}

	// Token: 0x06001345 RID: 4933 RVA: 0x0002C434 File Offset: 0x0002A634
	[Token(Token = "0x6001345")]
	[Address(RVA = "0x432330", Offset = "0x431130", VA = "0x180432330", Slot = "5")]
	public override void OpenEvent()
	{
		SavePoint sp = this.SP;
		int num = 0;
		if (sp == num)
		{
			Debug.LogError("找不到存檔點");
		}
		this.g_bOpenEvent = true;
		SavePoint sp2 = this.SP;
		SceneManager sceneManager = Game.sceneManager;
		SaveSystem save = sceneManager.Save;
		SoulSystem soulSystem = sceneManager.soulSystem;
		WizardGirlManage wizardGirl = sceneManager.wizardGirl;
		save.UpdateCharacterData(wizardGirl, soulSystem);
		GameSaveBasicData basic = Game.GameSave.basic;
		string stageName = sceneManager.stageName;
		int savePointNumber = sceneManager.GetSavePointNumber(sp2);
		basic.UpdateStageData(stageName, savePointNumber);
		Game.WriteGameSave();
		this.g_bSaveing = true;
	}

	// Token: 0x06001346 RID: 4934 RVA: 0x0002C4D8 File Offset: 0x0002A6D8
	[Token(Token = "0x6001346")]
	[Address(RVA = "0x432580", Offset = "0x431380", VA = "0x180432580")]
	public Save()
	{
		this.CheckPlayerEnter = true;
		base..ctor();
	}

	// Token: 0x04001E14 RID: 7700
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x4001E14")]
	public SavePoint SP;

	// Token: 0x04001E15 RID: 7701
	[FieldOffset(Offset = "0x40")]
	[Token(Token = "0x4001E15")]
	private bool g_bSaveing;
}
