62 lines
1.5 KiB
C#
62 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using RecNet;
|
|
|
|
namespace RecRoom.Challenges
|
|
{
|
|
// Token: 0x02000B3A RID: 2874
|
|
public class VarNumResolver<T> : NumResolver<T> where T : struct, IConvertible
|
|
{
|
|
// Token: 0x06015BCA RID: 89034 RVA: 0x0060726C File Offset: 0x0060546C
|
|
public VarNumResolver()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06015BCB RID: 89035 RVA: 0x00607274 File Offset: 0x00605474
|
|
public VarNumResolver(string VarKey)
|
|
{
|
|
this.VarKey = VarKey;
|
|
}
|
|
|
|
// Token: 0x1700091E RID: 2334
|
|
// (get) Token: 0x06015BCC RID: 89036 RVA: 0x00607284 File Offset: 0x00605484
|
|
public override NumResolverTypes NumResolverType
|
|
{
|
|
get
|
|
{
|
|
return NumResolverTypes.Var;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06015BCD RID: 89037 RVA: 0x00607288 File Offset: 0x00605488
|
|
public override T? GetValue(ChallengeEvents.IChallengeEventData eventData)
|
|
{
|
|
object var = eventData.GetVar(this.VarKey);
|
|
if (var != null)
|
|
{
|
|
T t = (T)((object)var);
|
|
return new T?(t);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x06015BCE RID: 89038 RVA: 0x006072C0 File Offset: 0x006054C0
|
|
public override Dictionary<string, object> Serialize()
|
|
{
|
|
Dictionary<string, object> dictionary = base.Serialize();
|
|
dictionary["vk"] = this.VarKey;
|
|
return dictionary;
|
|
}
|
|
|
|
// Token: 0x06015BCF RID: 89039 RVA: 0x006072E8 File Offset: 0x006054E8
|
|
public override void Deserialize(Dictionary<string, object> jsonDict)
|
|
{
|
|
this.VarKey = OFPFHHLNHIC.KOFIKGFMMKD<string>("vk", jsonDict);
|
|
}
|
|
|
|
// Token: 0x04003CC7 RID: 15559
|
|
[DBGMDIHCPIN]
|
|
public string VarKey;
|
|
}
|
|
}
|