Files
NobetaSource/Cpp2IL/Assembly-CSharp/Item.cs
2023-09-06 22:09:22 +02:00

285 lines
9.8 KiB
C#

using System;
using Cpp2IlInjected;
using UnityEngine;
// Token: 0x0200015A RID: 346
[Token(Token = "0x200015A")]
public class Item : PassiveEvent
{
// Token: 0x06001193 RID: 4499 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6001193")]
[Address(RVA = "0x10BD710", Offset = "0x10BBF10", VA = "0x1810BD710", Slot = "5")]
public override void Init()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06001194 RID: 4500 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6001194")]
[Address(RVA = "0x10BD920", Offset = "0x10BC120", VA = "0x1810BD920", Slot = "6")]
protected override void Update()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06001195 RID: 4501 RVA: 0x00028774 File Offset: 0x00026974
[Token(Token = "0x6001195")]
[Address(RVA = "0x10BD890", Offset = "0x10BC090", VA = "0x1810BD890")]
private void OnEnable()
{
this.g_fFall = 3f;
Transform transform = this.CheckFloor();
}
// Token: 0x06001196 RID: 4502 RVA: 0x00028794 File Offset: 0x00026994
[Token(Token = "0x6001196")]
[Address(RVA = "0x10BD460", Offset = "0x10BBC60", VA = "0x1810BD460")]
private void CheckAliveTime(float deltaTime)
{
float num = this.aliveTime;
if (0 < (int)num)
{
this.aliveTime = num;
GameObject gameObject = base.gameObject;
int num2 = 0;
gameObject.SetActive(num2 != 0);
Action action = this.returnHandler;
if (action != 0)
{
action();
return;
}
}
}
// Token: 0x06001197 RID: 4503 RVA: 0x000287DC File Offset: 0x000269DC
[Token(Token = "0x6001197")]
[Address(RVA = "0x5D2AB0", Offset = "0x5D12B0", VA = "0x1805D2AB0")]
public void BindReturnHandlerEvent(Action returnHandler)
{
/*
An exception occurred when decompiling this method (06001197)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void Item::BindReturnHandlerEvent(System.Action)
---> System.Exception: Basic block has to end with unconditional control flow.
{; Block_0:; stfld:Action(Item::returnHandler, ldloc:Item(this), ldloc:Action(returnHandler)); };
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
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 123
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: 0x06001198 RID: 4504 RVA: 0x000287F0 File Offset: 0x000269F0
[Token(Token = "0x6001198")]
[Address(RVA = "0x58B030", Offset = "0x589830", VA = "0x18058B030")]
public void SetItemType(ItemSystem.ItemType Type)
{
this.currentItemType = Type;
}
// Token: 0x06001199 RID: 4505 RVA: 0x00028804 File Offset: 0x00026A04
[Token(Token = "0x6001199")]
[Address(RVA = "0x490D70", Offset = "0x48F570", VA = "0x180490D70")]
public ItemSystem.ItemType GetItemType()
{
return this.currentItemType;
}
// Token: 0x0600119A RID: 4506 RVA: 0x00028818 File Offset: 0x00026A18
[Token(Token = "0x600119A")]
[Address(RVA = "0xFCBE80", Offset = "0xFCA680", VA = "0x180FCBE80")]
public void SetCanSave(bool bSave)
{
this.g_bCanSave = bSave;
}
// Token: 0x0600119B RID: 4507 RVA: 0x0002882C File Offset: 0x00026A2C
[Token(Token = "0x600119B")]
[Address(RVA = "0x9F81B0", Offset = "0x9F69B0", VA = "0x1809F81B0")]
public bool GetCanSave()
{
return this.g_bCanSave;
}
// Token: 0x0600119C RID: 4508 RVA: 0x00028840 File Offset: 0x00026A40
[Token(Token = "0x600119C")]
[Address(RVA = "0x10BD8F0", Offset = "0x10BC0F0", VA = "0x1810BD8F0")]
public void SetDiscard(bool bDiscard)
{
this.g_bDiscard = bDiscard;
this.boxCollider.enabled = bDiscard;
}
// Token: 0x0600119D RID: 4509 RVA: 0x00028868 File Offset: 0x00026A68
[Token(Token = "0x600119D")]
[Address(RVA = "0x10BD8A0", Offset = "0x10BC0A0", VA = "0x1810BD8A0")]
public void PickUp()
{
GameObject gameObject = base.gameObject;
int num = 0;
gameObject.SetActive(num != 0);
Action action = this.returnHandler;
if (action != 0)
{
action();
return;
}
}
// Token: 0x0600119E RID: 4510 RVA: 0x000288A0 File Offset: 0x00026AA0
[Token(Token = "0x600119E")]
[Address(RVA = "0x10BD8A0", Offset = "0x10BC0A0", VA = "0x1810BD8A0")]
private void ReturnItem()
{
GameObject gameObject = base.gameObject;
int num = 0;
gameObject.SetActive(num != 0);
Action action = this.returnHandler;
if (action != 0)
{
action();
return;
}
}
// Token: 0x0600119F RID: 4511 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x600119F")]
[Address(RVA = "0x10BD4C0", Offset = "0x10BBCC0", VA = "0x1810BD4C0")]
public Transform CheckFloor()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060011A0 RID: 4512 RVA: 0x000288D8 File Offset: 0x00026AD8
[Token(Token = "0x60011A0")]
[Address(RVA = "0x4AB650", Offset = "0x4A9E50", VA = "0x1804AB650")]
public float GetUseItem()
{
return this.g_fUseTime;
}
// Token: 0x060011A1 RID: 4513 RVA: 0x000288EC File Offset: 0x00026AEC
[Token(Token = "0x60011A1")]
[Address(RVA = "0x9E3AB0", Offset = "0x9E22B0", VA = "0x1809E3AB0")]
public void SetAliveTime(float time)
{
this.aliveTime = time;
}
// Token: 0x060011A2 RID: 4514 RVA: 0x00028900 File Offset: 0x00026B00
[Token(Token = "0x60011A2")]
[Address(RVA = "0x778D70", Offset = "0x777570", VA = "0x180778D70")]
public void SetPropertyID(int ID)
{
this.g_iPropertyID = ID;
}
// Token: 0x060011A3 RID: 4515 RVA: 0x00028914 File Offset: 0x00026B14
[Token(Token = "0x60011A3")]
[Address(RVA = "0x765D40", Offset = "0x764540", VA = "0x180765D40")]
public int GetPropertyID()
{
return this.g_iPropertyID;
}
// Token: 0x060011A4 RID: 4516 RVA: 0x00028928 File Offset: 0x00026B28
[Token(Token = "0x60011A4")]
[Address(RVA = "0x10BE180", Offset = "0x10BC980", VA = "0x1810BE180")]
public Item()
{
}
// Token: 0x04001B7D RID: 7037
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4001B7D")]
private ItemSystem g_IM;
// Token: 0x04001B7E RID: 7038
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x4001B7E")]
public Transform ItemObject;
// Token: 0x04001B7F RID: 7039
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x4001B7F")]
private ItemSystem.ItemType currentItemType;
// Token: 0x04001B80 RID: 7040
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x4001B80")]
private BoxCollider boxCollider;
// Token: 0x04001B81 RID: 7041
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x4001B81")]
private bool g_bFall;
// Token: 0x04001B82 RID: 7042
[Token(Token = "0x4001B82")]
private const float g_fGravity = 20f;
// Token: 0x04001B83 RID: 7043
[Token(Token = "0x4001B83")]
private const float g_fFallMax = -10f;
// Token: 0x04001B84 RID: 7044
[FieldOffset(Offset = "0x44")]
[Token(Token = "0x4001B84")]
private float g_fFall;
// Token: 0x04001B85 RID: 7045
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x4001B85")]
private float g_fFloorY;
// Token: 0x04001B86 RID: 7046
[FieldOffset(Offset = "0x4C")]
[Token(Token = "0x4001B86")]
private float g_fRotateSpeed = 100f;
// Token: 0x04001B87 RID: 7047
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x4001B87")]
public float g_fUseTime = 1f;
// Token: 0x04001B88 RID: 7048
[FieldOffset(Offset = "0x54")]
[Token(Token = "0x4001B88")]
private float aliveTime;
// Token: 0x04001B89 RID: 7049
[FieldOffset(Offset = "0x58")]
[Token(Token = "0x4001B89")]
private LayerMask g_FloorMask;
// Token: 0x04001B8A RID: 7050
[FieldOffset(Offset = "0x5C")]
[Token(Token = "0x4001B8A")]
private bool g_bTagMoveFloor;
// Token: 0x04001B8B RID: 7051
[FieldOffset(Offset = "0x5D")]
[Token(Token = "0x4001B8B")]
private bool g_bDiscard;
// Token: 0x04001B8C RID: 7052
[FieldOffset(Offset = "0x5E")]
[Token(Token = "0x4001B8C")]
private bool g_bCanSave;
// Token: 0x04001B8D RID: 7053
[FieldOffset(Offset = "0x60")]
[Token(Token = "0x4001B8D")]
private int g_iPropertyID = (int)((ulong)4294967295L);
// Token: 0x04001B8E RID: 7054
[FieldOffset(Offset = "0x68")]
[Token(Token = "0x4001B8E")]
private Action returnHandler;
}