forked from aly/qstbak
muffin v7.5.6
This commit is contained in:
parent
6266f9e6b7
commit
addf2d530f
619 changed files with 264792 additions and 446022 deletions
|
|
@ -1,8 +1,15 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Application.Network.WorkDefinitions;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using Lumina.Excel.Sheets;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Data;
|
||||
using Questionable.Model;
|
||||
|
|
@ -36,134 +43,867 @@ internal sealed class AlliedSocietyQuestFunctions
|
|||
|
||||
private static uint Transform(uint s0, uint s1)
|
||||
{
|
||||
uint num = s0 ^ (s0 << 11);
|
||||
return s1 ^ num ^ ((num ^ (s1 >> 11)) >> 8);
|
||||
int num = (int)(s0 << 11);
|
||||
int num2 = (int)s0;
|
||||
int num3 = num2 + num;
|
||||
int num4 = num2 & num;
|
||||
uint num5 = (uint)(num3 - (num4 + num4));
|
||||
num = (int)num5;
|
||||
num2 = (int)s1;
|
||||
int num6 = num2 + num;
|
||||
int num7 = num2 & num;
|
||||
int num8 = num6 - (num7 + num7);
|
||||
num = (int)(s1 >> 11);
|
||||
num2 = (int)num5;
|
||||
int num9 = num2 + num;
|
||||
int num10 = num2 & num;
|
||||
num = num9 - (num10 + num10) >>> 8;
|
||||
num2 = num8;
|
||||
return (uint)((num2 | num) - (num2 & num));
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override readonly string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _202B_202A_202D_206D_202D_206F_200E_200E_206D_200D_200F_206C_200F_206B_202C_200E_206A_200F_206F_200F_202D_200C_206A_206C_202D_202C_206A_202E_206E_202E_202B_202E_202B_202B_200C_206E_202C_206F_200F_206D_202E();
|
||||
_200F_206C_202A_200D_202E_206C_206A_202E_206E_200D_200B_200F_200E_200C_200E_202E_206E_202C_200B_206A_200D_206E_200D_202D_200D_200F_202A_202C_200E_200C_202D_206F_206B_206C_202E_200C_200E_202D_202E_202E(stringBuilder, global::_003CModule_003E._206C_202A_206D_206A_206E_202A_202B_206F_206D_200F_202D_200F_202D_206A_202C_202B_206D_206A_200E_200E_202D_202D_200D_200C_200D_200D_206D_206E_202A_200F_206E_206C_206D_206A_206D_202B_200F_200D_206E_200C_202E<string>(1180704865));
|
||||
_200F_206C_202A_200D_202E_206C_206A_202E_206E_200D_200B_200F_200E_200C_200E_202E_206E_202C_200B_206A_200D_206E_200D_202D_200D_200F_202A_202C_200E_200C_202D_206F_206B_206C_202E_200C_200E_202D_202E_202E(stringBuilder, global::_003CModule_003E._202A_206B_206D_200C_206B_200E_200E_202A_200B_202E_206A_206F_206A_206B_200E_200D_200F_206D_206E_206A_206F_200C_206C_202C_202A_206E_202C_200B_206E_202A_206E_202B_206B_202E_202E_206A_206D_206D_202C_200F_202E<string>(1664411125));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? (-666901402) : (-666901403));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -666901401;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = -666901403;
|
||||
break;
|
||||
case 2:
|
||||
_206C_200F_202D_200E_202E_200D_206D_200F_202C_200B_206C_202D_202C_202A_206C_200B_206D_206F_206B_202C_202E_206A_200C_202E_206F_202C_202B_202E_202C_206A_206F_206F_206A_202E_200E_206B_202E_200B_202B_206E_202E(stringBuilder, ' ');
|
||||
num = -666901402;
|
||||
break;
|
||||
case 1:
|
||||
_206C_200F_202D_200E_202E_200D_206D_200F_202C_200B_206C_202D_202C_202A_206C_200B_206D_206F_206B_202C_202E_206A_200C_202E_206F_202C_202B_202E_202C_206A_206F_206F_206A_202E_200E_206B_202E_200B_202B_206E_202E(stringBuilder, '}');
|
||||
return _206C_202A_200D_206A_206D_202C_200F_202D_202B_200D_206B_206E_200F_206B_200D_200B_202A_202A_200E_206A_206D_202B_200B_200F_200C_200B_206F_206E_202B_202E_202D_206D_202E_206C_200F_206F_200F_206C_200F_206B_202E((object)stringBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private readonly bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_200F_206C_202A_200D_202E_206C_206A_202E_206E_200D_200B_200F_200E_200C_200E_202E_206E_202C_200B_206A_200D_206E_200D_202D_200D_200F_202A_202C_200E_200C_202D_206F_206B_206C_202E_200C_200E_202D_202E_202E(builder, global::_003CModule_003E._202A_206B_206D_200C_206B_200E_200E_202A_200B_202E_206A_206F_206A_206B_200E_200D_200F_206D_206E_206A_206F_200C_206C_202C_202A_206E_202C_200B_206E_202A_206E_202B_206B_202E_202E_206A_206D_206D_202C_200F_202E<string>(352928866));
|
||||
_200F_206C_202A_200D_202E_206C_206A_202E_206E_200D_200B_200F_200E_200C_200E_202E_206E_202C_200B_206A_200D_206E_200D_202D_200D_200F_202A_202C_200E_200C_202D_206F_206B_206C_202E_200C_200E_202D_202E_202E(builder, S0.ToString());
|
||||
_200F_206C_202A_200D_202E_206C_206A_202E_206E_200D_200B_200F_200E_200C_200E_202E_206E_202C_200B_206A_200D_206E_200D_202D_200D_200F_202A_202C_200E_200C_202D_206F_206B_206C_202E_200C_200E_202D_202E_202E(builder, global::_003CModule_003E._202E_206C_200F_206B_206A_202A_202C_206F_200C_206C_202B_206B_206D_206D_206D_202D_206E_202E_206C_206E_206D_202C_206F_200D_202D_202E_206A_206D_202A_206A_202B_200D_200C_206D_202B_200B_200D_200C_206E_206B_202E<string>(-875975294));
|
||||
_200F_206C_202A_200D_202E_206C_206A_202E_206E_200D_200B_200F_200E_200C_200E_202E_206E_202C_200B_206A_200D_206E_200D_202D_200D_200F_202A_202C_200E_200C_202D_206F_206B_206C_202E_200C_200E_202D_202E_202E(builder, S1.ToString());
|
||||
_200F_206C_202A_200D_202E_206C_206A_202E_206E_200D_200B_200F_200E_200C_200E_202E_206E_202C_200B_206A_200D_206E_200D_202D_200D_200F_202A_202C_200E_200C_202D_206F_206B_206C_202E_200C_200E_202D_202E_202E(builder, global::_003CModule_003E._202D_206D_206A_206E_202C_202B_200C_206C_200E_206A_206D_200E_206A_202A_200C_202E_206E_202C_206F_200B_206D_206F_200C_202C_200B_202B_200F_200B_206A_206F_200F_202E_206B_200E_202B_202A_200F_200B_202A_200E_202E<string>(-660590067));
|
||||
_200F_206C_202A_200D_202E_206C_206A_202E_206E_200D_200B_200F_200E_200C_200E_202E_206E_202C_200B_206A_200D_206E_200D_202D_200D_200F_202A_202C_200E_200C_202D_206F_206B_206C_202E_200C_200E_202D_202E_202E(builder, S2.ToString());
|
||||
_200F_206C_202A_200D_202E_206C_206A_202E_206E_200D_200B_200F_200E_200C_200E_202E_206E_202C_200B_206A_200D_206E_200D_202D_200D_200F_202A_202C_200E_200C_202D_206F_206B_206C_202E_200C_200E_202D_202E_202E(builder, global::_003CModule_003E._202E_206C_200F_206B_206A_202A_202C_206F_200C_206C_202B_206B_206D_206D_206D_202D_206E_202E_206C_206E_206D_202C_206F_200D_202D_202E_206A_206D_202A_206A_202B_200D_200C_206D_202B_200B_200D_200C_206E_206B_202E<string>(-1999766628));
|
||||
_200F_206C_202A_200D_202E_206C_206A_202E_206E_200D_200B_200F_200E_200C_200E_202E_206E_202C_200B_206A_200D_206E_200D_202D_200D_200F_202A_202C_200E_200C_202D_206F_206B_206C_202E_200C_200E_202D_202E_202E(builder, S3.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public readonly bool Equals(Rng other)
|
||||
{
|
||||
int num = ((!EqualityComparer<uint>.Default.Equals(S0, other.S0)) ? 425581049 : 425581052);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 425581053;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(S2, other.S2)) ? 425581049 : 425581054);
|
||||
break;
|
||||
case 3:
|
||||
return EqualityComparer<uint>.Default.Equals(S3, other.S3);
|
||||
case 2:
|
||||
num = 425581052;
|
||||
break;
|
||||
case 4:
|
||||
return false;
|
||||
case 1:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(S1, other.S1)) ? 425581049 : 425581053);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<Rng>.Equals(Rng other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _202B_202A_202D_206D_202D_206F_200E_200E_206D_200D_200F_206C_200F_206B_202C_200E_206A_200F_206F_200F_202D_200C_206A_206C_202D_202C_206A_202E_206E_202E_202B_202E_202B_202B_200C_206E_202C_206F_200F_206D_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _200F_206C_202A_200D_202E_206C_206A_202E_206E_200D_200B_200F_200E_200C_200E_202E_206E_202C_200B_206A_200D_206E_200D_202D_200D_200F_202A_202C_200E_200C_202D_206F_206B_206C_202E_200C_200E_202D_202E_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _206C_200F_202D_200E_202E_200D_206D_200F_202C_200B_206C_202D_202C_202A_206C_200B_206D_206F_206B_202C_202E_206A_200C_202E_206F_202C_202B_202E_202C_206A_206F_206F_206A_202E_200E_206B_202E_200B_202B_206E_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _206C_202A_200D_206A_206D_202C_200F_202D_202B_200D_206B_206E_200F_206B_200D_200B_202A_202A_200E_206A_206D_202B_200B_200F_200C_200B_206F_206E_202B_202E_202D_206D_202E_206C_200F_206F_200F_206C_200F_206B_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
[CompilerGenerated]
|
||||
private sealed class _003C_003Ec
|
||||
{
|
||||
public static readonly _003C_003Ec _003C_003E9 = new _003C_003Ec();
|
||||
|
||||
public static Func<BeastReputationRank, bool> _003C_003E9__8_0;
|
||||
|
||||
public static Func<BeastReputationRank, uint> _003C_003E9__8_1;
|
||||
|
||||
public static Func<BeastReputationRank, ushort> _003C_003E9__8_2;
|
||||
|
||||
public static Func<Lumina.Excel.Sheets.Quest, bool> _003C_003E9__8_3;
|
||||
|
||||
public static Func<Lumina.Excel.Sheets.Quest, uint> _003C_003E9__8_4;
|
||||
|
||||
public static Func<Lumina.Excel.Sheets.Quest, ushort> _003C_003E9__8_5;
|
||||
|
||||
public static Func<BeastTribe, bool> _003C_003E9__8_6;
|
||||
|
||||
public static Func<BeastTribe, EAlliedSociety> _003C_003E9__8_7;
|
||||
|
||||
public static Func<BeastTribe, byte> _003C_003E9__8_8;
|
||||
|
||||
public static Func<EAlliedSociety, bool> _003C_003E9__8_9;
|
||||
|
||||
public static Func<QuestInfo, bool> _003C_003E9__8_10;
|
||||
|
||||
public static Func<EAlliedSociety, bool> _003C_003E9__8_11;
|
||||
|
||||
public static Func<QuestInfo, bool> _003C_003E9__8_12;
|
||||
|
||||
public static Func<QuestInfo, uint> _003C_003E9__8_13;
|
||||
|
||||
public static Func<IGrouping<uint, QuestInfo>, uint> _003C_003E9__8_14;
|
||||
|
||||
public static Func<QuestInfo, bool> _003C_003E9__8_16;
|
||||
|
||||
public static Func<QuestInfo, ElementId> _003C_003E9__8_17;
|
||||
|
||||
public static Func<IGrouping<uint, QuestInfo>, List<QuestInfo>> _003C_003E9__8_15;
|
||||
|
||||
public static Predicate<QuestInfo> _003C_003E9__14_2;
|
||||
|
||||
public static Func<QuestInfo, QuestId> _003C_003E9__14_1;
|
||||
|
||||
internal bool _003C_002Ector_003Eb__8_0(BeastReputationRank x)
|
||||
{
|
||||
return x.RowId != 0;
|
||||
}
|
||||
|
||||
internal uint _003C_002Ector_003Eb__8_1(BeastReputationRank x)
|
||||
{
|
||||
return x.RowId;
|
||||
}
|
||||
|
||||
internal ushort _003C_002Ector_003Eb__8_2(BeastReputationRank x)
|
||||
{
|
||||
return x.RequiredReputation;
|
||||
}
|
||||
|
||||
internal bool _003C_002Ector_003Eb__8_3(Lumina.Excel.Sheets.Quest x)
|
||||
{
|
||||
int num = ((x.RowId == 0) ? 229482898 : 229482896);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 229482899;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 229482896;
|
||||
break;
|
||||
case 3:
|
||||
num = ((x.BeastTribe.RowId == 0) ? 229482898 : 229482897);
|
||||
break;
|
||||
case 2:
|
||||
return x.BeastReputationValue > 0;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal uint _003C_002Ector_003Eb__8_4(Lumina.Excel.Sheets.Quest x)
|
||||
{
|
||||
return x.RowId;
|
||||
}
|
||||
|
||||
internal ushort _003C_002Ector_003Eb__8_5(Lumina.Excel.Sheets.Quest x)
|
||||
{
|
||||
return x.BeastReputationValue;
|
||||
}
|
||||
|
||||
internal bool _003C_002Ector_003Eb__8_6(BeastTribe x)
|
||||
{
|
||||
int num = ((x.RowId == 0) ? 1913982747 : 1913982745);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1913982747;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
return _206A_200F_206E_202C_206F_202C_206D_202A_200B_202C_202A_202A_206E_200E_206D_200C_206E_206F_200E_200C_206E_206B_202C_200B_202D_206B_202A_206F_206D_200F_202D_200B_202D_206C_200F_202C_200C_206D_202A_202C_202E(_206F_206E_206D_202C_206B_200B_206A_202A_200F_202B_202D_202B_200E_202E_202D_206E_206D_200E_202E_206E_206A_206B_206F_202E_206D_200B_202A_202C_206E_200E_206D_206D_206B_200C_206F_206C_206C_206A_200C_202B_202E(typeof(EAlliedSociety).TypeHandle), (object)(byte)x.RowId);
|
||||
case 2:
|
||||
num = (x.Name.IsEmpty ? 1913982747 : 1913982746);
|
||||
break;
|
||||
case 3:
|
||||
num = 1913982745;
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal EAlliedSociety _003C_002Ector_003Eb__8_7(BeastTribe x)
|
||||
{
|
||||
return (EAlliedSociety)x.RowId;
|
||||
}
|
||||
|
||||
internal byte _003C_002Ector_003Eb__8_8(BeastTribe x)
|
||||
{
|
||||
return x.MaxRank;
|
||||
}
|
||||
|
||||
internal bool _003C_002Ector_003Eb__8_9(EAlliedSociety x)
|
||||
{
|
||||
return x != EAlliedSociety.None;
|
||||
}
|
||||
|
||||
internal bool _003C_002Ector_003Eb__8_10(QuestInfo x)
|
||||
{
|
||||
return !x.IsRepeatable;
|
||||
}
|
||||
|
||||
internal bool _003C_002Ector_003Eb__8_11(EAlliedSociety x)
|
||||
{
|
||||
return x != EAlliedSociety.None;
|
||||
}
|
||||
|
||||
internal bool _003C_002Ector_003Eb__8_12(QuestInfo x)
|
||||
{
|
||||
return x.IsRepeatable;
|
||||
}
|
||||
|
||||
internal uint _003C_002Ector_003Eb__8_13(QuestInfo x)
|
||||
{
|
||||
return x.IssuerDataId;
|
||||
}
|
||||
|
||||
internal uint _003C_002Ector_003Eb__8_14(IGrouping<uint, QuestInfo> x)
|
||||
{
|
||||
return x.Key;
|
||||
}
|
||||
|
||||
internal List<QuestInfo> _003C_002Ector_003Eb__8_15(IGrouping<uint, QuestInfo> x)
|
||||
{
|
||||
return (from y in x
|
||||
orderby y.AlliedSocietyQuestGroup == 3, y.QuestId
|
||||
select y).ToList();
|
||||
}
|
||||
|
||||
internal bool _003C_002Ector_003Eb__8_16(QuestInfo y)
|
||||
{
|
||||
return y.AlliedSocietyQuestGroup == 3;
|
||||
}
|
||||
|
||||
internal ElementId _003C_002Ector_003Eb__8_17(QuestInfo y)
|
||||
{
|
||||
return y.QuestId;
|
||||
}
|
||||
|
||||
internal bool _003CCalculateAvailableQuests_003Eb__14_2(QuestInfo q)
|
||||
{
|
||||
return q.AlliedSocietyQuestGroup == 3;
|
||||
}
|
||||
|
||||
internal QuestId _003CCalculateAvailableQuests_003Eb__14_1(QuestInfo x)
|
||||
{
|
||||
return (QuestId)x.QuestId;
|
||||
}
|
||||
|
||||
static Type _206F_206E_206D_202C_206B_200B_206A_202A_200F_202B_202D_202B_200E_202E_202D_206E_206D_200E_202E_206E_206A_206B_206F_202E_206D_200B_202A_202C_206E_200E_206D_206D_206B_200C_206F_206C_206C_206A_200C_202B_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static bool _206A_200F_206E_202C_206F_202C_206D_202A_200B_202C_202A_202A_206E_200E_206D_200C_206E_206F_200E_200C_206E_206B_202C_200B_202D_206B_202A_206F_206D_200F_202D_200B_202D_206C_200F_202C_200C_206D_202A_202C_202E(Type P_0, object P_1)
|
||||
{
|
||||
return Enum.IsDefined(P_0, P_1);
|
||||
}
|
||||
}
|
||||
|
||||
private readonly ILogger<AlliedSocietyQuestFunctions> _logger;
|
||||
|
||||
private readonly QuestData _questData;
|
||||
|
||||
private readonly Dictionary<EAlliedSociety, List<NpcData>> _questsByAlliedSociety = new Dictionary<EAlliedSociety, List<NpcData>>();
|
||||
|
||||
private readonly Dictionary<(uint NpcDataId, byte Seed, bool OutranksAll, bool RankedUp), List<QuestId>> _dailyQuests = new Dictionary<(uint, byte, bool, bool), List<QuestId>>();
|
||||
|
||||
public AlliedSocietyQuestFunctions(QuestData questData, ILogger<AlliedSocietyQuestFunctions> logger)
|
||||
private readonly ImmutableDictionary<uint, ushort> _reputationRequiredByRank;
|
||||
|
||||
private readonly ImmutableDictionary<uint, ushort> _questReputationRewards;
|
||||
|
||||
private readonly ImmutableDictionary<EAlliedSociety, byte> _maxRankByAlliedSociety;
|
||||
|
||||
private readonly ImmutableDictionary<(EAlliedSociety, byte), QuestId> _rankUpQuests;
|
||||
|
||||
public AlliedSocietyQuestFunctions(QuestData questData, IDataManager dataManager, ILogger<AlliedSocietyQuestFunctions> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
foreach (EAlliedSociety item in from x in Enum.GetValues<EAlliedSociety>()
|
||||
where x != EAlliedSociety.None
|
||||
select x)
|
||||
_questData = questData;
|
||||
_reputationRequiredByRank = (from x in dataManager.GetExcelSheet<BeastReputationRank>()
|
||||
where x.RowId != 0
|
||||
select x).ToImmutableDictionary((BeastReputationRank x) => x.RowId, (BeastReputationRank x) => x.RequiredReputation);
|
||||
_questReputationRewards = dataManager.GetExcelSheet<Lumina.Excel.Sheets.Quest>().Where(delegate(Lumina.Excel.Sheets.Quest x)
|
||||
{
|
||||
foreach (KeyValuePair<uint, List<QuestInfo>> item2 in (from x in questData.GetAllByAlliedSociety(item)
|
||||
where x.IsRepeatable
|
||||
group x by x.IssuerDataId).ToDictionary((IGrouping<uint, QuestInfo> x) => x.Key, (IGrouping<uint, QuestInfo> x) => (from y in x
|
||||
orderby y.AlliedSocietyQuestGroup == 3, y.QuestId
|
||||
select y).ToList()))
|
||||
int num2 = ((x.RowId == 0) ? 229482898 : 229482896);
|
||||
while (true)
|
||||
{
|
||||
item2.Deconstruct(out var key, out var value);
|
||||
uint issuerDataId = key;
|
||||
List<QuestInfo> allQuests = value;
|
||||
NpcData npcData = new NpcData
|
||||
int num3 = num2;
|
||||
int num4 = 229482899;
|
||||
int num5 = num3;
|
||||
switch ((num5 | num4) - (num5 & num4))
|
||||
{
|
||||
IssuerDataId = issuerDataId,
|
||||
AllQuests = allQuests
|
||||
};
|
||||
if (_questsByAlliedSociety.TryGetValue(item, out List<NpcData> value2))
|
||||
{
|
||||
value2.Add(npcData);
|
||||
continue;
|
||||
case 0:
|
||||
num2 = 229482896;
|
||||
break;
|
||||
case 3:
|
||||
num2 = ((x.BeastTribe.RowId == 0) ? 229482898 : 229482897);
|
||||
break;
|
||||
case 2:
|
||||
return x.BeastReputationValue > 0;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
Dictionary<EAlliedSociety, List<NpcData>> questsByAlliedSociety = _questsByAlliedSociety;
|
||||
int num = 1;
|
||||
List<NpcData> list = new List<NpcData>(num);
|
||||
CollectionsMarshal.SetCount(list, num);
|
||||
CollectionsMarshal.AsSpan(list)[0] = npcData;
|
||||
questsByAlliedSociety[item] = list;
|
||||
}
|
||||
}).ToImmutableDictionary((Lumina.Excel.Sheets.Quest x) => x.RowId, (Lumina.Excel.Sheets.Quest x) => x.BeastReputationValue);
|
||||
_maxRankByAlliedSociety = dataManager.GetExcelSheet<BeastTribe>().Where(delegate(BeastTribe x)
|
||||
{
|
||||
int num2 = ((x.RowId == 0) ? 1913982747 : 1913982745);
|
||||
while (true)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 1913982747;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 1:
|
||||
return _003C_003Ec._206A_200F_206E_202C_206F_202C_206D_202A_200B_202C_202A_202A_206E_200E_206D_200C_206E_206F_200E_200C_206E_206B_202C_200B_202D_206B_202A_206F_206D_200F_202D_200B_202D_206C_200F_202C_200C_206D_202A_202C_202E(_003C_003Ec._206F_206E_206D_202C_206B_200B_206A_202A_200F_202B_202D_202B_200E_202E_202D_206E_206D_200E_202E_206E_206A_206B_206F_202E_206D_200B_202A_202C_206E_200E_206D_206D_206B_200C_206F_206C_206C_206A_200C_202B_202E(typeof(EAlliedSociety).TypeHandle), (object)(byte)x.RowId);
|
||||
case 2:
|
||||
num2 = (x.Name.IsEmpty ? 1913982747 : 1913982746);
|
||||
break;
|
||||
case 3:
|
||||
num2 = 1913982745;
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}).ToImmutableDictionary((BeastTribe x) => (EAlliedSociety)x.RowId, (BeastTribe x) => x.MaxRank);
|
||||
Dictionary<(EAlliedSociety, byte), QuestId> dictionary = new Dictionary<(EAlliedSociety, byte), QuestId>();
|
||||
IEnumerator<EAlliedSociety> enumerator = (from x in Enum.GetValues<EAlliedSociety>()
|
||||
where x != EAlliedSociety.None
|
||||
select x).GetEnumerator();
|
||||
try
|
||||
{
|
||||
while (_206F_202E_206C_200B_200E_202C_206B_202E_200E_200D_202D_200C_206E_200F_202E_200D_206C_200B_206F_206C_202A_202A_206B_202D_202D_202E_200C_200B_206C_200D_206C_206B_202C_202C_206B_200C_200B_202B_202A_206B_202E((IEnumerator)enumerator))
|
||||
{
|
||||
EAlliedSociety current = enumerator.Current;
|
||||
IEnumerator<QuestInfo> enumerator2 = (from x in questData.GetAllByAlliedSociety(current)
|
||||
where !x.IsRepeatable
|
||||
select x).GetEnumerator();
|
||||
try
|
||||
{
|
||||
while (_206F_202E_206C_200B_200E_202C_206B_202E_200E_200D_202D_200C_206E_200F_202E_200D_206C_200B_206F_206C_202A_202A_206B_202D_202D_202E_200C_200B_206C_200D_206C_206B_202C_202C_206B_200C_200B_202B_202A_206B_202E((IEnumerator)enumerator2))
|
||||
{
|
||||
QuestInfo current2 = enumerator2.Current;
|
||||
byte b = (byte)current2.AlliedSocietyRank;
|
||||
if (b > 0)
|
||||
{
|
||||
dictionary[(current, b)] = (QuestId)current2.QuestId;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (enumerator2 != null)
|
||||
{
|
||||
_200B_200B_200E_202D_200D_200D_202B_200F_202E_200C_202A_200B_202B_206B_202D_200D_206D_200C_206F_200B_202A_202A_200F_200B_206A_200C_206F_200C_206B_206B_200E_200E_206C_202B_202B_202E_202C_200E_202E_202C_202E((IDisposable)enumerator2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (enumerator != null)
|
||||
{
|
||||
_200B_200B_200E_202D_200D_200D_202B_200F_202E_200C_202A_200B_202B_206B_202D_200D_206D_200C_206F_200B_202A_202A_200F_200B_206A_200C_206F_200C_206B_206B_200E_200E_206C_202B_202B_202E_202C_200E_202E_202C_202E((IDisposable)enumerator);
|
||||
}
|
||||
}
|
||||
_rankUpQuests = dictionary.ToImmutableDictionary();
|
||||
enumerator = (from x in Enum.GetValues<EAlliedSociety>()
|
||||
where x != EAlliedSociety.None
|
||||
select x).GetEnumerator();
|
||||
try
|
||||
{
|
||||
while (_206F_202E_206C_200B_200E_202C_206B_202E_200E_200D_202D_200C_206E_200F_202E_200D_206C_200B_206F_206C_202A_202A_206B_202D_202D_202E_200C_200B_206C_200D_206C_206B_202C_202C_206B_200C_200B_202B_202A_206B_202E((IEnumerator)enumerator))
|
||||
{
|
||||
EAlliedSociety current3 = enumerator.Current;
|
||||
foreach (KeyValuePair<uint, List<QuestInfo>> item in (from x in questData.GetAllByAlliedSociety(current3)
|
||||
where x.IsRepeatable
|
||||
group x by x.IssuerDataId).ToDictionary((IGrouping<uint, QuestInfo> x) => x.Key, (IGrouping<uint, QuestInfo> x) => (from y in x
|
||||
orderby y.AlliedSocietyQuestGroup == 3, y.QuestId
|
||||
select y).ToList()))
|
||||
{
|
||||
item.Deconstruct(out var key, out var value);
|
||||
uint issuerDataId = key;
|
||||
List<QuestInfo> allQuests = value;
|
||||
NpcData npcData = new NpcData
|
||||
{
|
||||
IssuerDataId = issuerDataId,
|
||||
AllQuests = allQuests
|
||||
};
|
||||
if (_questsByAlliedSociety.TryGetValue(current3, out List<NpcData> value2))
|
||||
{
|
||||
value2.Add(npcData);
|
||||
continue;
|
||||
}
|
||||
Dictionary<EAlliedSociety, List<NpcData>> questsByAlliedSociety = _questsByAlliedSociety;
|
||||
int num = 1;
|
||||
List<NpcData> list = new List<NpcData>(num);
|
||||
CollectionsMarshal.SetCount(list, num);
|
||||
CollectionsMarshal.AsSpan(list)[0] = npcData;
|
||||
questsByAlliedSociety[current3] = list;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (enumerator != null)
|
||||
{
|
||||
_200B_200B_200E_202D_200D_200D_202B_200F_202E_200C_202A_200B_202B_206B_202D_200D_206D_200C_206F_200B_202A_202A_200F_200B_206A_200C_206F_200C_206B_206B_200E_200E_206C_202B_202B_202E_202C_200E_202E_202C_202E((IDisposable)enumerator);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe List<QuestId> GetAvailableAlliedSocietyQuests(EAlliedSociety alliedSociety)
|
||||
{
|
||||
byte rank = QuestManager.Instance()->BeastReputation[(int)(alliedSociety - 1)].Rank;
|
||||
byte currentRank = (byte)(rank & 0x7F);
|
||||
if (currentRank == 0)
|
||||
int num = ((alliedSociety != EAlliedSociety.None) ? (-2074607472) : (-2074607467));
|
||||
byte rank = default(byte);
|
||||
byte currentRank = default(byte);
|
||||
List<QuestId> list = default(List<QuestId>);
|
||||
bool flag2 = default(bool);
|
||||
byte dailyQuestSeed = default(byte);
|
||||
List<NpcData> value = default(List<NpcData>);
|
||||
NpcData current = default(NpcData);
|
||||
bool flag = default(bool);
|
||||
(uint, byte, bool, bool) key = default((uint, byte, bool, bool));
|
||||
List<QuestId> value2 = default(List<QuestId>);
|
||||
while (true)
|
||||
{
|
||||
return new List<QuestId>();
|
||||
}
|
||||
bool flag = (rank & 0x80) != 0;
|
||||
byte dailyQuestSeed = QuestManager.Instance()->DailyQuestSeed;
|
||||
List<QuestId> list = new List<QuestId>();
|
||||
foreach (NpcData item in _questsByAlliedSociety[alliedSociety])
|
||||
{
|
||||
bool flag2 = item.AllQuests.All((QuestInfo x) => currentRank > x.AlliedSocietyRank);
|
||||
(uint, byte, bool, bool) key = (item.IssuerDataId, dailyQuestSeed, flag2, flag);
|
||||
if (_dailyQuests.TryGetValue(key, out List<QuestId> value))
|
||||
int num2 = num;
|
||||
int num3 = -2074607466;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
list.AddRange(value);
|
||||
continue;
|
||||
case 6:
|
||||
{
|
||||
rank = QuestManager.Instance()->BeastReputation[(int)(alliedSociety - 1)].Rank;
|
||||
byte num11 = rank;
|
||||
num3 = 127;
|
||||
num4 = num11;
|
||||
currentRank = (byte)(num4 + num3 - (num4 | num3));
|
||||
num = ((currentRank != 0) ? (-2074607468) : (-2074607469));
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
return new List<QuestId>();
|
||||
case 5:
|
||||
return new List<QuestId>();
|
||||
case 1:
|
||||
return list;
|
||||
case 0:
|
||||
num = -2074607467;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
byte num10 = rank;
|
||||
num3 = 128;
|
||||
num4 = num10;
|
||||
flag2 = num4 + num3 - (num4 | num3) != 0;
|
||||
dailyQuestSeed = QuestManager.Instance()->DailyQuestSeed;
|
||||
list = new List<QuestId>();
|
||||
num = (_questsByAlliedSociety.TryGetValue(alliedSociety, out value) ? (-2074607470) : (-2074607465));
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
using List<NpcData>.Enumerator enumerator = value.GetEnumerator();
|
||||
num = -1740472784;
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
num3 = -1740472781;
|
||||
num4 = num7;
|
||||
int num8 = num4 + num3;
|
||||
int num9 = num4 & num3;
|
||||
switch (num8 - (num9 + num9))
|
||||
{
|
||||
case 5:
|
||||
num = -1740472784;
|
||||
break;
|
||||
case 1:
|
||||
current = enumerator.Current;
|
||||
flag = current.AllQuests.All((QuestInfo x) => currentRank > x.AlliedSocietyRank);
|
||||
key = (current.IssuerDataId, dailyQuestSeed, flag, flag2);
|
||||
num = ((!_dailyQuests.TryGetValue(key, out value2)) ? (-1740472783) : (-1740472781));
|
||||
break;
|
||||
case 3:
|
||||
num = (enumerator.MoveNext() ? (-1740472782) : (-1740472777));
|
||||
break;
|
||||
case 0:
|
||||
list.AddRange(value2);
|
||||
num = -1740472784;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
List<QuestId> list2 = CalculateAvailableQuests(current.AllQuests, dailyQuestSeed, flag, currentRank, flag2);
|
||||
_202E_200E_206F_206E_202E_206C_206D_200B_200F_200C_206A_202A_200C_206F_206F_206E_206C_200D_206E_200D_200B_200D_206C_206B_200F_202B_206D_202A_200D_206E_206B_206A_200B_206D_200E_200E_202B_202B_206A_200E_202E((ILogger)_logger, global::_003CModule_003E._202E_206C_200F_206B_206A_202A_202C_206F_200C_206C_202B_206B_206D_206D_206D_202D_206E_202E_206C_206E_206D_202C_206F_200D_202D_202E_206A_206D_202A_206A_202B_200D_200C_206D_202B_200B_200D_200C_206E_206B_202E<string>(832413821), new object[4]
|
||||
{
|
||||
alliedSociety,
|
||||
dailyQuestSeed,
|
||||
current.IssuerDataId,
|
||||
string.Join(global::_003CModule_003E._202A_206B_206D_200C_206B_200E_200E_202A_200B_202E_206A_206F_206A_206B_200E_200D_200F_206D_206E_206A_206F_200C_206C_202C_202A_206E_202C_200B_206E_202A_206E_202B_206B_202E_202E_206A_206D_206D_202C_200F_202E<string>(1467939024), list2)
|
||||
});
|
||||
_dailyQuests[key] = list2;
|
||||
list.AddRange(list2);
|
||||
num = -1740472784;
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe (byte CurrentRank, ushort CurrentValue, ushort MaxValue, bool IsMaxRank, bool IsAtCapacity)? GetReputationStatus(EAlliedSociety alliedSociety)
|
||||
{
|
||||
BeastReputationWork beastReputationWork = QuestManager.Instance()->BeastReputation[(int)(alliedSociety - 1)];
|
||||
byte rank = beastReputationWork.Rank;
|
||||
int num = 127;
|
||||
int num2 = rank;
|
||||
byte b = (byte)(num2 + num - (num2 | num));
|
||||
int num3 = ((b != 0) ? 1618192737 : 1618192736);
|
||||
while (true)
|
||||
{
|
||||
int num4 = num3;
|
||||
num = 1618192737;
|
||||
num2 = num4;
|
||||
int num5 = num2 + num;
|
||||
int num6 = num2 & num;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0081;
|
||||
case 1:
|
||||
return null;
|
||||
case 0:
|
||||
{
|
||||
ushort value = beastReputationWork.Value;
|
||||
ushort valueOrDefault = _reputationRequiredByRank.GetValueOrDefault(b, ushort.MaxValue);
|
||||
byte valueOrDefault2 = _maxRankByAlliedSociety.GetValueOrDefault<EAlliedSociety, byte>(alliedSociety, 8);
|
||||
bool item = b >= valueOrDefault2;
|
||||
bool item2 = value >= valueOrDefault;
|
||||
return (b, value, valueOrDefault, item, item2);
|
||||
}
|
||||
}
|
||||
continue;
|
||||
IL_0081:
|
||||
num3 = 1618192736;
|
||||
}
|
||||
}
|
||||
|
||||
public QuestId? GetRankUpQuest(EAlliedSociety alliedSociety, byte currentRank)
|
||||
{
|
||||
return _rankUpQuests.GetValueOrDefault((alliedSociety, currentRank));
|
||||
}
|
||||
|
||||
public ushort GetQuestReputationReward(QuestId questId)
|
||||
{
|
||||
return _questReputationRewards.GetValueOrDefault<uint, ushort>(_200D_202C_202A_206D_206E_200F_202A_202C_200C_202A_200C_202D_200F_200C_206F_206C_206B_206A_206C_200F_202A_200E_202A_206E_202D_202C_206F_200C_202B_206B_206C_206F_202B_206A_206F_202E_206F_206B_206B_206C_202E((ElementId)questId), 0);
|
||||
}
|
||||
|
||||
public bool WouldOvercapReputation(QuestId questId)
|
||||
{
|
||||
IQuestInfo questInfo;
|
||||
int num = ((!_questData.TryGetQuestInfo(questId, out questInfo)) ? 370818468 : 370818473);
|
||||
QuestInfo questInfo2 = default(QuestInfo);
|
||||
(byte, ushort, ushort, bool, bool)? reputationStatus = default((byte, ushort, ushort, bool, bool)?);
|
||||
ushort item = default(ushort);
|
||||
ushort item2 = default(ushort);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 370818477;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 7:
|
||||
num = ((questInfo2.AlliedSociety != EAlliedSociety.None) ? 370818472 : 370818476);
|
||||
break;
|
||||
case 4:
|
||||
questInfo2 = questInfo as QuestInfo;
|
||||
num = ((questInfo2 != null) ? 370818474 : 370818468);
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
(byte, ushort, ushort, bool, bool) value = reputationStatus.Value;
|
||||
item = value.Item2;
|
||||
item2 = value.Item3;
|
||||
num = ((!value.Item4) ? 370818475 : 370818469);
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
return false;
|
||||
case 6:
|
||||
{
|
||||
ushort questReputationReward = GetQuestReputationReward(questId);
|
||||
ushort num7 = item;
|
||||
num3 = questReputationReward;
|
||||
num4 = num7;
|
||||
return (num4 | num3) + (num4 & num3) > item2;
|
||||
}
|
||||
case 1:
|
||||
return false;
|
||||
case 0:
|
||||
return false;
|
||||
case 9:
|
||||
return false;
|
||||
case 2:
|
||||
num = 370818473;
|
||||
break;
|
||||
case 5:
|
||||
reputationStatus = GetReputationStatus(questInfo2.AlliedSociety);
|
||||
num = (reputationStatus.HasValue ? 370818478 : 370818477);
|
||||
break;
|
||||
}
|
||||
List<QuestId> list2 = CalculateAvailableQuests(item.AllQuests, dailyQuestSeed, flag2, currentRank, flag);
|
||||
_logger.LogInformation("Available for {Tribe} (Seed: {Seed}, Issuer: {IssuerId}): {Quests}", alliedSociety, dailyQuestSeed, item.IssuerDataId, string.Join(", ", list2));
|
||||
_dailyQuests[key] = list2;
|
||||
list.AddRange(list2);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private static List<QuestId> CalculateAvailableQuests(List<QuestInfo> allQuests, byte seed, bool outranksAll, byte currentRank, bool rankedUp)
|
||||
{
|
||||
List<QuestInfo> list = allQuests.Where((QuestInfo q) => IsEligible(q, currentRank, rankedUp)).ToList();
|
||||
List<QuestInfo> list2 = new List<QuestInfo>();
|
||||
if (list.Count == 0)
|
||||
int num = ((list.Count != 0) ? (-1989985077) : (-1989985088));
|
||||
int num12 = default(int);
|
||||
int num20 = default(int);
|
||||
int num6 = default(int);
|
||||
Rng rng = default(Rng);
|
||||
int num5 = default(int);
|
||||
int num15 = default(int);
|
||||
int num16 = default(int);
|
||||
int num10 = default(int);
|
||||
while (true)
|
||||
{
|
||||
return new List<QuestId>();
|
||||
}
|
||||
Rng rng = new Rng(seed);
|
||||
if (outranksAll)
|
||||
{
|
||||
int num = 0;
|
||||
for (int num2 = Math.Min(list.Count, 3); num < num2; num++)
|
||||
int num2 = num;
|
||||
int num3 = -1989985086;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
int num3 = rng.Next(list.Count);
|
||||
while (list2.Contains(list[num3]))
|
||||
{
|
||||
num3 = (num3 + 1) % list.Count;
|
||||
}
|
||||
list2.Add(list[num3]);
|
||||
case 6:
|
||||
num = ((num12 < num20) ? (-1989985082) : (-1989985085));
|
||||
break;
|
||||
case 17:
|
||||
num6 = list.FindIndex((QuestInfo q) => q.AlliedSocietyQuestGroup == 3);
|
||||
num = ((num6 < 0) ? (-1989985071) : (-1989985076));
|
||||
break;
|
||||
case 9:
|
||||
rng = new Rng(seed);
|
||||
num = ((!outranksAll) ? (-1989985069) : (-1989985074));
|
||||
break;
|
||||
case 11:
|
||||
num = (list2.Contains(list[num5]) ? (-1989985080) : (-1989985087));
|
||||
break;
|
||||
case 2:
|
||||
return new List<QuestId>();
|
||||
case 19:
|
||||
num6 = list.Count;
|
||||
num = -1989985083;
|
||||
break;
|
||||
case 7:
|
||||
num15 = list2.Count;
|
||||
num16 = _202C_206C_206A_206B_206A_200B_206E_206A_202E_200E_206D_206E_200B_200B_206B_206D_206E_200C_202E_206E_200E_202B_206F_202A_206D_206F_200D_206B_202A_200D_206A_206C_206F_202B_202B_200D_206C_202C_206A_202A_202E(num6, 3);
|
||||
num = -1989985086;
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
list2.Add(list[num5]);
|
||||
int num21 = num15;
|
||||
num3 = 1;
|
||||
num4 = num21;
|
||||
int num22 = num4 ^ num3;
|
||||
int num23 = num4 & num3;
|
||||
num15 = num22 + (num23 + num23);
|
||||
num = -1989985086;
|
||||
break;
|
||||
}
|
||||
case 14:
|
||||
list2.Add(list[num6 + rng.Next(list.Count - num6)]);
|
||||
num = -1989985083;
|
||||
break;
|
||||
case 16:
|
||||
num = (list2.Contains(list[num10]) ? (-1989985072) : (-1989985078));
|
||||
break;
|
||||
case 1:
|
||||
num = -1989985075;
|
||||
break;
|
||||
case 12:
|
||||
num12 = 0;
|
||||
num20 = _202C_206C_206A_206B_206A_200B_206E_206A_202E_200E_206D_206E_200B_200B_206B_206D_206E_200C_202E_206E_200E_202B_206F_202A_206D_206F_200D_206B_202A_200D_206A_206C_206F_202B_202B_200D_206C_202C_206A_202A_202E(list.Count, 3);
|
||||
num = -1989985084;
|
||||
break;
|
||||
case 4:
|
||||
num10 = rng.Next(list.Count);
|
||||
num = -1989985070;
|
||||
break;
|
||||
case 18:
|
||||
{
|
||||
int num17 = num10;
|
||||
num3 = 1;
|
||||
num4 = num17;
|
||||
int num18 = num4 ^ num3;
|
||||
int num19 = num4 & num3;
|
||||
num10 = (num18 + (num19 + num19)) % list.Count;
|
||||
num = -1989985070;
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
num = ((num15 < num16) ? (-1989985081) : (-1989985075));
|
||||
break;
|
||||
case 15:
|
||||
return list2.Select((QuestInfo x) => (QuestId)x.QuestId).ToList();
|
||||
case 13:
|
||||
num = -1989985088;
|
||||
break;
|
||||
case 8:
|
||||
{
|
||||
list2.Add(list[num10]);
|
||||
int num11 = num12;
|
||||
num3 = 1;
|
||||
num4 = num11;
|
||||
int num13 = num4 ^ num3;
|
||||
int num14 = num4 & num3;
|
||||
num12 = num13 + (num14 + num14);
|
||||
num = -1989985084;
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
{
|
||||
int num7 = num5;
|
||||
num3 = 1;
|
||||
num4 = num7;
|
||||
int num8 = num4 ^ num3;
|
||||
int num9 = num4 & num3;
|
||||
num5 = (num8 + (num9 + num9)) % num6;
|
||||
num = -1989985079;
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
num5 = rng.Next(num6);
|
||||
num = -1989985079;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int num4 = list.FindIndex((QuestInfo q) => q.AlliedSocietyQuestGroup == 3);
|
||||
if (num4 >= 0)
|
||||
{
|
||||
list2.Add(list[num4 + rng.Next(list.Count - num4)]);
|
||||
}
|
||||
else
|
||||
{
|
||||
num4 = list.Count;
|
||||
}
|
||||
int num5 = list2.Count;
|
||||
for (int num6 = Math.Min(num4, 3); num5 < num6; num5++)
|
||||
{
|
||||
int num7 = rng.Next(num4);
|
||||
while (list2.Contains(list[num7]))
|
||||
{
|
||||
num7 = (num7 + 1) % num4;
|
||||
}
|
||||
list2.Add(list[num7]);
|
||||
}
|
||||
}
|
||||
return list2.Select((QuestInfo x) => (QuestId)x.QuestId).ToList();
|
||||
}
|
||||
|
||||
private static bool IsEligible(QuestInfo questInfo, byte currentRank, bool rankedUp)
|
||||
{
|
||||
if (!rankedUp)
|
||||
int num = (rankedUp ? (-1485940211) : (-1485940210));
|
||||
while (true)
|
||||
{
|
||||
return questInfo.AlliedSocietyRank <= currentRank;
|
||||
int num2 = num;
|
||||
int num3 = -1485940212;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return questInfo.AlliedSocietyRank == currentRank;
|
||||
case 2:
|
||||
return questInfo.AlliedSocietyRank <= currentRank;
|
||||
case 0:
|
||||
goto IL_0058;
|
||||
}
|
||||
continue;
|
||||
IL_0058:
|
||||
num = -1485940210;
|
||||
}
|
||||
return questInfo.AlliedSocietyRank == currentRank;
|
||||
}
|
||||
|
||||
static bool _206F_202E_206C_200B_200E_202C_206B_202E_200E_200D_202D_200C_206E_200F_202E_200D_206C_200B_206F_206C_202A_202A_206B_202D_202D_202E_200C_200B_206C_200D_206C_206B_202C_202C_206B_200C_200B_202B_202A_206B_202E(IEnumerator P_0)
|
||||
{
|
||||
return P_0.MoveNext();
|
||||
}
|
||||
|
||||
static void _200B_200B_200E_202D_200D_200D_202B_200F_202E_200C_202A_200B_202B_206B_202D_200D_206D_200C_206F_200B_202A_202A_200F_200B_206A_200C_206F_200C_206B_206B_200E_200E_206C_202B_202B_202E_202C_200E_202E_202C_202E(IDisposable P_0)
|
||||
{
|
||||
P_0.Dispose();
|
||||
}
|
||||
|
||||
static void _202E_200E_206F_206E_202E_206C_206D_200B_200F_200C_206A_202A_200C_206F_206F_206E_206C_200D_206E_200D_200B_200D_206C_206B_200F_202B_206D_202A_200D_206E_206B_206A_200B_206D_200E_200E_202B_202B_206A_200E_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogDebug(P_1, P_2);
|
||||
}
|
||||
|
||||
static ushort _200D_202C_202A_206D_206E_200F_202A_202C_200C_202A_200C_202D_200F_200C_206F_206C_206B_206A_206C_200F_202A_200E_202A_206E_202D_202C_206F_200C_202B_206B_206C_206F_202B_206A_206F_202E_206F_206B_206B_206C_202E(ElementId P_0)
|
||||
{
|
||||
return P_0.Value;
|
||||
}
|
||||
|
||||
static int _202C_206C_206A_206B_206A_200B_206E_206A_202E_200E_206D_206E_200B_200B_206B_206D_206E_200C_202E_206E_200E_202B_206F_202A_206D_206F_200D_206B_202A_200D_206A_206C_206F_202B_202B_200D_206C_202C_206A_202A_202E(int P_0, int P_1)
|
||||
{
|
||||
return Math.Min(P_0, P_1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue