using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x02000200 RID: 512
[Token(Token = "0x2000200")]
public class Save : SceneEvent
{
	// Token: 0x060014F8 RID: 5368 RVA: 0x0002FC78 File Offset: 0x0002DE78
	[Token(Token = "0x60014F8")]
	[Address(RVA = "0x50C8E0", Offset = "0x50B8E0", VA = "0x18050C8E0")]
	protected void Update()
	{
		if (this.g_bSaveing)
		{
			this.g_bSaveing = false;
			GameObject gameObject = base.gameObject;
			int num = 0;
			gameObject.SetActive(num != 0);
			return;
		}
	}

	// Token: 0x060014F9 RID: 5369 RVA: 0x0002FCAC File Offset: 0x0002DEAC
	[Token(Token = "0x60014F9")]
	[Address(RVA = "0x50C6B0", Offset = "0x50B6B0", VA = "0x18050C6B0", Slot = "5")]
	public override void OpenEvent()
	{
		SavePoint sp = this.SP;
		int num = 0;
		if (sp == num)
		{
			Debug.LogError("找不到存檔點");
		}
		base.gameObject.SetActive(true);
		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: 0x060014FA RID: 5370 RVA: 0x0002FD5C File Offset: 0x0002DF5C
	[Token(Token = "0x60014FA")]
	[Address(RVA = "0x5051A0", Offset = "0x5041A0", VA = "0x1805051A0")]
	public Save()
	{
		this.CheckPlayerEnter = true;
		base..ctor();
	}

	// Token: 0x04001FEA RID: 8170
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x4001FEA")]
	public SavePoint SP;

	// Token: 0x04001FEB RID: 8171
	[FieldOffset(Offset = "0x40")]
	[Token(Token = "0x4001FEB")]
	private bool g_bSaveing;
}
