mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Hotfix] Shared Memory Protection Fixes
This commit is contained in:
+11
-5
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user