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
355
LLib/LLib.Gear/BestItemFinder.cs
Normal file
355
LLib/LLib.Gear/BestItemFinder.cs
Normal file
|
|
@ -0,0 +1,355 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using LLib.GameData;
|
||||
using Lumina.Excel;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public sealed class BestItemFinder
|
||||
{
|
||||
public static readonly IReadOnlyList<InventoryType> ArmoryAndEquipped;
|
||||
|
||||
public static readonly IReadOnlyList<InventoryType> ArmoryEquippedAndBags;
|
||||
|
||||
private readonly GearStatsCalculator _calculator;
|
||||
|
||||
private readonly ExcelSheet<Item> _itemSheet;
|
||||
|
||||
private readonly ExcelSheet<ClassJobCategory> _classJobCategorySheet;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public BestItemFinder(GearStatsCalculator calculator, IDataManager dataManager)
|
||||
{
|
||||
_206D_206D_200D_200E_206B_206F_200E_200E_206D_200F_200F_202C_206F_200D_200C_200E_206A_202D_206A_200D_202A_202E_200B_206C_206C_202A_206A_202B_202D_202E_200F_200B_206E_202C_202A_206F_202D_202B_200F_200C_202E((object)calculator, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1061074664));
|
||||
_206D_206D_200D_200E_206B_206F_200E_200E_206D_200F_200F_202C_206F_200D_200C_200E_206A_202D_206A_200D_202A_202E_200B_206C_206C_202A_206A_202B_202D_202E_200F_200B_206E_202C_202A_206F_202D_202B_200F_200C_202E((object)dataManager, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1509101314));
|
||||
_calculator = calculator;
|
||||
_itemSheet = dataManager.GetExcelSheet<Item>();
|
||||
_classJobCategorySheet = dataManager.GetExcelSheet<ClassJobCategory>();
|
||||
}
|
||||
|
||||
public unsafe BestItemRef? FindBest(EClassJob job, IReadOnlyList<uint> acceptedSlotCategories, StatPriority priority, IReadOnlyList<InventoryType> containers, byte playerLevel, EItemRankingMode rankingMode, BestItemRef? excludeContainerSlot = null)
|
||||
{
|
||||
BestItemRef? result = null;
|
||||
ItemRankingKey best = ItemRankingKey.None;
|
||||
int num = (job.DealsMagicDamage() ? (-539654856) : (-539654853));
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
BestItemRef valueOrDefault = default(BestItemRef);
|
||||
int num10 = default(int);
|
||||
Item value = default(Item);
|
||||
Item? rowOrDefault = default(Item?);
|
||||
InventoryType current = default(InventoryType);
|
||||
ItemRankingKey itemRankingKey = default(ItemRankingKey);
|
||||
EBaseParam param = default(EBaseParam);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
InventoryManager* ptr = default(InventoryManager*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -539654855;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
int num13;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
num = -539654853;
|
||||
break;
|
||||
case 2:
|
||||
num13 = 12;
|
||||
goto IL_0093;
|
||||
case 0:
|
||||
return null;
|
||||
case 1:
|
||||
num13 = 13;
|
||||
goto IL_0093;
|
||||
case 4:
|
||||
{
|
||||
IEnumerator<InventoryType> enumerator = containers.GetEnumerator();
|
||||
try
|
||||
{
|
||||
num = 1383035705;
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
num3 = 1383035707;
|
||||
num4 = num7;
|
||||
int num8 = num4 + num3;
|
||||
int num9 = num4 & num3;
|
||||
switch (num8 - (num9 + num9))
|
||||
{
|
||||
case 2:
|
||||
num = (_202D_206A_202A_206D_202C_202E_206A_206C_200D_200F_206E_202B_206D_206D_200B_206D_206B_200E_200D_206E_206C_206A_202B_206D_200B_200D_202B_202B_206B_206A_200D_202A_200B_206D_200B_202D_206A_202E_206F_206D_202E((IEnumerator)enumerator) ? 1383035691 : 1383035701);
|
||||
break;
|
||||
case 13:
|
||||
num = ((inventorySlot->ItemId == 0) ? 1383035706 : 1383035700);
|
||||
break;
|
||||
case 4:
|
||||
num = ((valueOrDefault.Slot == num10) ? 1383035706 : 1383035690);
|
||||
break;
|
||||
case 6:
|
||||
value = rowOrDefault.Value;
|
||||
num = ((!IsAcceptedSlot(value.EquipSlotCategory.RowId, acceptedSlotCategories)) ? 1383035706 : 1383035697);
|
||||
break;
|
||||
case 5:
|
||||
valueOrDefault = excludeContainerSlot.GetValueOrDefault();
|
||||
num = ((valueOrDefault.Container != current) ? 1383035690 : 1383035711);
|
||||
break;
|
||||
case 0:
|
||||
num = 1383035705;
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
EquipmentStats equipmentStats = _calculator.CalculateGearStats(inventorySlot);
|
||||
itemRankingKey = new ItemRankingKey(value.LevelItem.RowId, priority.Score(equipmentStats), equipmentStats.Get(param));
|
||||
num = ((!IsUpgrade(rankingMode, itemRankingKey, best)) ? 1383035706 : 1383035708);
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num10);
|
||||
num = ((inventorySlot == null) ? 1383035706 : 1383035702);
|
||||
break;
|
||||
case 10:
|
||||
num = ((value.LevelEquip > playerLevel) ? 1383035706 : 1383035703);
|
||||
break;
|
||||
case 15:
|
||||
num = ((!excludeContainerSlot.HasValue) ? 1383035690 : 1383035710);
|
||||
break;
|
||||
case 7:
|
||||
result = new BestItemRef(current, num10, inventorySlot->ItemId, itemRankingKey.ItemLevel, itemRankingKey.Score);
|
||||
best = itemRankingKey;
|
||||
num = 1383035706;
|
||||
break;
|
||||
case 11:
|
||||
num = ((num10 < inventoryContainer->Size) ? 1383035698 : 1383035705);
|
||||
break;
|
||||
case 12:
|
||||
num = ((!IsItemForJob(value, job)) ? 1383035706 : 1383035704);
|
||||
break;
|
||||
case 16:
|
||||
current = enumerator.Current;
|
||||
inventoryContainer = ptr->GetInventoryContainer(current);
|
||||
num = ((inventoryContainer == null) ? 1383035705 : 1383035699);
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
int num11 = num10;
|
||||
num3 = 1;
|
||||
num4 = num11;
|
||||
num10 = (num4 | num3) + (num4 & num3);
|
||||
num = 1383035696;
|
||||
break;
|
||||
}
|
||||
case 17:
|
||||
rowOrDefault = _itemSheet.GetRowOrDefault(inventorySlot->ItemId);
|
||||
num = ((!rowOrDefault.HasValue) ? 1383035706 : 1383035709);
|
||||
break;
|
||||
case 8:
|
||||
num10 = 0;
|
||||
num = 1383035696;
|
||||
break;
|
||||
case 14:
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
num = ((enumerator == null) ? 1816874723 : 1816874720);
|
||||
while (true)
|
||||
{
|
||||
int num12 = num;
|
||||
num3 = 1816874722;
|
||||
num4 = num12;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 1816874720;
|
||||
break;
|
||||
case 2:
|
||||
_206C_202E_206F_206E_206E_200E_200C_206A_200B_206E_202C_202E_206D_202D_202D_202E_206E_206D_200D_200D_202A_202B_202C_202B_200B_200F_202B_202B_200F_200C_202D_206C_200D_202B_200E_200F_206D_206E_206B_200C_202E((IDisposable)enumerator);
|
||||
num = 1816874723;
|
||||
break;
|
||||
case 1:
|
||||
goto end_IL_042f;
|
||||
}
|
||||
continue;
|
||||
end_IL_042f:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
IL_0093:
|
||||
param = (EBaseParam)num13;
|
||||
ptr = InventoryManager.Instance();
|
||||
num = ((ptr != null) ? (-539654851) : (-539654855));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsUpgrade(EItemRankingMode mode, ItemRankingKey candidate, ItemRankingKey best)
|
||||
{
|
||||
int num = ((mode != EItemRankingMode.DamageFirst) ? (-1413450028) : (-1413450032));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1413450029;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 8:
|
||||
num = -1413450032;
|
||||
break;
|
||||
case 7:
|
||||
num = ((mode != EItemRankingMode.ItemLevelFirst) ? (-1413450031) : (-1413450025));
|
||||
break;
|
||||
case 9:
|
||||
return candidate.ItemLevel > best.ItemLevel;
|
||||
case 4:
|
||||
num = ((candidate.ItemLevel == best.ItemLevel) ? (-1413450027) : (-1413450022));
|
||||
break;
|
||||
case 2:
|
||||
num = ((candidate.Score == best.Score) ? (-1413450029) : (-1413450026));
|
||||
break;
|
||||
case 5:
|
||||
return candidate.Score > best.Score;
|
||||
case 1:
|
||||
return candidate.Damage > best.Damage;
|
||||
case 3:
|
||||
num = ((candidate.Damage == best.Damage) ? (-1413450028) : (-1413450030));
|
||||
break;
|
||||
case 6:
|
||||
return candidate.Score > best.Score;
|
||||
case 0:
|
||||
return candidate.ItemLevel > best.ItemLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsItemForJob(Item item, EClassJob job)
|
||||
{
|
||||
uint rowId = item.ClassJobCategory.RowId;
|
||||
int num = ((rowId != 0) ? (-1361138782) : (-1361138777));
|
||||
ClassJobCategory? rowOrDefault = default(ClassJobCategory?);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1361138778;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 3:
|
||||
num = -1361138777;
|
||||
break;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
return true;
|
||||
case 0:
|
||||
return job.IsInCategory(rowOrDefault.Value);
|
||||
case 4:
|
||||
rowOrDefault = _classJobCategorySheet.GetRowOrDefault(rowId);
|
||||
num = (rowOrDefault.HasValue ? (-1361138778) : (-1361138780));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static bool IsAcceptedSlot(uint itemSlotCategory, IReadOnlyList<uint> accepted)
|
||||
{
|
||||
IEnumerator<uint> enumerator = accepted.GetEnumerator();
|
||||
try
|
||||
{
|
||||
int num = -1139406440;
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1139406439;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
num = (_202D_206A_202A_206D_202C_202E_206A_206C_200D_200F_206E_202B_206D_206D_200B_206D_206B_200E_200D_206E_206C_206A_202B_206D_200B_200D_202B_202B_206B_206A_200D_202A_200B_206D_200B_202D_206A_202E_206F_206D_202E((IEnumerator)enumerator) ? (-1139406438) : (-1139406439));
|
||||
break;
|
||||
case 3:
|
||||
num = ((enumerator.Current != itemSlotCategory) ? (-1139406440) : (-1139406437));
|
||||
break;
|
||||
case 4:
|
||||
num = -1139406440;
|
||||
break;
|
||||
case 2:
|
||||
return true;
|
||||
case 0:
|
||||
goto end_IL_0012;
|
||||
}
|
||||
continue;
|
||||
end_IL_0012:
|
||||
break;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
int num = ((enumerator == null) ? (-1966232189) : (-1966232192));
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
int num3 = -1966232191;
|
||||
int num4 = num7;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = -1966232192;
|
||||
break;
|
||||
case 1:
|
||||
_206C_202E_206F_206E_206E_200E_200C_206A_200B_206E_202C_202E_206D_202D_202D_202E_206E_206D_200D_200D_202A_202B_202C_202B_200B_200F_202B_202B_200F_200C_202D_206C_200D_202B_200E_200F_206D_206E_206B_200C_202E((IDisposable)enumerator);
|
||||
num = -1966232189;
|
||||
break;
|
||||
case 2:
|
||||
goto end_IL_00c5;
|
||||
}
|
||||
continue;
|
||||
end_IL_00c5:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static BestItemFinder()
|
||||
{
|
||||
InventoryType[] array = new InventoryType[12];
|
||||
_200B_206D_202E_206F_206A_206F_202B_200E_206E_200B_202D_206C_200F_206D_200D_206B_206A_202C_202C_206E_206E_202C_206D_206C_206F_202C_200F_200F_202A_202D_202B_206F_200E_202C_202C_200D_200B_206D_200D_200D_202E((Array)array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
ArmoryAndEquipped = new global::_003C_003Ez__ReadOnlyArray<InventoryType>(array);
|
||||
InventoryType[] array2 = new InventoryType[16];
|
||||
_200B_206D_202E_206F_206A_206F_202B_200E_206E_200B_202D_206C_200F_206D_200D_206B_206A_202C_202C_206E_206E_202C_206D_206C_206F_202C_200F_200F_202A_202D_202B_206F_200E_202C_202C_200D_200B_206D_200D_200D_202E((Array)array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
ArmoryEquippedAndBags = new global::_003C_003Ez__ReadOnlyArray<InventoryType>(array2);
|
||||
}
|
||||
|
||||
static void _206D_206D_200D_200E_206B_206F_200E_200E_206D_200F_200F_202C_206F_200D_200C_200E_206A_202D_206A_200D_202A_202E_200B_206C_206C_202A_206A_202B_202D_202E_200F_200B_206E_202C_202A_206F_202D_202B_200F_200C_202E(object P_0, string P_1)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(P_0, P_1);
|
||||
}
|
||||
|
||||
static bool _202D_206A_202A_206D_202C_202E_206A_206C_200D_200F_206E_202B_206D_206D_200B_206D_206B_200E_200D_206E_206C_206A_202B_206D_200B_200D_202B_202B_206B_206A_200D_202A_200B_206D_200B_202D_206A_202E_206F_206D_202E(IEnumerator P_0)
|
||||
{
|
||||
return P_0.MoveNext();
|
||||
}
|
||||
|
||||
static void _206C_202E_206F_206E_206E_200E_200C_206A_200B_206E_202C_202E_206D_202D_202D_202E_206E_206D_200D_200D_202A_202B_202C_202B_200B_200F_202B_202B_200F_200C_202D_206C_200D_202B_200E_200F_206D_206E_206B_200C_202E(IDisposable P_0)
|
||||
{
|
||||
P_0.Dispose();
|
||||
}
|
||||
|
||||
static void _200B_206D_202E_206F_206A_206F_202B_200E_206E_200B_202D_206C_200F_206D_200D_206B_206A_202C_202C_206E_206E_202C_206D_206C_206F_202C_200F_200F_202A_202D_202B_206F_200E_202C_202C_200D_200B_206D_200D_200D_202E(Array P_0, RuntimeFieldHandle P_1)
|
||||
{
|
||||
RuntimeHelpers.InitializeArray(P_0, P_1);
|
||||
}
|
||||
}
|
||||
117
LLib/LLib.Gear/BestItemRef.cs
Normal file
117
LLib/LLib.Gear/BestItemRef.cs
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public readonly record struct BestItemRef(InventoryType Container, int Slot, uint ItemId, uint ItemLevel, float SubstatScore)
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _200D_200D_206E_202E_200C_202C_200E_206A_202B_202A_200F_202B_202B_200D_206C_200E_206B_202B_202A_200D_206A_206A_206D_206D_202D_206F_200E_202D_206D_200F_202C_206E_206E_202E_200B_206D_206C_200D_202D_200C_202E();
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(879982736));
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(stringBuilder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1581517409));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 1969490728 : 1969490729);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1969490728;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
_200D_206F_202B_200E_206D_206B_206B_206B_202A_206B_202D_206F_202C_206D_202C_202B_206A_200D_200C_206A_206D_200E_200F_206E_206E_206A_206B_206D_202E_206C_206A_206C_206F_202E_202B_202B_206F_200E_206A_206C_202E(stringBuilder, '}');
|
||||
return _202D_200F_202C_200D_206A_202D_206E_206B_202E_206C_200C_200B_200B_202E_202C_200F_200E_206C_206E_206E_202C_202A_200F_200F_200F_202B_206C_200B_202A_206D_200C_206A_200B_202C_202A_206B_202D_206C_200D_200C_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_200D_206F_202B_200E_206D_206B_206B_206B_202A_206B_202D_206F_202C_206D_202C_202B_206A_200D_200C_206A_206D_200E_200F_206E_206E_206A_206B_206D_202E_206C_206A_206C_206F_202E_202B_202B_206F_200E_206A_206C_202E(stringBuilder, ' ');
|
||||
num = 1969490728;
|
||||
break;
|
||||
case 2:
|
||||
num = 1969490729;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-926004725));
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, Container.ToString());
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-991935084));
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, Slot.ToString());
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-1773173997));
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, ItemId.ToString());
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-928952484));
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, ItemLevel.ToString());
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-2040749927));
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, SubstatScore.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(BestItemRef other)
|
||||
{
|
||||
int num = ((!EqualityComparer<InventoryType>.Default.Equals(Container, other.Container)) ? 542422515 : 542422514);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 542422515;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 4:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(ItemLevel, other.ItemLevel)) ? 542422515 : 542422518);
|
||||
break;
|
||||
case 1:
|
||||
num = ((!EqualityComparer<int>.Default.Equals(Slot, other.Slot)) ? 542422515 : 542422512);
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 5:
|
||||
return EqualityComparer<float>.Default.Equals(SubstatScore, other.SubstatScore);
|
||||
case 3:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(ItemId, other.ItemId)) ? 542422515 : 542422519);
|
||||
break;
|
||||
case 2:
|
||||
num = 542422514;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<BestItemRef>.Equals(BestItemRef other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _200D_200D_206E_202E_200C_202C_200E_206A_202B_202A_200F_202B_202B_200D_206C_200E_206B_202B_202A_200D_206A_206A_206D_206D_202D_206F_200E_202D_206D_200F_202C_206E_206E_202E_200B_206D_206C_200D_202D_200C_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _200D_206F_202B_200E_206D_206B_206B_206B_202A_206B_202D_206F_202C_206D_202C_202B_206A_200D_200C_206A_206D_200E_200F_206E_206E_206A_206B_206D_202E_206C_206A_206C_206F_202E_202B_202B_206F_200E_206A_206C_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _202D_200F_202C_200D_206A_202D_206E_206B_202E_206C_200C_200B_200B_202E_202C_200F_200E_206C_206E_206E_202C_202A_200F_200F_200F_202B_206C_200B_202A_206D_200C_206A_200B_202C_202A_206B_202D_206C_200D_200C_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
463
LLib/LLib.Gear/DesynthActions.cs
Normal file
463
LLib/LLib.Gear/DesynthActions.cs
Normal file
|
|
@ -0,0 +1,463 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using LLib.GameUI;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public static class DesynthActions
|
||||
{
|
||||
public const uint DesynthUnlockQuestId = 65688u;
|
||||
|
||||
public unsafe static bool TryOpenDesynthWindow()
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr != null) ? 423836342 : 423836341);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 423836343;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
ptr->AgentInterface.Show();
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_005a;
|
||||
}
|
||||
continue;
|
||||
IL_005a:
|
||||
num = 423836341;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsDesynthAddonReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-866883789), out addonPtr);
|
||||
}
|
||||
|
||||
public unsafe static void SetCategory(AgentSalvage.SalvageItemCategory category)
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr == null) ? (-1642327650) : (-1642327651));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1642327649;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = -1642327651;
|
||||
break;
|
||||
case 1:
|
||||
return;
|
||||
case 2:
|
||||
ptr->SelectedCategory = category;
|
||||
num = -1642327650;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static AgentSalvage.SalvageItemCategory GetCategory()
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr != null) ? 1275547526 : 1275547525);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1275547527;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004b;
|
||||
case 2:
|
||||
return AgentSalvage.SalvageItemCategory.InventoryEquipment;
|
||||
case 1:
|
||||
return ptr->SelectedCategory;
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = 1275547525;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static void RefreshItemList()
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr == null) ? 213710031 : 213710028);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 213710029;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = 213710028;
|
||||
break;
|
||||
case 2:
|
||||
return;
|
||||
case 1:
|
||||
ptr->ItemListRefresh(isSalvageResultAddonOpen: true);
|
||||
num = 213710031;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static int GetItemCount()
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr != null) ? (-832139057) : (-832139060));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -832139059;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
return (int)ptr->ItemCount;
|
||||
case 1:
|
||||
return 0;
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -832139060;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TrySelectItem(IGameGui gameGui, int itemIndex)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1627601716), out addonPtr) ? (-770746818) : (-770746819));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -770746817;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0054;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
AddonCallback.FireWithUpdate(addonPtr, 12, itemIndex);
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0054:
|
||||
num = -770746819;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsConfirmDialogReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1828930182), out addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmDesynth(IGameGui gameGui, bool nqOnly = false)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(221638269), out addonPtr) ? (-763680542) : (-763680543));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -763680541;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 1:
|
||||
AddonCallback.FireWithUpdate(addonPtr, 15, nqOnly ? 1 : 0);
|
||||
AddonCallback.FireWithUpdate(addonPtr, default(int), default(int));
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -763680543;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsResultDialogReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-132278347), out addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseResultDialog(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(937498069), out addonPtr) ? (-1405203810) : (-1405203811));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1405203809;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_0060;
|
||||
}
|
||||
continue;
|
||||
IL_0060:
|
||||
num = -1405203811;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseDesynthWindow(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-2023860148), out addonPtr) ? 176704598 : 176704597);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 176704599;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = 176704597;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static AgentSalvage.SalvageListItem? GetItemAtIndex(int index)
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr == null) ? 1959558310 : 1959558311);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1959558309;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = 1959558311;
|
||||
break;
|
||||
case 2:
|
||||
num = ((ptr->ItemList == null) ? 1959558310 : 1959558305);
|
||||
break;
|
||||
case 1:
|
||||
return ptr->ItemList[index];
|
||||
case 4:
|
||||
num = ((index < 0) ? 1959558310 : 1959558304);
|
||||
break;
|
||||
case 5:
|
||||
num = ((index < ptr->ItemCount) ? 1959558308 : 1959558310);
|
||||
break;
|
||||
case 3:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool TryDesynthDirect(InventoryItem* item)
|
||||
{
|
||||
int num = ((item == null) ? (-1819563004) : (-1819563003));
|
||||
AgentSalvage* ptr = default(AgentSalvage*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1819563004;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = -1819563003;
|
||||
break;
|
||||
case 1:
|
||||
num = ((item->ItemId != 0) ? (-1819563007) : (-1819563004));
|
||||
break;
|
||||
case 5:
|
||||
ptr = AgentSalvage.Instance();
|
||||
num = ((ptr != null) ? (-1819563001) : (-1819563008));
|
||||
break;
|
||||
case 4:
|
||||
return false;
|
||||
case 3:
|
||||
{
|
||||
ptr->SalvageItem(item, 0, 0);
|
||||
AtkValue* returnValue = stackalloc AtkValue[1];
|
||||
AtkValue* ptr2 = stackalloc AtkValue[2];
|
||||
ptr2->Type = AtkValueType.Int;
|
||||
ptr2->Int = 0;
|
||||
ptr2[1].Type = AtkValueType.Bool;
|
||||
ptr2[1].Byte = 1;
|
||||
ptr->AgentInterface.ReceiveEvent(returnValue, ptr2, 2u, 1uL);
|
||||
return true;
|
||||
}
|
||||
case 0:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsDesynthUnlocked()
|
||||
{
|
||||
return GearFeatures.IsDesynthUnlocked();
|
||||
}
|
||||
|
||||
public static bool IsItemDesynthable(IDataManager dataManager, uint itemId)
|
||||
{
|
||||
Item row;
|
||||
int num = (dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out row) ? (-1608454273) : (-1608454276));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1608454274;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return row.Desynth > 0;
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_0068;
|
||||
}
|
||||
continue;
|
||||
IL_0068:
|
||||
num = -1608454276;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool CanPlayerDesynthItem(IDataManager dataManager, uint itemId)
|
||||
{
|
||||
Item row;
|
||||
int num = (dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out row) ? (-1179010991) : (-1179010980));
|
||||
PlayerState* ptr = default(PlayerState*);
|
||||
ClassJob? valueNullable = default(ClassJob?);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1179010983;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 4:
|
||||
num = -1179010980;
|
||||
break;
|
||||
case 6:
|
||||
return false;
|
||||
case 1:
|
||||
return false;
|
||||
case 7:
|
||||
return false;
|
||||
case 5:
|
||||
return false;
|
||||
case 3:
|
||||
ptr = PlayerState.Instance();
|
||||
num = ((ptr != null) ? (-1179010981) : (-1179010984));
|
||||
break;
|
||||
case 2:
|
||||
return ptr->ClassJobLevels[valueNullable.Value.ExpArrayIndex] >= 30;
|
||||
case 8:
|
||||
num = ((row.Desynth > 0) ? (-1179010983) : (-1179010978));
|
||||
break;
|
||||
case 0:
|
||||
valueNullable = row.ClassJobRepair.ValueNullable;
|
||||
num = (valueNullable.HasValue ? (-1179010982) : (-1179010977));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static float GetDesynthLevel(uint classJobId)
|
||||
{
|
||||
PlayerState* ptr = PlayerState.Instance();
|
||||
bool flag = ptr == null;
|
||||
int num = (flag ? 659072519 : 659072518);
|
||||
bool flag2 = default(bool);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 659072516;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 7:
|
||||
return ptr->GetDesynthesisLevel(classJobId);
|
||||
case 8:
|
||||
num = ((classJobId <= 15) ? 659072513 : 659072516);
|
||||
break;
|
||||
case 2:
|
||||
num = ((classJobId < 8) ? 659072516 : 659072524);
|
||||
break;
|
||||
case 5:
|
||||
flag2 = false;
|
||||
num = 659072517;
|
||||
break;
|
||||
case 3:
|
||||
num = ((!flag) ? 659072515 : 659072512);
|
||||
break;
|
||||
case 1:
|
||||
flag = flag2;
|
||||
num = 659072519;
|
||||
break;
|
||||
case 0:
|
||||
flag2 = true;
|
||||
num = 659072517;
|
||||
break;
|
||||
case 4:
|
||||
return 0f;
|
||||
case 6:
|
||||
num = 659072518;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
18
LLib/LLib.Gear/EEquipSlotCategory.cs
Normal file
18
LLib/LLib.Gear/EEquipSlotCategory.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
namespace LLib.Gear;
|
||||
|
||||
public enum EEquipSlotCategory : uint
|
||||
{
|
||||
None = 0u,
|
||||
OneHandedMainHand = 1u,
|
||||
Shield = 2u,
|
||||
Head = 3u,
|
||||
Body = 4u,
|
||||
Hands = 5u,
|
||||
Legs = 7u,
|
||||
Feet = 8u,
|
||||
Ears = 9u,
|
||||
Neck = 10u,
|
||||
Wrists = 11u,
|
||||
Rings = 12u,
|
||||
TwoHandedMainHand = 13u
|
||||
}
|
||||
407
LLib/LLib.Gear/EEquipSlotCategoryExtensions.cs
Normal file
407
LLib/LLib.Gear/EEquipSlotCategoryExtensions.cs
Normal file
|
|
@ -0,0 +1,407 @@
|
|||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public static class EEquipSlotCategoryExtensions
|
||||
{
|
||||
public static InventoryType? GetArmoryContainer(this EEquipSlotCategory slot)
|
||||
{
|
||||
int num;
|
||||
InventoryType? result = default(InventoryType?);
|
||||
switch (slot)
|
||||
{
|
||||
default:
|
||||
num = -2089769317;
|
||||
goto IL_0047;
|
||||
case EEquipSlotCategory.Ears:
|
||||
result = InventoryType.ArmoryEar;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
case EEquipSlotCategory.Shield:
|
||||
goto IL_00b7;
|
||||
case EEquipSlotCategory.Hands:
|
||||
goto IL_00cd;
|
||||
case EEquipSlotCategory.Head:
|
||||
goto IL_00e3;
|
||||
case (EEquipSlotCategory)6u:
|
||||
goto IL_00f9;
|
||||
case EEquipSlotCategory.Body:
|
||||
goto IL_010e;
|
||||
case EEquipSlotCategory.Legs:
|
||||
goto IL_0131;
|
||||
case EEquipSlotCategory.Feet:
|
||||
goto IL_0147;
|
||||
case EEquipSlotCategory.Wrists:
|
||||
goto IL_015d;
|
||||
case EEquipSlotCategory.OneHandedMainHand:
|
||||
case EEquipSlotCategory.TwoHandedMainHand:
|
||||
goto IL_017e;
|
||||
case EEquipSlotCategory.Neck:
|
||||
goto IL_0194;
|
||||
case EEquipSlotCategory.Rings:
|
||||
goto IL_01aa;
|
||||
IL_0047:
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -2089769328;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 7:
|
||||
goto end_IL_0047;
|
||||
case 8:
|
||||
goto IL_00b7;
|
||||
case 10:
|
||||
goto IL_00cd;
|
||||
case 5:
|
||||
goto IL_00e3;
|
||||
case 2:
|
||||
goto IL_00f9;
|
||||
case 9:
|
||||
goto IL_010e;
|
||||
case 1:
|
||||
return result;
|
||||
case 0:
|
||||
num = -2089769317;
|
||||
break;
|
||||
case 12:
|
||||
goto IL_0131;
|
||||
case 6:
|
||||
goto IL_0147;
|
||||
case 13:
|
||||
goto IL_015d;
|
||||
case 11:
|
||||
num = -2089769326;
|
||||
break;
|
||||
case 4:
|
||||
goto IL_017e;
|
||||
case 3:
|
||||
goto IL_0194;
|
||||
case 14:
|
||||
goto IL_01aa;
|
||||
}
|
||||
continue;
|
||||
end_IL_0047:
|
||||
break;
|
||||
}
|
||||
goto case EEquipSlotCategory.Ears;
|
||||
IL_01aa:
|
||||
result = InventoryType.ArmoryRings;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_0194:
|
||||
result = InventoryType.ArmoryNeck;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_017e:
|
||||
result = InventoryType.ArmoryMainHand;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_015d:
|
||||
result = InventoryType.ArmoryWrist;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_0147:
|
||||
result = InventoryType.ArmoryFeets;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_0131:
|
||||
result = InventoryType.ArmoryLegs;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_010e:
|
||||
result = InventoryType.ArmoryBody;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_00f9:
|
||||
result = null;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_00e3:
|
||||
result = InventoryType.ArmoryHead;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_00cd:
|
||||
result = InventoryType.ArmoryHands;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_00b7:
|
||||
result = InventoryType.ArmoryOffHand;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static int? FindFreeSlot(InventoryType container)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? (-1184837257) : (-1184837263));
|
||||
int num5 = default(int);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1184837262;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 7:
|
||||
return null;
|
||||
case 0:
|
||||
num5 = 0;
|
||||
num = -1184837260;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = -1184837260;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
return null;
|
||||
case 9:
|
||||
return num5;
|
||||
case 10:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num5);
|
||||
num = ((inventorySlot == null) ? (-1184837264) : (-1184837254));
|
||||
break;
|
||||
case 3:
|
||||
return null;
|
||||
case 5:
|
||||
inventoryContainer = ptr->GetInventoryContainer(container);
|
||||
num = ((inventoryContainer != null) ? (-1184837262) : (-1184837259));
|
||||
break;
|
||||
case 8:
|
||||
num = ((inventorySlot->ItemId != 0) ? (-1184837264) : (-1184837253));
|
||||
break;
|
||||
case 4:
|
||||
num = -1184837263;
|
||||
break;
|
||||
case 6:
|
||||
num = ((num5 < inventoryContainer->Size) ? (-1184837256) : (-1184837261));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool TryUnequipItem(int equippedSlotIndex)
|
||||
{
|
||||
int num;
|
||||
InventoryType? inventoryType2 = default(InventoryType?);
|
||||
InventoryManager* ptr = default(InventoryManager*);
|
||||
InventoryType valueOrDefault2 = default(InventoryType);
|
||||
int valueOrDefault = default(int);
|
||||
InventoryType? inventoryType = default(InventoryType?);
|
||||
int? num7 = default(int?);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
switch (equippedSlotIndex)
|
||||
{
|
||||
default:
|
||||
num = 1686328571;
|
||||
goto IL_004a;
|
||||
case 6:
|
||||
inventoryType2 = InventoryType.ArmoryLegs;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
case 11:
|
||||
case 12:
|
||||
goto IL_0106;
|
||||
case 0:
|
||||
goto IL_0147;
|
||||
case 7:
|
||||
goto IL_018d;
|
||||
case 3:
|
||||
goto IL_01d1;
|
||||
case 1:
|
||||
goto IL_022c;
|
||||
case 5:
|
||||
goto IL_0259;
|
||||
case 10:
|
||||
goto IL_0271;
|
||||
case 13:
|
||||
goto IL_029d;
|
||||
case 4:
|
||||
goto IL_02db;
|
||||
case 8:
|
||||
goto IL_0301;
|
||||
case 2:
|
||||
goto IL_0351;
|
||||
case 9:
|
||||
goto IL_036b;
|
||||
IL_004a:
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1686328567;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 24:
|
||||
return false;
|
||||
case 14:
|
||||
goto end_IL_004a;
|
||||
case 8:
|
||||
goto IL_0106;
|
||||
case 27:
|
||||
return false;
|
||||
case 31:
|
||||
goto IL_0120;
|
||||
case 6:
|
||||
goto IL_0147;
|
||||
case 22:
|
||||
goto IL_015f;
|
||||
case 30:
|
||||
return false;
|
||||
case 4:
|
||||
goto IL_018d;
|
||||
case 11:
|
||||
goto IL_01a5;
|
||||
case 15:
|
||||
goto IL_01d1;
|
||||
case 16:
|
||||
goto IL_01e9;
|
||||
case 20:
|
||||
goto IL_0208;
|
||||
case 18:
|
||||
goto IL_022c;
|
||||
case 2:
|
||||
ptr->MoveItemSlot(InventoryType.EquippedItems, (ushort)equippedSlotIndex, valueOrDefault2, (ushort)valueOrDefault, a6: true);
|
||||
return true;
|
||||
case 19:
|
||||
goto IL_0259;
|
||||
case 3:
|
||||
goto IL_0271;
|
||||
case 13:
|
||||
valueOrDefault2 = inventoryType.GetValueOrDefault();
|
||||
num = 1686328557;
|
||||
break;
|
||||
case 5:
|
||||
goto IL_029d;
|
||||
case 26:
|
||||
goto IL_02b5;
|
||||
case 7:
|
||||
goto IL_02db;
|
||||
case 0:
|
||||
num = 1686328571;
|
||||
break;
|
||||
case 28:
|
||||
return false;
|
||||
case 1:
|
||||
goto IL_0301;
|
||||
case 21:
|
||||
goto IL_0319;
|
||||
case 12:
|
||||
num = 1686328548;
|
||||
break;
|
||||
case 23:
|
||||
return false;
|
||||
case 25:
|
||||
goto IL_0351;
|
||||
case 17:
|
||||
return false;
|
||||
case 29:
|
||||
goto IL_036b;
|
||||
case 10:
|
||||
valueOrDefault = num7.GetValueOrDefault();
|
||||
num = 1686328565;
|
||||
break;
|
||||
case 9:
|
||||
goto IL_0398;
|
||||
}
|
||||
continue;
|
||||
IL_0398:
|
||||
num = ((inventorySlot->ItemId != 0) ? 1686328545 : 1686328553);
|
||||
continue;
|
||||
IL_015f:
|
||||
num7 = FindFreeSlot(valueOrDefault2);
|
||||
num = ((!num7.HasValue) ? 1686328556 : 1686328573);
|
||||
continue;
|
||||
IL_0208:
|
||||
num = ((equippedSlotIndex < inventoryContainer->Size) ? 1686328546 : 1686328555);
|
||||
continue;
|
||||
IL_0319:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(equippedSlotIndex);
|
||||
num = ((inventorySlot == null) ? 1686328553 : 1686328574);
|
||||
continue;
|
||||
IL_0120:
|
||||
inventoryType = inventoryType2;
|
||||
num = ((!inventoryType.HasValue) ? 1686328544 : 1686328570);
|
||||
continue;
|
||||
IL_01a5:
|
||||
inventoryContainer = ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
num = ((inventoryContainer != null) ? 1686328551 : 1686328559);
|
||||
continue;
|
||||
IL_02b5:
|
||||
ptr = InventoryManager.Instance();
|
||||
num = ((ptr != null) ? 1686328572 : 1686328550);
|
||||
continue;
|
||||
IL_01e9:
|
||||
num = ((equippedSlotIndex < 0) ? 1686328555 : 1686328547);
|
||||
continue;
|
||||
end_IL_004a:
|
||||
break;
|
||||
}
|
||||
goto case 6;
|
||||
IL_036b:
|
||||
inventoryType2 = InventoryType.ArmoryNeck;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_0351:
|
||||
inventoryType2 = InventoryType.ArmoryHead;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_0301:
|
||||
inventoryType2 = InventoryType.ArmoryEar;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_02db:
|
||||
inventoryType2 = InventoryType.ArmoryHands;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_029d:
|
||||
inventoryType2 = InventoryType.ArmorySoulCrystal;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_0271:
|
||||
inventoryType2 = InventoryType.ArmoryWrist;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_0259:
|
||||
inventoryType2 = null;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_022c:
|
||||
inventoryType2 = InventoryType.ArmoryOffHand;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_01d1:
|
||||
inventoryType2 = InventoryType.ArmoryBody;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_018d:
|
||||
inventoryType2 = InventoryType.ArmoryFeets;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_0147:
|
||||
inventoryType2 = InventoryType.ArmoryMainHand;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_0106:
|
||||
inventoryType2 = InventoryType.ArmoryRings;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
}
|
||||
}
|
||||
}
|
||||
8
LLib/LLib.Gear/EItemRankingMode.cs
Normal file
8
LLib/LLib.Gear/EItemRankingMode.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
namespace LLib.Gear;
|
||||
|
||||
public enum EItemRankingMode
|
||||
{
|
||||
ItemLevelFirst,
|
||||
ScoreFirst,
|
||||
DamageFirst
|
||||
}
|
||||
58
LLib/LLib.Gear/EquipmentSlots.cs
Normal file
58
LLib/LLib.Gear/EquipmentSlots.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public static class EquipmentSlots
|
||||
{
|
||||
public const int Count = 13;
|
||||
|
||||
public const int BeltIndex = 5;
|
||||
|
||||
public unsafe static InventoryContainer* GetEquippedContainer()
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? (-579848400) : (-579848397));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -579848398;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 1:
|
||||
return null;
|
||||
case 2:
|
||||
return ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = -579848397;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool TryGetEquippedItem(InventoryContainer* container, int slotIndex, out InventoryItem* item)
|
||||
{
|
||||
item = container->GetInventorySlot(slotIndex);
|
||||
int num = ((item == null) ? 365336456 : 365336459);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 365336458;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004d;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
return item->ItemId != 0;
|
||||
}
|
||||
continue;
|
||||
IL_004d:
|
||||
num = 365336459;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public sealed record EquipmentStats(Dictionary<EBaseParam, StatInfo> Stats, byte MateriaCount)
|
||||
{
|
||||
private sealed class KeyValuePairComparer : IEqualityComparer<KeyValuePair<EBaseParam, StatInfo>>
|
||||
[CompilerGenerated]
|
||||
private Type EqualityContract
|
||||
{
|
||||
public bool Equals(KeyValuePair<EBaseParam, StatInfo> x, KeyValuePair<EBaseParam, StatInfo> y)
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
if (x.Key == y.Key)
|
||||
{
|
||||
return object.Equals(x.Value, y.Value);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int GetHashCode(KeyValuePair<EBaseParam, StatInfo> obj)
|
||||
{
|
||||
return HashCode.Combine((int)obj.Key, obj.Value);
|
||||
return _206D_200D_202A_206A_206A_206A_200F_202C_202C_202D_206D_206F_206C_200D_200C_206C_202D_202E_202B_206E_202B_202B_202D_206C_200C_200F_202E_206D_200B_202E_200B_206E_202D_202A_200D_200B_200C_206B_200E_200D_202E(typeof(EquipmentStats).TypeHandle);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -31,19 +26,79 @@ public sealed record EquipmentStats(Dictionary<EBaseParam, StatInfo> Stats, byte
|
|||
public short GetEquipment(EBaseParam param)
|
||||
{
|
||||
Stats.TryGetValue(param, out StatInfo value);
|
||||
return value?.EquipmentValue ?? 0;
|
||||
int num = (((object)value != null) ? (-1344068202) : (-1344068203));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1344068204;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 1:
|
||||
return 0;
|
||||
case 2:
|
||||
return value.EquipmentValue;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -1344068203;
|
||||
}
|
||||
}
|
||||
|
||||
public short GetMateria(EBaseParam param)
|
||||
{
|
||||
Stats.TryGetValue(param, out StatInfo value);
|
||||
return value?.MateriaValue ?? 0;
|
||||
int num = (((object)value != null) ? 1796035726 : 1796035727);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1796035726;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0052;
|
||||
case 0:
|
||||
return value.MateriaValue;
|
||||
case 1:
|
||||
return 0;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = 1796035727;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsOvercapped(EBaseParam param)
|
||||
{
|
||||
Stats.TryGetValue(param, out StatInfo value);
|
||||
return value?.Overcapped ?? false;
|
||||
int num = (((object)value != null) ? 1825983400 : 1825983403);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1825983401;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 1:
|
||||
return value.Overcapped;
|
||||
case 2:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = 1825983403;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Has(EBaseParam substat)
|
||||
|
|
@ -58,15 +113,197 @@ public sealed record EquipmentStats(Dictionary<EBaseParam, StatInfo> Stats, byte
|
|||
|
||||
public bool Equals(EquipmentStats? other)
|
||||
{
|
||||
if (other != null && MateriaCount == other.MateriaCount)
|
||||
int num = ((other == null) ? 948419368 : 948419369);
|
||||
StatInfo statInfo = default(StatInfo);
|
||||
StatInfo value2 = default(StatInfo);
|
||||
while (true)
|
||||
{
|
||||
return Stats.SequenceEqual(other.Stats, new KeyValuePairComparer());
|
||||
int num2 = num;
|
||||
int num3 = 948419368;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
num = 948419369;
|
||||
break;
|
||||
case 1:
|
||||
num = ((MateriaCount != other.MateriaCount) ? 948419368 : 948419372);
|
||||
break;
|
||||
case 4:
|
||||
num = ((Stats.Count == other.Stats.Count) ? 948419370 : 948419368);
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 2:
|
||||
{
|
||||
using (Dictionary<EBaseParam, StatInfo>.Enumerator enumerator = Stats.GetEnumerator())
|
||||
{
|
||||
num = -2102937561;
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
num3 = -2102937566;
|
||||
num4 = num7;
|
||||
int num8 = num4 + num3;
|
||||
int num9 = num4 & num3;
|
||||
switch (num8 - (num9 + num9))
|
||||
{
|
||||
case 3:
|
||||
return false;
|
||||
case 2:
|
||||
num = (_202B_206A_200D_206F_202E_202A_200C_200F_200D_202D_202B_202B_200C_202E_200B_202B_206A_200E_200F_206C_202D_202B_200C_200D_206E_206A_206B_200D_202C_206E_202C_202D_206F_202E_202A_202A_200C_206A_202B_202C_202E((object)statInfo, (object)value2) ? (-2102937561) : (-2102937567));
|
||||
break;
|
||||
case 5:
|
||||
num = (enumerator.MoveNext() ? (-2102937562) : (-2102937565));
|
||||
break;
|
||||
case 0:
|
||||
num = -2102937561;
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
enumerator.Current.Deconstruct(out var key, out var value);
|
||||
EBaseParam key2 = key;
|
||||
statInfo = value;
|
||||
num = ((!other.Stats.TryGetValue(key2, out value2)) ? (-2102937567) : (-2102937568));
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
goto end_IL_00dc;
|
||||
}
|
||||
continue;
|
||||
end_IL_00dc:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IEquatable<EquipmentStats>.Equals(EquipmentStats? other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine(MateriaCount, Stats);
|
||||
int num = MateriaCount.GetHashCode();
|
||||
using Dictionary<EBaseParam, StatInfo>.Enumerator enumerator = Stats.GetEnumerator();
|
||||
int num2 = 1490502903;
|
||||
while (true)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 1490502902;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 3:
|
||||
num2 = 1490502903;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
enumerator.Current.Deconstruct(out var key, out var value);
|
||||
EBaseParam value2 = key;
|
||||
StatInfo value3 = value;
|
||||
num ^= HashCode.Combine(value2, value3);
|
||||
num2 = 1490502903;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
num2 = (enumerator.MoveNext() ? 1490502900 : 1490502902);
|
||||
break;
|
||||
case 0:
|
||||
return num;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _206D_200D_206D_206D_200B_200C_206E_200E_206C_200C_206F_206D_202D_206F_202D_202D_200F_202D_206A_202A_206B_206F_202E_206E_200C_206E_202D_202C_202B_200B_200E_200D_202D_200E_202C_206D_202B_206C_202D_202B_202E();
|
||||
_206D_202C_202C_200D_200B_202D_206F_206D_206A_200F_202B_200F_206E_202C_206E_206E_200D_202C_206E_206C_206F_202D_202D_202B_206F_202A_202A_202D_200E_206D_200F_206D_206B_206F_202C_200B_206C_202E_202D_200D_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(137609556));
|
||||
_206D_202C_202C_200D_200B_202D_206F_206D_206A_200F_202B_200F_206E_202C_206E_206E_200D_202C_206E_206C_206F_202D_202D_202B_206F_202A_202A_202D_200E_206D_200F_206D_206B_206F_202C_200B_206C_202E_202D_200D_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1808631505));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? (-1401190179) : (-1401190180));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1401190179;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
_200C_206A_202D_200E_200F_200E_200C_202A_200E_200E_206B_202A_202A_206B_202B_206E_202D_202D_206A_206A_202C_206D_206B_200F_206A_200F_202D_200D_202C_200F_200F_200F_206A_206A_206C_206C_200E_200F_200D_206B_202E(stringBuilder, '}');
|
||||
return _202E_200B_206C_202B_206C_200C_202E_206E_206B_206D_202B_202C_202D_202C_206B_202B_206E_202B_202D_206E_206C_200C_202A_206C_206F_206F_202C_200F_200C_200F_202B_206A_206A_202E_202E_202A_200D_202C_202C_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_200C_206A_202D_200E_200F_200E_200C_202A_200E_200E_206B_202A_202A_206B_202B_206E_202D_202D_206A_206A_202C_206D_206B_200F_206A_200F_202D_200D_202C_200F_200F_200F_206A_206A_206C_206C_200E_200F_200D_206B_202E(stringBuilder, ' ');
|
||||
num = -1401190179;
|
||||
break;
|
||||
case 2:
|
||||
num = -1401190180;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206C_202B_202C_202E_202C_206E_206E_200F_202B_200C_200C_202B_202D_206C_206F_206D_206E_200D_202C_206F_202D_202E_202A_206D_206A_202C_200B_206E_202D_200C_200F_202A_200C_202B_202C_206A_202E_206D_206B_202A_202E();
|
||||
_206D_202C_202C_200D_200B_202D_206F_206D_206A_200F_202B_200F_206E_202C_206E_206E_200D_202C_206E_206C_206F_202D_202D_202B_206F_202A_202A_202D_200E_206D_200F_206D_206B_206F_202C_200B_206C_202E_202D_200D_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-716646928));
|
||||
_200E_202D_206A_200C_206A_200D_202A_200F_200C_206E_202B_206A_200D_206D_206F_206A_206B_206C_206C_202B_206D_200F_200D_200D_200C_206F_200D_200E_206A_206E_200F_202A_202B_200B_206B_206E_202C_200C_200D_202E_202E(builder, (object)Stats);
|
||||
_206D_202C_202C_200D_200B_202D_206F_206D_206A_200F_202B_200F_206E_202C_206E_206E_200D_202C_206E_206C_206F_202D_202D_202B_206F_202A_202A_202D_200E_206D_200F_206D_206B_206F_202C_200B_206C_202E_202D_200D_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-88604916));
|
||||
_206D_202C_202C_200D_200B_202D_206F_206D_206A_200F_202B_200F_206E_202C_206E_206E_200D_202C_206E_206C_206F_202D_202D_202B_206F_202A_202A_202D_200E_206D_200F_206D_206B_206F_202C_200B_206C_202E_202D_200D_202E(builder, MateriaCount.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
static Type _206D_200D_202A_206A_206A_206A_200F_202C_202C_202D_206D_206F_206C_200D_200C_206C_202D_202E_202B_206E_202B_202B_202D_206C_200C_200F_202E_206D_200B_202E_200B_206E_202D_202A_200D_200B_200C_206B_200E_200D_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static bool _202B_206A_200D_206F_202E_202A_200C_200F_200D_202D_202B_202B_200C_202E_200B_202B_206A_200E_200F_206C_202D_202B_200C_200D_206E_206A_206B_200D_202C_206E_202C_202D_206F_202E_202A_202A_200C_206A_202B_202C_202E(object P_0, object P_1)
|
||||
{
|
||||
return object.Equals(P_0, P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _206D_200D_206D_206D_200B_200C_206E_200E_206C_200C_206F_206D_202D_206F_202D_202D_200F_202D_206A_202A_206B_206F_202E_206E_200C_206E_202D_202C_202B_200B_200E_200D_202D_200E_202C_206D_202B_206C_202D_202B_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _206D_202C_202C_200D_200B_202D_206F_206D_206A_200F_202B_200F_206E_202C_206E_206E_200D_202C_206E_206C_206F_202D_202D_202B_206F_202A_202A_202D_200E_206D_200F_206D_206B_206F_202C_200B_206C_202E_202D_200D_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _200C_206A_202D_200E_200F_200E_200C_202A_200E_200E_206B_202A_202A_206B_202B_206E_202D_202D_206A_206A_202C_206D_206B_200F_206A_200F_202D_200D_202C_200F_200F_200F_206A_206A_206C_206C_200E_200F_200D_206B_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _202E_200B_206C_202B_206C_200C_202E_206E_206B_206D_202B_202C_202D_202C_206B_202B_206E_202B_202D_206E_206C_200C_202A_206C_206F_206F_202C_200F_200C_200F_202B_206A_206A_202E_202E_202A_200D_202C_202C_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
|
||||
static void _206C_202B_202C_202E_202C_206E_206E_200F_202B_200C_200C_202B_202D_206C_206F_206D_206E_200D_202C_206F_202D_202E_202A_206D_206A_202C_200B_206E_202D_200C_200F_202A_200C_202B_202C_206A_202E_206D_206B_202A_202E()
|
||||
{
|
||||
RuntimeHelpers.EnsureSufficientExecutionStack();
|
||||
}
|
||||
|
||||
static StringBuilder _200E_202D_206A_200C_206A_200D_202A_200F_200C_206E_202B_206A_200D_206D_206F_206A_206B_206C_206C_202B_206D_200F_200D_200D_200C_206F_200D_200E_206A_206E_200F_202A_202B_200B_206B_206E_202C_200C_200D_202E_202E(StringBuilder P_0, object P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,15 +27,47 @@ public readonly struct ExtendedBaseParam : IExcelRow<ExtendedBaseParam>
|
|||
|
||||
private static ushort EquipSlotCategoryPctCtor(ExcelPage page, uint parentOffset, uint offset, uint i)
|
||||
{
|
||||
if (i != 0)
|
||||
int num = ((i == 0) ? 1726719508 : 1726719511);
|
||||
while (true)
|
||||
{
|
||||
return page.ReadUInt16(offset + 8 + (i - 1) * 2);
|
||||
int num2 = num;
|
||||
int num3 = 1726719510;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0043;
|
||||
case 2:
|
||||
return 0;
|
||||
case 1:
|
||||
{
|
||||
num3 = 8;
|
||||
num4 = (int)offset;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
int num9 = num7 + (num8 + num8);
|
||||
num3 = 1;
|
||||
num4 = (int)i;
|
||||
num3 = ~(~num4 + num3) * 2;
|
||||
num4 = num9;
|
||||
return _206B_202D_206F_202C_206F_202A_206D_202D_202E_206C_206D_206A_200D_200F_206B_200D_200E_202D_206F_206A_202C_200F_206B_200B_200B_200E_200C_202D_206E_200C_206E_206E_200E_200B_202A_202E_202B_206A_206A_206F_202E(page, (nuint)(uint)((num4 | num3) + (num4 & num3)));
|
||||
}
|
||||
}
|
||||
continue;
|
||||
IL_0043:
|
||||
num = 1726719511;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static ExtendedBaseParam Create(ExcelPage page, uint offset, uint row)
|
||||
{
|
||||
return new ExtendedBaseParam(page, offset, row);
|
||||
}
|
||||
|
||||
static ushort _206B_202D_206F_202C_206F_202A_206D_202D_202E_206C_206D_206A_200D_200F_206B_200D_200E_202D_206F_206A_202C_200F_206B_200B_200B_200E_200C_202D_206E_200C_206E_206E_200E_200B_202A_202E_202B_206A_206A_206F_202E(ExcelPage P_0, nuint P_1)
|
||||
{
|
||||
return P_0.ReadUInt16(P_1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
163
LLib/LLib.Gear/ExtractActions.cs
Normal file
163
LLib/LLib.Gear/ExtractActions.cs
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using LLib.GameUI;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public static class ExtractActions
|
||||
{
|
||||
public const uint ExtractionUnlockQuestId = 66174u;
|
||||
|
||||
public unsafe static bool TryOpenExtractionWindow()
|
||||
{
|
||||
ActionManager* ptr = ActionManager.Instance();
|
||||
int num = ((ptr != null) ? 1517753475 : 1517753472);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1517753473;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004b;
|
||||
case 2:
|
||||
return ptr->UseAction(ActionType.GeneralAction, 14u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = 1517753472;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsExtractionAddonReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(1975097749), out addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryExtractFirst(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1577561758), out addonPtr) ? 1656734997 : 1656734996);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1656734997;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
AddonCallback.FireWithUpdate(addonPtr, 2, 0);
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
goto IL_0068;
|
||||
}
|
||||
continue;
|
||||
IL_0068:
|
||||
num = 1656734996;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsConfirmDialogReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1781947130), out addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmExtraction(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(839489786), out addonPtr) ? (-1818884272) : (-1818884269));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1818884271;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, default(int));
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -1818884269;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TrySwitchCategory(IGameGui gameGui, int category)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(1975097749), out addonPtr) ? (-1576577779) : (-1576577778));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1576577780;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, 1, category);
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_006a;
|
||||
}
|
||||
continue;
|
||||
IL_006a:
|
||||
num = -1576577778;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseExtractionWindow(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1686317250), out addonPtr) ? 930280316 : 930280319);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 930280317;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, -1);
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = 930280319;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsExtractionUnlocked()
|
||||
{
|
||||
return GearFeatures.IsExtractionUnlocked();
|
||||
}
|
||||
}
|
||||
352
LLib/LLib.Gear/GearConditionHelper.cs
Normal file
352
LLib/LLib.Gear/GearConditionHelper.cs
Normal file
|
|
@ -0,0 +1,352 @@
|
|||
using System.Collections.Generic;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public static class GearConditionHelper
|
||||
{
|
||||
private const ushort MaxCondition = 30000;
|
||||
|
||||
private const ushort MaxSpiritbond = 10000;
|
||||
|
||||
public unsafe static int? GetLowestConditionPercent()
|
||||
{
|
||||
InventoryContainer* equippedContainer = EquipmentSlots.GetEquippedContainer();
|
||||
int num = ((equippedContainer != null) ? 136938409 : 136938411);
|
||||
int? result = default(int?);
|
||||
int num9 = default(int);
|
||||
int num8 = default(int);
|
||||
InventoryItem* item = default(InventoryItem*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 136938412;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 10:
|
||||
return result;
|
||||
case 8:
|
||||
result = num9;
|
||||
num = 136938405;
|
||||
break;
|
||||
case 4:
|
||||
num = ((num8 == 5) ? 136938405 : 136938410);
|
||||
break;
|
||||
case 7:
|
||||
return null;
|
||||
case 6:
|
||||
num = ((!EquipmentSlots.TryGetEquippedItem(equippedContainer, num8, out item)) ? 136938405 : 136938414);
|
||||
break;
|
||||
case 1:
|
||||
num = ((num9 >= result.Value) ? 136938405 : 136938404);
|
||||
break;
|
||||
case 2:
|
||||
num9 = item->Condition * 100 / 30000;
|
||||
num = ((!result.HasValue) ? 136938404 : 136938413);
|
||||
break;
|
||||
case 5:
|
||||
result = null;
|
||||
num8 = 0;
|
||||
num = 136938415;
|
||||
break;
|
||||
case 3:
|
||||
num = ((num8 < 13) ? 136938408 : 136938406);
|
||||
break;
|
||||
case 0:
|
||||
num = 136938411;
|
||||
break;
|
||||
case 9:
|
||||
{
|
||||
int num7 = num8;
|
||||
num3 = 1;
|
||||
num4 = num7;
|
||||
num8 = (num4 | num3) + (num4 & num3);
|
||||
num = 136938415;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static List<SlotCondition> GetAllSlotConditions()
|
||||
{
|
||||
List<SlotCondition> list = new List<SlotCondition>(13);
|
||||
InventoryContainer* equippedContainer = EquipmentSlots.GetEquippedContainer();
|
||||
int num = ((equippedContainer != null) ? 1727066767 : 1727066762);
|
||||
int num5 = default(int);
|
||||
InventoryItem* item = default(InventoryItem*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1727066761;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 4:
|
||||
num = ((num5 < 13) ? 1727066764 : 1727066763);
|
||||
break;
|
||||
case 6:
|
||||
num5 = 0;
|
||||
num = 1727066765;
|
||||
break;
|
||||
case 3:
|
||||
return list;
|
||||
case 8:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = 1727066765;
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
list.Add(new SlotCondition(num5, item->ItemId, item->Condition * 100 / 30000));
|
||||
num = 1727066753;
|
||||
break;
|
||||
case 5:
|
||||
num = ((num5 == 5) ? 1727066753 : 1727066760);
|
||||
break;
|
||||
case 0:
|
||||
num = 1727066762;
|
||||
break;
|
||||
case 1:
|
||||
num = ((!EquipmentSlots.TryGetEquippedItem(equippedContainer, num5, out item)) ? 1727066753 : 1727066766);
|
||||
break;
|
||||
case 2:
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool HasSpiritbondReadyItem(bool includeBags = false)
|
||||
{
|
||||
InventoryContainer* equippedContainer = EquipmentSlots.GetEquippedContainer();
|
||||
int num = ((equippedContainer == null) ? 566966460 : 566966456);
|
||||
int num5 = default(int);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
int num6 = default(int);
|
||||
InventoryItem* item = default(InventoryItem*);
|
||||
InventoryType inventoryType = default(InventoryType);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
InventoryManager* ptr = default(InventoryManager*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 566966450;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 15:
|
||||
num = ((num5 < inventoryContainer->Size) ? 566966433 : 566966438);
|
||||
break;
|
||||
case 14:
|
||||
num = (includeBags ? 566966451 : 566966463);
|
||||
break;
|
||||
case 4:
|
||||
num = ((!EquipmentSlots.TryGetEquippedItem(equippedContainer, num6, out item)) ? 566966442 : 566966449);
|
||||
break;
|
||||
case 24:
|
||||
{
|
||||
int num8 = num6;
|
||||
num3 = 1;
|
||||
num4 = num8;
|
||||
num6 = (num4 | num3) + (num4 & num3);
|
||||
num = 566966452;
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
int num7 = num5;
|
||||
num3 = 1;
|
||||
num4 = num7;
|
||||
num5 = (num4 | num3) + (num4 & num3);
|
||||
num = 566966461;
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
num5 = 0;
|
||||
num = 566966461;
|
||||
break;
|
||||
case 18:
|
||||
num = 566966456;
|
||||
break;
|
||||
case 3:
|
||||
num = ((item->SpiritbondOrCollectability < 10000) ? 566966442 : 566966458);
|
||||
break;
|
||||
case 10:
|
||||
num6 = 0;
|
||||
num = 566966452;
|
||||
break;
|
||||
case 6:
|
||||
num = ((num6 < 13) ? 566966459 : 566966460);
|
||||
break;
|
||||
case 20:
|
||||
inventoryType++;
|
||||
num = 566966439;
|
||||
break;
|
||||
case 12:
|
||||
num = (((inventorySlot->Flags & InventoryItem.ItemFlags.Collectable) != InventoryItem.ItemFlags.None) ? 566966455 : 566966457);
|
||||
break;
|
||||
case 19:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num5);
|
||||
num = ((inventorySlot == null) ? 566966455 : 566966434);
|
||||
break;
|
||||
case 2:
|
||||
return false;
|
||||
case 8:
|
||||
return true;
|
||||
case 17:
|
||||
inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
num = ((inventoryContainer == null) ? 566966438 : 566966453);
|
||||
break;
|
||||
case 11:
|
||||
num = ((inventorySlot->SpiritbondOrCollectability < 10000) ? 566966455 : 566966437);
|
||||
break;
|
||||
case 23:
|
||||
return true;
|
||||
case 22:
|
||||
return false;
|
||||
case 13:
|
||||
return false;
|
||||
case 16:
|
||||
num = ((inventorySlot->ItemId == 0) ? 566966455 : 566966462);
|
||||
break;
|
||||
case 21:
|
||||
num = ((inventoryType <= InventoryType.Inventory4) ? 566966435 : 566966436);
|
||||
break;
|
||||
case 9:
|
||||
num = ((num6 == 5) ? 566966442 : 566966454);
|
||||
break;
|
||||
case 0:
|
||||
inventoryType = InventoryType.Inventory1;
|
||||
num = 566966439;
|
||||
break;
|
||||
case 1:
|
||||
ptr = InventoryManager.Instance();
|
||||
num = ((ptr != null) ? 566966450 : 566966448);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static int? GetLowestSpiritbondPercent()
|
||||
{
|
||||
InventoryContainer* equippedContainer = EquipmentSlots.GetEquippedContainer();
|
||||
int num = ((equippedContainer != null) ? 1500996181 : 1500996188);
|
||||
int? result = default(int?);
|
||||
int num8 = default(int);
|
||||
int num7 = default(int);
|
||||
InventoryItem* item = default(InventoryItem*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1500996182;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 4:
|
||||
num = 1500996188;
|
||||
break;
|
||||
case 6:
|
||||
result = num8;
|
||||
num = 1500996183;
|
||||
break;
|
||||
case 9:
|
||||
num = ((num7 < 13) ? 1500996177 : 1500996180);
|
||||
break;
|
||||
case 10:
|
||||
return null;
|
||||
case 0:
|
||||
num = ((!EquipmentSlots.TryGetEquippedItem(equippedContainer, num7, out item)) ? 1500996183 : 1500996190);
|
||||
break;
|
||||
case 5:
|
||||
num = ((num8 >= result.Value) ? 1500996183 : 1500996176);
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
int num9 = num7;
|
||||
num3 = 1;
|
||||
num4 = num9;
|
||||
int num10 = num4 ^ num3;
|
||||
int num11 = num4 & num3;
|
||||
num7 = num10 + (num11 + num11);
|
||||
num = 1500996191;
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
num8 = item->SpiritbondOrCollectability * 100 / 10000;
|
||||
num = ((!result.HasValue) ? 1500996176 : 1500996179);
|
||||
break;
|
||||
case 7:
|
||||
num = ((num7 == 5) ? 1500996183 : 1500996182);
|
||||
break;
|
||||
case 2:
|
||||
return result;
|
||||
case 3:
|
||||
result = null;
|
||||
num7 = 0;
|
||||
num = 1500996191;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static List<SlotSpiritbond> GetAllSpiritbondInfo()
|
||||
{
|
||||
List<SlotSpiritbond> list = new List<SlotSpiritbond>(13);
|
||||
InventoryContainer* equippedContainer = EquipmentSlots.GetEquippedContainer();
|
||||
int num = ((equippedContainer != null) ? 818481642 : 818481641);
|
||||
int num5 = default(int);
|
||||
InventoryItem* item = default(InventoryItem*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 818481643;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 5:
|
||||
num = ((!EquipmentSlots.TryGetEquippedItem(equippedContainer, num5, out item)) ? 818481647 : 818481643);
|
||||
break;
|
||||
case 7:
|
||||
num = ((num5 == 5) ? 818481647 : 818481646);
|
||||
break;
|
||||
case 1:
|
||||
num5 = 0;
|
||||
num = 818481645;
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
num5 = (num4 | num3) + (num4 & num3);
|
||||
num = 818481645;
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
return list;
|
||||
case 2:
|
||||
return list;
|
||||
case 6:
|
||||
num = ((num5 < 13) ? 818481644 : 818481635);
|
||||
break;
|
||||
case 0:
|
||||
list.Add(new SlotSpiritbond(num5, item->ItemId, item->SpiritbondOrCollectability * 100 / 10000, item->SpiritbondOrCollectability >= 10000));
|
||||
num = 818481647;
|
||||
break;
|
||||
case 3:
|
||||
num = 818481641;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
34
LLib/LLib.Gear/GearFeatures.cs
Normal file
34
LLib/LLib.Gear/GearFeatures.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public static class GearFeatures
|
||||
{
|
||||
public const uint DesynthQuestId = 65688u;
|
||||
|
||||
public const uint ExtractionQuestId = 66174u;
|
||||
|
||||
public const uint MeldingQuestId = 66175u;
|
||||
|
||||
public const uint OvermeldingQuestId = 66176u;
|
||||
|
||||
public static bool IsDesynthUnlocked()
|
||||
{
|
||||
return QuestManager.IsQuestComplete(65688u);
|
||||
}
|
||||
|
||||
public static bool IsExtractionUnlocked()
|
||||
{
|
||||
return QuestManager.IsQuestComplete(66174u);
|
||||
}
|
||||
|
||||
public static bool IsMeldingUnlocked()
|
||||
{
|
||||
return QuestManager.IsQuestComplete(66175u);
|
||||
}
|
||||
|
||||
public static bool IsOvermeldingUnlocked()
|
||||
{
|
||||
return QuestManager.IsQuestComplete(66176u);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using Lumina.Excel;
|
||||
|
|
@ -10,15 +13,236 @@ namespace LLib.Gear;
|
|||
|
||||
public sealed class GearStatsCalculator
|
||||
{
|
||||
private sealed record MateriaInfo(EBaseParam BaseParam, Collection<short> Values, bool HasItem);
|
||||
private sealed record MateriaInfo(EBaseParam BaseParam, Collection<short> Values, bool HasItem)
|
||||
{
|
||||
[CompilerGenerated]
|
||||
private Type EqualityContract
|
||||
{
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
return _202B_200E_202C_202C_206A_206B_206F_202B_200B_206C_202A_206A_206E_202C_206C_206B_202A_200E_202D_202C_200C_206B_206A_202B_202D_200F_206F_202A_206F_202D_200B_202E_200B_200D_206F_206B_202B_200D_206F_202B_202E(typeof(MateriaInfo).TypeHandle);
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _200E_206B_206B_202B_200C_200E_206C_202E_202C_202D_202B_202A_206E_202E_200C_206F_202A_202E_206F_206A_202C_206D_202B_200D_206E_200D_202A_202B_206D_202E_206F_206F_202A_206D_206F_200E_200B_202B_206D_206C_202E();
|
||||
_206A_206C_200F_200C_202A_202E_200D_202E_206E_206C_200B_206D_202A_200B_200B_206E_200B_206C_206B_200C_200C_206E_206D_200B_206C_202B_202E_206E_206B_202C_206A_200D_200F_206A_200F_206A_200B_200C_206F_206D_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-451610657));
|
||||
_206A_206C_200F_200C_202A_202E_200D_202E_206E_206C_200B_206D_202A_200B_200B_206E_200B_206C_206B_200C_200C_206E_206D_200B_206C_202B_202E_206E_206B_202C_206A_200D_200F_206A_200F_206A_200B_200C_206F_206D_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1808631505));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 3927346 : 3927345);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 3927347;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
_202B_202B_202D_202C_200B_206A_202A_200C_202E_206E_200C_202C_200D_202E_202A_202B_200B_200B_202A_200D_206B_202E_206B_206F_200C_200C_202D_206F_200B_200B_206D_206A_206B_202C_206B_200D_206C_202A_202C_202A_202E(stringBuilder, '}');
|
||||
return _200D_200C_206A_202A_206D_206E_200D_200B_200D_202C_202A_202E_206D_200F_206D_206A_202C_206D_200D_206D_206D_200E_200D_202C_202D_200B_202B_206A_202D_200D_206B_206E_206E_202E_206F_206B_202A_202C_206E_202B_202E((object)stringBuilder);
|
||||
case 2:
|
||||
_202B_202B_202D_202C_200B_206A_202A_200C_202E_206E_200C_202C_200D_202E_202A_202B_200B_200B_202A_200D_206B_202E_206B_206F_200C_200C_202D_206F_200B_200B_206D_206A_206B_202C_206B_200D_206C_202A_202C_202A_202E(stringBuilder, ' ');
|
||||
num = 3927346;
|
||||
break;
|
||||
case 0:
|
||||
num = 3927345;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_202E_206B_200D_206D_202C_206F_206E_200F_200E_206E_200C_200D_200F_206B_206A_206A_206C_202B_200D_200C_202B_200D_206A_200C_206D_200F_202D_206F_206C_206B_206C_206B_202E_202B_200B_206D_200E_206F_202A_202E_202E();
|
||||
_206A_206C_200F_200C_202A_202E_200D_202E_206E_206C_200B_206D_202A_200B_200B_206E_200B_206C_206B_200C_200C_206E_206D_200B_206C_202B_202E_206E_206B_202C_206A_200D_200F_206A_200F_206A_200B_200C_206F_206D_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-1366977224));
|
||||
_206A_206C_200F_200C_202A_202E_200D_202E_206E_206C_200B_206D_202A_200B_200B_206E_200B_206C_206B_200C_200C_206E_206D_200B_206C_202B_202E_206E_206B_202C_206A_200D_200F_206A_200F_206A_200B_200C_206F_206D_202E(builder, BaseParam.ToString());
|
||||
_206A_206C_200F_200C_202A_202E_200D_202E_206E_206C_200B_206D_202A_200B_200B_206E_200B_206C_206B_200C_200C_206E_206D_200B_206C_202B_202E_206E_206B_202C_206A_200D_200F_206A_200F_206A_200B_200C_206F_206D_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-629506369));
|
||||
_206A_206C_200F_200C_202A_202E_200D_202E_206E_206C_200B_206D_202A_200B_200B_206E_200B_206C_206B_200C_200C_206E_206D_200B_206C_202B_202E_206E_206B_202C_206A_200D_200F_206A_200F_206A_200B_200C_206F_206D_202E(builder, Values.ToString());
|
||||
_206A_206C_200F_200C_202A_202E_200D_202E_206E_206C_200B_206D_202A_200B_200B_206E_200B_206C_206B_200C_200C_206E_206D_200B_206C_202B_202E_206E_206B_202C_206A_200D_200F_206A_200F_206A_200B_200C_206F_206D_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(2080820800));
|
||||
_206A_206C_200F_200C_202A_202E_200D_202E_206E_206C_200B_206D_202A_200B_200B_206E_200B_206C_206B_200C_200C_206E_206D_200B_206C_202B_202E_206E_206B_202C_206A_200D_200F_206A_200F_206A_200B_200C_206F_206D_202E(builder, HasItem.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(MateriaInfo? other)
|
||||
{
|
||||
int num = (((object)this == other) ? 217201442 : 217201446);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 217201441;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
num = ((!_206D_202A_206F_202A_202D_206D_206B_206C_206B_206D_200E_206C_202B_200E_206D_200D_202C_206B_206C_200C_200B_202E_200E_200E_206F_206F_206C_200F_200F_206F_206E_206D_202D_202E_200C_202B_206C_206A_200F_202C_202E(EqualityContract, other.EqualityContract)) ? 217201441 : 217201445);
|
||||
break;
|
||||
case 7:
|
||||
num = (((object)other == null) ? 217201441 : 217201440);
|
||||
break;
|
||||
case 3:
|
||||
return true;
|
||||
case 5:
|
||||
num = 217201446;
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 4:
|
||||
num = ((!EqualityComparer<EBaseParam>.Default.Equals(BaseParam, other.BaseParam)) ? 217201441 : 217201443);
|
||||
break;
|
||||
case 2:
|
||||
num = ((!EqualityComparer<Collection<short>>.Default.Equals(Values, other.Values)) ? 217201441 : 217201447);
|
||||
break;
|
||||
case 6:
|
||||
return EqualityComparer<bool>.Default.Equals(HasItem, other.HasItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<MateriaInfo>.Equals(MateriaInfo? other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static Type _202B_200E_202C_202C_206A_206B_206F_202B_200B_206C_202A_206A_206E_202C_206C_206B_202A_200E_202D_202C_200C_206B_206A_202B_202D_200F_206F_202A_206F_202D_200B_202E_200B_200D_206F_206B_202B_200D_206F_202B_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static StringBuilder _200E_206B_206B_202B_200C_200E_206C_202E_202C_202D_202B_202A_206E_202E_200C_206F_202A_202E_206F_206A_202C_206D_202B_200D_206E_200D_202A_202B_206D_202E_206F_206F_202A_206D_206F_200E_200B_202B_206D_206C_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _206A_206C_200F_200C_202A_202E_200D_202E_206E_206C_200B_206D_202A_200B_200B_206E_200B_206C_206B_200C_200C_206E_206D_200B_206C_202B_202E_206E_206B_202C_206A_200D_200F_206A_200F_206A_200B_200C_206F_206D_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _202B_202B_202D_202C_200B_206A_202A_200C_202E_206E_200C_202C_200D_202E_202A_202B_200B_200B_202A_200D_206B_202E_206B_206F_200C_200C_202D_206F_200B_200B_206D_206A_206B_202C_206B_200D_206C_202A_202C_202A_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _200D_200C_206A_202A_206D_206E_200D_200B_200D_202C_202A_202E_206D_200F_206D_206A_202C_206D_200D_206D_206D_200E_200D_202C_202D_200B_202B_206A_202D_200D_206B_206E_206E_202E_206F_206B_202A_202C_206E_202B_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
|
||||
static void _202E_206B_200D_206D_202C_206F_206E_200F_200E_206E_200C_200D_200F_206B_206A_206A_206C_202B_200D_200C_202B_200D_206A_200C_206D_200F_202D_206F_206C_206B_206C_206B_202E_202B_200B_206D_200E_206F_202A_202E_202E()
|
||||
{
|
||||
RuntimeHelpers.EnsureSufficientExecutionStack();
|
||||
}
|
||||
|
||||
static bool _206D_202A_206F_202A_202D_206D_206B_206C_206B_206D_200E_206C_202B_200E_206D_200D_202C_206B_206C_200C_200B_202E_200E_200E_206F_206F_206C_200F_200F_206F_206E_206D_202D_202E_200C_202B_206C_206A_200F_202C_202E(Type P_0, Type P_1)
|
||||
{
|
||||
return P_0 == P_1;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
[CompilerGenerated]
|
||||
private sealed class _003C_003Ec
|
||||
{
|
||||
public static readonly _003C_003Ec _003C_003E9 = new _003C_003Ec();
|
||||
|
||||
public static Func<ExtendedBaseParam, IEnumerable<(EBaseParam, int y, ushort)>> _003C_003E9__7_0;
|
||||
|
||||
public static Func<(EBaseParam, int y, ushort), (EBaseParam, int)> _003C_003E9__7_1;
|
||||
|
||||
public static Func<(EBaseParam, int y, ushort), ushort> _003C_003E9__7_2;
|
||||
|
||||
public static Func<Materia, bool> _003C_003E9__7_3;
|
||||
|
||||
public static Func<Materia, uint> _003C_003E9__7_4;
|
||||
|
||||
public static Func<Materia, MateriaInfo> _003C_003E9__7_5;
|
||||
|
||||
internal IEnumerable<(EBaseParam, int y, ushort)> _003C_002Ector_003Eb__7_0(ExtendedBaseParam x)
|
||||
{
|
||||
_003C_003Ec__DisplayClass7_0 CS_0024_003C_003E8__locals3 = new _003C_003Ec__DisplayClass7_0
|
||||
{
|
||||
x = x
|
||||
};
|
||||
return from y in _202E_202C_202D_206C_200D_200C_206B_200C_206E_202A_206F_202E_206C_200E_206F_200D_202E_206F_202C_206F_200B_206C_206F_206C_206D_202D_202A_202E_202E_206E_206E_202A_206B_202B_202D_206F_202E_206B_202E_202C_202E(0, CS_0024_003C_003E8__locals3.x.EquipSlotCategoryPct.Count)
|
||||
select ((EBaseParam)CS_0024_003C_003E8__locals3.x.RowId, y: y, CS_0024_003C_003E8__locals3.x.EquipSlotCategoryPct[y]);
|
||||
}
|
||||
|
||||
internal (EBaseParam, int) _003C_002Ector_003Eb__7_1((EBaseParam, int y, ushort) x)
|
||||
{
|
||||
return (x.Item1, x.y);
|
||||
}
|
||||
|
||||
internal ushort _003C_002Ector_003Eb__7_2((EBaseParam, int y, ushort) x)
|
||||
{
|
||||
return x.Item3;
|
||||
}
|
||||
|
||||
internal bool _003C_002Ector_003Eb__7_3(Materia x)
|
||||
{
|
||||
int num = ((x.RowId == 0) ? (-1542142344) : (-1542142341));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1542142343;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004a;
|
||||
case 2:
|
||||
return x.BaseParam.RowId != 0;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_004a:
|
||||
num = -1542142341;
|
||||
}
|
||||
}
|
||||
|
||||
internal uint _003C_002Ector_003Eb__7_4(Materia x)
|
||||
{
|
||||
return x.RowId;
|
||||
}
|
||||
|
||||
internal MateriaInfo _003C_002Ector_003Eb__7_5(Materia x)
|
||||
{
|
||||
return new MateriaInfo((EBaseParam)x.BaseParam.RowId, x.Value, x.Item[0].RowId != 0);
|
||||
}
|
||||
|
||||
static IEnumerable<int> _202E_202C_202D_206C_200D_200C_206B_200C_206E_202A_206F_202E_206C_200E_206F_200D_202E_206F_202C_206F_200B_206C_206F_206C_206D_202D_202A_202E_202E_206E_206E_202A_206B_202B_202D_206F_202E_206B_202E_202C_202E(int P_0, int P_1)
|
||||
{
|
||||
return Enumerable.Range(P_0, P_1);
|
||||
}
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
private sealed class _003C_003Ec__DisplayClass7_0
|
||||
{
|
||||
public ExtendedBaseParam x;
|
||||
|
||||
internal (EBaseParam, int y, ushort) _003C_002Ector_003Eb__6(int y)
|
||||
{
|
||||
return ((EBaseParam)x.RowId, y: y, x.EquipSlotCategoryPct[y]);
|
||||
}
|
||||
}
|
||||
|
||||
private const uint EternityRingItemId = 8575u;
|
||||
|
||||
private static readonly uint[] CanHaveOffhand = new uint[14]
|
||||
{
|
||||
2u, 6u, 8u, 12u, 14u, 16u, 18u, 20u, 22u, 24u,
|
||||
26u, 28u, 30u, 32u
|
||||
};
|
||||
private static readonly uint[] CanHaveOffhand;
|
||||
|
||||
private readonly ExcelSheet<Item> _itemSheet;
|
||||
|
||||
|
|
@ -28,17 +252,19 @@ public sealed class GearStatsCalculator
|
|||
|
||||
private readonly Dictionary<uint, MateriaInfo> _materiaStats;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public GearStatsCalculator(IDataManager? dataManager)
|
||||
: this(dataManager?.GetExcelSheet<ItemLevel>() ?? throw new ArgumentNullException("dataManager"), dataManager.GetExcelSheet<ExtendedBaseParam>(), dataManager.GetExcelSheet<Materia>(), dataManager.GetExcelSheet<Item>())
|
||||
: this(dataManager?.GetExcelSheet<ItemLevel>() ?? throw _202D_206D_206E_202C_200B_200E_206C_202A_200B_200E_206A_200F_200F_202B_206E_200D_206F_200F_200C_206C_200E_200E_206F_200D_202D_206F_206B_206F_202D_200E_206A_200D_202D_200F_206E_200F_206B_206B_200D_206F_202E(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(167281534)), dataManager.GetExcelSheet<ExtendedBaseParam>(), dataManager.GetExcelSheet<Materia>(), dataManager.GetExcelSheet<Item>())
|
||||
{
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public GearStatsCalculator(ExcelSheet<ItemLevel> itemLevelSheet, ExcelSheet<ExtendedBaseParam> baseParamSheet, ExcelSheet<Materia> materiaSheet, ExcelSheet<Item> itemSheet)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(itemLevelSheet, "itemLevelSheet");
|
||||
ArgumentNullException.ThrowIfNull(baseParamSheet, "baseParamSheet");
|
||||
ArgumentNullException.ThrowIfNull(materiaSheet, "materiaSheet");
|
||||
ArgumentNullException.ThrowIfNull(itemSheet, "itemSheet");
|
||||
_202A_202D_206D_206A_200C_202C_200D_202E_202B_206C_206C_206A_200B_200C_200C_206D_202C_200E_206B_206F_202B_200D_206E_206F_202C_200F_202E_206B_200F_202A_202E_202B_200B_206B_200C_200B_206D_202D_206B_206F_202E((object)itemLevelSheet, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-1517214085));
|
||||
_202A_202D_206D_206A_200C_202C_200D_202E_202B_206C_206C_206A_200B_200C_200C_206D_202C_200E_206B_206F_202B_200D_206E_206F_202C_200F_202E_206B_200F_202A_202E_202B_200B_206B_200C_200B_206D_202D_206B_206F_202E((object)baseParamSheet, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1818459179));
|
||||
_202A_202D_206D_206A_200C_202C_200D_202E_202B_206C_206C_206A_200B_200C_200C_206D_202C_200E_206B_206F_202B_200D_206E_206F_202C_200F_202E_206B_200F_202A_202E_202B_200B_206B_200C_200B_206D_202D_206B_206F_202E((object)materiaSheet, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-1786404470));
|
||||
_202A_202D_206D_206A_200C_202C_200D_202E_202B_206C_206C_206A_200B_200C_200C_206D_202C_200E_206B_206F_202B_200D_206E_206F_202C_200F_202E_206B_200F_202A_202E_202B_200B_206B_200C_200B_206D_202D_206B_206F_202E((object)itemSheet, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1610602393));
|
||||
_itemSheet = itemSheet;
|
||||
foreach (ItemLevel item in itemLevelSheet)
|
||||
{
|
||||
|
|
@ -65,155 +291,597 @@ public sealed class GearStatsCalculator
|
|||
_itemLevelStatCaps[(item.RowId, EBaseParam.Craftsmanship)] = item.Craftsmanship;
|
||||
_itemLevelStatCaps[(item.RowId, EBaseParam.Control)] = item.Control;
|
||||
}
|
||||
_equipSlotCategoryPct = baseParamSheet.SelectMany((ExtendedBaseParam x) => from y in Enumerable.Range(0, x.EquipSlotCategoryPct.Count)
|
||||
_equipSlotCategoryPct = baseParamSheet.SelectMany((ExtendedBaseParam x) => from y in _003C_003Ec._202E_202C_202D_206C_200D_200C_206B_200C_206E_202A_206F_202E_206C_200E_206F_200D_202E_206F_202C_206F_200B_206C_206F_206C_206D_202D_202A_202E_202E_206E_206E_202A_206B_202B_202D_206F_202E_206B_202E_202C_202E(0, x.EquipSlotCategoryPct.Count)
|
||||
select ((EBaseParam)x.RowId, y: y, x.EquipSlotCategoryPct[y])).ToDictionary(((EBaseParam, int y, ushort) x) => (x.Item1, x.y), ((EBaseParam, int y, ushort) x) => x.Item3);
|
||||
_materiaStats = materiaSheet.Where((Materia x) => x.RowId != 0 && x.BaseParam.RowId != 0).ToDictionary((Materia x) => x.RowId, (Materia x) => new MateriaInfo((EBaseParam)x.BaseParam.RowId, x.Value, x.Item[0].RowId != 0));
|
||||
_materiaStats = materiaSheet.Where(delegate(Materia x)
|
||||
{
|
||||
int num = ((x.RowId == 0) ? (-1542142344) : (-1542142341));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1542142343;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004a;
|
||||
case 2:
|
||||
return x.BaseParam.RowId != 0;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_004a:
|
||||
num = -1542142341;
|
||||
}
|
||||
}).ToDictionary((Materia x) => x.RowId, (Materia x) => new MateriaInfo((EBaseParam)x.BaseParam.RowId, x.Value, x.Item[0].RowId != 0));
|
||||
}
|
||||
|
||||
public unsafe EquipmentStats CalculateGearStats(InventoryItem* item)
|
||||
{
|
||||
List<(uint, byte)> list = new List<(uint, byte)>();
|
||||
byte b = 0;
|
||||
if (item->ItemId != 8575)
|
||||
int num = ((item->ItemId == 8575) ? 190071822 : 190071818);
|
||||
int num11 = default(int);
|
||||
Item? rowOrDefault = default(Item?);
|
||||
ushort num10 = default(ushort);
|
||||
while (true)
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
int num2 = num;
|
||||
int num3 = 190071819;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
ushort num = item->Materia[i];
|
||||
if (num != 0)
|
||||
case 6:
|
||||
{
|
||||
int num12 = num11;
|
||||
num3 = 1;
|
||||
num4 = num12;
|
||||
int num13 = num4 ^ num3;
|
||||
int num14 = num4 & num3;
|
||||
num11 = num13 + (num14 + num14);
|
||||
num = 190071820;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
num11 = 0;
|
||||
num = 190071820;
|
||||
break;
|
||||
case 5:
|
||||
rowOrDefault = _itemSheet.GetRowOrDefault(item->ItemId);
|
||||
num = (rowOrDefault.HasValue ? 190071817 : 190071819);
|
||||
break;
|
||||
case 7:
|
||||
num = ((num11 < 5) ? 190071811 : 190071822);
|
||||
break;
|
||||
case 3:
|
||||
num = 190071818;
|
||||
break;
|
||||
case 8:
|
||||
num10 = item->Materia[num11];
|
||||
num = ((num10 == 0) ? 190071821 : 190071823);
|
||||
break;
|
||||
case 0:
|
||||
return new EquipmentStats(new Dictionary<EBaseParam, StatInfo>(), 0);
|
||||
case 2:
|
||||
return CalculateGearStats(rowOrDefault.Value, _206B_200B_206C_206A_200B_200C_206B_200B_202A_206F_206B_206A_206E_206A_200C_202E_206C_200E_200D_200E_202A_206E_200F_206B_200C_200D_200D_206F_206F_200D_206F_200D_206F_202C_202C_202A_200F_206C_206C_200E_202E((Enum)item->Flags, (Enum)InventoryItem.ItemFlags.HighQuality), list)with
|
||||
{
|
||||
b++;
|
||||
list.Add((num, item->MateriaGrades[i]));
|
||||
}
|
||||
MateriaCount = b
|
||||
};
|
||||
case 4:
|
||||
{
|
||||
byte num7 = b;
|
||||
num3 = 1;
|
||||
num4 = num7;
|
||||
int num8 = num4 ^ num3;
|
||||
int num9 = num4 & num3;
|
||||
b = (byte)(num8 + (num9 + num9));
|
||||
list.Add((num10, item->MateriaGrades[num11]));
|
||||
num = 190071821;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return CalculateGearStats(_itemSheet.GetRow(item->ItemId), item->Flags.HasFlag(InventoryItem.ItemFlags.HighQuality), list)with
|
||||
{
|
||||
MateriaCount = b
|
||||
};
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public EquipmentStats CalculateGearStats(Item item, bool highQuality, IReadOnlyList<(uint MateriaId, byte Grade)> materias)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(materias, "materias");
|
||||
_202A_202D_206D_206A_200C_202C_200D_202E_202B_206C_206C_206A_200B_200C_200C_206D_202C_200E_206B_206F_202B_200D_206E_206F_202C_200F_202E_206B_200F_202A_202E_202B_200B_206B_200C_200B_206D_202D_206B_206F_202E((object)materias, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-6679386));
|
||||
Dictionary<EBaseParam, StatInfo> dictionary = new Dictionary<EBaseParam, StatInfo>();
|
||||
for (int i = 0; i < item.BaseParam.Count; i++)
|
||||
int num = ((item.DamagePhys <= 0) ? (-1164820612) : (-1164820623));
|
||||
int num12 = default(int);
|
||||
int num11 = default(int);
|
||||
MateriaInfo value = default(MateriaInfo);
|
||||
(uint, byte) current = default((uint, byte));
|
||||
while (true)
|
||||
{
|
||||
AddEquipmentStat(dictionary, item.BaseParam[i], item.BaseParamValue[i]);
|
||||
}
|
||||
if (highQuality)
|
||||
{
|
||||
for (int j = 0; j < item.BaseParamSpecial.Count; j++)
|
||||
int num2 = num;
|
||||
int num3 = -1164820618;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
AddEquipmentStat(dictionary, item.BaseParamSpecial[j], item.BaseParamValueSpecial[j]);
|
||||
case 3:
|
||||
num12 = 0;
|
||||
num = -1164820618;
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
AddEquipmentStat(dictionary, item.BaseParam[num12], item.BaseParamValue[num12]);
|
||||
int num13 = num12;
|
||||
num3 = 1;
|
||||
num4 = num13;
|
||||
num12 = (num4 | num3) + (num4 & num3);
|
||||
num = -1164820618;
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
dictionary[EBaseParam.DamageMag] = new StatInfo((short)item.DamageMag, 0, Overcapped: false);
|
||||
num = -1164820619;
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
AddEquipmentStat(dictionary, item.BaseParamSpecial[num11], item.BaseParamValueSpecial[num11]);
|
||||
int num14 = num11;
|
||||
num3 = 1;
|
||||
num4 = num14;
|
||||
num11 = (num4 | num3) + (num4 & num3);
|
||||
num = -1164820620;
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
num = ((item.DamageMag <= 0) ? (-1164820619) : (-1164820621));
|
||||
break;
|
||||
case 1:
|
||||
num11 = 0;
|
||||
num = -1164820620;
|
||||
break;
|
||||
case 8:
|
||||
num = ((!highQuality) ? (-1164820611) : (-1164820617));
|
||||
break;
|
||||
case 7:
|
||||
dictionary[EBaseParam.DamagePhys] = new StatInfo((short)item.DamagePhys, 0, Overcapped: false);
|
||||
num = -1164820612;
|
||||
break;
|
||||
case 0:
|
||||
num = ((num12 < item.BaseParam.Count) ? (-1164820622) : (-1164820610));
|
||||
break;
|
||||
case 9:
|
||||
num = -1164820623;
|
||||
break;
|
||||
case 2:
|
||||
num = ((num11 < item.BaseParamSpecial.Count) ? (-1164820624) : (-1164820611));
|
||||
break;
|
||||
case 11:
|
||||
{
|
||||
IEnumerator<(uint, byte)> enumerator = materias.GetEnumerator();
|
||||
try
|
||||
{
|
||||
num = -1326444285;
|
||||
while (true)
|
||||
{
|
||||
int num5 = num;
|
||||
num3 = -1326444286;
|
||||
num4 = num5;
|
||||
int num6 = num4 + num3;
|
||||
int num7 = num4 & num3;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 1:
|
||||
num = (_202E_202E_202D_206D_206F_202E_202C_200F_200C_202B_206C_200D_200E_202B_202E_202E_202E_206F_202B_206A_200E_202B_202A_206C_206E_206C_206B_200C_202B_206D_202A_202D_206E_200B_202A_202A_206A_200B_202B_202E((IEnumerator)enumerator) ? (-1326444287) : (-1326444286));
|
||||
break;
|
||||
case 2:
|
||||
AddMateriaStat(item, dictionary, value, current.Item2);
|
||||
num = -1326444285;
|
||||
break;
|
||||
case 3:
|
||||
current = enumerator.Current;
|
||||
num = ((!_materiaStats.TryGetValue(current.Item1, out value)) ? (-1326444285) : (-1326444288));
|
||||
break;
|
||||
case 4:
|
||||
num = -1326444285;
|
||||
break;
|
||||
case 0:
|
||||
goto end_IL_0238;
|
||||
}
|
||||
continue;
|
||||
end_IL_0238:
|
||||
break;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
num = ((enumerator == null) ? (-851721026) : (-851721027));
|
||||
while (true)
|
||||
{
|
||||
int num8 = num;
|
||||
num3 = -851721025;
|
||||
num4 = num8;
|
||||
int num9 = num4 + num3;
|
||||
int num10 = num4 & num3;
|
||||
switch (num9 - (num10 + num10))
|
||||
{
|
||||
case 1:
|
||||
goto end_IL_0319;
|
||||
case 2:
|
||||
_202B_202D_200E_206F_202E_200D_202E_200B_202E_202C_202E_206E_206F_206C_200F_200C_202C_202D_206C_202E_200D_202E_200B_206D_200D_200D_206C_202E_206E_206C_202E_206C_202B_202B_202B_202D_206E_200E_200C_206D_202E((IDisposable)enumerator);
|
||||
num = -851721026;
|
||||
break;
|
||||
case 0:
|
||||
num = -851721027;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
end_IL_0319:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return new EquipmentStats(dictionary, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var materia in materias)
|
||||
{
|
||||
if (_materiaStats.TryGetValue(materia.MateriaId, out MateriaInfo value))
|
||||
{
|
||||
AddMateriaStat(item, dictionary, value, materia.Grade);
|
||||
}
|
||||
}
|
||||
return new EquipmentStats(dictionary, 0);
|
||||
}
|
||||
|
||||
private static void AddEquipmentStat(Dictionary<EBaseParam, StatInfo> result, RowRef<BaseParam> baseParam, short value)
|
||||
{
|
||||
if (baseParam.RowId != 0)
|
||||
int num = ((baseParam.RowId != 0) ? (-1609748606) : (-1609748602));
|
||||
StatInfo value2 = default(StatInfo);
|
||||
while (true)
|
||||
{
|
||||
if (result.TryGetValue((EBaseParam)baseParam.RowId, out StatInfo value2))
|
||||
int num2 = num;
|
||||
int num3 = -1609748606;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = -1609748602;
|
||||
break;
|
||||
case 3:
|
||||
result[(EBaseParam)baseParam.RowId] = value2 with
|
||||
{
|
||||
EquipmentValue = (short)(value2.EquipmentValue + value)
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
case 4:
|
||||
return;
|
||||
case 1:
|
||||
result[(EBaseParam)baseParam.RowId] = new StatInfo(value, 0, Overcapped: false);
|
||||
return;
|
||||
case 0:
|
||||
num = ((!result.TryGetValue((EBaseParam)baseParam.RowId, out value2)) ? (-1609748605) : (-1609748607));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddMateriaStat(Item item, Dictionary<EBaseParam, StatInfo> result, MateriaInfo materiaInfo, short grade)
|
||||
{
|
||||
if (!result.TryGetValue(materiaInfo.BaseParam, out StatInfo value))
|
||||
StatInfo value;
|
||||
int num = (result.TryGetValue(materiaInfo.BaseParam, out value) ? 1378115408 : 1378115409);
|
||||
short num5 = default(short);
|
||||
while (true)
|
||||
{
|
||||
value = (result[materiaInfo.BaseParam] = new StatInfo(0, 0, Overcapped: false));
|
||||
}
|
||||
if (materiaInfo.HasItem)
|
||||
{
|
||||
short num = (short)(GetMaximumStatValue(item, materiaInfo.BaseParam) - value.EquipmentValue);
|
||||
if (value.MateriaValue + materiaInfo.Values[grade] > num)
|
||||
{
|
||||
result[materiaInfo.BaseParam] = value with
|
||||
{
|
||||
MateriaValue = num,
|
||||
Overcapped = true
|
||||
};
|
||||
}
|
||||
else
|
||||
int num2 = num;
|
||||
int num3 = 1378115413;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 6:
|
||||
num = 1378115409;
|
||||
break;
|
||||
case 0:
|
||||
result[materiaInfo.BaseParam] = value with
|
||||
{
|
||||
MateriaValue = (short)(value.MateriaValue + materiaInfo.Values[grade])
|
||||
};
|
||||
return;
|
||||
case 4:
|
||||
value = (result[materiaInfo.BaseParam] = new StatInfo(0, 0, Overcapped: false));
|
||||
num = 1378115408;
|
||||
break;
|
||||
case 2:
|
||||
result[materiaInfo.BaseParam] = value with
|
||||
{
|
||||
MateriaValue = num5,
|
||||
Overcapped = true
|
||||
};
|
||||
return;
|
||||
case 5:
|
||||
num = ((!materiaInfo.HasItem) ? 1378115413 : 1378115414);
|
||||
break;
|
||||
case 3:
|
||||
num5 = (short)_206C_206F_200B_206F_202D_200C_202E_202C_202E_200C_202A_200D_200D_200D_200F_206B_206A_200B_200B_206E_200D_206E_206E_202B_206E_202D_200F_202B_200C_202E_202A_206D_200F_206E_202C_206B_200F_206B_206D_202C_202E(0, GetMaximumStatValue(item, materiaInfo.BaseParam) - value.EquipmentValue);
|
||||
num = ((value.MateriaValue + materiaInfo.Values[grade] <= num5) ? 1378115412 : 1378115415);
|
||||
break;
|
||||
case 1:
|
||||
result[materiaInfo.BaseParam] = value with
|
||||
{
|
||||
MateriaValue = (short)(value.MateriaValue + materiaInfo.Values[grade])
|
||||
};
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result[materiaInfo.BaseParam] = value with
|
||||
{
|
||||
MateriaValue = (short)(value.MateriaValue + materiaInfo.Values[grade])
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public short GetMaximumStatValue(Item item, EBaseParam baseParamValue)
|
||||
{
|
||||
if (_itemLevelStatCaps.TryGetValue((item.LevelItem.RowId, baseParamValue), out var value))
|
||||
ushort value;
|
||||
int num = ((!_itemLevelStatCaps.TryGetValue((item.LevelItem.RowId, baseParamValue), out value)) ? 740973538 : 740973537);
|
||||
while (true)
|
||||
{
|
||||
return (short)Math.Round((float)(value * _equipSlotCategoryPct[(baseParamValue, (int)item.EquipSlotCategory.RowId)]) / 1000f, MidpointRounding.AwayFromZero);
|
||||
int num2 = num;
|
||||
int num3 = 740973536;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_006a;
|
||||
case 1:
|
||||
return (short)_200B_206F_202B_202B_206A_200F_200E_206E_206D_206E_206F_202C_200E_200D_202E_202B_202D_202E_200B_206A_206E_206D_202A_200D_206B_206A_206F_206A_202E_206E_202B_200B_200B_200C_206A_206F_202C_206E_202C_200C_202E((double)((float)(value * _equipSlotCategoryPct[(baseParamValue, (int)item.EquipSlotCategory.RowId)]) / 1000f), MidpointRounding.AwayFromZero);
|
||||
case 2:
|
||||
return 0;
|
||||
}
|
||||
continue;
|
||||
IL_006a:
|
||||
num = 740973537;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public unsafe short CalculateAverageItemLevel(InventoryContainer* container)
|
||||
{
|
||||
uint num = 0u;
|
||||
int num2 = 12;
|
||||
for (int i = 0; i < 13; i++)
|
||||
int num = ((container != null) ? 1354599352 : 1354599354);
|
||||
Item? rowOrDefault = default(Item?);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
int num10 = default(int);
|
||||
int num8 = default(int);
|
||||
uint num7 = default(uint);
|
||||
while (true)
|
||||
{
|
||||
if (i == 5)
|
||||
int num2 = num;
|
||||
int num3 = 1354599355;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
InventoryItem* inventorySlot = container->GetInventorySlot(i);
|
||||
if (inventorySlot == null || inventorySlot->ItemId == 0)
|
||||
case 2:
|
||||
rowOrDefault = _itemSheet.GetRowOrDefault(inventorySlot->ItemId);
|
||||
num = ((!rowOrDefault.HasValue) ? 1354599358 : 1354599349);
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
continue;
|
||||
int num13 = num10;
|
||||
num3 = 1;
|
||||
num4 = num13;
|
||||
int num14 = num4 ^ num3;
|
||||
int num15 = num4 & num3;
|
||||
num10 = num14 + (num15 + num15);
|
||||
num = 1354599348;
|
||||
break;
|
||||
}
|
||||
Item? rowOrDefault = _itemSheet.GetRowOrDefault(inventorySlot->ItemId);
|
||||
if (!rowOrDefault.HasValue)
|
||||
case 1:
|
||||
return 0;
|
||||
case 16:
|
||||
num = ((num10 != 0) ? 1354599346 : 1354599347);
|
||||
break;
|
||||
case 9:
|
||||
{
|
||||
continue;
|
||||
int num11 = num8;
|
||||
num3 = 1;
|
||||
num4 = num11;
|
||||
num8 = ~(~num4 + num3);
|
||||
num = 1354599358;
|
||||
break;
|
||||
}
|
||||
if (rowOrDefault.Value.ItemUICategory.RowId == 105)
|
||||
case 11:
|
||||
inventorySlot = container->GetInventorySlot(num10);
|
||||
num = ((inventorySlot == null) ? 1354599358 : 1354599336);
|
||||
break;
|
||||
case 17:
|
||||
num = ((num10 != 0) ? 1354599345 : 1354599356);
|
||||
break;
|
||||
case 12:
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
num2--;
|
||||
}
|
||||
num2--;
|
||||
continue;
|
||||
num7 += rowOrDefault.Value.LevelItem.RowId;
|
||||
int num12 = num10;
|
||||
num3 = 1;
|
||||
num4 = num12;
|
||||
num10 = (num4 | num3) + (num4 & num3);
|
||||
num = 1354599345;
|
||||
break;
|
||||
}
|
||||
if (i == 0 && !((ReadOnlySpan<uint>)CanHaveOffhand).Contains(rowOrDefault.Value.ItemUICategory.RowId))
|
||||
case 15:
|
||||
num = ((num10 < 13) ? 1354599355 : 1354599337);
|
||||
break;
|
||||
case 3:
|
||||
num7 = 0u;
|
||||
num8 = 12;
|
||||
num10 = 0;
|
||||
num = 1354599348;
|
||||
break;
|
||||
case 6:
|
||||
num = 1354599354;
|
||||
break;
|
||||
case 7:
|
||||
num = (((ReadOnlySpan<uint>)CanHaveOffhand).Contains(rowOrDefault.Value.ItemUICategory.RowId) ? 1354599345 : 1354599351);
|
||||
break;
|
||||
case 0:
|
||||
num = ((num10 == 5) ? 1354599358 : 1354599344);
|
||||
break;
|
||||
case 18:
|
||||
num = ((num8 > 0) ? 1354599350 : 1354599359);
|
||||
break;
|
||||
case 4:
|
||||
return 0;
|
||||
case 14:
|
||||
num = ((rowOrDefault.Value.ItemUICategory.RowId != 105) ? 1354599338 : 1354599339);
|
||||
break;
|
||||
case 19:
|
||||
num = ((inventorySlot->ItemId == 0) ? 1354599358 : 1354599353);
|
||||
break;
|
||||
case 10:
|
||||
num7 += rowOrDefault.Value.LevelItem.RowId;
|
||||
num = 1354599358;
|
||||
break;
|
||||
case 8:
|
||||
{
|
||||
num += rowOrDefault.Value.LevelItem.RowId;
|
||||
i++;
|
||||
int num9 = num8;
|
||||
num3 = 1;
|
||||
num4 = num9;
|
||||
num8 = ~(~num4 + num3);
|
||||
num = 1354599346;
|
||||
break;
|
||||
}
|
||||
case 13:
|
||||
return (short)(num7 / num8);
|
||||
}
|
||||
num += rowOrDefault.Value.LevelItem.RowId;
|
||||
}
|
||||
return (short)(num / num2);
|
||||
}
|
||||
|
||||
public unsafe EquipmentStats CalculateGearsetStats(InventoryContainer* container)
|
||||
{
|
||||
int num = ((container != null) ? 335366351 : 335366348);
|
||||
EBaseParam key = default(EBaseParam);
|
||||
StatInfo statInfo = default(StatInfo);
|
||||
StatInfo value = default(StatInfo);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 335366349;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004c;
|
||||
case 1:
|
||||
return new EquipmentStats(new Dictionary<EBaseParam, StatInfo>(), 0);
|
||||
case 2:
|
||||
{
|
||||
Dictionary<EBaseParam, StatInfo> dictionary = new Dictionary<EBaseParam, StatInfo>();
|
||||
byte b = 0;
|
||||
int num5 = 0;
|
||||
while (num5 < 13)
|
||||
{
|
||||
if (num5 != 5)
|
||||
{
|
||||
InventoryItem* inventorySlot = container->GetInventorySlot(num5);
|
||||
if (inventorySlot != null && inventorySlot->ItemId != 0)
|
||||
{
|
||||
EquipmentStats equipmentStats = CalculateGearStats(inventorySlot);
|
||||
b += equipmentStats.MateriaCount;
|
||||
using Dictionary<EBaseParam, StatInfo>.Enumerator enumerator = equipmentStats.Stats.GetEnumerator();
|
||||
num = 2133896260;
|
||||
while (true)
|
||||
{
|
||||
int num6 = num;
|
||||
num3 = 2133896256;
|
||||
num4 = num6;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 5:
|
||||
dictionary[key] = statInfo;
|
||||
num = 2133896260;
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
enumerator.Current.Deconstruct(out var key2, out var value2);
|
||||
key = key2;
|
||||
statInfo = value2;
|
||||
num = ((!dictionary.TryGetValue(key, out value)) ? 2133896261 : 2133896256);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
num = 2133896260;
|
||||
break;
|
||||
case 4:
|
||||
num = (enumerator.MoveNext() ? 2133896257 : 2133896258);
|
||||
break;
|
||||
case 0:
|
||||
dictionary[key] = value with
|
||||
{
|
||||
EquipmentValue = (short)(value.EquipmentValue + statInfo.EquipmentValue),
|
||||
MateriaValue = (short)(value.MateriaValue + statInfo.MateriaValue),
|
||||
Overcapped = (value.Overcapped || statInfo.Overcapped)
|
||||
};
|
||||
num = 2133896260;
|
||||
break;
|
||||
case 2:
|
||||
goto end_IL_00c3;
|
||||
}
|
||||
continue;
|
||||
end_IL_00c3:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
int num7 = num5;
|
||||
num3 = 1;
|
||||
num4 = num7;
|
||||
int num8 = num4 ^ num3;
|
||||
int num9 = num4 & num3;
|
||||
num5 = num8 + (num9 + num9);
|
||||
}
|
||||
return new EquipmentStats(dictionary, b);
|
||||
}
|
||||
}
|
||||
continue;
|
||||
IL_004c:
|
||||
num = 335366348;
|
||||
}
|
||||
}
|
||||
|
||||
static GearStatsCalculator()
|
||||
{
|
||||
uint[] array = new uint[14];
|
||||
_206C_206E_200D_206F_206A_206D_200C_200C_200E_200B_200E_200C_202E_202E_200E_202A_206B_200F_206D_206A_206C_206F_206B_200F_202A_206A_206F_206F_202A_202B_202E_206A_202E_202E_200B_200B_202D_202A_206C_206C_202E((Array)array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
CanHaveOffhand = array;
|
||||
}
|
||||
|
||||
static ArgumentNullException _202D_206D_206E_202C_200B_200E_206C_202A_200B_200E_206A_200F_200F_202B_206E_200D_206F_200F_200C_206C_200E_200E_206F_200D_202D_206F_206B_206F_202D_200E_206A_200D_202D_200F_206E_200F_206B_206B_200D_206F_202E(string P_0)
|
||||
{
|
||||
return new ArgumentNullException(P_0);
|
||||
}
|
||||
|
||||
static void _202A_202D_206D_206A_200C_202C_200D_202E_202B_206C_206C_206A_200B_200C_200C_206D_202C_200E_206B_206F_202B_200D_206E_206F_202C_200F_202E_206B_200F_202A_202E_202B_200B_206B_200C_200B_206D_202D_206B_206F_202E(object P_0, string P_1)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(P_0, P_1);
|
||||
}
|
||||
|
||||
static bool _206B_200B_206C_206A_200B_200C_206B_200B_202A_206F_206B_206A_206E_206A_200C_202E_206C_200E_200D_200E_202A_206E_200F_206B_200C_200D_200D_206F_206F_200D_206F_200D_206F_202C_202C_202A_200F_206C_206C_200E_202E(Enum P_0, Enum P_1)
|
||||
{
|
||||
return P_0.HasFlag(P_1);
|
||||
}
|
||||
|
||||
static bool _202E_202E_202D_206D_206F_202E_202C_200F_200C_202B_206C_200D_200E_202B_202E_202E_202E_206F_202B_206A_200E_202B_202A_206C_206E_206C_206B_200C_202B_206D_202A_202D_206E_200B_202A_202A_206A_200B_202B_202E(IEnumerator P_0)
|
||||
{
|
||||
return P_0.MoveNext();
|
||||
}
|
||||
|
||||
static void _202B_202D_200E_206F_202E_200D_202E_200B_202E_202C_202E_206E_206F_206C_200F_200C_202C_202D_206C_202E_200D_202E_200B_206D_200D_200D_206C_202E_206E_206C_202E_206C_202B_202B_202B_202D_206E_200E_200C_206D_202E(IDisposable P_0)
|
||||
{
|
||||
P_0.Dispose();
|
||||
}
|
||||
|
||||
static int _206C_206F_200B_206F_202D_200C_202E_202C_202E_200C_202A_200D_200D_200D_200F_206B_206A_200B_200B_206E_200D_206E_206E_202B_206E_202D_200F_202B_200C_202E_202A_206D_200F_206E_202C_206B_200F_206B_206D_202C_202E(int P_0, int P_1)
|
||||
{
|
||||
return Math.Max(P_0, P_1);
|
||||
}
|
||||
|
||||
static double _200B_206F_202B_202B_206A_200F_200E_206E_206D_206E_206F_202C_200E_200D_202E_202B_202D_202E_200B_206A_206E_206D_202A_200D_206B_206A_206F_206A_202E_206E_202B_200B_200B_200C_206A_206F_202C_206E_202C_200C_202E(double P_0, MidpointRounding P_1)
|
||||
{
|
||||
return Math.Round(P_0, P_1);
|
||||
}
|
||||
|
||||
static void _206C_206E_200D_206F_206A_206D_200C_200C_200E_200B_200E_200C_202E_202E_200E_202A_206B_200F_206D_206A_206C_206F_206B_200F_202A_206A_206F_206F_202A_202B_202E_206A_202E_202E_200B_200B_202D_202A_206C_206C_202E(Array P_0, RuntimeFieldHandle P_1)
|
||||
{
|
||||
RuntimeHelpers.InitializeArray(P_0, P_1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
89
LLib/LLib.Gear/GearsetHelper.cs
Normal file
89
LLib/LLib.Gear/GearsetHelper.cs
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public static class GearsetHelper
|
||||
{
|
||||
public unsafe static int GetCurrentGearsetIndex()
|
||||
{
|
||||
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
|
||||
int num = ((ptr != null) ? (-1692442216) : (-1692442213));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1692442214;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 1:
|
||||
return -1;
|
||||
case 2:
|
||||
return ptr->CurrentGearsetIndex;
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = -1692442213;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool TryEquipGearset(int gearsetIndex)
|
||||
{
|
||||
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
|
||||
int num = ((ptr == null) ? 231059237 : 231059236);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 231059239;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
ptr->EquipGearset(gearsetIndex, 0);
|
||||
return true;
|
||||
case 1:
|
||||
num = (ptr->IsValidGearset(gearsetIndex) ? 231059239 : 231059237);
|
||||
break;
|
||||
case 2:
|
||||
return false;
|
||||
case 3:
|
||||
num = ((gearsetIndex < 0) ? 231059237 : 231059238);
|
||||
break;
|
||||
case 4:
|
||||
num = 231059236;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static byte GetGearsetClassJob(int gearsetIndex)
|
||||
{
|
||||
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
|
||||
int num = ((ptr == null) ? (-76399401) : (-76399403));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -76399402;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return 0;
|
||||
case 2:
|
||||
num = (ptr->IsValidGearset(gearsetIndex) ? (-76399406) : (-76399401));
|
||||
break;
|
||||
case 4:
|
||||
return ptr->GetGearset(gearsetIndex)->ClassJob;
|
||||
case 0:
|
||||
num = -76399403;
|
||||
break;
|
||||
case 3:
|
||||
num = ((gearsetIndex < 0) ? (-76399401) : (-76399404));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
106
LLib/LLib.Gear/ItemRankingKey.cs
Normal file
106
LLib/LLib.Gear/ItemRankingKey.cs
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public readonly record struct ItemRankingKey(uint ItemLevel, float Score, short Damage)
|
||||
{
|
||||
public static readonly ItemRankingKey None = new ItemRankingKey(0u, float.NegativeInfinity, short.MinValue);
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _206A_202E_200D_202A_202D_206B_202D_200F_206A_202A_206A_202E_200E_200C_206F_202A_206E_206D_202C_206E_206F_202D_202E_206E_206F_200F_206A_200C_200F_206E_202C_200C_200F_206B_200C_200B_202C_202E_202D_200F_202E();
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(stringBuilder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(1583508102));
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1148273145));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 83489676 : 83489679);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 83489678;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = 83489679;
|
||||
break;
|
||||
case 1:
|
||||
_202A_206F_206A_206A_200C_206D_200B_202B_202D_206F_202B_202C_202A_200F_206D_206E_200B_206A_206B_206B_206F_202D_202E_206C_200C_200F_206E_202E_206C_202B_206E_200E_202B_200E_202E_206F_202A_200B_206A_206B_202E(stringBuilder, ' ');
|
||||
num = 83489676;
|
||||
break;
|
||||
case 2:
|
||||
_202A_206F_206A_206A_200C_206D_200B_202B_202D_206F_202B_202C_202A_200F_206D_206E_200B_206A_206B_206B_206F_202D_202E_206C_200C_200F_206E_202E_206C_202B_206E_200E_202B_200E_202E_206F_202A_200B_206A_206B_202E(stringBuilder, '}');
|
||||
return _206C_202E_200D_200D_206E_202D_206C_206B_206A_202B_200F_202D_202C_206C_202B_202B_202A_200F_206A_202B_206F_206D_202B_206E_200D_200C_202C_206E_206C_202C_202E_200D_202B_206D_200B_202B_202E_202E_202B_202D_202E((object)stringBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-802987284));
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(builder, ItemLevel.ToString());
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(892084588));
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(builder, Score.ToString());
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-1290468425));
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(builder, Damage.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(ItemRankingKey other)
|
||||
{
|
||||
int num = ((!EqualityComparer<uint>.Default.Equals(ItemLevel, other.ItemLevel)) ? (-23667421) : (-23667422));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -23667421;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
return false;
|
||||
case 1:
|
||||
num = ((!EqualityComparer<float>.Default.Equals(Score, other.Score)) ? (-23667421) : (-23667424));
|
||||
break;
|
||||
case 2:
|
||||
num = -23667422;
|
||||
break;
|
||||
case 3:
|
||||
return EqualityComparer<short>.Default.Equals(Damage, other.Damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<ItemRankingKey>.Equals(ItemRankingKey other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _206A_202E_200D_202A_202D_206B_202D_200F_206A_202A_206A_202E_200E_200C_206F_202A_206E_206D_202C_206E_206F_202D_202E_206E_206F_200F_206A_200C_200F_206E_202C_200C_200F_206B_200C_200B_202C_202E_202D_200F_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _202A_206F_206A_206A_200C_206D_200B_202B_202D_206F_202B_202C_202A_200F_206D_206E_200B_206A_206B_206B_206F_202D_202E_206C_200C_200F_206E_202E_206C_202B_206E_200E_202B_200E_202E_206F_202A_200B_206A_206B_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _206C_202E_200D_200D_206E_202D_206C_206B_206A_202B_200F_202D_202C_206C_202B_202B_202A_200F_206A_202B_206F_206D_202B_206E_200D_200C_202C_206E_206C_202C_202E_200D_202B_206D_200B_202B_202E_202E_202B_202D_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
269
LLib/LLib.Gear/MateriaHelper.cs
Normal file
269
LLib/LLib.Gear/MateriaHelper.cs
Normal file
|
|
@ -0,0 +1,269 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public static class MateriaHelper
|
||||
{
|
||||
private const int MaxMateriaSlots = 5;
|
||||
|
||||
public unsafe static List<MeldSlotInfo> GetMeldedMateria(InventoryItem* item)
|
||||
{
|
||||
List<MeldSlotInfo> list = new List<MeldSlotInfo>(5);
|
||||
int num = ((item == null) ? (-1527939717) : (-1527939716));
|
||||
int num7 = default(int);
|
||||
uint num9 = default(uint);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1527939719;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 7:
|
||||
return list;
|
||||
case 4:
|
||||
num7 = 0;
|
||||
num = -1527939727;
|
||||
break;
|
||||
case 6:
|
||||
list.Add(new MeldSlotInfo(num7, num9, item->MateriaGrades[num7]));
|
||||
num = -1527939720;
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
int num8 = num7;
|
||||
num3 = 1;
|
||||
num4 = num8;
|
||||
num7 = (num4 | num3) + (num4 & num3);
|
||||
num = -1527939727;
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
num = -1527939716;
|
||||
break;
|
||||
case 3:
|
||||
num9 = item->Materia[num7];
|
||||
num = ((num9 == 0) ? (-1527939720) : (-1527939713));
|
||||
break;
|
||||
case 5:
|
||||
num = ((item->ItemId != 0) ? (-1527939715) : (-1527939717));
|
||||
break;
|
||||
case 8:
|
||||
num = ((num7 < 5) ? (-1527939718) : (-1527939714));
|
||||
break;
|
||||
case 2:
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int GetNormalSlotCount(IDataManager dataManager, uint itemId)
|
||||
{
|
||||
Item row;
|
||||
int num = (dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out row) ? (-1343561605) : (-1343561608));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1343561607;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
return row.MateriaSlotCount;
|
||||
case 1:
|
||||
return 0;
|
||||
case 0:
|
||||
goto IL_0067;
|
||||
}
|
||||
continue;
|
||||
IL_0067:
|
||||
num = -1343561608;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool CanOvermeld(IDataManager dataManager, uint itemId)
|
||||
{
|
||||
Item row;
|
||||
int num = (dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out row) ? (-2077097183) : (-2077097182));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -2077097184;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return row.IsAdvancedMeldingPermitted;
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_0065;
|
||||
}
|
||||
continue;
|
||||
IL_0065:
|
||||
num = -2077097182;
|
||||
}
|
||||
}
|
||||
|
||||
public static int GetOvermeldSuccessRate(IDataManager dataManager, byte grade, int overmeldSlot, bool isHq)
|
||||
{
|
||||
int num = ((overmeldSlot >= 0) ? 943397358 : 943397347);
|
||||
MateriaGrade row = default(MateriaGrade);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 943397355;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 943397347;
|
||||
break;
|
||||
case 2:
|
||||
return row.OvermeldHQPercent[overmeldSlot];
|
||||
case 4:
|
||||
num = ((overmeldSlot < row.OvermeldHQPercent.Count) ? 943397353 : 943397345);
|
||||
break;
|
||||
case 8:
|
||||
return 0;
|
||||
case 5:
|
||||
num = (dataManager.GetExcelSheet<MateriaGrade>().TryGetRow(grade, out row) ? 943397354 : 943397356);
|
||||
break;
|
||||
case 3:
|
||||
num = ((overmeldSlot < row.OvermeldNQPercent.Count) ? 943397346 : 943397357);
|
||||
break;
|
||||
case 7:
|
||||
return 0;
|
||||
case 10:
|
||||
return 0;
|
||||
case 9:
|
||||
return row.OvermeldNQPercent[overmeldSlot];
|
||||
case 1:
|
||||
num = ((!isHq) ? 943397352 : 943397359);
|
||||
break;
|
||||
case 6:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static int CountMateriaInInventory(uint materiaItemId)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? 244394904 : 244394907);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 244394905;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
return ptr->GetInventoryItemCount(materiaItemId, isHq: false, checkEquipped: true, checkArmory: true, 0);
|
||||
case 2:
|
||||
return 0;
|
||||
case 0:
|
||||
goto IL_0059;
|
||||
}
|
||||
continue;
|
||||
IL_0059:
|
||||
num = 244394907;
|
||||
}
|
||||
}
|
||||
|
||||
public static int EstimateMateriaNeeded(int successRatePercent, int confidencePercent = 90)
|
||||
{
|
||||
int num = ((successRatePercent < 100) ? 394334376 : 394334378);
|
||||
double num5 = default(double);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 394334379;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
double num6 = (double)successRatePercent / 100.0;
|
||||
double num7 = (double)_200E_200C_202D_202E_206D_206B_202B_202E_200E_200F_200F_202B_202A_202A_206D_200B_202E_200F_206E_206A_200D_206D_200F_200E_206B_200B_202A_200B_206A_200C_206E_202E_206E_206F_206B_206B_206A_200B_200B_202A_202E(confidencePercent, 0, 99) / 100.0;
|
||||
num5 = _202B_200F_202E_202E_200D_202C_206D_206B_200E_200E_202A_200D_206D_206D_202E_202A_200C_202C_200C_202A_206A_206B_200F_200E_206B_202B_206F_202B_202E_200E_202D_202E_206B_202A_202C_206C_206B_202B_200C_206B_202E(_200F_202B_200B_200C_206C_200E_202A_206D_206C_206D_200B_200C_202B_206A_200E_202A_206F_202B_206A_200D_200F_200D_200B_202E_202C_202C_200F_206B_206F_202E_200F_200C_200F_202C_202E_206F_200F_200B_206C_200C_202E(1.0 - num7) / _200F_202B_200B_200C_206C_200E_202A_206D_206C_206D_200B_200C_202B_206A_200E_202A_206F_202B_206A_200D_200F_200D_200B_202E_202C_202C_200F_206B_206F_202E_200F_200C_200F_202C_202E_206F_200F_200B_206C_200C_202E(1.0 - num6));
|
||||
num = ((!(num5 < 1.0)) ? 394334379 : 394334371);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
return 1;
|
||||
case 7:
|
||||
num = 394334378;
|
||||
break;
|
||||
case 5:
|
||||
return int.MaxValue;
|
||||
case 6:
|
||||
return (int)num5;
|
||||
case 4:
|
||||
return int.MaxValue;
|
||||
case 0:
|
||||
num = ((!(num5 > 2147483647.0)) ? 394334381 : 394334382);
|
||||
break;
|
||||
case 3:
|
||||
num = ((successRatePercent > 0) ? 394334377 : 394334383);
|
||||
break;
|
||||
case 8:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static uint GetMateriaItemId(IDataManager dataManager, uint materiaRowId, byte grade)
|
||||
{
|
||||
Materia row;
|
||||
int num = (dataManager.GetExcelSheet<Materia>().TryGetRow(materiaRowId, out row) ? (-1528382481) : (-1528382482));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1528382483;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
return 0u;
|
||||
case 3:
|
||||
return 0u;
|
||||
case 4:
|
||||
return row.Item[grade].RowId;
|
||||
case 2:
|
||||
num = ((grade < row.Item.Count) ? (-1528382487) : (-1528382484));
|
||||
break;
|
||||
case 0:
|
||||
num = -1528382482;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int _200E_200C_202D_202E_206D_206B_202B_202E_200E_200F_200F_202B_202A_202A_206D_200B_202E_200F_206E_206A_200D_206D_200F_200E_206B_200B_202A_200B_206A_200C_206E_202E_206E_206F_206B_206B_206A_200B_200B_202A_202E(int P_0, int P_1, int P_2)
|
||||
{
|
||||
return Math.Clamp(P_0, P_1, P_2);
|
||||
}
|
||||
|
||||
static double _200F_202B_200B_200C_206C_200E_202A_206D_206C_206D_200B_200C_202B_206A_200E_202A_206F_202B_206A_200D_200F_200D_200B_202E_202C_202C_200F_206B_206F_202E_200F_200C_200F_202C_202E_206F_200F_200B_206C_200C_202E(double P_0)
|
||||
{
|
||||
return Math.Log(P_0);
|
||||
}
|
||||
|
||||
static double _202B_200F_202E_202E_200D_202C_206D_206B_200E_200E_202A_200D_206D_206D_202E_202A_200C_202C_200C_202A_206A_206B_200F_200E_206B_202B_206F_202B_202E_200E_202D_202E_206B_202A_202C_206C_206B_202B_200C_206B_202E(double P_0)
|
||||
{
|
||||
return Math.Ceiling(P_0);
|
||||
}
|
||||
}
|
||||
661
LLib/LLib.Gear/MeldActions.cs
Normal file
661
LLib/LLib.Gear/MeldActions.cs
Normal file
|
|
@ -0,0 +1,661 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using LLib.GameUI;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public static class MeldActions
|
||||
{
|
||||
public const uint MeldUnlockQuestId = 66175u;
|
||||
|
||||
public const uint OvermeldUnlockQuestId = 66176u;
|
||||
|
||||
public unsafe static bool TryOpenMeldAgent()
|
||||
{
|
||||
ActionManager* ptr = ActionManager.Instance();
|
||||
int num = ((ptr != null) ? (-92377207) : (-92377206));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -92377205;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 2:
|
||||
return ptr->UseAction(ActionType.GeneralAction, 13u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = -92377206;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool IsMeldAgentReady()
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? 1012581320 : 1012581323);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1012581322;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0050;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
return agentByInternalId->IsAgentActive();
|
||||
}
|
||||
continue;
|
||||
IL_0050:
|
||||
num = 1012581323;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static void CloseMeldAgent()
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? 1172237178 : 1172237177);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1172237179;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return;
|
||||
case 2:
|
||||
agentByInternalId->Hide();
|
||||
num = 1172237178;
|
||||
break;
|
||||
case 0:
|
||||
num = 1172237177;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool TrySelectItemCategory(int category)
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? 1631304881 : 1631304883);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1631304882;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
return false;
|
||||
case 2:
|
||||
AgentHelper.SendEvent(agentByInternalId, 0uL, 0, category);
|
||||
return true;
|
||||
case 0:
|
||||
num = 1631304883;
|
||||
break;
|
||||
case 1:
|
||||
num = (agentByInternalId->IsAgentActive() ? 1631304880 : 1631304881);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool TrySelectItem(int itemIndex)
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? (-2072200034) : (-2072200035));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -2072200036;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = -2072200035;
|
||||
break;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
num = (agentByInternalId->IsAgentActive() ? (-2072200033) : (-2072200034));
|
||||
break;
|
||||
case 3:
|
||||
AgentHelper.SendEvent(agentByInternalId, 0uL, 1, itemIndex, 1, 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool TrySelectMateria(int materiaIndex)
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? 1070130699 : 1070130696);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1070130698;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
num = (agentByInternalId->IsAgentActive() ? 1070130697 : 1070130699);
|
||||
break;
|
||||
case 3:
|
||||
AgentHelper.SendEvent(agentByInternalId, 0uL, 2, materiaIndex, 1, 0);
|
||||
return true;
|
||||
case 0:
|
||||
num = 1070130696;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmMeld(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(627835042), out addonPtr) ? 1229741423 : 1229741420);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1229741422;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, 0, 0, 1);
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = 1229741420;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmOvermeld(IGameGui gameGui)
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? (-1324266092) : (-1324266093));
|
||||
AtkUnitBase* addonPtr = default(AtkUnitBase*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1324266089;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
AddonCallback.ClickYes(addonPtr);
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
case 4:
|
||||
num = (agentByInternalId->IsAgentActive() ? (-1324266090) : (-1324266092));
|
||||
break;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(184774238), out addonPtr) ? (-1324266089) : (-1324266091));
|
||||
break;
|
||||
case 5:
|
||||
num = -1324266093;
|
||||
break;
|
||||
case 3:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool TryRequestRetrieve()
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? (-1148814480) : (-1148814479));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1148814480;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
return false;
|
||||
case 1:
|
||||
num = (agentByInternalId->IsAgentActive() ? (-1148814477) : (-1148814480));
|
||||
break;
|
||||
case 2:
|
||||
num = -1148814479;
|
||||
break;
|
||||
case 3:
|
||||
AgentHelper.SendEvent(agentByInternalId, 4uL, 0, 1, 0, 0, 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmRetrieve(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-507581273), out addonPtr) ? (-1428512463) : (-1428512462));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1428512461;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
AddonCallback.Fire(addonPtr, default(int));
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -1428512462;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsMeldDialogReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(2146370651), out addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsRetrieveDialogReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1509768351), out addonPtr);
|
||||
}
|
||||
|
||||
public unsafe static bool IsAgentLoading()
|
||||
{
|
||||
AgentMateriaAttach* ptr = AgentMateriaAttach.Instance();
|
||||
int num = ((ptr == null) ? (-1447124743) : (-1447124742));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1447124741;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
return ptr->UpdateState != 0;
|
||||
case 0:
|
||||
goto IL_0057;
|
||||
}
|
||||
continue;
|
||||
IL_0057:
|
||||
num = -1447124742;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static int GetSelectedItemIndex()
|
||||
{
|
||||
AgentMateriaAttach* ptr = AgentMateriaAttach.Instance();
|
||||
int num = ((ptr == null) ? (-10593117) : (-10593120));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -10593119;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
return -1;
|
||||
case 1:
|
||||
return ptr->SelectedItemIndex;
|
||||
case 0:
|
||||
goto IL_0054;
|
||||
}
|
||||
continue;
|
||||
IL_0054:
|
||||
num = -10593120;
|
||||
}
|
||||
}
|
||||
|
||||
public static AgentMateriaAttach.FilterCategory GetFilterCategory(InventoryType inventoryType)
|
||||
{
|
||||
int num = ((inventoryType > InventoryType.EquippedItems) ? (-1327648937) : (-1327648944));
|
||||
AgentMateriaAttach.FilterCategory result = default(AgentMateriaAttach.FilterCategory);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1327648930;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 11:
|
||||
result = AgentMateriaAttach.FilterCategory.Equipped;
|
||||
num = -1327648933;
|
||||
break;
|
||||
case 4:
|
||||
result = AgentMateriaAttach.FilterCategory.ArmouryWeapon;
|
||||
num = -1327648933;
|
||||
break;
|
||||
case 10:
|
||||
result = AgentMateriaAttach.FilterCategory.Inventory;
|
||||
num = -1327648933;
|
||||
break;
|
||||
case 14:
|
||||
num = ((inventoryType <= InventoryType.Inventory4) ? (-1327648940) : (-1327648931));
|
||||
break;
|
||||
case 9:
|
||||
switch (inventoryType)
|
||||
{
|
||||
case InventoryType.ArmoryOffHand:
|
||||
break;
|
||||
default:
|
||||
goto IL_00f8;
|
||||
case InventoryType.ArmoryHead:
|
||||
case InventoryType.ArmoryBody:
|
||||
case InventoryType.ArmoryHands:
|
||||
goto IL_010e;
|
||||
case InventoryType.ArmoryWrist:
|
||||
goto IL_011b;
|
||||
case InventoryType.ArmoryLegs:
|
||||
case InventoryType.ArmoryFeets:
|
||||
goto IL_0128;
|
||||
case InventoryType.ArmoryEar:
|
||||
case InventoryType.ArmoryNeck:
|
||||
goto IL_0135;
|
||||
case InventoryType.ArmoryWaist:
|
||||
goto IL_016e;
|
||||
}
|
||||
goto case 4;
|
||||
case 15:
|
||||
num = -1327648944;
|
||||
break;
|
||||
case 7:
|
||||
goto IL_010e;
|
||||
case 2:
|
||||
goto IL_011b;
|
||||
case 6:
|
||||
goto IL_0128;
|
||||
case 8:
|
||||
goto IL_0135;
|
||||
case 1:
|
||||
num = ((inventoryType == InventoryType.ArmoryMainHand) ? (-1327648934) : (-1327648946));
|
||||
break;
|
||||
case 16:
|
||||
num = -1327648930;
|
||||
break;
|
||||
case 0:
|
||||
goto IL_016e;
|
||||
case 5:
|
||||
return result;
|
||||
case 3:
|
||||
num = ((inventoryType == InventoryType.EquippedItems) ? (-1327648939) : (-1327648942));
|
||||
break;
|
||||
case 12:
|
||||
num = -1327648930;
|
||||
break;
|
||||
case 13:
|
||||
{
|
||||
num = ((inventoryType == InventoryType.ArmoryRings) ? (-1327648932) : (-1327648929));
|
||||
break;
|
||||
}
|
||||
IL_010e:
|
||||
result = AgentMateriaAttach.FilterCategory.ArmouryHeadBodyHands;
|
||||
num = -1327648933;
|
||||
break;
|
||||
IL_00f8:
|
||||
num = -1327648941;
|
||||
break;
|
||||
IL_016e:
|
||||
result = AgentMateriaAttach.FilterCategory.None;
|
||||
num = -1327648933;
|
||||
break;
|
||||
IL_0135:
|
||||
result = AgentMateriaAttach.FilterCategory.ArmouryNeckEars;
|
||||
num = -1327648933;
|
||||
break;
|
||||
IL_0128:
|
||||
result = AgentMateriaAttach.FilterCategory.ArmouryLegsFeet;
|
||||
num = -1327648933;
|
||||
break;
|
||||
IL_011b:
|
||||
result = AgentMateriaAttach.FilterCategory.ArmouryWristRing;
|
||||
num = -1327648933;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static int? FindItemIndex(InventoryItem* target)
|
||||
{
|
||||
int num = ((target != null) ? (-1032587333) : (-1032587331));
|
||||
AgentMateriaAttach* ptr = default(AgentMateriaAttach*);
|
||||
int num5 = default(int);
|
||||
AgentMateriaAttach.MateriaAttachEntry* value = default(AgentMateriaAttach.MateriaAttachEntry*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1032587332;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 8:
|
||||
num = ((!ptr->IsAgentActive()) ? (-1032587329) : (-1032587330));
|
||||
break;
|
||||
case 3:
|
||||
return null;
|
||||
case 10:
|
||||
num = ((num5 < ptr->ItemCount) ? (-1032587339) : (-1032587336));
|
||||
break;
|
||||
case 7:
|
||||
ptr = AgentMateriaAttach.Instance();
|
||||
num = ((ptr == null) ? (-1032587329) : (-1032587340));
|
||||
break;
|
||||
case 4:
|
||||
return null;
|
||||
case 12:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = -1032587338;
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
value = ptr->Data->ItemsSorted[num5].Value;
|
||||
num = ((value == null) ? (-1032587344) : (-1032587335));
|
||||
break;
|
||||
case 5:
|
||||
num = ((value->Item != target) ? (-1032587344) : (-1032587337));
|
||||
break;
|
||||
case 1:
|
||||
return null;
|
||||
case 2:
|
||||
num = ((ptr->Data != null) ? (-1032587334) : (-1032587329));
|
||||
break;
|
||||
case 11:
|
||||
return num5;
|
||||
case 0:
|
||||
num = -1032587331;
|
||||
break;
|
||||
case 6:
|
||||
num5 = 0;
|
||||
num = -1032587338;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static int? FindMateriaIndex(uint materiaItemId)
|
||||
{
|
||||
AgentMateriaAttach* ptr = AgentMateriaAttach.Instance();
|
||||
int num = ((ptr == null) ? 2014235157 : 2014235164);
|
||||
AgentMateriaAttach.MateriaAttachEntry* value = default(AgentMateriaAttach.MateriaAttachEntry*);
|
||||
int num6 = default(int);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 2014235167;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 11:
|
||||
num = ((value->Item->ItemId != materiaItemId) ? 2014235158 : 2014235159);
|
||||
break;
|
||||
case 0:
|
||||
num = ((ptr->Data != null) ? 2014235166 : 2014235157);
|
||||
break;
|
||||
case 10:
|
||||
return null;
|
||||
case 8:
|
||||
return num6;
|
||||
case 7:
|
||||
return null;
|
||||
case 3:
|
||||
num = ((!ptr->IsAgentActive()) ? 2014235157 : 2014235167);
|
||||
break;
|
||||
case 2:
|
||||
num = 2014235164;
|
||||
break;
|
||||
case 4:
|
||||
num = ((num6 < ptr->MateriaCount) ? 2014235162 : 2014235160);
|
||||
break;
|
||||
case 1:
|
||||
num6 = 0;
|
||||
num = 2014235163;
|
||||
break;
|
||||
case 5:
|
||||
value = ptr->Data->MateriaSorted[num6].Value;
|
||||
num = ((value == null) ? 2014235158 : 2014235161);
|
||||
break;
|
||||
case 6:
|
||||
num = ((value->Item == null) ? 2014235158 : 2014235156);
|
||||
break;
|
||||
case 9:
|
||||
{
|
||||
int num5 = num6;
|
||||
num3 = 1;
|
||||
num4 = num5;
|
||||
num6 = (num4 | num3) + (num4 & num3);
|
||||
num = 2014235163;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsMeldingUnlocked()
|
||||
{
|
||||
return GearFeatures.IsMeldingUnlocked();
|
||||
}
|
||||
|
||||
public static bool IsOvermeldingUnlocked()
|
||||
{
|
||||
return GearFeatures.IsOvermeldingUnlocked();
|
||||
}
|
||||
|
||||
public unsafe static bool CanMeldItem(IDataManager dataManager, InventoryItem* item)
|
||||
{
|
||||
int num = ((item == null) ? (-1684140330) : (-1684140332));
|
||||
Item row = default(Item);
|
||||
int num5 = default(int);
|
||||
int num6 = default(int);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1684140328;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 6:
|
||||
num = (dataManager.GetExcelSheet<Item>().TryGetRow(item->ItemId, out row) ? (-1684140324) : (-1684140325));
|
||||
break;
|
||||
case 5:
|
||||
num5 = row.MateriaSlotCount;
|
||||
num = ((!row.IsAdvancedMeldingPermitted) ? (-1684140336) : (-1684140333));
|
||||
break;
|
||||
case 4:
|
||||
num = ((row.MateriaSlotCount != 0) ? (-1684140323) : (-1684140335));
|
||||
break;
|
||||
case 2:
|
||||
num = -1684140332;
|
||||
break;
|
||||
case 1:
|
||||
num = ((item->Materia[num6] != 0) ? (-1684140334) : (-1684140321));
|
||||
break;
|
||||
case 13:
|
||||
return false;
|
||||
case 11:
|
||||
num5 = 5;
|
||||
num = -1684140336;
|
||||
break;
|
||||
case 0:
|
||||
num = ((num6 < num5) ? (-1684140327) : (-1684140331));
|
||||
break;
|
||||
case 10:
|
||||
{
|
||||
int num7 = num6;
|
||||
num3 = 1;
|
||||
num4 = num7;
|
||||
int num8 = num4 ^ num3;
|
||||
int num9 = num4 & num3;
|
||||
num6 = num8 + (num9 + num9);
|
||||
num = -1684140328;
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
num6 = 0;
|
||||
num = -1684140328;
|
||||
break;
|
||||
case 7:
|
||||
return true;
|
||||
case 9:
|
||||
return false;
|
||||
case 14:
|
||||
return false;
|
||||
case 3:
|
||||
return false;
|
||||
case 12:
|
||||
num = ((item->ItemId != 0) ? (-1684140322) : (-1684140330));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
111
LLib/LLib.Gear/MeldInstruction.cs
Normal file
111
LLib/LLib.Gear/MeldInstruction.cs
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public readonly record struct MeldInstruction(uint ItemId, int SlotIndex, uint MateriaItemId, bool IsOvermeld)
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _206F_202B_202C_200C_200F_202E_206B_206B_200F_206D_200F_206E_200F_202A_202E_202B_202B_206C_202A_200C_206D_202B_200F_200F_206F_200E_202B_206F_202A_200B_206E_206D_206B_202C_202A_200F_200C_206F_202A_202C_202E();
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(910491666));
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1808631505));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 1348202798 : 1348202799);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1348202798;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = 1348202799;
|
||||
break;
|
||||
case 0:
|
||||
_202E_206B_202B_200B_206D_206D_200D_202D_200B_202D_206C_202C_206D_206C_202E_202D_202C_206A_202A_200D_202B_206B_206F_206E_202E_206A_200B_202E_202C_200B_206C_200B_200C_202A_202C_206C_206A_206C_206A_202A_202E(stringBuilder, '}');
|
||||
return _202A_200D_206C_206B_202A_202A_206D_200D_200B_200F_202A_202B_206C_200F_202E_206A_206C_206B_202A_202A_206B_200B_200E_202D_206C_206A_200D_202E_206E_202E_206C_202E_202D_200E_200B_202A_202E_200E_202D_206B_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_202E_206B_202B_200B_206D_206D_200D_202D_200B_202D_206C_202C_206D_206C_202E_202D_202C_206A_202A_200D_202B_206B_206F_206E_202E_206A_200B_202E_202C_200B_206C_200B_200C_202A_202C_206C_206A_206C_206A_202A_202E(stringBuilder, ' ');
|
||||
num = 1348202798;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1758736713));
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, ItemId.ToString());
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(66042605));
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, SlotIndex.ToString());
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1813688100));
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, MateriaItemId.ToString());
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-2051131662));
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, IsOvermeld.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(MeldInstruction other)
|
||||
{
|
||||
int num = ((!EqualityComparer<uint>.Default.Equals(ItemId, other.ItemId)) ? 1583334064 : 1583334069);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1583334068;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
num = 1583334069;
|
||||
break;
|
||||
case 0:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(MateriaItemId, other.MateriaItemId)) ? 1583334064 : 1583334070);
|
||||
break;
|
||||
case 2:
|
||||
return EqualityComparer<bool>.Default.Equals(IsOvermeld, other.IsOvermeld);
|
||||
case 1:
|
||||
num = ((!EqualityComparer<int>.Default.Equals(SlotIndex, other.SlotIndex)) ? 1583334064 : 1583334068);
|
||||
break;
|
||||
case 4:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<MeldInstruction>.Equals(MeldInstruction other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _206F_202B_202C_200C_200F_202E_206B_206B_200F_206D_200F_206E_200F_202A_202E_202B_202B_206C_202A_200C_206D_202B_200F_200F_206F_200E_202B_206F_202A_200B_206E_206D_206B_202C_202A_200F_200C_206F_202A_202C_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _202E_206B_202B_200B_206D_206D_200D_202D_200B_202D_206C_202C_206D_206C_202E_202D_202C_206A_202A_200D_202B_206B_206F_206E_202E_206A_200B_202E_202C_200B_206C_200B_200C_202A_202C_206C_206A_206C_206A_202A_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _202A_200D_206C_206B_202A_202A_206D_200D_200B_200F_202A_202B_206C_200F_202E_206A_206C_206B_202A_202A_206B_200B_200E_202D_206C_206A_200D_202E_206E_202E_206C_202E_202D_200E_200B_202A_202E_200E_202D_206B_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
11
LLib/LLib.Gear/MeldResult.cs
Normal file
11
LLib/LLib.Gear/MeldResult.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
namespace LLib.Gear;
|
||||
|
||||
public enum MeldResult
|
||||
{
|
||||
Success,
|
||||
AgentUnavailable,
|
||||
ItemNotFound,
|
||||
MateriaNotFound,
|
||||
OvermeldFailed,
|
||||
Cancelled
|
||||
}
|
||||
110
LLib/LLib.Gear/MeldSlotInfo.cs
Normal file
110
LLib/LLib.Gear/MeldSlotInfo.cs
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public readonly record struct MeldSlotInfo(int SlotIndex, uint MateriaId, byte Grade)
|
||||
{
|
||||
public bool IsEmpty => MateriaId == 0;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _206D_206A_202B_206C_202D_200F_200E_206E_202D_202D_206B_202B_202C_202C_200B_200F_206F_202E_202E_206C_206D_206E_206F_200E_202E_206B_200B_202A_206E_200B_206A_206D_202B_202E_202E_202E_206C_200F_202A_200F_202E();
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-178237641));
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1808631505));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? (-753586067) : (-753586066));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -753586068;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = -753586066;
|
||||
break;
|
||||
case 1:
|
||||
_202D_200E_206F_206F_202C_200D_202A_202C_202D_200C_206F_206F_206B_202B_206C_200E_206F_202C_202B_206A_206C_206B_206F_200E_206E_202A_202C_206C_206E_206C_200D_206D_206C_202C_202A_202B_202A_206E_200C_202E_202E(stringBuilder, '}');
|
||||
return _206F_202A_200E_202E_206A_206F_200F_206A_206C_206F_206D_206F_200F_200E_200E_202D_202D_206C_202C_206C_206D_206C_200F_202E_206A_200C_200D_200D_200D_206D_206C_202D_206D_200D_202C_206C_202E_200D_206A_206E_202E((object)stringBuilder);
|
||||
case 2:
|
||||
_202D_200E_206F_206F_202C_200D_202A_202C_202D_200C_206F_206F_206B_202B_206C_200E_206F_202C_202B_206A_206C_206B_206F_200E_206E_202A_202C_206C_206E_206C_200D_206D_206C_202C_202A_202B_202A_206E_200C_202E_202E(stringBuilder, ' ');
|
||||
num = -753586067;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1108590379));
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, SlotIndex.ToString());
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-548869315));
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, MateriaId.ToString());
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1808759350));
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, Grade.ToString());
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-1359578170));
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, IsEmpty.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(MeldSlotInfo other)
|
||||
{
|
||||
int num = ((!EqualityComparer<int>.Default.Equals(SlotIndex, other.SlotIndex)) ? (-1955436948) : (-1955436946));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1955436945;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = -1955436946;
|
||||
break;
|
||||
case 1:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(MateriaId, other.MateriaId)) ? (-1955436948) : (-1955436947));
|
||||
break;
|
||||
case 3:
|
||||
return false;
|
||||
case 2:
|
||||
return EqualityComparer<byte>.Default.Equals(Grade, other.Grade);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<MeldSlotInfo>.Equals(MeldSlotInfo other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _206D_206A_202B_206C_202D_200F_200E_206E_202D_202D_206B_202B_202C_202C_200B_200F_206F_202E_202E_206C_206D_206E_206F_200E_202E_206B_200B_202A_206E_200B_206A_206D_202B_202E_202E_202E_206C_200F_202A_200F_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _202D_200E_206F_206F_202C_200D_202A_202C_202D_200C_206F_206F_206B_202B_206C_200E_206F_202C_202B_206A_206C_206B_206F_200E_206E_202A_202C_206C_206E_206C_200D_206D_206C_202C_202A_202B_202A_206E_200C_202E_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _206F_202A_200E_202E_206A_206F_200F_206A_206C_206F_206D_206F_200F_200E_200E_202D_202D_206C_202C_206C_206D_206C_200F_202E_206A_200C_200D_200D_200D_206D_206C_202D_206D_200D_202C_206C_202E_200D_206A_206E_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
450
LLib/LLib.Gear/RepairActions.cs
Normal file
450
LLib/LLib.Gear/RepairActions.cs
Normal file
|
|
@ -0,0 +1,450 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using LLib.GameUI;
|
||||
using Lumina.Excel;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public static class RepairActions
|
||||
{
|
||||
public const uint RepairServiceDataId = 720915u;
|
||||
|
||||
public unsafe static bool TryOpenRepairWindow()
|
||||
{
|
||||
ActionManager* ptr = ActionManager.Instance();
|
||||
int num = ((ptr != null) ? 68220505 : 68220506);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 68220504;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
return ptr->UseAction(ActionType.GeneralAction, 6u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_0061;
|
||||
}
|
||||
continue;
|
||||
IL_0061:
|
||||
num = 68220506;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsRepairAddonReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(2048825811), out addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryRepairAll(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(419098168), out addonPtr) ? (-498234615) : (-498234614));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -498234613;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
return AddonCallback.ClickButton(addonPtr, ((AddonRepair*)addonPtr)->RepairAllButton);
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -498234614;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmDialog(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(2048825811), out addonPtr) ? 2047386500 : 2047386499);
|
||||
AtkUnitBase* addonPtr2 = default(AtkUnitBase*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 2047386496;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
AddonCallback.ClickYes(addonPtr2);
|
||||
return true;
|
||||
case 3:
|
||||
return false;
|
||||
case 4:
|
||||
num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(423301839), out addonPtr2) ? 2047386498 : 2047386497);
|
||||
break;
|
||||
case 1:
|
||||
return false;
|
||||
case 0:
|
||||
num = 2047386499;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static string DescribeRepairAddon(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-469715628), out addonPtr) ? 1483181869 : 1483181871);
|
||||
AtkComponentButton* repairAllButton = default(AtkComponentButton*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1483181870;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
string text;
|
||||
string value;
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = 1483181871;
|
||||
break;
|
||||
case 3:
|
||||
repairAllButton = ((AddonRepair*)addonPtr)->RepairAllButton;
|
||||
num = ((repairAllButton == null) ? 1483181864 : 1483181866);
|
||||
break;
|
||||
case 1:
|
||||
return global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1020358053);
|
||||
case 0:
|
||||
text = global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1832920714);
|
||||
goto IL_00eb;
|
||||
case 5:
|
||||
text = global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(120055411);
|
||||
goto IL_00eb;
|
||||
case 6:
|
||||
text = global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(2048905668);
|
||||
goto IL_00eb;
|
||||
case 4:
|
||||
{
|
||||
num = (repairAllButton->IsEnabled ? 1483181867 : 1483181870);
|
||||
break;
|
||||
}
|
||||
IL_00eb:
|
||||
value = text;
|
||||
defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(44, 3);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-734034791));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(addonPtr->IsVisible);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-199296985));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(LAddon.IsAddonReady(addonPtr));
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1116769434));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(value);
|
||||
return defaultInterpolatedStringHandler.ToStringAndClear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseRepairWindow(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1033968236), out addonPtr) ? (-405897678) : (-405897677));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -405897678;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0052;
|
||||
case 0:
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -405897677;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TrySelectRepairFromMenu(IGameGui gameGui, int repairIndex)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-779772561), out addonPtr) ? 1787787027 : 1787787024);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1787787025;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
AddonCallback.FireWithUpdate(addonPtr, repairIndex);
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = 1787787024;
|
||||
}
|
||||
}
|
||||
|
||||
public static int? FindRepairIndex(IDataManager dataManager, uint npcBaseId)
|
||||
{
|
||||
ENpcBase row;
|
||||
int num = (dataManager.GetExcelSheet<ENpcBase>().TryGetRow(npcBaseId, out row) ? (-1361038007) : (-1361038008));
|
||||
int num5 = default(int);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1361038006;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 6:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = -1361038003;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
return null;
|
||||
case 3:
|
||||
num5 = 0;
|
||||
num = -1361038003;
|
||||
break;
|
||||
case 1:
|
||||
num = ((row.ENpcData[num5].RowId != 720915) ? (-1361038004) : (-1361038002));
|
||||
break;
|
||||
case 7:
|
||||
num = ((num5 < row.ENpcData.Count) ? (-1361038005) : (-1361038001));
|
||||
break;
|
||||
case 4:
|
||||
return num5;
|
||||
case 0:
|
||||
num = -1361038008;
|
||||
break;
|
||||
case 5:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static bool CanSelfRepairItem(uint itemId, IDataManager dataManager, Func<uint, byte> jobLevelLookup)
|
||||
{
|
||||
Item row;
|
||||
int num = (dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out row) ? 1632671578 : 1632671580);
|
||||
uint rowId = default(uint);
|
||||
uint num7 = default(uint);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1632671577;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 7:
|
||||
return false;
|
||||
case 6:
|
||||
{
|
||||
byte num8 = jobLevelLookup(rowId);
|
||||
int num9 = _206E_206F_206E_202B_202E_202E_206A_202A_202B_200F_206E_200D_200F_206C_200B_206D_206D_202E_200D_200B_200D_206C_200D_202E_206F_202B_206C_206B_206B_206B_200D_202B_206C_200F_202B_206E_202C_206C_202B_202A_202E(row.LevelEquip - 10, 1);
|
||||
num = ((num8 >= num9) ? 1632671576 : 1632671581);
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
return HasDarkMatterOrBetter(dataManager, num7);
|
||||
case 5:
|
||||
return false;
|
||||
case 2:
|
||||
return false;
|
||||
case 4:
|
||||
return false;
|
||||
case 3:
|
||||
rowId = row.ClassJobRepair.RowId;
|
||||
num = ((rowId != 0) ? 1632671583 : 1632671579);
|
||||
break;
|
||||
case 8:
|
||||
num = 1632671580;
|
||||
break;
|
||||
case 1:
|
||||
num7 = row.ItemRepair.ValueNullable?.Item.RowId ?? 0;
|
||||
num = ((num7 != 0) ? 1632671577 : 1632671582);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool CanSelfRepairAny(IDataManager dataManager, Func<uint, byte> jobLevelLookup, int thresholdPercent = 100)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? 1849138139 : 1849138142);
|
||||
int num7 = default(int);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1849138143;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
return true;
|
||||
case 9:
|
||||
num7 = 0;
|
||||
num = 1849138140;
|
||||
break;
|
||||
case 5:
|
||||
num = ((!CanSelfRepairItem(inventorySlot->ItemId, dataManager, jobLevelLookup)) ? 1849138131 : 1849138143);
|
||||
break;
|
||||
case 2:
|
||||
num = 1849138142;
|
||||
break;
|
||||
case 7:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num7);
|
||||
num = ((inventorySlot == null) ? 1849138131 : 1849138132);
|
||||
break;
|
||||
case 10:
|
||||
return false;
|
||||
case 6:
|
||||
num = ((inventorySlot->Condition * 100 / 30000 >= thresholdPercent) ? 1849138131 : 1849138138);
|
||||
break;
|
||||
case 11:
|
||||
num = ((inventorySlot->ItemId == 0) ? 1849138131 : 1849138137);
|
||||
break;
|
||||
case 8:
|
||||
return false;
|
||||
case 12:
|
||||
{
|
||||
int num8 = num7;
|
||||
num3 = 1;
|
||||
num4 = num8;
|
||||
int num9 = num4 ^ num3;
|
||||
int num10 = num4 & num3;
|
||||
num7 = num9 + (num10 + num10);
|
||||
num = 1849138140;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
num = ((num7 < inventoryContainer->Size) ? 1849138136 : 1849138133);
|
||||
break;
|
||||
case 4:
|
||||
inventoryContainer = ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
num = ((inventoryContainer != null) ? 1849138134 : 1849138135);
|
||||
break;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private unsafe static bool HasDarkMatterOrBetter(IDataManager dataManager, uint requiredItemId)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? (-248963167) : (-248963166));
|
||||
ItemRepairResource current = default(ItemRepairResource);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -248963165;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0054;
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
{
|
||||
ExcelSheet<ItemRepairResource> excelSheet = dataManager.GetExcelSheet<ItemRepairResource>();
|
||||
bool flag = false;
|
||||
using (ExcelSheet<ItemRepairResource>.Enumerator enumerator = excelSheet.GetEnumerator())
|
||||
{
|
||||
num = 975190741;
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
num3 = 975190742;
|
||||
num4 = num7;
|
||||
int num8 = num4 + num3;
|
||||
int num9 = num4 & num3;
|
||||
switch (num8 - (num9 + num9))
|
||||
{
|
||||
case 3:
|
||||
num = (enumerator.MoveNext() ? 975190743 : 975190742);
|
||||
break;
|
||||
case 6:
|
||||
flag = true;
|
||||
num = 975190737;
|
||||
break;
|
||||
case 1:
|
||||
current = enumerator.Current;
|
||||
num = ((current.Item.RowId != requiredItemId) ? 975190737 : 975190736);
|
||||
break;
|
||||
case 5:
|
||||
num = ((ptr->GetInventoryItemCount(current.Item.RowId, isHq: false, checkEquipped: true, checkArmory: true, 0) <= 0) ? 975190741 : 975190740);
|
||||
break;
|
||||
case 4:
|
||||
num = 975190741;
|
||||
break;
|
||||
case 7:
|
||||
num = ((!flag) ? 975190741 : 975190739);
|
||||
break;
|
||||
case 2:
|
||||
return true;
|
||||
case 0:
|
||||
goto end_IL_0086;
|
||||
}
|
||||
continue;
|
||||
end_IL_0086:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
IL_0054:
|
||||
num = -248963166;
|
||||
}
|
||||
}
|
||||
|
||||
static int _206E_206F_206E_202B_202E_202E_206A_202A_202B_200F_206E_200D_200F_206C_200B_206D_206D_202E_200D_200B_200D_206C_200D_202E_206F_202B_206C_206B_206B_206B_200D_202B_206C_200F_202B_206E_202C_206C_202B_202A_202E(int P_0, int P_1)
|
||||
{
|
||||
return Math.Max(P_0, P_1);
|
||||
}
|
||||
}
|
||||
106
LLib/LLib.Gear/SlotCondition.cs
Normal file
106
LLib/LLib.Gear/SlotCondition.cs
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public readonly record struct SlotCondition(int SlotIndex, uint ItemId, int ConditionPercent)
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _200E_202C_206F_200F_200F_200E_202B_202C_206F_206B_200D_206B_206C_202B_200D_200F_206D_200E_200C_200E_206A_206D_206D_202E_206A_202D_206B_206C_206D_200D_200F_202B_206D_202D_202B_200B_202C_200C_206B_206C_202E();
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(401739836));
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1148273145));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? (-272952950) : (-272952951));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -272952952;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
_200D_202E_200E_202A_200E_206F_206E_202B_206D_202D_206E_200C_200D_200B_200E_206A_200F_206D_206F_202B_202D_200D_202C_206C_200F_206A_202E_206E_202A_202B_200C_202C_206C_200B_202B_200C_206A_200E_206A_206F_202E(stringBuilder, '}');
|
||||
return _206D_206E_206B_206B_202B_206F_202D_200E_200C_206D_200D_200F_200D_202D_202E_206A_200E_206D_200E_206C_200E_206F_206F_202E_200F_202E_202D_206B_200D_206D_200D_202C_206D_200D_200C_206E_202A_202B_202D_202E_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_200D_202E_200E_202A_200E_206F_206E_202B_206D_202D_206E_200C_200D_200B_200E_206A_200F_206D_206F_202B_202D_200D_202C_206C_200F_206A_202E_206E_202A_202B_200C_202C_206C_200B_202B_200C_206A_200E_206A_206F_202E(stringBuilder, ' ');
|
||||
num = -272952950;
|
||||
break;
|
||||
case 0:
|
||||
num = -272952951;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-578928888));
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(builder, SlotIndex.ToString());
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(466953188));
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(builder, ItemId.ToString());
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1004296737));
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(builder, ConditionPercent.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(SlotCondition other)
|
||||
{
|
||||
int num = ((!EqualityComparer<int>.Default.Equals(SlotIndex, other.SlotIndex)) ? (-1584065341) : (-1584065343));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1584065344;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = -1584065343;
|
||||
break;
|
||||
case 1:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(ItemId, other.ItemId)) ? (-1584065341) : (-1584065342));
|
||||
break;
|
||||
case 2:
|
||||
return EqualityComparer<int>.Default.Equals(ConditionPercent, other.ConditionPercent);
|
||||
case 3:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<SlotCondition>.Equals(SlotCondition other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _200E_202C_206F_200F_200F_200E_202B_202C_206F_206B_200D_206B_206C_202B_200D_200F_206D_200E_200C_200E_206A_206D_206D_202E_206A_202D_206B_206C_206D_200D_200F_202B_206D_202D_202B_200B_202C_200C_206B_206C_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _200D_202E_200E_202A_200E_206F_206E_202B_206D_202D_206E_200C_200D_200B_200E_206A_200F_206D_206F_202B_202D_200D_202C_206C_200F_206A_202E_206E_202A_202B_200C_202C_206C_200B_202B_200C_206A_200E_206A_206F_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _206D_206E_206B_206B_202B_206F_202D_200E_200C_206D_200D_200F_200D_202D_202E_206A_200E_206D_200E_206C_200E_206F_206F_202E_200F_202E_202D_206B_200D_206D_200D_202C_206D_200D_200C_206E_202A_202B_202D_202E_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
109
LLib/LLib.Gear/SlotSpiritbond.cs
Normal file
109
LLib/LLib.Gear/SlotSpiritbond.cs
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public readonly record struct SlotSpiritbond(int SlotIndex, uint ItemId, int SpiritbondPercent, bool IsReady)
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _202D_206C_206D_200D_206C_206F_200B_202A_200D_200D_202B_202D_206E_202C_202D_200B_206A_206C_200E_200F_206A_202B_202A_200F_202E_202E_206B_202A_206C_202C_206C_206C_200E_202D_206B_206A_206E_202C_200F_202B_202E();
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(2109045036));
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(stringBuilder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(579144622));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? (-2119618883) : (-2119618882));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -2119618881;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = -2119618882;
|
||||
break;
|
||||
case 1:
|
||||
_202E_200F_206D_202D_206A_206B_206E_202E_200D_200F_200C_206D_206E_200C_200C_206A_200D_200B_202B_206E_200C_200C_202A_202A_200F_206C_200C_206D_206C_202C_200B_200C_200C_200C_202C_200D_206F_200B_206A_206C_202E(stringBuilder, ' ');
|
||||
num = -2119618883;
|
||||
break;
|
||||
case 2:
|
||||
_202E_200F_206D_202D_206A_206B_206E_202E_200D_200F_200C_206D_206E_200C_200C_206A_200D_200B_202B_206E_200C_200C_202A_202A_200F_206C_200C_206D_206C_202C_200B_200C_200C_200C_202C_200D_206F_200B_206A_206C_202E(stringBuilder, '}');
|
||||
return _202E_206B_202D_206B_200C_200E_202E_206B_202B_202C_202E_206A_206F_206F_206F_202E_206F_200D_206D_200B_200E_202A_206B_206C_200D_206B_202B_206B_206D_202C_200C_202D_200D_202B_202C_200E_200E_206E_200F_206A_202E((object)stringBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-78434179));
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, SlotIndex.ToString());
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-1773173997));
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, ItemId.ToString());
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1225522819));
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, SpiritbondPercent.ToString());
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1842281916));
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, IsReady.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(SlotSpiritbond other)
|
||||
{
|
||||
int num = ((!EqualityComparer<int>.Default.Equals(SlotIndex, other.SlotIndex)) ? (-364855096) : (-364855094));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -364855096;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
num = ((!EqualityComparer<int>.Default.Equals(SpiritbondPercent, other.SpiritbondPercent)) ? (-364855096) : (-364855093));
|
||||
break;
|
||||
case 2:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(ItemId, other.ItemId)) ? (-364855096) : (-364855095));
|
||||
break;
|
||||
case 4:
|
||||
num = -364855094;
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 3:
|
||||
return EqualityComparer<bool>.Default.Equals(IsReady, other.IsReady);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<SlotSpiritbond>.Equals(SlotSpiritbond other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _202D_206C_206D_200D_206C_206F_200B_202A_200D_200D_202B_202D_206E_202C_202D_200B_206A_206C_200E_200F_206A_202B_202A_200F_202E_202E_206B_202A_206C_202C_206C_206C_200E_202D_206B_206A_206E_202C_200F_202B_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _202E_200F_206D_202D_206A_206B_206E_202E_200D_200F_200C_206D_206E_200C_200C_206A_200D_200B_202B_206E_200C_200C_202A_202A_200F_206C_200C_206D_206C_202C_200B_200C_200C_200C_202C_200D_206F_200B_206A_206C_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _202E_206B_202D_206B_200C_200E_202E_206B_202B_202C_202E_206A_206F_206F_206F_202E_206F_200D_206D_200B_200E_202A_206B_206C_200D_206B_202B_206B_206D_202C_200C_202D_200D_202B_202C_200E_200E_206E_200F_206A_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,147 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public sealed record StatInfo(short EquipmentValue, short MateriaValue, bool Overcapped)
|
||||
{
|
||||
[CompilerGenerated]
|
||||
private Type EqualityContract
|
||||
{
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
return _202C_200D_206E_200F_202B_200B_200B_206C_206A_202A_202A_206B_200D_202B_206E_206C_202B_200D_206B_206E_206F_200B_206B_206A_200D_202A_206C_202C_206F_206E_200F_202B_200D_202E_206E_206A_206C_200F_202B_202D_202E(typeof(StatInfo).TypeHandle);
|
||||
}
|
||||
}
|
||||
|
||||
public short TotalValue => (short)(EquipmentValue + MateriaValue);
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _202B_202A_202C_200D_202C_200C_200F_200F_206A_206A_200E_202A_200D_202D_206B_206E_200E_202B_202A_200C_202B_206A_206C_202C_206D_202B_206E_202D_200D_206A_202A_206A_200C_200E_206A_206E_206E_202E_200F_202D_202E();
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(stringBuilder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1952140969));
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(stringBuilder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(579144622));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 1013311267 : 1013311264);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1013311266;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = 1013311264;
|
||||
break;
|
||||
case 2:
|
||||
_200C_206C_202D_200D_200C_202E_200F_202C_206A_206A_206A_200C_206C_206C_206F_202E_202B_200D_200B_202C_202D_206F_200F_202E_206B_202E_200D_200D_206E_202D_202E_206D_206C_200C_200E_200F_206D_206F_200E_200D_202E(stringBuilder, ' ');
|
||||
num = 1013311267;
|
||||
break;
|
||||
case 1:
|
||||
_200C_206C_202D_200D_200C_202E_200F_202C_206A_206A_206A_200C_206C_206C_206F_202E_202B_200D_200B_202C_202D_206F_200F_202E_206B_202E_200D_200D_206E_202D_202E_206D_206C_200C_200E_200F_206D_206F_200E_200D_202E(stringBuilder, '}');
|
||||
return _202A_200B_206C_200E_206C_202B_202D_206F_206B_202A_200D_200F_202D_200D_202B_202A_200F_200D_200E_202B_202C_202B_202A_200F_206E_206C_206F_202E_206D_202D_202B_200C_202D_200B_202B_202A_200B_206F_200F_206E_202E((object)stringBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206D_206C_202B_206D_206F_206C_206D_202C_202D_206E_200D_200B_200E_206E_200B_200B_200E_206D_206D_200E_202E_202C_206F_202D_206C_206E_206F_206C_206A_206A_200E_206F_206E_206F_206A_200C_206A_206F_206D_200F_202E();
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(771577716));
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, EquipmentValue.ToString());
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1148322998));
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, MateriaValue.ToString());
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(2107946747));
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, Overcapped.ToString());
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-2076013549));
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, TotalValue.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(StatInfo? other)
|
||||
{
|
||||
int num = (((object)this == other) ? 1623034008 : 1623034013);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1623034015;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 7:
|
||||
return true;
|
||||
case 2:
|
||||
num = (((object)other == null) ? 1623034011 : 1623034010);
|
||||
break;
|
||||
case 4:
|
||||
return false;
|
||||
case 0:
|
||||
num = 1623034013;
|
||||
break;
|
||||
case 6:
|
||||
return EqualityComparer<bool>.Default.Equals(Overcapped, other.Overcapped);
|
||||
case 1:
|
||||
num = ((!EqualityComparer<short>.Default.Equals(EquipmentValue, other.EquipmentValue)) ? 1623034011 : 1623034012);
|
||||
break;
|
||||
case 3:
|
||||
num = ((!EqualityComparer<short>.Default.Equals(MateriaValue, other.MateriaValue)) ? 1623034011 : 1623034009);
|
||||
break;
|
||||
case 5:
|
||||
num = ((!_202A_202C_206E_202E_206B_202B_202E_200B_200D_200E_200C_206D_206A_200D_206D_202B_206C_202E_206B_202D_206E_206F_206C_206A_202C_202B_206D_200B_200C_200C_200C_202D_206D_200C_206F_206D_206E_206B_200F_202E(EqualityContract, other.EqualityContract)) ? 1623034011 : 1623034014);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<StatInfo>.Equals(StatInfo? other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static Type _202C_200D_206E_200F_202B_200B_200B_206C_206A_202A_202A_206B_200D_202B_206E_206C_202B_200D_206B_206E_206F_200B_206B_206A_200D_202A_206C_202C_206F_206E_200F_202B_200D_202E_206E_206A_206C_200F_202B_202D_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static StringBuilder _202B_202A_202C_200D_202C_200C_200F_200F_206A_206A_200E_202A_200D_202D_206B_206E_200E_202B_202A_200C_202B_206A_206C_202C_206D_202B_206E_202D_200D_206A_202A_206A_200C_200E_206A_206E_206E_202E_200F_202D_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _200C_206C_202D_200D_200C_202E_200F_202C_206A_206A_206A_200C_206C_206C_206F_202E_202B_200D_200B_202C_202D_206F_200F_202E_206B_202E_200D_200D_206E_202D_202E_206D_206C_200C_200E_200F_206D_206F_200E_200D_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _202A_200B_206C_200E_206C_202B_202D_206F_206B_202A_200D_200F_202D_200D_202B_202A_200F_200D_200E_202B_202C_202B_202A_200F_206E_206C_206F_202E_206D_202D_202B_200C_202D_200B_202B_202A_200B_206F_200F_206E_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
|
||||
static void _206D_206C_202B_206D_206F_206C_206D_202C_202D_206E_200D_200B_200E_206E_200B_200B_200E_206D_206D_200E_202E_202C_206F_202D_206C_206E_206F_206C_206A_206A_200E_206F_206E_206F_206A_200C_206A_206F_206D_200F_202E()
|
||||
{
|
||||
RuntimeHelpers.EnsureSufficientExecutionStack();
|
||||
}
|
||||
|
||||
static bool _202A_202C_206E_202E_206B_202B_202E_200B_200D_200E_200C_206D_206A_200D_206D_202B_206C_202E_206B_202D_206E_206F_206C_206A_202C_202B_206D_200B_200C_200C_200C_202D_206D_200C_206F_206D_206E_206B_200F_202E(Type P_0, Type P_1)
|
||||
{
|
||||
return P_0 == P_1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
244
LLib/LLib.Gear/StatPriority.cs
Normal file
244
LLib/LLib.Gear/StatPriority.cs
Normal file
|
|
@ -0,0 +1,244 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using LLib.GameData;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public sealed class StatPriority
|
||||
{
|
||||
private readonly IReadOnlyDictionary<EBaseParam, float> _weights;
|
||||
|
||||
public IReadOnlyDictionary<EBaseParam, float> Weights => _weights;
|
||||
|
||||
public StatPriority(IReadOnlyDictionary<EBaseParam, float> weights)
|
||||
{
|
||||
_weights = weights;
|
||||
}
|
||||
|
||||
public float Score(EquipmentStats stats)
|
||||
{
|
||||
float num = 0f;
|
||||
IEnumerator<KeyValuePair<EBaseParam, float>> enumerator = _weights.GetEnumerator();
|
||||
try
|
||||
{
|
||||
int num2 = -280188401;
|
||||
EBaseParam param = default(EBaseParam);
|
||||
float num6 = default(float);
|
||||
while (true)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = -280188405;
|
||||
int num5 = num3;
|
||||
switch ((num5 | num4) - (num5 & num4))
|
||||
{
|
||||
case 0:
|
||||
num2 = -280188401;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
enumerator.Current.Deconstruct(out var key, out var value);
|
||||
param = key;
|
||||
num6 = value;
|
||||
num2 = ((num6 == 0f) ? (-280188401) : (-280188406));
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
num += (float)stats.Get(param) * num6;
|
||||
num2 = -280188401;
|
||||
break;
|
||||
case 4:
|
||||
num2 = (_202C_206A_206A_200E_202C_206E_206B_200B_206A_202B_202C_206A_206B_200F_206A_206D_200C_206D_202E_200F_206B_206C_206E_202A_200B_206D_202B_202A_202C_202A_206B_206C_202D_206D_202E_206F_200C_202D_200D_206F_202E((IEnumerator)enumerator) ? (-280188407) : (-280188408));
|
||||
break;
|
||||
case 3:
|
||||
return num;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
int num2 = ((enumerator == null) ? (-1972077866) : (-1972077865));
|
||||
while (true)
|
||||
{
|
||||
int num7 = num2;
|
||||
int num4 = -1972077866;
|
||||
int num5 = num7;
|
||||
int num8 = num5 + num4;
|
||||
int num9 = num5 & num4;
|
||||
switch (num8 - (num9 + num9))
|
||||
{
|
||||
case 2:
|
||||
num2 = -1972077865;
|
||||
break;
|
||||
case 0:
|
||||
goto end_IL_00f9;
|
||||
case 1:
|
||||
_206B_200F_206A_200C_200F_202A_200C_206A_206F_200D_206A_206C_206A_206C_202C_202C_202A_206E_206B_202D_202E_200F_202D_206D_206E_206D_206B_200F_200D_206B_200D_202B_202A_206F_202D_206D_206C_200B_200F_206C_202E((IDisposable)enumerator);
|
||||
num2 = -1972077866;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
end_IL_00f9:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static StatPriority ForJob(EClassJob job)
|
||||
{
|
||||
EBaseParam[] relevantParams = GetRelevantParams(job);
|
||||
Dictionary<EBaseParam, float> dictionary = new Dictionary<EBaseParam, float>(relevantParams.Length);
|
||||
EBaseParam[] array = relevantParams;
|
||||
int num = 0;
|
||||
int num2 = 1591763655;
|
||||
while (true)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 1591763652;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 0:
|
||||
num2 = 1591763655;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
EBaseParam key = array[num];
|
||||
dictionary[key] = 1f;
|
||||
int num8 = num;
|
||||
num4 = 1;
|
||||
num5 = num8;
|
||||
num = (num5 | num4) + (num5 & num4);
|
||||
num2 = 1591763655;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
return new StatPriority(dictionary);
|
||||
case 3:
|
||||
num2 = ((num < array.Length) ? 1591763654 : 1591763653);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static EBaseParam[] GetRelevantParams(EClassJob job)
|
||||
{
|
||||
int num = ((!job.IsCrafter()) ? 1757392226 : 1757392244);
|
||||
bool flag = default(bool);
|
||||
bool flag2 = default(bool);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1757392228;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
EBaseParam[] array4 = new EBaseParam[5];
|
||||
_206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E((Array)array4, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
return array4;
|
||||
}
|
||||
case 16:
|
||||
{
|
||||
EBaseParam[] array = new EBaseParam[3];
|
||||
_206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E((Array)array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
return array;
|
||||
}
|
||||
case 14:
|
||||
{
|
||||
EBaseParam[] array6 = new EBaseParam[5];
|
||||
_206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E((Array)array6, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
return array6;
|
||||
}
|
||||
case 2:
|
||||
num = ((job - 29 <= EClassJob.Gladiator) ? 1757392232 : 1757392225);
|
||||
break;
|
||||
case 9:
|
||||
{
|
||||
EBaseParam[] array7 = new EBaseParam[5];
|
||||
_206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E((Array)array7, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
return array7;
|
||||
}
|
||||
case 13:
|
||||
num = ((!job.IsTank()) ? 1757392239 : 1757392227);
|
||||
break;
|
||||
case 19:
|
||||
{
|
||||
EBaseParam[] array3 = new EBaseParam[5];
|
||||
_206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E((Array)array3, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
return array3;
|
||||
}
|
||||
case 8:
|
||||
flag = flag2;
|
||||
num = 1757392229;
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
EBaseParam[] array2 = new EBaseParam[3];
|
||||
_206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E((Array)array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
return array2;
|
||||
}
|
||||
case 3:
|
||||
flag2 = false;
|
||||
num = 1757392236;
|
||||
break;
|
||||
case 18:
|
||||
num = 1757392244;
|
||||
break;
|
||||
case 5:
|
||||
num = ((job != EClassJob.Viper) ? 1757392231 : 1757392232);
|
||||
break;
|
||||
case 17:
|
||||
num = ((!job.IsCaster()) ? 1757392235 : 1757392228);
|
||||
break;
|
||||
case 15:
|
||||
return Array.Empty<EBaseParam>();
|
||||
case 7:
|
||||
{
|
||||
EBaseParam[] array5 = new EBaseParam[7];
|
||||
_206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E((Array)array5, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
return array5;
|
||||
}
|
||||
case 10:
|
||||
num = ((!job.IsMelee()) ? 1757392245 : 1757392237);
|
||||
break;
|
||||
case 12:
|
||||
flag2 = true;
|
||||
num = 1757392236;
|
||||
break;
|
||||
case 1:
|
||||
num = ((!flag) ? 1757392238 : 1757392247);
|
||||
break;
|
||||
case 11:
|
||||
flag = job.IsPhysicalRanged();
|
||||
num = (flag ? 1757392229 : 1757392230);
|
||||
break;
|
||||
case 6:
|
||||
num = ((!job.IsGatherer()) ? 1757392240 : 1757392224);
|
||||
break;
|
||||
case 20:
|
||||
num = ((!job.IsHealer()) ? 1757392233 : 1757392234);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool _202C_206A_206A_200E_202C_206E_206B_200B_206A_202B_202C_206A_206B_200F_206A_206D_200C_206D_202E_200F_206B_206C_206E_202A_200B_206D_202B_202A_202C_202A_206B_206C_202D_206D_202E_206F_200C_202D_200D_206F_202E(IEnumerator P_0)
|
||||
{
|
||||
return P_0.MoveNext();
|
||||
}
|
||||
|
||||
static void _206B_200F_206A_200C_200F_202A_200C_206A_206F_200D_206A_206C_206A_206C_202C_202C_202A_206E_206B_202D_202E_200F_202D_206D_206E_206D_206B_200F_200D_206B_200D_202B_202A_206F_202D_206D_206C_200B_200F_206C_202E(IDisposable P_0)
|
||||
{
|
||||
P_0.Dispose();
|
||||
}
|
||||
|
||||
static void _206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E(Array P_0, RuntimeFieldHandle P_1)
|
||||
{
|
||||
RuntimeHelpers.InitializeArray(P_0, P_1);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue