mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include "../common/eqemu_exception.h"
|
||||
|
||||
void LoadBaseData(SharedDatabase *database, const std::string &prefix) {
|
||||
EQEmu::IPCMutex mutex("base_data");
|
||||
EQ::IPCMutex mutex("base_data");
|
||||
mutex.Lock();
|
||||
int records = (database->GetMaxBaseDataLevel() + 1);
|
||||
if(records == 0) {
|
||||
@@ -35,7 +35,7 @@ void LoadBaseData(SharedDatabase *database, const std::string &prefix) {
|
||||
|
||||
auto Config = EQEmuConfig::get();
|
||||
std::string file_name = Config->SharedMemDir + prefix + std::string("base_data");
|
||||
EQEmu::MemoryMappedFile mmf(file_name, size);
|
||||
EQ::MemoryMappedFile mmf(file_name, size);
|
||||
mmf.ZeroFile();
|
||||
|
||||
void *ptr = mmf.Get();
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "../common/item_data.h"
|
||||
|
||||
void LoadItems(SharedDatabase *database, const std::string &prefix) {
|
||||
EQEmu::IPCMutex mutex("items");
|
||||
EQ::IPCMutex mutex("items");
|
||||
mutex.Lock();
|
||||
|
||||
int32 items = -1;
|
||||
@@ -35,11 +35,11 @@ void LoadItems(SharedDatabase *database, const std::string &prefix) {
|
||||
EQ_EXCEPT("Shared Memory", "Unable to get any items from the database.");
|
||||
}
|
||||
|
||||
uint32 size = static_cast<uint32>(EQEmu::FixedMemoryHashSet<EQEmu::ItemData>::estimated_size(items, max_item));
|
||||
uint32 size = static_cast<uint32>(EQ::FixedMemoryHashSet<EQ::ItemData>::estimated_size(items, max_item));
|
||||
|
||||
auto Config = EQEmuConfig::get();
|
||||
std::string file_name = Config->SharedMemDir + prefix + std::string("items");
|
||||
EQEmu::MemoryMappedFile mmf(file_name, size);
|
||||
EQ::MemoryMappedFile mmf(file_name, size);
|
||||
mmf.ZeroFile();
|
||||
|
||||
void *ptr = mmf.Get();
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "../common/loottable.h"
|
||||
|
||||
void LoadLoot(SharedDatabase *database, const std::string &prefix) {
|
||||
EQEmu::IPCMutex mutex("loot");
|
||||
EQ::IPCMutex mutex("loot");
|
||||
mutex.Lock();
|
||||
|
||||
uint32 loot_table_count, loot_table_max, loot_table_entries_count;
|
||||
@@ -48,15 +48,15 @@ void LoadLoot(SharedDatabase *database, const std::string &prefix) {
|
||||
std::string file_name_lt = Config->SharedMemDir + prefix + std::string("loot_table");
|
||||
std::string file_name_ld = Config->SharedMemDir + prefix + std::string("loot_drop");
|
||||
|
||||
EQEmu::MemoryMappedFile mmf_loot_table(file_name_lt, loot_table_size);
|
||||
EQEmu::MemoryMappedFile mmf_loot_drop(file_name_ld, loot_drop_size);
|
||||
EQ::MemoryMappedFile mmf_loot_table(file_name_lt, loot_table_size);
|
||||
EQ::MemoryMappedFile mmf_loot_drop(file_name_ld, loot_drop_size);
|
||||
mmf_loot_table.ZeroFile();
|
||||
mmf_loot_drop.ZeroFile();
|
||||
|
||||
EQEmu::FixedMemoryVariableHashSet<LootTable_Struct> loot_table_hash(reinterpret_cast<byte*>(mmf_loot_table.Get()),
|
||||
EQ::FixedMemoryVariableHashSet<LootTable_Struct> loot_table_hash(reinterpret_cast<byte*>(mmf_loot_table.Get()),
|
||||
loot_table_size, loot_table_max);
|
||||
|
||||
EQEmu::FixedMemoryVariableHashSet<LootDrop_Struct> loot_drop_hash(reinterpret_cast<byte*>(mmf_loot_drop.Get()),
|
||||
EQ::FixedMemoryVariableHashSet<LootDrop_Struct> loot_drop_hash(reinterpret_cast<byte*>(mmf_loot_drop.Get()),
|
||||
loot_drop_size, loot_drop_max);
|
||||
|
||||
database->LoadLootTables(mmf_loot_table.Get(), loot_table_max);
|
||||
|
||||
@@ -25,18 +25,18 @@
|
||||
#include "../common/faction.h"
|
||||
|
||||
void LoadFactions(SharedDatabase *database, const std::string &prefix) {
|
||||
EQEmu::IPCMutex mutex("faction");
|
||||
EQ::IPCMutex mutex("faction");
|
||||
mutex.Lock();
|
||||
|
||||
uint32 lists = 0;
|
||||
uint32 max_list = 0;
|
||||
database->GetFactionListInfo(lists, max_list);
|
||||
|
||||
uint32 size = static_cast<uint32>(EQEmu::FixedMemoryHashSet<NPCFactionList>::estimated_size(lists, max_list));
|
||||
uint32 size = static_cast<uint32>(EQ::FixedMemoryHashSet<NPCFactionList>::estimated_size(lists, max_list));
|
||||
|
||||
auto Config = EQEmuConfig::get();
|
||||
std::string file_name = Config->SharedMemDir + prefix + std::string("faction");
|
||||
EQEmu::MemoryMappedFile mmf(file_name, size);
|
||||
EQ::MemoryMappedFile mmf(file_name, size);
|
||||
mmf.ZeroFile();
|
||||
|
||||
void *ptr = mmf.Get();
|
||||
|
||||
@@ -26,17 +26,17 @@
|
||||
#include "../common/features.h"
|
||||
|
||||
void LoadSkillCaps(SharedDatabase *database, const std::string &prefix) {
|
||||
EQEmu::IPCMutex mutex("skill_caps");
|
||||
EQ::IPCMutex mutex("skill_caps");
|
||||
mutex.Lock();
|
||||
|
||||
uint32 class_count = PLAYER_CLASS_COUNT;
|
||||
uint32 skill_count = EQEmu::skills::HIGHEST_SKILL + 1;
|
||||
uint32 skill_count = EQ::skills::HIGHEST_SKILL + 1;
|
||||
uint32 level_count = HARD_LEVEL_CAP + 1;
|
||||
uint32 size = (class_count * skill_count * level_count * sizeof(uint16));
|
||||
|
||||
auto Config = EQEmuConfig::get();
|
||||
std::string file_name = Config->SharedMemDir + prefix + std::string("skill_caps");
|
||||
EQEmu::MemoryMappedFile mmf(file_name, size);
|
||||
EQ::MemoryMappedFile mmf(file_name, size);
|
||||
mmf.ZeroFile();
|
||||
|
||||
void *ptr = mmf.Get();
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "../common/spdat.h"
|
||||
|
||||
void LoadSpells(SharedDatabase *database, const std::string &prefix) {
|
||||
EQEmu::IPCMutex mutex("spells");
|
||||
EQ::IPCMutex mutex("spells");
|
||||
mutex.Lock();
|
||||
int records = database->GetMaxSpellID() + 1;
|
||||
if(records == 0) {
|
||||
@@ -36,7 +36,7 @@ void LoadSpells(SharedDatabase *database, const std::string &prefix) {
|
||||
|
||||
auto Config = EQEmuConfig::get();
|
||||
std::string file_name = Config->SharedMemDir + prefix + std::string("spells");
|
||||
EQEmu::MemoryMappedFile mmf(file_name, size);
|
||||
EQ::MemoryMappedFile mmf(file_name, size);
|
||||
mmf.ZeroFile();
|
||||
|
||||
void *ptr = mmf.Get();
|
||||
|
||||
Reference in New Issue
Block a user