mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +00:00
[Hotfix] Shared Memory Protection Fixes
This commit is contained in:
parent
5331f4d841
commit
4002d6a083
@ -932,8 +932,6 @@ bool SharedDatabase::LoadItems(const std::string &prefix) {
|
||||
return false;
|
||||
}
|
||||
|
||||
m_shared_items_count = GetItemsCount();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1784,8 +1782,6 @@ bool SharedDatabase::LoadSpells(const std::string &prefix, int32 *records, const
|
||||
LogError("Error Loading Spells: {}", ex.what());
|
||||
return false;
|
||||
}
|
||||
|
||||
m_shared_spells_count = GetSpellsCount();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -2403,4 +2399,14 @@ uint32 SharedDatabase::GetItemsCount()
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void SharedDatabase::SetSharedItemsCount(uint32 shared_items_count)
|
||||
{
|
||||
SharedDatabase::m_shared_items_count = shared_items_count;
|
||||
}
|
||||
|
||||
void SharedDatabase::SetSharedSpellsCount(uint32 shared_spells_count)
|
||||
{
|
||||
SharedDatabase::m_shared_spells_count = shared_spells_count;
|
||||
}
|
||||
|
||||
@ -217,6 +217,10 @@ protected:
|
||||
std::unique_ptr<EQ::MemoryMappedFile> base_data_mmf;
|
||||
std::unique_ptr<EQ::MemoryMappedFile> spells_mmf;
|
||||
|
||||
public:
|
||||
void SetSharedItemsCount(uint32 shared_items_count);
|
||||
void SetSharedSpellsCount(uint32 shared_spells_count);
|
||||
protected:
|
||||
uint32 m_shared_items_count = 0;
|
||||
uint32 m_shared_spells_count = 0;
|
||||
};
|
||||
|
||||
@ -333,6 +333,10 @@ int main(int argc, char** argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// load these here for now until spells and items can be truly repointed to "content_db"
|
||||
database.SetSharedItemsCount(content_db.GetItemsCount());
|
||||
database.SetSharedSpellsCount(content_db.GetSpellsCount());
|
||||
|
||||
LogInfo("Loading base data");
|
||||
if (!database.LoadBaseData(hotfix_name)) {
|
||||
LogError("Loading base data failed!");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user