Browse Source

🔥 Remove now useless 'SpecialAutoPlace' function

pull/1407/head
Juliano Leal Goncalves 5 years ago committed by Anders Jenbo
parent
commit
0b8a35f4b0
  1. 36
      Source/inv.cpp
  2. 1
      Source/inv.h

36
Source/inv.cpp

@ -993,42 +993,6 @@ bool AutoPlaceItemInInventorySlot(int playerNumber, int slotIndex, const ItemStr
return done;
}
BOOL SpecialAutoPlace(int pnum, int ii, const ItemStruct &item)
{
int i, j, xx, yy;
BOOL done;
done = TRUE;
yy = 10 * (ii / 10);
if (yy < 0) {
yy = 0;
}
InvXY itemSize = GetInventorySize(item);
for (j = 0; j < itemSize.Y && done; j++) {
if (yy >= NUM_INV_GRID_ELEM) {
done = FALSE;
}
xx = ii % 10;
if (xx < 0) {
xx = 0;
}
for (i = 0; i < itemSize.X && done; i++) {
if (xx >= 10) {
done = FALSE;
} else {
done = plr[pnum].InvGrid[xx + yy] == 0;
}
xx++;
}
yy += 10;
}
if (!done) {
done = AutoPlaceItemInBelt(pnum, item);
}
return done;
}
BOOL GoldAutoPlace(int pnum)
{

1
Source/inv.h

@ -44,7 +44,6 @@ bool AutoEquipEnabled(const PlayerStruct &player, const ItemStruct &item);
bool AutoEquip(int playerNumber, const ItemStruct &item, bool persistItem = true);
bool AutoPlaceItemInInventorySlot(int playerNumber, int slotIndex, const ItemStruct &item, bool persistItem);
bool AutoPlaceItemInBelt(int playerNumber, const ItemStruct &item, bool persistItem = false);
BOOL SpecialAutoPlace(int pnum, int ii, const ItemStruct &item);
BOOL GoldAutoPlace(int pnum);
void CheckInvSwap(int pnum, BYTE bLoc, int idx, WORD wCI, int seed, BOOL bId, uint32_t dwBuff);
void inv_update_rem_item(int pnum, BYTE iv);

Loading…
Cancel
Save