mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18: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,7 +210,7 @@ bool SharedDatabase::SaveCursor(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
int16 i = EQ::invslot::slotCursor;
|
int16 i = EQ::invbag::CURSOR_BAG_BEGIN;
|
||||||
for (auto& it = start; it != end; ++it, i++) {
|
for (auto& it = start; it != end; ++it, i++) {
|
||||||
// shouldn't be anything in the queue that indexes this high
|
// shouldn't be anything in the queue that indexes this high
|
||||||
if (i > EQ::invbag::CURSOR_BAG_END) {
|
if (i > EQ::invbag::CURSOR_BAG_END) {
|
||||||
@ -218,14 +218,10 @@ bool SharedDatabase::SaveCursor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const EQ::ItemInstance* inst = *it;
|
const EQ::ItemInstance* inst = *it;
|
||||||
const int16 use_slot = i == EQ::invslot::slotCursor ? EQ::invslot::slotCursor : i;
|
const int16 use_slot = i == EQ::invbag::CURSOR_BAG_BEGIN ? EQ::invslot::slotCursor : i;
|
||||||
if (!SaveInventory(char_id, inst, use_slot)) {
|
if (!SaveInventory(char_id, inst, use_slot)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == EQ::invslot::slotCursor) {
|
|
||||||
i = EQ::invbag::CURSOR_BAG_BEGIN;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user