[Cleanup] Cleanup logic in cursor bag check (#4642)

* [Cleanup] Cleanup logic in cursor bag check

* oops
This commit is contained in:
nytmyr 2025-02-04 16:16:34 -06:00 committed by GitHub
parent f1852e16b7
commit ff2763785c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -210,22 +210,18 @@ bool SharedDatabase::SaveCursor(
)
);
int16 i = EQ::invslot::slotCursor;
int16 i = EQ::invbag::CURSOR_BAG_BEGIN;
for (auto& it = start; it != end; ++it, i++) {
// shouldn't be anything in the queue that indexes this high
if (i > EQ::invbag::CURSOR_BAG_END) {
break;
}
const EQ::ItemInstance* inst = *it;
const int16 use_slot = i == EQ::invslot::slotCursor ? EQ::invslot::slotCursor : i;
const EQ::ItemInstance* inst = *it;
const int16 use_slot = i == EQ::invbag::CURSOR_BAG_BEGIN ? EQ::invslot::slotCursor : i;
if (!SaveInventory(char_id, inst, use_slot)) {
return false;
}
if (i == EQ::invslot::slotCursor) {
i = EQ::invbag::CURSOR_BAG_BEGIN;
}
}
return true;