136 lines
4.3 KiB
C#
136 lines
4.3 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
using RecRoom.Core.Combat;
|
|
using RecRoom.Core.Pools;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x02000558 RID: 1368
|
|
[Token(Token = "0x2000558")]
|
|
[StructLayout(3)]
|
|
public class AdjustWeaponForQualitySetting : MonoBehaviour
|
|
{
|
|
// Token: 0x0600294A RID: 10570 RVA: 0x000AB914 File Offset: 0x000A9B14
|
|
[Token(Token = "0x600294A")]
|
|
[Address(RVA = "0xFFABB0", Offset = "0xFF95B0", VA = "0x180FFABB0")]
|
|
private void Start()
|
|
{
|
|
ImpactDecal impactDecalPrefab = this.weapon.impactDecalPrefab;
|
|
this.LKPJNMGHMHM.ImpactDecalOverride = impactDecalPrefab;
|
|
PooledParticle impactParticlePrefab = this.weapon.impactParticlePrefab;
|
|
this.LKPJNMGHMHM.ImpactParticleOverride = impactParticlePrefab;
|
|
SettingsManager instance = SingletonMonoBehaviour.Instance;
|
|
int num = 0;
|
|
if (instance != num && NOBCCPHLPNJ.MMICKFMMLJO)
|
|
{
|
|
this.GFAHHBOFMHP();
|
|
SettingsManager instance2 = SingletonMonoBehaviour.Instance;
|
|
Action<INGEKFNNGDK> action = new Action(this.EHDNCHLIKMF);
|
|
instance2.QualitySettingChanged += action;
|
|
int num2 = 0;
|
|
base.enabled = num2 != 0;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600294B RID: 10571 RVA: 0x000AB9A4 File Offset: 0x000A9BA4
|
|
[Token(Token = "0x600294B")]
|
|
[Address(RVA = "0xFFAAA0", Offset = "0xFF94A0", VA = "0x180FFAAA0")]
|
|
private void OnDestroy()
|
|
{
|
|
SettingsManager instance = SingletonMonoBehaviour.Instance;
|
|
int num = 0;
|
|
if (instance != num)
|
|
{
|
|
SettingsManager instance2 = SingletonMonoBehaviour.Instance;
|
|
Action<INGEKFNNGDK> action = new Action(this.EHDNCHLIKMF);
|
|
instance2.QualitySettingChanged -= action;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600294C RID: 10572 RVA: 0x000AB9E4 File Offset: 0x000A9BE4
|
|
[Token(Token = "0x600294C")]
|
|
[Address(RVA = "0xFFA940", Offset = "0xFF9340", VA = "0x180FFA940")]
|
|
private void EHDNCHLIKMF(INGEKFNNGDK AOKDECDAEEG)
|
|
{
|
|
this.GFAHHBOFMHP();
|
|
}
|
|
|
|
// Token: 0x0600294D RID: 10573 RVA: 0x000AB9F8 File Offset: 0x000A9BF8
|
|
[Token(Token = "0x600294D")]
|
|
[Address(RVA = "0xFFA950", Offset = "0xFF9350", VA = "0x180FFA950")]
|
|
private void GFAHHBOFMHP()
|
|
{
|
|
INGEKFNNGDK qualitySetting = SingletonMonoBehaviour.Instance.KONLNCONKKJ;
|
|
AdjustWeaponForQualitySetting.WeaponSettings[] array = this.overrideSettings;
|
|
int num = (int)qualitySetting;
|
|
if (array != 0)
|
|
{
|
|
int length = array.Length;
|
|
int num2 = 0;
|
|
if (num2 < length)
|
|
{
|
|
if ("{il2cpp array field local4->}" != num)
|
|
{
|
|
num2++;
|
|
}
|
|
this.weapon.impactDecalPrefab = num2;
|
|
AdjustWeaponForQualitySetting.WeaponSettings[] array2 = this.overrideSettings;
|
|
this.weapon.impactParticlePrefab = array2;
|
|
return;
|
|
}
|
|
}
|
|
Weapon weapon = this.weapon;
|
|
ImpactDecal impactDecalOverride = this.LKPJNMGHMHM.ImpactDecalOverride;
|
|
weapon.impactDecalPrefab = impactDecalOverride;
|
|
Weapon weapon2 = this.weapon;
|
|
PooledParticle impactParticleOverride = this.LKPJNMGHMHM.ImpactParticleOverride;
|
|
weapon2.impactParticlePrefab = impactParticleOverride;
|
|
}
|
|
|
|
// Token: 0x0600294E RID: 10574 RVA: 0x000ABAA0 File Offset: 0x000A9CA0
|
|
[Token(Token = "0x600294E")]
|
|
[Address(RVA = "0x3C1210", Offset = "0x3BFC10", VA = "0x1803C1210")]
|
|
public AdjustWeaponForQualitySetting()
|
|
{
|
|
}
|
|
|
|
// Token: 0x040022C8 RID: 8904
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x40022C8")]
|
|
[SerializeField]
|
|
private AdjustWeaponForQualitySetting.WeaponSettings[] overrideSettings;
|
|
|
|
// Token: 0x040022C9 RID: 8905
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x40022C9")]
|
|
[SerializeField]
|
|
[DDPIINEJFMD(JIBDPHMGEGO.Self, false, false)]
|
|
private Weapon weapon;
|
|
|
|
// Token: 0x040022CA RID: 8906
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40022CA")]
|
|
private AdjustWeaponForQualitySetting.WeaponSettings LKPJNMGHMHM;
|
|
|
|
// Token: 0x02000559 RID: 1369
|
|
[Token(Token = "0x2000559")]
|
|
[Serializable]
|
|
public struct WeaponSettings
|
|
{
|
|
// Token: 0x040022CB RID: 8907
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x40022CB")]
|
|
public INGEKFNNGDK QualitySetting;
|
|
|
|
// Token: 0x040022CC RID: 8908
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x8")]
|
|
[Token(Token = "0x40022CC")]
|
|
public ImpactDecal ImpactDecalOverride;
|
|
|
|
// Token: 0x040022CD RID: 8909
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40022CD")]
|
|
public PooledParticle ImpactParticleOverride;
|
|
}
|
|
}
|