using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x020001C2 RID: 450
[Token(Token = "0x20001C2")]
public class DamageObject : AttackableObject
{
	// Token: 0x06001404 RID: 5124 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001404")]
	[Address(RVA = "0x12F7D10", Offset = "0x12F6D10", VA = "0x1812F7D10", Slot = "4")]
	public override void Init()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001405 RID: 5125 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001405")]
	[Address(RVA = "0x12F8FF0", Offset = "0x12F7FF0", VA = "0x1812F8FF0", Slot = "6")]
	protected override void Update()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001406 RID: 5126 RVA: 0x0002DA9C File Offset: 0x0002BC9C
	[Token(Token = "0x6001406")]
	[Address(RVA = "0x12F8310", Offset = "0x12F7310", VA = "0x1812F8310", Slot = "8")]
	protected override void LateUpdate()
	{
		if (!this.g_bDamage)
		{
			base.LateUpdate();
			return;
		}
	}

	// Token: 0x06001407 RID: 5127 RVA: 0x0002DABC File Offset: 0x0002BCBC
	[Token(Token = "0x6001407")]
	[Address(RVA = "0x12F8330", Offset = "0x12F7330", VA = "0x1812F8330", Slot = "12")]
	protected virtual void SetDamageColor()
	{
		float num = this.g_fDisTimeVal;
		int num2 = 0;
		if (num <= (float)num2)
		{
			float num3 = this.g_fAlpha;
			if (num3 <= (float)num2)
			{
				GameObject gameObject = base.gameObject;
				int num4 = 0;
				gameObject.SetActive(num4 != 0);
			}
			this.g_fAlpha = num3;
			if (!this.FadeOut)
			{
				return;
			}
			GameObject damage = this.Damage;
			int num5 = 0;
			int childCount = damage.transform.childCount;
			if (num5 >= childCount)
			{
				return;
			}
			Material material = this.Damage.transform.GetChild(num5).GetComponent<MeshRenderer>().GetMaterial();
			float num6 = this.g_fAlpha;
			material.SetFloat("_Alpha", num6);
			GameObject damage2 = this.Damage;
			num5++;
			while (damage2 != 0)
			{
			}
		}
		if (this.g_bcDamageCollider.enabled)
		{
			BoxCollider boxCollider = this.g_bcDamageCollider;
			int num7 = 0;
			boxCollider.enabled = num7 != 0;
		}
		float num8 = this.g_fDisTimeVal;
		this.g_fDisTimeVal = num8;
		if (!this.FadeOut)
		{
			GameObject damage3 = this.Damage;
			int num9 = 0;
			int childCount2 = damage3.transform.childCount;
			if (num9 < childCount2)
			{
				MeshCollider component = this.Damage.transform.GetChild(num9).GetComponent<MeshCollider>();
				int num10 = 0;
				component.enabled = num10 != 0;
				GameObject damage4 = this.Damage;
				num9++;
			}
		}
	}

	// Token: 0x06001408 RID: 5128 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001408")]
	[Address(RVA = "0x12F7C20", Offset = "0x12F6C20", VA = "0x1812F7C20", Slot = "9")]
	public override void HitPhysical(AttackData AD)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001409 RID: 5129 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001409")]
	[Address(RVA = "0x12F7A50", Offset = "0x12F6A50", VA = "0x1812F7A50", Slot = "13")]
	public virtual void HitPhysical(float fStrength)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600140A RID: 5130 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600140A")]
	[Address(RVA = "0x12F78E0", Offset = "0x12F68E0", VA = "0x1812F78E0", Slot = "10")]
	public override void HitMagic(AttackData AD)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600140B RID: 5131 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600140B")]
	[Address(RVA = "0x12F85C0", Offset = "0x12F75C0", VA = "0x1812F85C0", Slot = "14")]
	public virtual void SetDamage()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600140C RID: 5132 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600140C")]
	[Address(RVA = "0x12F8B70", Offset = "0x12F7B70", VA = "0x1812F8B70", Slot = "15")]
	public virtual void SetRecovery()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600140D RID: 5133 RVA: 0x0002DC08 File Offset: 0x0002BE08
	[Token(Token = "0x600140D")]
	[Address(RVA = "0x12F8EA0", Offset = "0x12F7EA0", VA = "0x1812F8EA0", Slot = "11")]
	public override void SetTimeScale(float fTimeScale)
	{
		/*
An exception occurred when decompiling this method (0600140D)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void DamageObject::SetTimeScale(System.Single)

 ---> System.ArgumentOutOfRangeException: Non-negative number required. (Parameter 'length')
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
   at System.Array.Copy(Array sourceArray, Array destinationArray, Int32 length)
   at ICSharpCode.Decompiler.ILAst.ILAstBuilder.StackSlot.ModifyStack(StackSlot[] stack, Int32 popCount, Int32 pushCount, ByteCode pushDefinition) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstBuilder.cs:line 51
   at ICSharpCode.Decompiler.ILAst.ILAstBuilder.StackAnalysis(MethodDef methodDef) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstBuilder.cs:line 401
   at ICSharpCode.Decompiler.ILAst.ILAstBuilder.Build(MethodDef methodDef, Boolean optimize, DecompilerContext context) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstBuilder.cs:line 276
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 112
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
   --- End of inner exception stack trace ---
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
   at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
*/;
	}

