310 lines
9.1 KiB
C#
310 lines
9.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
using RecRoom.Core;
|
|
using RecRoom.Core.Combat;
|
|
using RecRoom.Tools.Weapons;
|
|
using UnityEngine;
|
|
|
|
namespace RecRoom.Activities.Quest
|
|
{
|
|
// Token: 0x020026FB RID: 9979
|
|
[Token(Token = "0x20026FB")]
|
|
[StructLayout(3)]
|
|
public class DraculaQuestGear : QuestGear
|
|
{
|
|
// Token: 0x06011598 RID: 71064 RVA: 0x0041D6AC File Offset: 0x0041B8AC
|
|
[Token(Token = "0x6011598")]
|
|
[Address(RVA = "0x1100CA0", Offset = "0x10FF6A0", VA = "0x181100CA0")]
|
|
private void Awake()
|
|
{
|
|
Whip component = base.GetComponent<Whip>();
|
|
this.KBJEFNJJJHF = component;
|
|
int num = 0;
|
|
if (!(component != num))
|
|
{
|
|
RangedWeapon component2 = base.GetComponent<RangedWeapon>();
|
|
this.CHOKCBJIJAL = component2;
|
|
int num2 = 0;
|
|
if (!(component2 != num2))
|
|
{
|
|
goto IL_F3;
|
|
}
|
|
RangedWeapon chokcbjijal = this.CHOKCBJIJAL;
|
|
Action action = new Action(this.MIKJDLDPIEP);
|
|
chokcbjijal.OFOLKCFPBEN += action;
|
|
}
|
|
Tool tool = this.KBJEFNJJJHF._tool;
|
|
Tool.OGLAJAFKBMN oglajafkbmn = new Tool.OGLAJAFKBMN(this.PLEALOIKBJO);
|
|
tool.AddCustomPickupCondition(oglajafkbmn);
|
|
Tool tool2 = this.KBJEFNJJJHF._tool;
|
|
Tool.EHOOCLKEMPD ehooclkempd = new Tool.EHOOCLKEMPD(this.IOOHPKMPGLP);
|
|
tool2.AddCustomEquipCondition(ehooclkempd);
|
|
Tool tool3 = this.KBJEFNJJJHF._tool;
|
|
ActionEvent<Tool> postPickupEvent = tool3.PostPickupEvent;
|
|
Action<Tool> action2 = new Action(this.NJJFPMFFICD);
|
|
ActionEvent<Tool> actionEvent = postPickupEvent + action2;
|
|
tool3.PostPickupEvent = actionEvent;
|
|
Action<float> action3 = new Action(this.DMMOMLKNNKI);
|
|
IDisposable disposable = ScheduledUpdateMonoBehaviourExtensions.UpdateAtRate(this, 5f, action3);
|
|
IL_F3:
|
|
Whip kbjefnjjjhf = this.KBJEFNJJJHF;
|
|
int num3 = 0;
|
|
if (kbjefnjjjhf == num3)
|
|
{
|
|
RangedWeapon chokcbjijal2 = this.CHOKCBJIJAL;
|
|
int num4 = 0;
|
|
if (chokcbjijal2 == num4)
|
|
{
|
|
global::UnityEngine.Object.Destroy(this);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06011599 RID: 71065 RVA: 0x0041D7E8 File Offset: 0x0041B9E8
|
|
[Token(Token = "0x6011599")]
|
|
[Address(RVA = "0x11019B0", Offset = "0x11003B0", VA = "0x1811019B0")]
|
|
private void OnDestroy()
|
|
{
|
|
Whip kbjefnjjjhf = this.KBJEFNJJJHF;
|
|
int num = 0;
|
|
if (kbjefnjjjhf != num)
|
|
{
|
|
Tool tool = this.KBJEFNJJJHF._tool;
|
|
Tool.OGLAJAFKBMN oglajafkbmn = new Tool.OGLAJAFKBMN(this.PLEALOIKBJO);
|
|
tool.RemoveCustomPickupCondition(oglajafkbmn);
|
|
Tool tool2 = this.KBJEFNJJJHF._tool;
|
|
Tool.EHOOCLKEMPD ehooclkempd = new Tool.EHOOCLKEMPD(this.IOOHPKMPGLP);
|
|
tool2.RemoveCustomEquipCondition(ehooclkempd);
|
|
Tool tool3 = this.KBJEFNJJJHF._tool;
|
|
ActionEvent<Tool> postPickupEvent = tool3.PostPickupEvent;
|
|
Action<Tool> action = new Action(this.NJJFPMFFICD);
|
|
ActionEvent<Tool> actionEvent = postPickupEvent - action;
|
|
tool3.PostPickupEvent = actionEvent;
|
|
}
|
|
RangedWeapon chokcbjijal = this.CHOKCBJIJAL;
|
|
int num2 = 0;
|
|
if (chokcbjijal != num2)
|
|
{
|
|
RangedWeapon chokcbjijal2 = this.CHOKCBJIJAL;
|
|
Action action2 = new Action(this.MIKJDLDPIEP);
|
|
chokcbjijal2.OFOLKCFPBEN -= action2;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0601159A RID: 71066 RVA: 0x0041D8C0 File Offset: 0x0041BAC0
|
|
[Token(Token = "0x601159A")]
|
|
[Address(RVA = "0x1101BA0", Offset = "0x11005A0", VA = "0x181101BA0")]
|
|
private bool PLEALOIKBJO(Tool NBHJPDBHDHB, Player NHCEBNBEEBE, Vector3 JEDLNAEEMEN, bool GEJJBENPHJG)
|
|
{
|
|
int num;
|
|
int num2;
|
|
do
|
|
{
|
|
num = 0;
|
|
IReadOnlyList<PlayerHand> bothHands = NHCEBNBEEBE.BothHands;
|
|
if (bothHands != 0)
|
|
{
|
|
bool flag;
|
|
while (!flag)
|
|
{
|
|
}
|
|
OGNBCNBPFCC ognbcnbpfcc;
|
|
while (ognbcnbpfcc != OGNBCNBPFCC.DRACULA_WHIP)
|
|
{
|
|
}
|
|
}
|
|
num2 = 0;
|
|
if (bothHands != 0)
|
|
{
|
|
}
|
|
if (num != -1)
|
|
{
|
|
if (typeof(IDisposable).TypeHandle == (ulong)160L)
|
|
{
|
|
}
|
|
if (typeof(IDisposable).TypeHandle == (ulong)77L)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
while (num != 0);
|
|
PlayerToolEquipSlot[] <HBBPIPDDLKN>k__BackingField = NHCEBNBEEBE.toolEquipSlots.<HBBPIPDDLKN>k__BackingField;
|
|
int length = <HBBPIPDDLKN>k__BackingField.Length;
|
|
if (num2 < length)
|
|
{
|
|
PlayerToolEquipSlot playerToolEquipSlot = <HBBPIPDDLKN>k__BackingField[num2];
|
|
if (playerToolEquipSlot.FDMFNIJKHKC && playerToolEquipSlot.EFEKNEEGDIP.OGNBCNBPFCC == OGNBCNBPFCC.DRACULA_WHIP)
|
|
{
|
|
Tool equippedTool = playerToolEquipSlot.EFEKNEEGDIP;
|
|
if (num != equippedTool)
|
|
{
|
|
goto IL_A2;
|
|
}
|
|
}
|
|
num2++;
|
|
}
|
|
IL_A2:
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0601159B RID: 71067 RVA: 0x0041D988 File Offset: 0x0041BB88
|
|
[Token(Token = "0x601159B")]
|
|
[Address(RVA = "0x1101580", Offset = "0x10FFF80", VA = "0x181101580")]
|
|
private void NJJFPMFFICD(Tool NBHJPDBHDHB)
|
|
{
|
|
int num;
|
|
do
|
|
{
|
|
num = 0;
|
|
Player <OKDFEPHLKCB>k__BackingField = NBHJPDBHDHB.<OKDFEPHLKCB>k__BackingField;
|
|
Player <EGKJPJKLEAI>k__BackingField = Player.<EGKJPJKLEAI>k__BackingField;
|
|
if (!(<OKDFEPHLKCB>k__BackingField == <EGKJPJKLEAI>k__BackingField))
|
|
{
|
|
break;
|
|
}
|
|
IReadOnlyList<PlayerHand> bothHands = Player.<EGKJPJKLEAI>k__BackingField.BothHands;
|
|
if (bothHands != 0)
|
|
{
|
|
bool flag;
|
|
while (!flag)
|
|
{
|
|
}
|
|
bool flag2;
|
|
while (!flag2)
|
|
{
|
|
}
|
|
OGNBCNBPFCC ognbcnbpfcc;
|
|
while (ognbcnbpfcc != OGNBCNBPFCC.DRACULA_WHIP)
|
|
{
|
|
}
|
|
Vector3 zero = Vector3.zero;
|
|
Vector3 zero2 = Vector3.zero;
|
|
IDisposable disposable = SingletonMonoBehaviour.Instance.Play((NotificationManager.IBIDFAOPIPC)((uint)1), "No dual wielding... don't be sneaky!", 2f, num, num);
|
|
}
|
|
if (bothHands != 0)
|
|
{
|
|
}
|
|
if (num != -1)
|
|
{
|
|
}
|
|
}
|
|
while (num != 0);
|
|
}
|
|
|
|
// Token: 0x0601159C RID: 71068 RVA: 0x0041DA24 File Offset: 0x0041BC24
|
|
[Token(Token = "0x601159C")]
|
|
[Address(RVA = "0x1101050", Offset = "0x10FFA50", VA = "0x181101050")]
|
|
private bool IOOHPKMPGLP(Tool EGFEJGHDNAI, Player BGKPFFGBMCC, FNCLOCJLFDG HCPBBFGIBAB)
|
|
{
|
|
int num4;
|
|
int num5;
|
|
do
|
|
{
|
|
int num = 0;
|
|
int num2 = 0;
|
|
if (!(BGKPFFGBMCC != num2))
|
|
{
|
|
return true;
|
|
}
|
|
IReadOnlyList<PlayerHand> bothHands = BGKPFFGBMCC.BothHands;
|
|
if (bothHands != 0)
|
|
{
|
|
int num3 = 0;
|
|
if (!(EGFEJGHDNAI != num3) || EGFEJGHDNAI.OGNBCNBPFCC != OGNBCNBPFCC.DRACULA_WHIP)
|
|
{
|
|
continue;
|
|
}
|
|
bool flag;
|
|
while (!flag)
|
|
{
|
|
}
|
|
num4 = 0;
|
|
}
|
|
num5 = 0;
|
|
if (bothHands != 0)
|
|
{
|
|
}
|
|
if (num != -1)
|
|
{
|
|
if (typeof(IDisposable).TypeHandle == (ulong)186L)
|
|
{
|
|
}
|
|
if (typeof(IDisposable).TypeHandle == (ulong)103L)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
while (num4 != 0);
|
|
PlayerToolEquipSlot[] <HBBPIPDDLKN>k__BackingField = BGKPFFGBMCC.toolEquipSlots.<HBBPIPDDLKN>k__BackingField;
|
|
int length = <HBBPIPDDLKN>k__BackingField.Length;
|
|
if (num5 < length)
|
|
{
|
|
PlayerToolEquipSlot playerToolEquipSlot = <HBBPIPDDLKN>k__BackingField[num5];
|
|
if (playerToolEquipSlot.FDMFNIJKHKC && playerToolEquipSlot.EFEKNEEGDIP.OGNBCNBPFCC == OGNBCNBPFCC.DRACULA_WHIP)
|
|
{
|
|
Tool equippedTool = playerToolEquipSlot.EFEKNEEGDIP;
|
|
if (EGFEJGHDNAI != equippedTool)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
num5++;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// Token: 0x0601159D RID: 71069 RVA: 0x0041DB08 File Offset: 0x0041BD08
|
|
[Token(Token = "0x601159D")]
|
|
[Address(RVA = "0x1100F90", Offset = "0x10FF990", VA = "0x181100F90")]
|
|
private void DMMOMLKNNKI(float POGAEJIEPIM)
|
|
{
|
|
Whip kbjefnjjjhf = this.KBJEFNJJJHF;
|
|
int num = 0;
|
|
if (!(kbjefnjjjhf == num) && this.KBJEFNJJJHF._tool.<JGABDFBGDEB>k__BackingField.PAJGCGDFHKK)
|
|
{
|
|
this.KBJEFNJJJHF._tool.<JGABDFBGDEB>k__BackingField.CheckCleanup();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0601159E RID: 71070 RVA: 0x0041DB5C File Offset: 0x0041BD5C
|
|
[Token(Token = "0x601159E")]
|
|
[Address(RVA = "0x11013D0", Offset = "0x10FFDD0", VA = "0x1811013D0")]
|
|
private void MIKJDLDPIEP()
|
|
{
|
|
if (this.CHOKCBJIJAL.hasAuthority && this.CHOKCBJIJAL.FPLOELJHIHK && NetworkedSingletonMonoBehaviour.FFNIFALJLDD)
|
|
{
|
|
Tool tool = this.CHOKCBJIJAL._tool;
|
|
ActionEvent<Tool, Vector3, Quaternion, Vector3, bool> postResetEvent = tool.PostResetEvent;
|
|
Action<Tool, Vector3, Quaternion, Vector3, bool> action = new Action(NetworkedSingletonMonoBehaviour.ONCPNMDGGKG.spawnManager.OnSpawnedToolReset);
|
|
ActionEvent<Tool, Vector3, Quaternion, Vector3, bool> actionEvent = postResetEvent + action;
|
|
tool.PostResetEvent = actionEvent;
|
|
ToolCleanup <JGABDFBGDEB>k__BackingField = this.CHOKCBJIJAL._tool.<JGABDFBGDEB>k__BackingField;
|
|
int num = 0;
|
|
<JGABDFBGDEB>k__BackingField.AuthorityQueueForceCleanup(num != 0);
|
|
this.CHOKCBJIJAL._tool.<JGABDFBGDEB>k__BackingField.defaultDelayUntilCleanup = 0f;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0601159F RID: 71071 RVA: 0x0041DC08 File Offset: 0x0041BE08
|
|
[Token(Token = "0x601159F")]
|
|
[Address(RVA = "0x6A4030", Offset = "0x6A2A30", VA = "0x1806A4030")]
|
|
public DraculaQuestGear()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400B95C RID: 47452
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400B95C")]
|
|
private Whip KBJEFNJJJHF;
|
|
|
|
// Token: 0x0400B95D RID: 47453
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400B95D")]
|
|
private RangedWeapon CHOKCBJIJAL;
|
|
}
|
|
}
|