Delinked current inventory slot enumeration and constants from EQEmu::constants and global definition

This commit is contained in:
Uleat
2016-04-22 07:34:55 -04:00
parent b3475d7b50
commit 1890d006a2
65 changed files with 1835 additions and 1849 deletions
+7 -7
View File
@@ -708,7 +708,7 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
/* Insert starting inventory... */
std::string invquery;
for (int16 i = EQEmu::constants::EQUIPMENT_BEGIN; i <= EQEmu::constants::BANK_BAGS_END;) {
for (int16 i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::BANK_BAGS_END;) {
const ItemInst* newinv = inv->GetItem(i);
if (newinv) {
invquery = StringFormat("INSERT INTO `inventory` (charid, slotid, itemid, charges, color) VALUES (%u, %i, %u, %i, %u)",
@@ -717,16 +717,16 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
auto results = QueryDatabase(invquery);
}
if (i == SlotCursor) {
i = EQEmu::constants::GENERAL_BAGS_BEGIN;
if (i == EQEmu::legacy::SlotCursor) {
i = EQEmu::legacy::GENERAL_BAGS_BEGIN;
continue;
}
else if (i == EQEmu::constants::CURSOR_BAG_END) {
i = EQEmu::constants::BANK_BEGIN;
else if (i == EQEmu::legacy::CURSOR_BAG_END) {
i = EQEmu::legacy::BANK_BEGIN;
continue;
}
else if (i == EQEmu::constants::BANK_END) {
i = EQEmu::constants::BANK_BAGS_BEGIN;
else if (i == EQEmu::legacy::BANK_END) {
i = EQEmu::legacy::BANK_BAGS_BEGIN;
continue;
}
i++;