mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-30 01:18:17 +00:00
Cleanup
This commit is contained in:
@@ -1095,13 +1095,13 @@ int16 EQ::InventoryProfile::CalcSlotId(int16 bagslot_id, uint8 bagidx)
|
||||
if (bagslot_id == invslot::slotCursor) {
|
||||
slot_id = invbag::CURSOR_BAG_BEGIN + bagidx;
|
||||
} else if (EQ::ValueWithin(bagslot_id, invslot::GENERAL_BEGIN, invslot::GENERAL_END)) {
|
||||
slot_id = invbag::GENERAL_BAGS_BEGIN + (bagslot_id - invbag::GENERAL_BAGS_BEGIN) * invbag::SLOT_COUNT + bagidx;
|
||||
slot_id = invbag::GENERAL_BAGS_BEGIN + (bagslot_id - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT + bagidx;
|
||||
} else if (EQ::ValueWithin(bagslot_id, invslot::BANK_BEGIN, invslot::BANK_END)) {
|
||||
slot_id = invbag::BANK_BAGS_BEGIN + (bagslot_id - invbag::BANK_BAGS_BEGIN) * invbag::SLOT_COUNT + bagidx;
|
||||
slot_id = invbag::BANK_BAGS_BEGIN + (bagslot_id - invslot::BANK_BEGIN) * invbag::SLOT_COUNT + bagidx;
|
||||
} else if (EQ::ValueWithin(bagslot_id, invslot::SHARED_BANK_BEGIN, invslot::SHARED_BANK_END)) {
|
||||
slot_id = invbag::SHARED_BANK_BAGS_BEGIN + (bagslot_id - invbag::SHARED_BANK_BAGS_BEGIN) * invbag::SLOT_COUNT + bagidx;
|
||||
slot_id = invbag::SHARED_BANK_BAGS_BEGIN + (bagslot_id - invslot::SHARED_BANK_BEGIN) * invbag::SLOT_COUNT + bagidx;
|
||||
} else if (EQ::ValueWithin(bagslot_id, invslot::TRADE_BEGIN, invslot::TRADE_END)) {
|
||||
slot_id = invbag::TRADE_BAGS_BEGIN + (bagslot_id - invbag::TRADE_BAGS_BEGIN) * invbag::SLOT_COUNT + bagidx;
|
||||
slot_id = invbag::TRADE_BAGS_BEGIN + (bagslot_id - invslot::TRADE_BEGIN) * invbag::SLOT_COUNT + bagidx;
|
||||
}
|
||||
|
||||
return slot_id;
|
||||
|
||||
+1
-1
@@ -804,7 +804,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, EQ::InventoryProfile* inv)
|
||||
}
|
||||
|
||||
int16 put_slot_id;
|
||||
if (EQ::ValueWithin(slot_id, EQ::invbag::CURSOR_BAG_BEGIN, EQ::invbag::CURSOR_BAG_END) || slot_id == EQ::invslot::slotCursor) {
|
||||
if (EQ::ValueWithin(slot_id, EQ::invbag::CURSOR_BAG_BEGIN, EQ::invbag::CURSOR_BAG_END)) {
|
||||
put_slot_id = inv->PushCursor(*inst);
|
||||
} else {
|
||||
put_slot_id = inv->PutItem(slot_id, *inst);
|
||||
|
||||
Reference in New Issue
Block a user