	// Token: 0x0600140E RID: 5134 RVA: 0x0002DC8C File Offset: 0x0002BE8C
	[Token(Token = "0x600140E")]
	[Address(RVA = "0x6FDD40", Offset = "0x6FCD40", VA = "0x1806FDD40")]
	public bool GetIsDamage()
	{
		return this.g_bDamage;
	}

	// Token: 0x0600140F RID: 5135 RVA: 0x0002DCA0 File Offset: 0x0002BEA0
	[Token(Token = "0x600140F")]
	[Address(RVA = "0x12F4920", Offset = "0x12F3920", VA = "0x1812F4920")]
	public DamageObject()
	{
	}

	// Token: 0x04001E56 RID: 7766
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x4001E56")]
	public GameObject Original;

	// Token: 0x04001E57 RID: 7767
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x4001E57")]
	public GameObject Damage;

	// Token: 0x04001E58 RID: 7768
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x4001E58")]
	public int DamageMoney;

	// Token: 0x04001E59 RID: 7769
	[FieldOffset(Offset = "0x7C")]
	[Token(Token = "0x4001E59")]
	public int DamageHP;

	// Token: 0x04001E5A RID: 7770
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x4001E5A")]
	public int DamageMP;

	// Token: 0x04001E5B RID: 7771
	[FieldOffset(Offset = "0x84")]
	[Token(Token = "0x4001E5B")]
	public ItemSystem.ItemType ItemType;

	// Token: 0x04001E5C RID: 7772
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x4001E5C")]
	public int PropertyID = (int)((ulong)4294967295L);

	// Token: 0x04001E5D RID: 7773
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x4001E5D")]
	public GameObject DamageEffectObject;

	// Token: 0x04001E5E RID: 7774
	[FieldOffset(Offset = "0x98")]
	[Token(Token = "0x4001E5E")]
	public GameObject HitEffectObject;

	// Token: 0x04001E5F RID: 7775
	[FieldOffset(Offset = "0xA0")]
	[Token(Token = "0x4001E5F")]
	public SceneEvent[] OpenEvent;

	// Token: 0x04001E60 RID: 7776
	[FieldOffset(Offset = "0xA8")]
	[Token(Token = "0x4001E60")]
	protected Vector3 g_v3Center;

	// Token: 0x04001E61 RID: 7777
	[FieldOffset(Offset = "0xB8")]
	[Token(Token = "0x4001E61")]
	protected BoxCollider g_BC;

	// Token: 0x04001E62 RID: 7778
	[FieldOffset(Offset = "0xC0")]
	[Token(Token = "0x4001E62")]
	private float g_fOriginalMass = 1f;

	// Token: 0x04001E63 RID: 7779
	[FieldOffset(Offset = "0xC4")]
	[Token(Token = "0x4001E63")]
	private float g_fOriginalAngularDrag = 0.05f;

	// Token: 0x04001E64 RID: 7780
	[FieldOffset(Offset = "0xC8")]
	[Token(Token = "0x4001E64")]
	protected bool g_bDamage;

	// Token: 0x04001E65 RID: 7781
	[Token(Token = "0x4001E65")]
	protected const float g_fDisTime = 4.5f;

	// Token: 0x04001E66 RID: 7782
	[Token(Token = "0x4001E66")]
	protected const float g_fDisSpeed = 1f;

	// Token: 0x04001E67 RID: 7783
	[FieldOffset(Offset = "0xCC")]
	[Token(Token = "0x4001E67")]
	protected float g_fDisTimeVal;

	// Token: 0x04001E68 RID: 7784
	[FieldOffset(Offset = "0xD0")]
	[Token(Token = "0x4001E68")]
	protected float g_fAlpha = 1f;

	// Token: 0x04001E69 RID: 7785
	[FieldOffset(Offset = "0xD4")]
	[Token(Token = "0x4001E69")]
	protected float g_fOriginalHP;

	// Token: 0x04001E6A RID: 7786
	[FieldOffset(Offset = "0xD8")]
	[Token(Token = "0x4001E6A")]
	protected EffectPool g_DamageEffect;

	// Token: 0x04001E6B RID: 7787
	[FieldOffset(Offset = "0xE0")]
	[Token(Token = "0x4001E6B")]
	protected EffectPool g_HitEffect;

	// Token: 0x04001E6C RID: 7788
	[FieldOffset(Offset = "0xE8")]
	[Token(Token = "0x4001E6C")]
	protected Vector3[] g_v3RecoveryPosition;

	// Token: 0x04001E6D RID: 7789
	[FieldOffset(Offset = "0xF0")]
	[Token(Token = "0x4001E6D")]
	protected Quaternion[] g_qRecoveryRotation;

	// Token: 0x04001E6E RID: 7790
	[FieldOffset(Offset = "0xF8")]
	[Token(Token = "0x4001E6E")]
	protected BoxCollider g_bcDamageCollider;

	// Token: 0x04001E6F RID: 7791
	[FieldOffset(Offset = "0x100")]
	[Token(Token = "0x4001E6F")]
	public bool FadeOut = true;
}
