mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Cleanup] Cleanup logic in cursor bag check (#4642)
* [Cleanup] Cleanup logic in cursor bag check * oops
This commit is contained in:
parent
f1852e16b7
commit
ff2763785c
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user