muffin v7.5.11
This commit is contained in:
parent
addf2d530f
commit
3102923ce2
522 changed files with 41082 additions and 211592 deletions
|
|
@ -1,7 +1,5 @@
|
|||
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;
|
||||
|
|
@ -12,9 +10,41 @@ namespace LLib.Gear;
|
|||
|
||||
public sealed class BestItemFinder
|
||||
{
|
||||
public static readonly IReadOnlyList<InventoryType> ArmoryAndEquipped;
|
||||
public static readonly IReadOnlyList<InventoryType> ArmoryAndEquipped = new global::_003C_003Ez__ReadOnlyArray<InventoryType>(new InventoryType[12]
|
||||
{
|
||||
InventoryType.EquippedItems,
|
||||
InventoryType.ArmoryMainHand,
|
||||
InventoryType.ArmoryOffHand,
|
||||
InventoryType.ArmoryHead,
|
||||
InventoryType.ArmoryBody,
|
||||
InventoryType.ArmoryHands,
|
||||
InventoryType.ArmoryLegs,
|
||||
InventoryType.ArmoryFeets,
|
||||
InventoryType.ArmoryEar,
|
||||
InventoryType.ArmoryNeck,
|
||||
InventoryType.ArmoryWrist,
|
||||
InventoryType.ArmoryRings
|
||||
});
|
||||
|
||||
public static readonly IReadOnlyList<InventoryType> ArmoryEquippedAndBags;
|
||||
public static readonly IReadOnlyList<InventoryType> ArmoryEquippedAndBags = new global::_003C_003Ez__ReadOnlyArray<InventoryType>(new InventoryType[16]
|
||||
{
|
||||
InventoryType.EquippedItems,
|
||||
InventoryType.ArmoryMainHand,
|
||||
InventoryType.ArmoryOffHand,
|
||||
InventoryType.ArmoryHead,
|
||||
InventoryType.ArmoryBody,
|
||||
InventoryType.ArmoryHands,
|
||||
InventoryType.ArmoryLegs,
|
||||
InventoryType.ArmoryFeets,
|
||||
InventoryType.ArmoryEar,
|
||||
InventoryType.ArmoryNeck,
|
||||
InventoryType.ArmoryWrist,
|
||||
InventoryType.ArmoryRings,
|
||||
InventoryType.Inventory1,
|
||||
InventoryType.Inventory2,
|
||||
InventoryType.Inventory3,
|
||||
InventoryType.Inventory4
|
||||
});
|
||||
|
||||
private readonly GearStatsCalculator _calculator;
|
||||
|
||||
|
|
@ -22,11 +52,10 @@ public sealed class BestItemFinder
|
|||
|
||||
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));
|
||||
ArgumentNullException.ThrowIfNull(calculator, "calculator");
|
||||
ArgumentNullException.ThrowIfNull(dataManager, "dataManager");
|
||||
_calculator = calculator;
|
||||
_itemSheet = dataManager.GetExcelSheet<Item>();
|
||||
_classJobCategorySheet = dataManager.GetExcelSheet<ClassJobCategory>();
|
||||
|
|
@ -36,320 +65,100 @@ public sealed class BestItemFinder
|
|||
{
|
||||
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)
|
||||
EBaseParam param = (job.DealsMagicDamage() ? EBaseParam.DamageMag : EBaseParam.DamagePhys);
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -539654855;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
int num13;
|
||||
switch (num5 - (num6 + num6))
|
||||
return null;
|
||||
}
|
||||
foreach (InventoryType container in containers)
|
||||
{
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(container);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
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:
|
||||
continue;
|
||||
}
|
||||
for (int i = 0; i < inventoryContainer->Size; i++)
|
||||
{
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(i);
|
||||
if (inventorySlot == null || inventorySlot->ItemId == 0)
|
||||
{
|
||||
IEnumerator<InventoryType> enumerator = containers.GetEnumerator();
|
||||
try
|
||||
continue;
|
||||
}
|
||||
if (excludeContainerSlot.HasValue)
|
||||
{
|
||||
BestItemRef valueOrDefault = excludeContainerSlot.GetValueOrDefault();
|
||||
if (valueOrDefault.Container == container && valueOrDefault.Slot == i)
|
||||
{
|
||||
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;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Item? rowOrDefault = _itemSheet.GetRowOrDefault(inventorySlot->ItemId);
|
||||
if (!rowOrDefault.HasValue)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
Item value = rowOrDefault.Value;
|
||||
if (IsAcceptedSlot(value.EquipSlotCategory.RowId, acceptedSlotCategories) && value.LevelEquip <= playerLevel && IsItemForJob(value, job))
|
||||
{
|
||||
EquipmentStats equipmentStats = _calculator.CalculateGearStats(inventorySlot);
|
||||
ItemRankingKey itemRankingKey = new ItemRankingKey(value.LevelItem.RowId, priority.Score(equipmentStats), equipmentStats.Get(param));
|
||||
if (IsUpgrade(rankingMode, itemRankingKey, best))
|
||||
{
|
||||
result = new BestItemRef(container, i, inventorySlot->ItemId, itemRankingKey.ItemLevel, itemRankingKey.Score);
|
||||
best = itemRankingKey;
|
||||
}
|
||||
}
|
||||
IL_0093:
|
||||
param = (EBaseParam)num13;
|
||||
ptr = InventoryManager.Instance();
|
||||
num = ((ptr != null) ? (-539654851) : (-539654855));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static bool IsUpgrade(EItemRankingMode mode, ItemRankingKey candidate, ItemRankingKey best)
|
||||
{
|
||||
int num = ((mode != EItemRankingMode.DamageFirst) ? (-1413450028) : (-1413450032));
|
||||
while (true)
|
||||
if (mode == EItemRankingMode.DamageFirst && candidate.Damage != best.Damage)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1413450029;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return candidate.Damage > best.Damage;
|
||||
}
|
||||
if (mode == EItemRankingMode.ItemLevelFirst)
|
||||
{
|
||||
if (candidate.ItemLevel != best.ItemLevel)
|
||||
{
|
||||
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;
|
||||
}
|
||||
return candidate.Score > best.Score;
|
||||
}
|
||||
if (candidate.Score != best.Score)
|
||||
{
|
||||
return candidate.Score > best.Score;
|
||||
}
|
||||
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)
|
||||
if (rowId == 0)
|
||||
{
|
||||
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;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
ClassJobCategory? rowOrDefault = _classJobCategorySheet.GetRowOrDefault(rowId);
|
||||
if (!rowOrDefault.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return job.IsInCategory(rowOrDefault.Value);
|
||||
}
|
||||
|
||||
private static bool IsAcceptedSlot(uint itemSlotCategory, IReadOnlyList<uint> accepted)
|
||||
{
|
||||
IEnumerator<uint> enumerator = accepted.GetEnumerator();
|
||||
try
|
||||
foreach (uint item in accepted)
|
||||
{
|
||||
int num = -1139406440;
|
||||
while (true)
|
||||
if (item == itemSlotCategory)
|
||||
{
|
||||
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 true;
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,117 +1,5 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
public readonly record struct BestItemRef(InventoryType Container, int Slot, uint ItemId, uint ItemLevel, float SubstatScore);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
||||
|
|
@ -16,334 +15,141 @@ public static class DesynthActions
|
|||
public unsafe static bool TryOpenDesynthWindow()
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr != null) ? 423836342 : 423836341);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
ptr->AgentInterface.Show();
|
||||
return true;
|
||||
}
|
||||
|
||||
[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);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("SalvageItemSelector", out addonPtr);
|
||||
}
|
||||
|
||||
public unsafe static void SetCategory(AgentSalvage.SalvageItemCategory category)
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr == null) ? (-1642327650) : (-1642327651));
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
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;
|
||||
}
|
||||
ptr->SelectedCategory = category;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static AgentSalvage.SalvageItemCategory GetCategory()
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr != null) ? 1275547526 : 1275547525);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
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;
|
||||
return AgentSalvage.SalvageItemCategory.InventoryEquipment;
|
||||
}
|
||||
return ptr->SelectedCategory;
|
||||
}
|
||||
|
||||
public unsafe static void RefreshItemList()
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr == null) ? 213710031 : 213710028);
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
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;
|
||||
}
|
||||
ptr->ItemListRefresh(isSalvageResultAddonOpen: true);
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static int GetItemCount()
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr != null) ? (-832139057) : (-832139060));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
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;
|
||||
return 0;
|
||||
}
|
||||
return (int)ptr->ItemCount;
|
||||
}
|
||||
|
||||
[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)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SalvageItemSelector", out var addonPtr))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.FireWithUpdate(addonPtr, 12, itemIndex);
|
||||
return true;
|
||||
}
|
||||
|
||||
[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);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("SalvageDialog", 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)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SalvageDialog", out var addonPtr))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.FireWithUpdate(addonPtr, 15, nqOnly ? 1 : 0);
|
||||
AddonCallback.FireWithUpdate(addonPtr, default(int), default(int));
|
||||
return true;
|
||||
}
|
||||
|
||||
[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);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("SalvageResult", 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)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SalvageResult", out var addonPtr))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
[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)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SalvageItemSelector", out var addonPtr))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe static AgentSalvage.SalvageListItem? GetItemAtIndex(int index)
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr == null) ? 1959558310 : 1959558311);
|
||||
while (true)
|
||||
if (ptr == null || ptr->ItemList == null || index < 0 || index >= ptr->ItemCount)
|
||||
{
|
||||
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;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return ptr->ItemList[index];
|
||||
}
|
||||
|
||||
public unsafe static bool TryDesynthDirect(InventoryItem* item)
|
||||
{
|
||||
int num = ((item == null) ? (-1819563004) : (-1819563003));
|
||||
AgentSalvage* ptr = default(AgentSalvage*);
|
||||
while (true)
|
||||
if (item == null || item->ItemId == 0)
|
||||
{
|
||||
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;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
public static bool IsDesynthUnlocked()
|
||||
|
|
@ -353,111 +159,49 @@ public static class DesynthActions
|
|||
|
||||
public static bool IsItemDesynthable(IDataManager dataManager, uint itemId)
|
||||
{
|
||||
Item row;
|
||||
int num = (dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out row) ? (-1608454273) : (-1608454276));
|
||||
while (true)
|
||||
if (!dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out var row))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
return row.Desynth > 0;
|
||||
}
|
||||
|
||||
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)
|
||||
if (!dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out var row))
|
||||
{
|
||||
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;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (row.Desynth <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
ClassJob? valueNullable = row.ClassJobRepair.ValueNullable;
|
||||
if (!valueNullable.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
PlayerState* ptr = PlayerState.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return ptr->ClassJobLevels[valueNullable.Value.ExpArrayIndex] >= 30;
|
||||
}
|
||||
|
||||
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)
|
||||
if (!flag)
|
||||
{
|
||||
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;
|
||||
}
|
||||
bool flag2 = ((classJobId < 8 || classJobId > 15) ? true : false);
|
||||
flag = flag2;
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
return 0f;
|
||||
}
|
||||
return ptr->GetDesynthesisLevel(classJobId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,402 +6,137 @@ 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;
|
||||
return InventoryType.ArmoryMainHand;
|
||||
case EEquipSlotCategory.Shield:
|
||||
return InventoryType.ArmoryOffHand;
|
||||
case EEquipSlotCategory.Head:
|
||||
return InventoryType.ArmoryHead;
|
||||
case EEquipSlotCategory.Body:
|
||||
return InventoryType.ArmoryBody;
|
||||
case EEquipSlotCategory.Hands:
|
||||
return InventoryType.ArmoryHands;
|
||||
case EEquipSlotCategory.Legs:
|
||||
return InventoryType.ArmoryLegs;
|
||||
case EEquipSlotCategory.Feet:
|
||||
return InventoryType.ArmoryFeets;
|
||||
case EEquipSlotCategory.Ears:
|
||||
return InventoryType.ArmoryEar;
|
||||
case EEquipSlotCategory.Neck:
|
||||
goto IL_0194;
|
||||
return InventoryType.ArmoryNeck;
|
||||
case EEquipSlotCategory.Wrists:
|
||||
return InventoryType.ArmoryWrist;
|
||||
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;
|
||||
return InventoryType.ArmoryRings;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1184837262;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return null;
|
||||
}
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(container);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (int i = 0; i < inventoryContainer->Size; i++)
|
||||
{
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(i);
|
||||
if (inventorySlot != null && inventorySlot->ItemId == 0)
|
||||
{
|
||||
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;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
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*);
|
||||
InventoryType? inventoryType;
|
||||
switch (equippedSlotIndex)
|
||||
{
|
||||
default:
|
||||
num = 1686328571;
|
||||
goto IL_004a;
|
||||
case 0:
|
||||
inventoryType = InventoryType.ArmoryMainHand;
|
||||
break;
|
||||
case 1:
|
||||
inventoryType = InventoryType.ArmoryOffHand;
|
||||
break;
|
||||
case 2:
|
||||
inventoryType = InventoryType.ArmoryHead;
|
||||
break;
|
||||
case 3:
|
||||
inventoryType = InventoryType.ArmoryBody;
|
||||
break;
|
||||
case 4:
|
||||
inventoryType = InventoryType.ArmoryHands;
|
||||
break;
|
||||
case 6:
|
||||
inventoryType2 = InventoryType.ArmoryLegs;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
inventoryType = InventoryType.ArmoryLegs;
|
||||
break;
|
||||
case 7:
|
||||
inventoryType = InventoryType.ArmoryFeets;
|
||||
break;
|
||||
case 8:
|
||||
inventoryType = InventoryType.ArmoryEar;
|
||||
break;
|
||||
case 9:
|
||||
inventoryType = InventoryType.ArmoryNeck;
|
||||
break;
|
||||
case 10:
|
||||
inventoryType = InventoryType.ArmoryWrist;
|
||||
break;
|
||||
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;
|
||||
inventoryType = InventoryType.ArmoryRings;
|
||||
break;
|
||||
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;
|
||||
inventoryType = InventoryType.ArmorySoulCrystal;
|
||||
break;
|
||||
default:
|
||||
inventoryType = null;
|
||||
break;
|
||||
}
|
||||
InventoryType? inventoryType2 = inventoryType;
|
||||
if (inventoryType2.HasValue)
|
||||
{
|
||||
InventoryType valueOrDefault = inventoryType2.GetValueOrDefault();
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (equippedSlotIndex < 0 || equippedSlotIndex >= inventoryContainer->Size)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(equippedSlotIndex);
|
||||
if (inventorySlot == null || inventorySlot->ItemId == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int? num = FindFreeSlot(valueOrDefault);
|
||||
if (num.HasValue)
|
||||
{
|
||||
int valueOrDefault2 = num.GetValueOrDefault();
|
||||
ptr->MoveItemSlot(InventoryType.EquippedItems, (ushort)equippedSlotIndex, valueOrDefault, (ushort)valueOrDefault2, a6: true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,48 +11,20 @@ public static class EquipmentSlots
|
|||
public unsafe static InventoryContainer* GetEquippedContainer()
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? (-579848400) : (-579848397));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
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;
|
||||
return null;
|
||||
}
|
||||
return ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
}
|
||||
|
||||
public unsafe static bool TryGetEquippedItem(InventoryContainer* container, int slotIndex, out InventoryItem* item)
|
||||
{
|
||||
item = container->GetInventorySlot(slotIndex);
|
||||
int num = ((item == null) ? 365336456 : 365336459);
|
||||
while (true)
|
||||
if (item != null)
|
||||
{
|
||||
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;
|
||||
return item->ItemId != 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,11 @@
|
|||
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)
|
||||
{
|
||||
[CompilerGenerated]
|
||||
private Type EqualityContract
|
||||
{
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
public short Get(EBaseParam param)
|
||||
{
|
||||
return (short)(GetEquipment(param) + GetMateria(param));
|
||||
|
|
@ -26,79 +14,19 @@ public sealed record EquipmentStats(Dictionary<EBaseParam, StatInfo> Stats, byte
|
|||
public short GetEquipment(EBaseParam param)
|
||||
{
|
||||
Stats.TryGetValue(param, out StatInfo value);
|
||||
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;
|
||||
}
|
||||
return value?.EquipmentValue ?? 0;
|
||||
}
|
||||
|
||||
public short GetMateria(EBaseParam param)
|
||||
{
|
||||
Stats.TryGetValue(param, out StatInfo value);
|
||||
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;
|
||||
}
|
||||
return value?.MateriaValue ?? 0;
|
||||
}
|
||||
|
||||
public bool IsOvercapped(EBaseParam param)
|
||||
{
|
||||
Stats.TryGetValue(param, out StatInfo value);
|
||||
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;
|
||||
}
|
||||
return value?.Overcapped ?? false;
|
||||
}
|
||||
|
||||
public bool Has(EBaseParam substat)
|
||||
|
|
@ -113,197 +41,30 @@ public sealed record EquipmentStats(Dictionary<EBaseParam, StatInfo> Stats, byte
|
|||
|
||||
public bool Equals(EquipmentStats? other)
|
||||
{
|
||||
int num = ((other == null) ? 948419368 : 948419369);
|
||||
StatInfo statInfo = default(StatInfo);
|
||||
StatInfo value2 = default(StatInfo);
|
||||
while (true)
|
||||
if (other == null || MateriaCount != other.MateriaCount || Stats.Count != other.Stats.Count)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 948419368;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return false;
|
||||
}
|
||||
foreach (var (key, objA) in Stats)
|
||||
{
|
||||
if (!other.Stats.TryGetValue(key, out StatInfo value) || !object.Equals(objA, value))
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<EquipmentStats>.Equals(EquipmentStats? other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = MateriaCount.GetHashCode();
|
||||
using Dictionary<EBaseParam, StatInfo>.Enumerator enumerator = Stats.GetEnumerator();
|
||||
int num2 = 1490502903;
|
||||
while (true)
|
||||
foreach (KeyValuePair<EBaseParam, StatInfo> stat in Stats)
|
||||
{
|
||||
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;
|
||||
}
|
||||
stat.Deconstruct(out var key, out var value);
|
||||
EBaseParam value2 = key;
|
||||
StatInfo value3 = value;
|
||||
num ^= HashCode.Combine(value2, value3);
|
||||
}
|
||||
}
|
||||
|
||||
[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);
|
||||
return num;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,47 +27,15 @@ public readonly struct ExtendedBaseParam : IExcelRow<ExtendedBaseParam>
|
|||
|
||||
private static ushort EquipSlotCategoryPctCtor(ExcelPage page, uint parentOffset, uint offset, uint i)
|
||||
{
|
||||
int num = ((i == 0) ? 1726719508 : 1726719511);
|
||||
while (true)
|
||||
if (i != 0)
|
||||
{
|
||||
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 page.ReadUInt16(offset + 8 + (i - 1) * 2);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
|
|
@ -13,147 +12,63 @@ public static class ExtractActions
|
|||
public unsafe static bool TryOpenExtractionWindow()
|
||||
{
|
||||
ActionManager* ptr = ActionManager.Instance();
|
||||
int num = ((ptr != null) ? 1517753475 : 1517753472);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
return ptr->UseAction(ActionType.GeneralAction, 14u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
}
|
||||
|
||||
[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);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("Materialize", 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)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("Materialize", out var addonPtr))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.FireWithUpdate(addonPtr, 2, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
[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);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("MaterializeDialog", 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)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("MaterializeDialog", out var addonPtr))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, default(int));
|
||||
return true;
|
||||
}
|
||||
|
||||
[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)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("Materialize", out var addonPtr))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, 1, category);
|
||||
return true;
|
||||
}
|
||||
|
||||
[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)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("Materialize", out var addonPtr))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, -1);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsExtractionUnlocked()
|
||||
|
|
|
|||
|
|
@ -12,341 +12,121 @@ public static class GearConditionHelper
|
|||
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)
|
||||
if (equippedContainer == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 136938412;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return null;
|
||||
}
|
||||
int? result = null;
|
||||
for (int i = 0; i < 13; i++)
|
||||
{
|
||||
if (i != 5 && EquipmentSlots.TryGetEquippedItem(equippedContainer, i, out var item))
|
||||
{
|
||||
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;
|
||||
}
|
||||
int num = item->Condition * 100 / 30000;
|
||||
if (!result.HasValue || num < result.Value)
|
||||
{
|
||||
result = num;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
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)
|
||||
if (equippedContainer == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1727066761;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return list;
|
||||
}
|
||||
for (int i = 0; i < 13; i++)
|
||||
{
|
||||
if (i != 5 && EquipmentSlots.TryGetEquippedItem(equippedContainer, i, out var item))
|
||||
{
|
||||
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;
|
||||
list.Add(new SlotCondition(i, item->ItemId, item->Condition * 100 / 30000));
|
||||
}
|
||||
}
|
||||
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)
|
||||
if (equippedContainer != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 566966450;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
for (int i = 0; i < 13; i++)
|
||||
{
|
||||
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;
|
||||
if (i != 5 && EquipmentSlots.TryGetEquippedItem(equippedContainer, i, out var item) && item->SpiritbondOrCollectability >= 10000)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!includeBags)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
for (InventoryType inventoryType = InventoryType.Inventory1; inventoryType <= InventoryType.Inventory4; inventoryType++)
|
||||
{
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for (int j = 0; j < inventoryContainer->Size; j++)
|
||||
{
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(j);
|
||||
if (inventorySlot != null && inventorySlot->ItemId != 0 && (inventorySlot->Flags & InventoryItem.ItemFlags.Collectable) == 0 && inventorySlot->SpiritbondOrCollectability >= 10000)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
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)
|
||||
if (equippedContainer == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1500996182;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return null;
|
||||
}
|
||||
int? result = null;
|
||||
for (int i = 0; i < 13; i++)
|
||||
{
|
||||
if (i != 5 && EquipmentSlots.TryGetEquippedItem(equippedContainer, i, out var item))
|
||||
{
|
||||
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;
|
||||
int num = item->SpiritbondOrCollectability * 100 / 10000;
|
||||
if (!result.HasValue || num < result.Value)
|
||||
{
|
||||
result = num;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
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)
|
||||
if (equippedContainer == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 818481643;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return list;
|
||||
}
|
||||
for (int i = 0; i < 13; i++)
|
||||
{
|
||||
if (i != 5 && EquipmentSlots.TryGetEquippedItem(equippedContainer, i, out var item))
|
||||
{
|
||||
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;
|
||||
list.Add(new SlotSpiritbond(i, item->ItemId, item->SpiritbondOrCollectability * 100 / 10000, item->SpiritbondOrCollectability >= 10000));
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -7,83 +7,31 @@ public static class GearsetHelper
|
|||
public unsafe static int GetCurrentGearsetIndex()
|
||||
{
|
||||
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
|
||||
int num = ((ptr != null) ? (-1692442216) : (-1692442213));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
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;
|
||||
return -1;
|
||||
}
|
||||
return ptr->CurrentGearsetIndex;
|
||||
}
|
||||
|
||||
public unsafe static bool TryEquipGearset(int gearsetIndex)
|
||||
{
|
||||
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
|
||||
int num = ((ptr == null) ? 231059237 : 231059236);
|
||||
while (true)
|
||||
if (ptr == null || gearsetIndex < 0 || !ptr->IsValidGearset(gearsetIndex))
|
||||
{
|
||||
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;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
ptr->EquipGearset(gearsetIndex, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe static byte GetGearsetClassJob(int gearsetIndex)
|
||||
{
|
||||
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
|
||||
int num = ((ptr == null) ? (-76399401) : (-76399403));
|
||||
while (true)
|
||||
if (ptr == null || gearsetIndex < 0 || !ptr->IsValidGearset(gearsetIndex))
|
||||
{
|
||||
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;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return ptr->GetGearset(gearsetIndex)->ClassJob;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,106 +1,6 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,257 +13,108 @@ public static class MateriaHelper
|
|||
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)
|
||||
if (item == null || item->ItemId == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1527939719;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return list;
|
||||
}
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
uint num = item->Materia[i];
|
||||
if (num != 0)
|
||||
{
|
||||
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;
|
||||
list.Add(new MeldSlotInfo(i, num, item->MateriaGrades[i]));
|
||||
}
|
||||
}
|
||||
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)
|
||||
if (!dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out var row))
|
||||
{
|
||||
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;
|
||||
return 0;
|
||||
}
|
||||
return row.MateriaSlotCount;
|
||||
}
|
||||
|
||||
public static bool CanOvermeld(IDataManager dataManager, uint itemId)
|
||||
{
|
||||
Item row;
|
||||
int num = (dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out row) ? (-2077097183) : (-2077097182));
|
||||
while (true)
|
||||
if (!dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out var row))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
return row.IsAdvancedMeldingPermitted;
|
||||
}
|
||||
|
||||
public static int GetOvermeldSuccessRate(IDataManager dataManager, byte grade, int overmeldSlot, bool isHq)
|
||||
{
|
||||
int num = ((overmeldSlot >= 0) ? 943397358 : 943397347);
|
||||
MateriaGrade row = default(MateriaGrade);
|
||||
while (true)
|
||||
if (overmeldSlot < 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 943397355;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return 0;
|
||||
}
|
||||
if (!dataManager.GetExcelSheet<MateriaGrade>().TryGetRow(grade, out var row))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (isHq)
|
||||
{
|
||||
if (overmeldSlot >= row.OvermeldHQPercent.Count)
|
||||
{
|
||||
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;
|
||||
}
|
||||
return row.OvermeldHQPercent[overmeldSlot];
|
||||
}
|
||||
if (overmeldSlot >= row.OvermeldNQPercent.Count)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return row.OvermeldNQPercent[overmeldSlot];
|
||||
}
|
||||
|
||||
public unsafe static int CountMateriaInInventory(uint materiaItemId)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? 244394904 : 244394907);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
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;
|
||||
return 0;
|
||||
}
|
||||
return ptr->GetInventoryItemCount(materiaItemId, isHq: false, checkEquipped: true, checkArmory: true, 0);
|
||||
}
|
||||
|
||||
public static int EstimateMateriaNeeded(int successRatePercent, int confidencePercent = 90)
|
||||
{
|
||||
int num = ((successRatePercent < 100) ? 394334376 : 394334378);
|
||||
double num5 = default(double);
|
||||
while (true)
|
||||
if (successRatePercent >= 100)
|
||||
{
|
||||
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;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (successRatePercent <= 0)
|
||||
{
|
||||
return int.MaxValue;
|
||||
}
|
||||
double num = (double)successRatePercent / 100.0;
|
||||
double num2 = (double)Math.Clamp(confidencePercent, 0, 99) / 100.0;
|
||||
double num3 = Math.Ceiling(Math.Log(1.0 - num2) / Math.Log(1.0 - num));
|
||||
if (num3 < 1.0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (num3 > 2147483647.0)
|
||||
{
|
||||
return int.MaxValue;
|
||||
}
|
||||
return (int)num3;
|
||||
}
|
||||
|
||||
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)
|
||||
if (!dataManager.GetExcelSheet<Materia>().TryGetRow(materiaRowId, out var row))
|
||||
{
|
||||
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;
|
||||
}
|
||||
return 0u;
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
if (grade >= row.Item.Count)
|
||||
{
|
||||
return 0u;
|
||||
}
|
||||
return row.Item[grade].RowId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
|
|
@ -17,568 +16,216 @@ public static class MeldActions
|
|||
public unsafe static bool TryOpenMeldAgent()
|
||||
{
|
||||
ActionManager* ptr = ActionManager.Instance();
|
||||
int num = ((ptr != null) ? (-92377207) : (-92377206));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
return ptr->UseAction(ActionType.GeneralAction, 13u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
}
|
||||
|
||||
public unsafe static bool IsMeldAgentReady()
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? 1012581320 : 1012581323);
|
||||
while (true)
|
||||
if (agentByInternalId != null)
|
||||
{
|
||||
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;
|
||||
return agentByInternalId->IsAgentActive();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe static void CloseMeldAgent()
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? 1172237178 : 1172237177);
|
||||
while (true)
|
||||
if (agentByInternalId != null)
|
||||
{
|
||||
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;
|
||||
}
|
||||
agentByInternalId->Hide();
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool TrySelectItemCategory(int category)
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? 1631304881 : 1631304883);
|
||||
while (true)
|
||||
if (agentByInternalId == null || !agentByInternalId->IsAgentActive())
|
||||
{
|
||||
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;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
AgentHelper.SendEvent(agentByInternalId, 0uL, 0, category);
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe static bool TrySelectItem(int itemIndex)
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? (-2072200034) : (-2072200035));
|
||||
while (true)
|
||||
if (agentByInternalId == null || !agentByInternalId->IsAgentActive())
|
||||
{
|
||||
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;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
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)
|
||||
if (agentByInternalId == null || !agentByInternalId->IsAgentActive())
|
||||
{
|
||||
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;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
AgentHelper.SendEvent(agentByInternalId, 0uL, 2, materiaIndex, 1, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
[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)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("MateriaAttachDialog", out var addonPtr))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, 0, 0, 1);
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
[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)
|
||||
if (agentByInternalId == null || !agentByInternalId->IsAgentActive())
|
||||
{
|
||||
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;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SelectYesno", out var addonPtr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AddonCallback.ClickYes(addonPtr);
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe static bool TryRequestRetrieve()
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? (-1148814480) : (-1148814479));
|
||||
while (true)
|
||||
if (agentByInternalId == null || !agentByInternalId->IsAgentActive())
|
||||
{
|
||||
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;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
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)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("MateriaRetrieveDialog", out var addonPtr))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, default(int));
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
[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);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("MateriaAttachDialog", 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);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("MateriaRetrieveDialog", out addonPtr);
|
||||
}
|
||||
|
||||
public unsafe static bool IsAgentLoading()
|
||||
{
|
||||
AgentMateriaAttach* ptr = AgentMateriaAttach.Instance();
|
||||
int num = ((ptr == null) ? (-1447124743) : (-1447124742));
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
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;
|
||||
return ptr->UpdateState != 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe static int GetSelectedItemIndex()
|
||||
{
|
||||
AgentMateriaAttach* ptr = AgentMateriaAttach.Instance();
|
||||
int num = ((ptr == null) ? (-10593117) : (-10593120));
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
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;
|
||||
return ptr->SelectedItemIndex;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static AgentMateriaAttach.FilterCategory GetFilterCategory(InventoryType inventoryType)
|
||||
{
|
||||
int num = ((inventoryType > InventoryType.EquippedItems) ? (-1327648937) : (-1327648944));
|
||||
AgentMateriaAttach.FilterCategory result = default(AgentMateriaAttach.FilterCategory);
|
||||
while (true)
|
||||
switch (inventoryType)
|
||||
{
|
||||
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;
|
||||
}
|
||||
case InventoryType.Inventory1:
|
||||
case InventoryType.Inventory2:
|
||||
case InventoryType.Inventory3:
|
||||
case InventoryType.Inventory4:
|
||||
return AgentMateriaAttach.FilterCategory.Inventory;
|
||||
case InventoryType.ArmoryOffHand:
|
||||
case InventoryType.ArmoryMainHand:
|
||||
return AgentMateriaAttach.FilterCategory.ArmouryWeapon;
|
||||
case InventoryType.ArmoryHead:
|
||||
case InventoryType.ArmoryBody:
|
||||
case InventoryType.ArmoryHands:
|
||||
return AgentMateriaAttach.FilterCategory.ArmouryHeadBodyHands;
|
||||
case InventoryType.ArmoryLegs:
|
||||
case InventoryType.ArmoryFeets:
|
||||
return AgentMateriaAttach.FilterCategory.ArmouryLegsFeet;
|
||||
case InventoryType.ArmoryEar:
|
||||
case InventoryType.ArmoryNeck:
|
||||
return AgentMateriaAttach.FilterCategory.ArmouryNeckEars;
|
||||
case InventoryType.ArmoryWrist:
|
||||
case InventoryType.ArmoryRings:
|
||||
return AgentMateriaAttach.FilterCategory.ArmouryWristRing;
|
||||
case InventoryType.EquippedItems:
|
||||
return AgentMateriaAttach.FilterCategory.Equipped;
|
||||
default:
|
||||
return AgentMateriaAttach.FilterCategory.None;
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
if (target == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1032587332;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return null;
|
||||
}
|
||||
AgentMateriaAttach* ptr = AgentMateriaAttach.Instance();
|
||||
if (ptr == null || !ptr->IsAgentActive() || ptr->Data == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (int i = 0; i < ptr->ItemCount; i++)
|
||||
{
|
||||
AgentMateriaAttach.MateriaAttachEntry* value = ptr->Data->ItemsSorted[i].Value;
|
||||
if (value != null && value->Item == target)
|
||||
{
|
||||
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;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
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)
|
||||
if (ptr == null || !ptr->IsAgentActive() || ptr->Data == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 2014235167;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return null;
|
||||
}
|
||||
for (int i = 0; i < ptr->MateriaCount; i++)
|
||||
{
|
||||
AgentMateriaAttach.MateriaAttachEntry* value = ptr->Data->MateriaSorted[i].Value;
|
||||
if (value != null && value->Item != null && value->Item->ItemId == materiaItemId)
|
||||
{
|
||||
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;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static bool IsMeldingUnlocked()
|
||||
|
|
@ -593,69 +240,30 @@ public static class MeldActions
|
|||
|
||||
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)
|
||||
if (item == null || item->ItemId == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1684140328;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return false;
|
||||
}
|
||||
if (!dataManager.GetExcelSheet<Item>().TryGetRow(item->ItemId, out var row))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (row.MateriaSlotCount == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int num = row.MateriaSlotCount;
|
||||
if (row.IsAdvancedMeldingPermitted)
|
||||
{
|
||||
num = 5;
|
||||
}
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
if (item->Materia[i] == 0)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,111 +1,3 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
public readonly record struct MeldInstruction(uint ItemId, int SlotIndex, uint MateriaItemId, bool IsOvermeld);
|
||||
|
|
|
|||
|
|
@ -1,110 +1,6 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||
|
|
@ -17,434 +16,157 @@ public static class RepairActions
|
|||
public unsafe static bool TryOpenRepairWindow()
|
||||
{
|
||||
ActionManager* ptr = ActionManager.Instance();
|
||||
int num = ((ptr != null) ? 68220505 : 68220506);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
return ptr->UseAction(ActionType.GeneralAction, 6u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
}
|
||||
|
||||
[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);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("Repair", 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)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("Repair", out var addonPtr))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
return AddonCallback.ClickButton(addonPtr, ((AddonRepair*)addonPtr)->RepairAllButton);
|
||||
}
|
||||
|
||||
[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)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("Repair", out var _))
|
||||
{
|
||||
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;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SelectYesno", out var addonPtr2))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AddonCallback.ClickYes(addonPtr2);
|
||||
return true;
|
||||
}
|
||||
|
||||
[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)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("Repair", out var addonPtr))
|
||||
{
|
||||
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();
|
||||
}
|
||||
return "addon: not open";
|
||||
}
|
||||
AtkComponentButton* repairAllButton = ((AddonRepair*)addonPtr)->RepairAllButton;
|
||||
string value = ((repairAllButton == null) ? "null" : (repairAllButton->IsEnabled ? "enabled" : "disabled"));
|
||||
return $"addon: visible={addonPtr->IsVisible}, ready={LAddon.IsAddonReady(addonPtr)}, repair-all button: {value}";
|
||||
}
|
||||
|
||||
[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)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("Repair", out var addonPtr))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
[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)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SelectIconString", out var addonPtr))
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.FireWithUpdate(addonPtr, repairIndex);
|
||||
return true;
|
||||
}
|
||||
|
||||
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)
|
||||
if (!dataManager.GetExcelSheet<ENpcBase>().TryGetRow(npcBaseId, out var row))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1361038006;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return null;
|
||||
}
|
||||
for (int i = 0; i < row.ENpcData.Count; i++)
|
||||
{
|
||||
if (row.ENpcData[i].RowId == 720915)
|
||||
{
|
||||
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;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
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)
|
||||
if (!dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out var row))
|
||||
{
|
||||
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;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
uint rowId = row.ClassJobRepair.RowId;
|
||||
if (rowId == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
byte num = jobLevelLookup(rowId);
|
||||
int num2 = Math.Max(row.LevelEquip - 10, 1);
|
||||
if (num < num2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
uint num3 = row.ItemRepair.ValueNullable?.Item.RowId ?? 0;
|
||||
if (num3 == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return HasDarkMatterOrBetter(dataManager, num3);
|
||||
}
|
||||
|
||||
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)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1849138143;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return false;
|
||||
}
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < inventoryContainer->Size; i++)
|
||||
{
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(i);
|
||||
if (inventorySlot != null && inventorySlot->ItemId != 0 && inventorySlot->Condition * 100 / 30000 < thresholdPercent && CanSelfRepairItem(inventorySlot->ItemId, dataManager, jobLevelLookup))
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
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)
|
||||
if (ptr == null)
|
||||
{
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
ExcelSheet<ItemRepairResource> excelSheet = dataManager.GetExcelSheet<ItemRepairResource>();
|
||||
bool flag = false;
|
||||
foreach (ItemRepairResource item in excelSheet)
|
||||
{
|
||||
if (item.Item.RowId == requiredItemId)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
if (flag && ptr->GetInventoryItemCount(item.Item.RowId, isHq: false, checkEquipped: true, checkArmory: true, 0) > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,106 +1,3 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
public readonly record struct SlotCondition(int SlotIndex, uint ItemId, int ConditionPercent);
|
||||
|
|
|
|||
|
|
@ -1,109 +1,3 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
public readonly record struct SlotSpiritbond(int SlotIndex, uint ItemId, int SpiritbondPercent, bool IsReady);
|
||||
|
|
|
|||
|
|
@ -1,147 +1,6 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using LLib.GameData;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
|
@ -20,69 +18,14 @@ public sealed class StatPriority
|
|||
public float Score(EquipmentStats stats)
|
||||
{
|
||||
float num = 0f;
|
||||
IEnumerator<KeyValuePair<EBaseParam, float>> enumerator = _weights.GetEnumerator();
|
||||
try
|
||||
foreach (var (param, num3) in _weights)
|
||||
{
|
||||
int num2 = -280188401;
|
||||
EBaseParam param = default(EBaseParam);
|
||||
float num6 = default(float);
|
||||
while (true)
|
||||
if (num3 != 0f)
|
||||
{
|
||||
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;
|
||||
num += (float)stats.Get(param) * num3;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
public static StatPriority ForJob(EClassJob job)
|
||||
|
|
@ -90,155 +33,96 @@ public sealed class StatPriority
|
|||
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)
|
||||
foreach (EBaseParam key in array)
|
||||
{
|
||||
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;
|
||||
}
|
||||
dictionary[key] = 1f;
|
||||
}
|
||||
return new StatPriority(dictionary);
|
||||
}
|
||||
|
||||
private static EBaseParam[] GetRelevantParams(EClassJob job)
|
||||
{
|
||||
int num = ((!job.IsCrafter()) ? 1757392226 : 1757392244);
|
||||
bool flag = default(bool);
|
||||
bool flag2 = default(bool);
|
||||
while (true)
|
||||
if (job.IsCrafter())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1757392228;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return new EBaseParam[3]
|
||||
{
|
||||
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;
|
||||
}
|
||||
EBaseParam.CP,
|
||||
EBaseParam.Control,
|
||||
EBaseParam.Craftsmanship
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
if (job.IsGatherer())
|
||||
{
|
||||
return new EBaseParam[3]
|
||||
{
|
||||
EBaseParam.GP,
|
||||
EBaseParam.Gathering,
|
||||
EBaseParam.Perception
|
||||
};
|
||||
}
|
||||
if (job.IsHealer())
|
||||
{
|
||||
return new EBaseParam[5]
|
||||
{
|
||||
EBaseParam.Mind,
|
||||
EBaseParam.Piety,
|
||||
EBaseParam.SpellSpeed,
|
||||
EBaseParam.Determination,
|
||||
EBaseParam.Crit
|
||||
};
|
||||
}
|
||||
if (job.IsTank())
|
||||
{
|
||||
return new EBaseParam[7]
|
||||
{
|
||||
EBaseParam.Strength,
|
||||
EBaseParam.Vitality,
|
||||
EBaseParam.Determination,
|
||||
EBaseParam.Tenacity,
|
||||
EBaseParam.DirectHit,
|
||||
EBaseParam.Crit,
|
||||
EBaseParam.SkillSpeed
|
||||
};
|
||||
}
|
||||
bool flag = job.IsPhysicalRanged();
|
||||
if (!flag)
|
||||
{
|
||||
bool flag2 = ((job - 29 <= EClassJob.Gladiator || job == EClassJob.Viper) ? true : false);
|
||||
flag = flag2;
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
return new EBaseParam[5]
|
||||
{
|
||||
EBaseParam.Dexterity,
|
||||
EBaseParam.Determination,
|
||||
EBaseParam.DirectHit,
|
||||
EBaseParam.Crit,
|
||||
EBaseParam.SkillSpeed
|
||||
};
|
||||
}
|
||||
if (job.IsMelee())
|
||||
{
|
||||
return new EBaseParam[5]
|
||||
{
|
||||
EBaseParam.Strength,
|
||||
EBaseParam.Determination,
|
||||
EBaseParam.DirectHit,
|
||||
EBaseParam.Crit,
|
||||
EBaseParam.SkillSpeed
|
||||
};
|
||||
}
|
||||
if (job.IsCaster())
|
||||
{
|
||||
return new EBaseParam[5]
|
||||
{
|
||||
EBaseParam.Intelligence,
|
||||
EBaseParam.Determination,
|
||||
EBaseParam.DirectHit,
|
||||
EBaseParam.Crit,
|
||||
EBaseParam.SpellSpeed
|
||||
};
|
||||
}
|
||||
return Array.Empty<EBaseParam>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue