mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-13 10:58:20 +00:00
Skill caps load with new smem scheme
This commit is contained in:
@@ -27,11 +27,10 @@
|
||||
void LoadSpells(SharedDatabase *database) {
|
||||
EQEmu::IPCMutex mutex("spells");
|
||||
mutex.Lock();
|
||||
int records = database->GetMaxSpellID();
|
||||
if(records == -1) {
|
||||
EQ_EXCEPT("Shared Memory", "Unable to get maximum number of spells from the database.");
|
||||
int records = database->GetMaxSpellID() + 1;
|
||||
if(records == 0) {
|
||||
EQ_EXCEPT("Shared Memory", "Unable to get any spells from the database.");
|
||||
}
|
||||
++records;
|
||||
|
||||
uint32 size = records * sizeof(SPDat_Spell_Struct);
|
||||
EQEmu::MemoryMappedFile mmf("shared/spells", size);
|
||||
|
||||
Reference in New Issue
Block a user