mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 07:21:48 +00:00
shareddb.cpp & .h header include cleanup
This commit is contained in:
parent
62d8fb538b
commit
689f95b430
@ -3,22 +3,20 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
#include "shareddb.h"
|
|
||||||
#include "mysql.h"
|
|
||||||
#include "item.h"
|
|
||||||
#include "classes.h"
|
#include "classes.h"
|
||||||
#include "rulesys.h"
|
|
||||||
#include "seperator.h"
|
|
||||||
#include "string_util.h"
|
|
||||||
#include "eq_packet_structs.h"
|
#include "eq_packet_structs.h"
|
||||||
#include "guilds.h"
|
|
||||||
#include "extprofile.h"
|
|
||||||
#include "memory_mapped_file.h"
|
|
||||||
#include "ipc_mutex.h"
|
|
||||||
#include "eqemu_exception.h"
|
#include "eqemu_exception.h"
|
||||||
#include "loottable.h"
|
|
||||||
#include "faction.h"
|
#include "faction.h"
|
||||||
#include "features.h"
|
#include "features.h"
|
||||||
|
#include "guilds.h"
|
||||||
|
#include "ipc_mutex.h"
|
||||||
|
#include "item.h"
|
||||||
|
#include "loottable.h"
|
||||||
|
#include "memory_mapped_file.h"
|
||||||
|
#include "mysql.h"
|
||||||
|
#include "rulesys.h"
|
||||||
|
#include "shareddb.h"
|
||||||
|
#include "string_util.h"
|
||||||
|
|
||||||
SharedDatabase::SharedDatabase()
|
SharedDatabase::SharedDatabase()
|
||||||
: Database(), skill_caps_mmf(nullptr), items_mmf(nullptr), items_hash(nullptr), faction_mmf(nullptr), faction_hash(nullptr),
|
: Database(), skill_caps_mmf(nullptr), items_mmf(nullptr), items_hash(nullptr), faction_mmf(nullptr), faction_hash(nullptr),
|
||||||
|
|||||||
@ -6,36 +6,42 @@
|
|||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "skills.h"
|
#include "skills.h"
|
||||||
#include "spdat.h"
|
#include "spdat.h"
|
||||||
#include "item.h"
|
|
||||||
#include "base_data.h"
|
#include "base_data.h"
|
||||||
#include "fixed_memory_hash_set.h"
|
#include "fixed_memory_hash_set.h"
|
||||||
#include "fixed_memory_variable_hash_set.h"
|
#include "fixed_memory_variable_hash_set.h"
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
|
class EvolveInfo;
|
||||||
|
class Inventory;
|
||||||
|
class ItemInst;
|
||||||
|
struct BaseDataStruct;
|
||||||
|
struct InspectMessage_Struct;
|
||||||
|
struct PlayerProfile_Struct;
|
||||||
|
struct SPDat_Spell_Struct;
|
||||||
struct Item_Struct;
|
struct Item_Struct;
|
||||||
struct NPCFactionList;
|
struct NPCFactionList;
|
||||||
struct Faction;
|
|
||||||
struct LootTable_Struct;
|
struct LootTable_Struct;
|
||||||
struct LootDrop_Struct;
|
struct LootDrop_Struct;
|
||||||
namespace EQEmu {
|
namespace EQEmu
|
||||||
|
{
|
||||||
class MemoryMappedFile;
|
class MemoryMappedFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This object is inherited by world and zone's DB object,
|
This object is inherited by world and zone's DB object,
|
||||||
* and is mainly here to facilitate shared memory, and other
|
and is mainly here to facilitate shared memory, and other
|
||||||
* things which only world and zone need.
|
things which only world and zone need.
|
||||||
*/
|
*/
|
||||||
class SharedDatabase : public Database {
|
class SharedDatabase : public Database
|
||||||
public:
|
{
|
||||||
|
public:
|
||||||
SharedDatabase();
|
SharedDatabase();
|
||||||
SharedDatabase(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
|
SharedDatabase(const char* host, const char* user, const char* passwd, const char* database, uint32 port);
|
||||||
virtual ~SharedDatabase();
|
virtual ~SharedDatabase();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* General Character Related Stuff
|
General Character Related Stuff
|
||||||
*/
|
*/
|
||||||
bool SetGMSpeed(uint32 account_id, uint8 gmspeed);
|
bool SetGMSpeed(uint32 account_id, uint8 gmspeed);
|
||||||
uint8 GetGMSpeed(uint32 account_id);
|
uint8 GetGMSpeed(uint32 account_id);
|
||||||
@ -45,11 +51,11 @@ public:
|
|||||||
void SaveCharacterInspectMessage(uint32 character_id, const InspectMessage_Struct* message);
|
void SaveCharacterInspectMessage(uint32 character_id, const InspectMessage_Struct* message);
|
||||||
void GetBotInspectMessage(uint32 botid, InspectMessage_Struct* message);
|
void GetBotInspectMessage(uint32 botid, InspectMessage_Struct* message);
|
||||||
void SetBotInspectMessage(uint32 botid, const InspectMessage_Struct* message);
|
void SetBotInspectMessage(uint32 botid, const InspectMessage_Struct* message);
|
||||||
bool GetCommandSettings(std::map<std::string,uint8> &commands);
|
bool GetCommandSettings(std::map<std::string, uint8> &commands);
|
||||||
uint32 GetTotalTimeEntitledOnAccount(uint32 AccountID);
|
uint32 GetTotalTimeEntitledOnAccount(uint32 AccountID);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Character Inventory
|
Character Inventory
|
||||||
*/
|
*/
|
||||||
bool SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iterator &start, std::list<ItemInst*>::const_iterator &end);
|
bool SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iterator &start, std::list<ItemInst*>::const_iterator &end);
|
||||||
bool SaveInventory(uint32 char_id, const ItemInst* inst, int16 slot_id);
|
bool SaveInventory(uint32 char_id, const ItemInst* inst, int16 slot_id);
|
||||||
@ -69,14 +75,14 @@ public:
|
|||||||
std::string GetBook(const char *txtfile);
|
std::string GetBook(const char *txtfile);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Item Methods
|
Item Methods
|
||||||
*/
|
*/
|
||||||
ItemInst* CreateItem(uint32 item_id, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
ItemInst* CreateItem(uint32 item_id, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
||||||
ItemInst* CreateItem(const Item_Struct* item, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
ItemInst* CreateItem(const Item_Struct* item, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
||||||
ItemInst* CreateBaseItem(const Item_Struct* item, int16 charges=0);
|
ItemInst* CreateBaseItem(const Item_Struct* item, int16 charges = 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Shared Memory crap
|
Shared Memory crap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//items
|
//items
|
||||||
@ -116,7 +122,7 @@ public:
|
|||||||
void LoadBaseData(void *data, int max_level);
|
void LoadBaseData(void *data, int max_level);
|
||||||
const BaseDataStruct* GetBaseData(int lvl, int cl);
|
const BaseDataStruct* GetBaseData(int lvl, int cl);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
EQEmu::MemoryMappedFile *skill_caps_mmf;
|
EQEmu::MemoryMappedFile *skill_caps_mmf;
|
||||||
EQEmu::MemoryMappedFile *items_mmf;
|
EQEmu::MemoryMappedFile *items_mmf;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user