muffin v7.5.11
This commit is contained in:
parent
addf2d530f
commit
3102923ce2
522 changed files with 41082 additions and 211592 deletions
|
|
@ -50,264 +50,87 @@ public static class InventoryContainers
|
|||
public unsafe static int CountFreeSlots(ReadOnlySpan<InventoryType> containers)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? 422803500 : 422803490);
|
||||
ReadOnlySpan<InventoryType> readOnlySpan = default(ReadOnlySpan<InventoryType>);
|
||||
int num7 = default(int);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
int num9 = default(int);
|
||||
int num11 = default(int);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 422803495;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return 0;
|
||||
}
|
||||
int num = 0;
|
||||
ReadOnlySpan<InventoryType> readOnlySpan = containers;
|
||||
for (int i = 0; i < readOnlySpan.Length; i++)
|
||||
{
|
||||
InventoryType inventoryType = readOnlySpan[i];
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
InventoryType inventoryType = readOnlySpan[num7];
|
||||
inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
num = ((inventoryContainer == null) ? 422803501 : 422803493);
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
case 11:
|
||||
num9 = 0;
|
||||
readOnlySpan = containers;
|
||||
num7 = 0;
|
||||
num = 422803492;
|
||||
break;
|
||||
case 0:
|
||||
num = ((num11 < inventoryContainer->Size) ? 422803491 : 422803501);
|
||||
break;
|
||||
case 10:
|
||||
for (int j = 0; j < inventoryContainer->Size; j++)
|
||||
{
|
||||
int num14 = num7;
|
||||
num3 = 1;
|
||||
num4 = num14;
|
||||
num7 = (num4 | num3) + (num4 & num3);
|
||||
num = 422803492;
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
{
|
||||
int num10 = num11;
|
||||
num3 = 1;
|
||||
num4 = num10;
|
||||
int num12 = num4 ^ num3;
|
||||
int num13 = num4 & num3;
|
||||
num11 = num12 + (num13 + num13);
|
||||
num = 422803495;
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
{
|
||||
int num8 = num9;
|
||||
num3 = 1;
|
||||
num4 = num8;
|
||||
num9 = (num4 | num3) + (num4 & num3);
|
||||
num = 422803488;
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
return 0;
|
||||
case 12:
|
||||
return num9;
|
||||
case 6:
|
||||
num = 422803490;
|
||||
break;
|
||||
case 8:
|
||||
num = ((inventorySlot->ItemId != 0) ? 422803488 : 422803502);
|
||||
break;
|
||||
case 2:
|
||||
num11 = 0;
|
||||
num = 422803495;
|
||||
break;
|
||||
case 4:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num11);
|
||||
num = ((inventorySlot == null) ? 422803502 : 422803503);
|
||||
break;
|
||||
case 3:
|
||||
num = ((num7 < readOnlySpan.Length) ? 422803494 : 422803499);
|
||||
break;
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(j);
|
||||
if (inventorySlot == null || inventorySlot->ItemId == 0)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
public unsafe static int CountItems(uint itemId, ReadOnlySpan<InventoryType> containers)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? 107037197 : 107037193);
|
||||
int num11 = default(int);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
int num7 = default(int);
|
||||
ReadOnlySpan<InventoryType> readOnlySpan = default(ReadOnlySpan<InventoryType>);
|
||||
int num5 = default(int);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 107037196;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return 0;
|
||||
}
|
||||
int num = 0;
|
||||
ReadOnlySpan<InventoryType> readOnlySpan = containers;
|
||||
for (int i = 0; i < readOnlySpan.Length; i++)
|
||||
{
|
||||
InventoryType inventoryType = readOnlySpan[i];
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
case 9:
|
||||
num11 = 0;
|
||||
num = 107037196;
|
||||
break;
|
||||
case 0:
|
||||
num = ((num11 < inventoryContainer->Size) ? 107037190 : 107037191);
|
||||
break;
|
||||
case 1:
|
||||
num7 = 0;
|
||||
readOnlySpan = containers;
|
||||
num5 = 0;
|
||||
num = 107037184;
|
||||
break;
|
||||
case 3:
|
||||
num = ((inventorySlot->ItemId != itemId) ? 107037192 : 107037188);
|
||||
break;
|
||||
case 7:
|
||||
num = 107037193;
|
||||
break;
|
||||
case 8:
|
||||
{
|
||||
int num6 = num7;
|
||||
num3 = inventorySlot->Quantity;
|
||||
num4 = num6;
|
||||
int num8 = num4 ^ num3;
|
||||
int num9 = num4 & num3;
|
||||
num7 = num8 + (num9 + num9);
|
||||
num = 107037192;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
case 5:
|
||||
return 0;
|
||||
case 10:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num11);
|
||||
num = ((inventorySlot == null) ? 107037192 : 107037199);
|
||||
break;
|
||||
case 4:
|
||||
for (int j = 0; j < inventoryContainer->Size; j++)
|
||||
{
|
||||
int num12 = num11;
|
||||
num3 = 1;
|
||||
num4 = num12;
|
||||
int num13 = num4 ^ num3;
|
||||
int num14 = num4 & num3;
|
||||
num11 = num13 + (num14 + num14);
|
||||
num = 107037196;
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
InventoryType inventoryType = readOnlySpan[num5];
|
||||
inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
num = ((inventoryContainer == null) ? 107037191 : 107037189);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
return num7;
|
||||
case 11:
|
||||
{
|
||||
int num10 = num5;
|
||||
num3 = 1;
|
||||
num4 = num10;
|
||||
num5 = (num4 | num3) + (num4 & num3);
|
||||
num = 107037184;
|
||||
break;
|
||||
}
|
||||
case 12:
|
||||
num = ((num5 < readOnlySpan.Length) ? 107037194 : 107037198);
|
||||
break;
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(j);
|
||||
if (inventorySlot != null && inventorySlot->ItemId == itemId)
|
||||
{
|
||||
num += inventorySlot->Quantity;
|
||||
}
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
public unsafe static List<InventoryItem> GetHqItems(ReadOnlySpan<InventoryType> containers)
|
||||
{
|
||||
List<InventoryItem> list = new List<InventoryItem>();
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? (-877452053) : (-877452056));
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
int num5 = default(int);
|
||||
ReadOnlySpan<InventoryType> readOnlySpan = default(ReadOnlySpan<InventoryType>);
|
||||
int num9 = default(int);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -877452054;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return list;
|
||||
}
|
||||
ReadOnlySpan<InventoryType> readOnlySpan = containers;
|
||||
for (int i = 0; i < readOnlySpan.Length; i++)
|
||||
{
|
||||
InventoryType inventoryType = readOnlySpan[i];
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
case 5:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num5);
|
||||
num = ((inventorySlot == null) ? (-877452055) : (-877452050));
|
||||
break;
|
||||
case 2:
|
||||
return list;
|
||||
case 9:
|
||||
num = -877452056;
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
InventoryType inventoryType = readOnlySpan[num9];
|
||||
inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
num = ((inventoryContainer == null) ? (-877452051) : (-877452057));
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
case 7:
|
||||
for (int j = 0; j < inventoryContainer->Size; j++)
|
||||
{
|
||||
int num10 = num9;
|
||||
num3 = 1;
|
||||
num4 = num10;
|
||||
int num11 = num4 ^ num3;
|
||||
int num12 = num4 & num3;
|
||||
num9 = num11 + (num12 + num12);
|
||||
num = -877452064;
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
num = ((num9 < readOnlySpan.Length) ? (-877452054) : (-877452063));
|
||||
break;
|
||||
case 6:
|
||||
num = ((num5 < inventoryContainer->Size) ? (-877452049) : (-877452051));
|
||||
break;
|
||||
case 12:
|
||||
num = (((inventorySlot->Flags & InventoryItem.ItemFlags.HighQuality) == 0) ? (-877452055) : (-877452062));
|
||||
break;
|
||||
case 8:
|
||||
list.Add(*inventorySlot);
|
||||
num = -877452055;
|
||||
break;
|
||||
case 1:
|
||||
readOnlySpan = containers;
|
||||
num9 = 0;
|
||||
num = -877452064;
|
||||
break;
|
||||
case 4:
|
||||
num = ((inventorySlot->ItemId == 0) ? (-877452055) : (-877452058));
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = -877452052;
|
||||
break;
|
||||
}
|
||||
case 11:
|
||||
return list;
|
||||
case 13:
|
||||
num5 = 0;
|
||||
num = -877452052;
|
||||
break;
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(j);
|
||||
if (inventorySlot != null && inventorySlot->ItemId != 0 && (inventorySlot->Flags & InventoryItem.ItemFlags.HighQuality) != InventoryItem.ItemFlags.None)
|
||||
{
|
||||
list.Add(*inventorySlot);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue