mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 12:18:27 +00:00
Updated EQDictionary entries to allow ease of reading and gui tooltip propagation
This commit is contained in:
@@ -241,12 +241,12 @@ int16 EQEmu::InventoryProfile::PutItem(int16 slot_id, const ItemInstance& inst)
|
||||
return EQEmu::invslot::SLOT_INVALID;
|
||||
}
|
||||
else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) {
|
||||
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank])
|
||||
if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize.Bank)
|
||||
return EQEmu::invslot::SLOT_INVALID;
|
||||
}
|
||||
else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||
auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
||||
if (temp_slot >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank])
|
||||
if (temp_slot >= m_lookup->InventoryTypeSize.Bank)
|
||||
return EQEmu::invslot::SLOT_INVALID;
|
||||
}
|
||||
|
||||
@@ -298,14 +298,14 @@ bool EQEmu::InventoryProfile::SwapItem(
|
||||
}
|
||||
}
|
||||
else if (source_slot <= EQEmu::invslot::BANK_END && source_slot >= EQEmu::invslot::BANK_BEGIN) {
|
||||
if ((source_slot - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) {
|
||||
if ((source_slot - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize.Bank) {
|
||||
fail_state = swapNotAllowed;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (source_slot <= EQEmu::invbag::BANK_BAGS_END && source_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||
auto temp_slot = (source_slot - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
||||
if (temp_slot >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) {
|
||||
if (temp_slot >= m_lookup->InventoryTypeSize.Bank) {
|
||||
fail_state = swapNotAllowed;
|
||||
return false;
|
||||
}
|
||||
@@ -325,14 +325,14 @@ bool EQEmu::InventoryProfile::SwapItem(
|
||||
}
|
||||
}
|
||||
else if (destination_slot <= EQEmu::invslot::BANK_END && destination_slot >= EQEmu::invslot::BANK_BEGIN) {
|
||||
if ((destination_slot - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) {
|
||||
if ((destination_slot - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize.Bank) {
|
||||
fail_state = swapNotAllowed;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (destination_slot <= EQEmu::invbag::BANK_BAGS_END && destination_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) {
|
||||
auto temp_slot = (destination_slot - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT;
|
||||
if (temp_slot >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) {
|
||||
if (temp_slot >= m_lookup->InventoryTypeSize.Bank) {
|
||||
fail_state = swapNotAllowed;
|
||||
return false;
|
||||
}
|
||||
@@ -1308,7 +1308,7 @@ EQEmu::ItemInstance* EQEmu::InventoryProfile::_GetItem(const std::map<int16, Ite
|
||||
return nullptr;
|
||||
}
|
||||
else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) {
|
||||
if (slot_id - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank])
|
||||
if (slot_id - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize.Bank)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -1360,7 +1360,7 @@ int16 EQEmu::InventoryProfile::_PutItem(int16 slot_id, ItemInstance* inst)
|
||||
result = slot_id;
|
||||
}
|
||||
else if (slot_id >= invslot::BANK_BEGIN && slot_id <= invslot::BANK_END) {
|
||||
if (slot_id - EQEmu::invslot::BANK_BEGIN < m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) {
|
||||
if (slot_id - EQEmu::invslot::BANK_BEGIN < m_lookup->InventoryTypeSize.Bank) {
|
||||
m_bank[slot_id] = inst;
|
||||
result = slot_id;
|
||||
}
|
||||
@@ -1403,7 +1403,7 @@ int16 EQEmu::InventoryProfile::_HasItem(std::map<int16, ItemInstance*>& bucket,
|
||||
continue;
|
||||
}
|
||||
else if (iter->first <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) {
|
||||
if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank])
|
||||
if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize.Bank)
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1505,7 +1505,7 @@ int16 EQEmu::InventoryProfile::_HasItemByUse(std::map<int16, ItemInstance*>& buc
|
||||
continue;
|
||||
}
|
||||
else if (iter->first <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) {
|
||||
if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank])
|
||||
if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize.Bank)
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1578,7 +1578,7 @@ int16 EQEmu::InventoryProfile::_HasItemByLoreGroup(std::map<int16, ItemInstance*
|
||||
continue;
|
||||
}
|
||||
else if (iter->first <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) {
|
||||
if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank])
|
||||
if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize.Bank)
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user