390 lines
12 KiB
C#
390 lines
12 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Cpp2IlInjected;
|
|
using RecRoom.Core.AI;
|
|
using UnityEngine;
|
|
|
|
namespace RecRoom.Core.Combat
|
|
{
|
|
// Token: 0x020033CC RID: 13260
|
|
[Token(Token = "0x20033CC")]
|
|
[Serializable]
|
|
public class MeleeWeaponChunk
|
|
{
|
|
// Token: 0x17003FC4 RID: 16324
|
|
// (get) Token: 0x06017236 RID: 94774 RVA: 0x00569A9C File Offset: 0x00567C9C
|
|
[Token(Token = "0x17003FC4")]
|
|
public Vector3 OriginPosition
|
|
{
|
|
[Token(Token = "0x6017236")]
|
|
[Address(RVA = "0x1437890", Offset = "0x1436690", VA = "0x181437890")]
|
|
get
|
|
{
|
|
bool flag;
|
|
if (!flag)
|
|
{
|
|
bool flag2;
|
|
if (!flag2)
|
|
{
|
|
Vector3 zero = Vector3.zero;
|
|
}
|
|
Vector3 vector;
|
|
float z = vector.z;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x17003FC5 RID: 16325
|
|
// (get) Token: 0x06017237 RID: 94775 RVA: 0x00569AC8 File Offset: 0x00567CC8
|
|
[Token(Token = "0x17003FC5")]
|
|
public int Durability
|
|
{
|
|
[Token(Token = "0x6017237")]
|
|
[Address(RVA = "0x3FA560", Offset = "0x3F9360", VA = "0x1803FA560")]
|
|
get
|
|
{
|
|
return this.durability;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17003FC6 RID: 16326
|
|
// (get) Token: 0x06017238 RID: 94776 RVA: 0x00569ADC File Offset: 0x00567CDC
|
|
[Token(Token = "0x17003FC6")]
|
|
public IEnumerable<MeleeWeaponChunk.DurabilityGameObject> DurabilityGameObjects
|
|
{
|
|
[Token(Token = "0x6017238")]
|
|
[Address(RVA = "0x3F6400", Offset = "0x3F5200", VA = "0x1803F6400")]
|
|
get
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06017238)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.Generic.IEnumerable`1<RecRoom.Core.Combat.MeleeWeaponChunk/DurabilityGameObject> RecRoom.Core.Combat.MeleeWeaponChunk::get_DurabilityGameObjects()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:valuetype RecRoom.Core.Combat.MeleeWeaponChunk/DurabilityGameObject[](var_0_06, ldfld:valuetype RecRoom.Core.Combat.MeleeWeaponChunk/DurabilityGameObject[](MeleeWeaponChunk::durabilityGameObjects, ldloc:MeleeWeaponChunk(this)))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
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 355
|
|
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 1660
|
|
*/;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17003FC7 RID: 16327
|
|
// (get) Token: 0x06017239 RID: 94777 RVA: 0x00569AF0 File Offset: 0x00567CF0
|
|
[Token(Token = "0x17003FC7")]
|
|
public float WeaponAttackContribution
|
|
{
|
|
[Token(Token = "0x6017239")]
|
|
[Address(RVA = "0x763220", Offset = "0x762020", VA = "0x180763220")]
|
|
get
|
|
{
|
|
return this.weaponAttackContribution;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17003FC8 RID: 16328
|
|
// (set) Token: 0x0601723A RID: 94778 RVA: 0x00569B04 File Offset: 0x00567D04
|
|
[Token(Token = "0x17003FC8")]
|
|
public int DurabilityDamageTaken
|
|
{
|
|
[Token(Token = "0x601723A")]
|
|
[Address(RVA = "0x1437330", Offset = "0x1436130", VA = "0x181437330")]
|
|
set
|
|
{
|
|
MeleeWeaponChunk.DurabilityGameObject[] array = this.durabilityGameObjects;
|
|
if (array != 0)
|
|
{
|
|
int num = 0;
|
|
int num2 = 0;
|
|
if (num2 < array.Length)
|
|
{
|
|
num += num;
|
|
bool flag = value <= "{il2cpp field on 2, offset 0x2C}";
|
|
MeleeWeaponChunk.DurabilityGameObject[] array2 = this.durabilityGameObjects;
|
|
num++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x17003FC9 RID: 16329
|
|
// (get) Token: 0x0601723B RID: 94779 RVA: 0x00569B50 File Offset: 0x00567D50
|
|
// (set) Token: 0x0601723C RID: 94780 RVA: 0x00569B64 File Offset: 0x00567D64
|
|
[Token(Token = "0x17003FC9")]
|
|
public bool IsEnabled
|
|
{
|
|
[Token(Token = "0x601723B")]
|
|
[Address(RVA = "0xAF8AC0", Offset = "0xAF78C0", VA = "0x180AF8AC0")]
|
|
get
|
|
{
|
|
return this._isEnabled;
|
|
}
|
|
[Token(Token = "0x601723C")]
|
|
[Address(RVA = "0x14379B0", Offset = "0x14367B0", VA = "0x1814379B0")]
|
|
set
|
|
{
|
|
this._isEnabled = value;
|
|
this.KEFJFGLPCGI();
|
|
this.OEJHLOAANFG();
|
|
if (!value)
|
|
{
|
|
if (this.isShattered != value)
|
|
{
|
|
return;
|
|
}
|
|
RagdollPiece[] array = this.ragdollPieces;
|
|
int num = 0;
|
|
if (num >= array.Length)
|
|
{
|
|
return;
|
|
}
|
|
GameObject gameObject = array[num].gameObject;
|
|
int num2 = 0;
|
|
gameObject.SetActive(num2 != 0);
|
|
RagdollPiece[] array2 = this.ragdollPieces;
|
|
num++;
|
|
}
|
|
RagdollPiece[] array3 = this.ragdollPieces;
|
|
int num3 = 0;
|
|
this.isShattered = false;
|
|
if (num3 < array3.Length)
|
|
{
|
|
array3[num3].gameObject.SetActive(true);
|
|
this.ragdollPieces[num3].StopRagdoll();
|
|
RagdollPiece[] array4 = this.ragdollPieces;
|
|
num3++;
|
|
while (array4 != 0)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0601723D RID: 94781 RVA: 0x00569C24 File Offset: 0x00567E24
|
|
[Token(Token = "0x601723D")]
|
|
[Address(RVA = "0x1437860", Offset = "0x1436660", VA = "0x181437860")]
|
|
public void OFFLOPLJBBG(MeleeWeapon GDIGKHINJCG)
|
|
{
|
|
this.weapon = GDIGKHINJCG;
|
|
int num = 0;
|
|
this.isShattered = false;
|
|
this.DurabilityDamageTaken = num;
|
|
}
|
|
|
|
// Token: 0x0601723E RID: 94782 RVA: 0x00569C48 File Offset: 0x00567E48
|
|
[Token(Token = "0x601723E")]
|
|
[Address(RVA = "0x14373E0", Offset = "0x14361E0", VA = "0x1814373E0")]
|
|
public void EMLOHBHENFF(Vector3 POMGIDPAKLH, float OCHEHCGCCIJ)
|
|
{
|
|
int num = 0;
|
|
this.isShattered = true;
|
|
RagdollPiece[] array = this.ragdollPieces;
|
|
if (num < array.Length)
|
|
{
|
|
array[num].gameObject.SetActive(true);
|
|
RagdollPiece ragdollPiece = this.ragdollPieces[num];
|
|
Vector3 vector;
|
|
float z = vector.z;
|
|
float z2 = POMGIDPAKLH.z;
|
|
RagdollPiece[] array2 = this.ragdollPieces;
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0601723F RID: 94783 RVA: 0x00569CB0 File Offset: 0x00567EB0
|
|
[Token(Token = "0x601723F")]
|
|
[Address(RVA = "0x1437540", Offset = "0x1436340", VA = "0x181437540")]
|
|
public void KEFJFGLPCGI()
|
|
{
|
|
MeleeWeaponCollider[] array = this.meleeColliders;
|
|
int num = 0;
|
|
if (num < array.Length)
|
|
{
|
|
MeleeWeaponCollider meleeWeaponCollider = array[num];
|
|
int num2 = 0;
|
|
if (meleeWeaponCollider != num2)
|
|
{
|
|
MeleeWeaponCollider meleeWeaponCollider2 = this.meleeColliders[num];
|
|
bool enabled = meleeWeaponCollider2.enabled;
|
|
bool isEnabled = this._isEnabled;
|
|
meleeWeaponCollider2.enabled = isEnabled;
|
|
}
|
|
MeleeWeaponCollider[] array2 = this.meleeColliders;
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06017240 RID: 94784 RVA: 0x00569D20 File Offset: 0x00567F20
|
|
[Token(Token = "0x6017240")]
|
|
[Address(RVA = "0x14377C0", Offset = "0x14365C0", VA = "0x1814377C0")]
|
|
public void OEJHLOAANFG()
|
|
{
|
|
DynamicMeshTrail[] array = this.trails;
|
|
int num = 0;
|
|
if (num < array.Length)
|
|
{
|
|
DynamicMeshTrail dynamicMeshTrail = array[num];
|
|
bool enabled = dynamicMeshTrail.enabled;
|
|
bool isEnabled = this._isEnabled;
|
|
dynamicMeshTrail.enabled = isEnabled;
|
|
DynamicMeshTrail[] array2 = this.trails;
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06017241 RID: 94785 RVA: 0x00569D70 File Offset: 0x00567F70
|
|
[Token(Token = "0x6017241")]
|
|
[Address(RVA = "0x1437730", Offset = "0x1436530", VA = "0x181437730")]
|
|
private void MMPLKGAPCAO()
|
|
{
|
|
if (!this.isShattered)
|
|
{
|
|
RagdollPiece[] array = this.ragdollPieces;
|
|
int num = 0;
|
|
if (num < array.Length)
|
|
{
|
|
GameObject gameObject = array[num].gameObject;
|
|
int num2 = 0;
|
|
gameObject.SetActive(num2 != 0);
|
|
RagdollPiece[] array2 = this.ragdollPieces;
|
|
num++;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06017242 RID: 94786 RVA: 0x00569DC0 File Offset: 0x00567FC0
|
|
[Token(Token = "0x6017242")]
|
|
[Address(RVA = "0x1437660", Offset = "0x1436460", VA = "0x181437660")]
|
|
private void MEAOOANLNHB()
|
|
{
|
|
RagdollPiece[] array = this.ragdollPieces;
|
|
int num = 0;
|
|
this.isShattered = false;
|
|
if (num < array.Length)
|
|
{
|
|
array[num].gameObject.SetActive(true);
|
|
this.ragdollPieces[num].StopRagdoll();
|
|
RagdollPiece[] array2 = this.ragdollPieces;
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06017243 RID: 94787 RVA: 0x00569E1C File Offset: 0x0056801C
|
|
[Token(Token = "0x6017243")]
|
|
[Address(RVA = "0x1437330", Offset = "0x1436130", VA = "0x181437330")]
|
|
private void DNIDIIKMKLM(int IOPIDGNPMLF)
|
|
{
|
|
MeleeWeaponChunk.DurabilityGameObject[] array = this.durabilityGameObjects;
|
|
if (array != 0)
|
|
{
|
|
int num = 0;
|
|
int num2 = 0;
|
|
if (num2 < array.Length)
|
|
{
|
|
num += num;
|
|
bool flag = IOPIDGNPMLF <= "{il2cpp field on 2, offset 0x2C}";
|
|
MeleeWeaponChunk.DurabilityGameObject[] array2 = this.durabilityGameObjects;
|
|
num++;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06017244 RID: 94788 RVA: 0x00569E68 File Offset: 0x00568068
|
|
[Token(Token = "0x6017244")]
|
|
[Address(RVA = "0x1437880", Offset = "0x1436680", VA = "0x181437880")]
|
|
public MeleeWeaponChunk()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400F0F8 RID: 61688
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400F0F8")]
|
|
[SerializeField]
|
|
[Header("Config")]
|
|
private int durability;
|
|
|
|
// Token: 0x0400F0F9 RID: 61689
|
|
[FieldOffset(Offset = "0x14")]
|
|
[Token(Token = "0x400F0F9")]
|
|
[SerializeField]
|
|
private float weaponAttackContribution;
|
|
|
|
// Token: 0x0400F0FA RID: 61690
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400F0FA")]
|
|
[SerializeField]
|
|
[Header("References")]
|
|
private Transform origin;
|
|
|
|
// Token: 0x0400F0FB RID: 61691
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400F0FB")]
|
|
[SerializeField]
|
|
private MeleeWeaponChunk.DurabilityGameObject[] durabilityGameObjects;
|
|
|
|
// Token: 0x0400F0FC RID: 61692
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400F0FC")]
|
|
[SerializeField]
|
|
private RagdollPiece[] ragdollPieces;
|
|
|
|
// Token: 0x0400F0FD RID: 61693
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x400F0FD")]
|
|
[SerializeField]
|
|
private MeleeWeaponCollider[] meleeColliders;
|
|
|
|
// Token: 0x0400F0FE RID: 61694
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x400F0FE")]
|
|
[SerializeField]
|
|
private DynamicMeshTrail[] trails;
|
|
|
|
// Token: 0x0400F0FF RID: 61695
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x400F0FF")]
|
|
private Weapon weapon;
|
|
|
|
// Token: 0x0400F100 RID: 61696
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x400F100")]
|
|
private bool isShattered;
|
|
|
|
// Token: 0x0400F101 RID: 61697
|
|
[FieldOffset(Offset = "0x49")]
|
|
[Token(Token = "0x400F101")]
|
|
private bool _isEnabled = true;
|
|
|
|
// Token: 0x020033CD RID: 13261
|
|
[Token(Token = "0x20033CD")]
|
|
[Serializable]
|
|
public struct DurabilityGameObject
|
|
{
|
|
// Token: 0x0400F102 RID: 61698
|
|
[FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x400F102")]
|
|
public GameObject GameObject;
|
|
|
|
// Token: 0x0400F103 RID: 61699
|
|
[FieldOffset(Offset = "0x8")]
|
|
[Token(Token = "0x400F103")]
|
|
public int MinimumVisibilityDamage;
|
|
|
|
// Token: 0x0400F104 RID: 61700
|
|
[FieldOffset(Offset = "0xC")]
|
|
[Token(Token = "0x400F104")]
|
|
public int MaximumVisibilityDamage;
|
|
}
|
|
}
|
|
}
|