Activated per-expansion support for active inventory slot addressing

This commit is contained in:
Uleat
2019-01-15 00:50:58 -05:00
parent 182b7e9843
commit 703cbc6727
13 changed files with 209 additions and 45 deletions
+12 -13
View File
@@ -119,19 +119,18 @@ EQEmu::InventoryProfile::~InventoryProfile()
m_trade.clear();
}
bool EQEmu::InventoryProfile::SetInventoryVersion(versions::MobVersion inventory_version) {
if (!m_mob_version_set) {
m_mob_version = versions::ValidateMobVersion(inventory_version);
m_lookup = inventory::StaticLookup(m_mob_version);
m_mob_version_set = true;
return true;
}
else {
m_lookup = inventory::StaticLookup(versions::MobVersion::Unknown);
Log(Logs::General, Logs::Error, "InventoryVersion set request after initial set (old: %u, new: %u)",
static_cast<uint32>(m_mob_version), static_cast<uint32>(inventory_version));
return false;
}
void EQEmu::InventoryProfile::SetInventoryVersion(versions::MobVersion inventory_version) {
m_mob_version = versions::ValidateMobVersion(inventory_version);
SetGMInventory(m_gm_inventory);
}
void EQEmu::InventoryProfile::SetGMInventory(bool gmi_flag) {
m_gm_inventory = gmi_flag;
if (m_gm_inventory)
m_lookup = inventory::DynamicGMLookup(m_mob_version);
else
m_lookup = inventory::DynamicLookup(m_mob_version);
}
void EQEmu::InventoryProfile::CleanDirty() {