mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +00:00
More shared memory work + moved spdat from zone to common
This commit is contained in:
parent
78b2385785
commit
7ce6f4de0d
@ -2,7 +2,7 @@
|
|||||||
#define MEMSHARE_SPELLS_H
|
#define MEMSHARE_SPELLS_H
|
||||||
|
|
||||||
#include "../common/types.h"
|
#include "../common/types.h"
|
||||||
#include "../zone/spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "../common/EMuShareMem.h"
|
#include "../common/EMuShareMem.h"
|
||||||
|
|
||||||
struct MMFSpells_Struct {
|
struct MMFSpells_Struct {
|
||||||
|
|||||||
@ -55,6 +55,7 @@ SET(common_sources
|
|||||||
serverinfo.cpp
|
serverinfo.cpp
|
||||||
shareddb.cpp
|
shareddb.cpp
|
||||||
SharedLibrary.cpp
|
SharedLibrary.cpp
|
||||||
|
spdat.cpp
|
||||||
StructStrategy.cpp
|
StructStrategy.cpp
|
||||||
TCPConnection.cpp
|
TCPConnection.cpp
|
||||||
TCPServer.cpp
|
TCPServer.cpp
|
||||||
@ -168,6 +169,7 @@ SET(common_headers
|
|||||||
shareddb.h
|
shareddb.h
|
||||||
SharedLibrary.h
|
SharedLibrary.h
|
||||||
skills.h
|
skills.h
|
||||||
|
spdat.h
|
||||||
StructStrategy.h
|
StructStrategy.h
|
||||||
TCPBasicServer.h
|
TCPBasicServer.h
|
||||||
TCPConnection.h
|
TCPConnection.h
|
||||||
|
|||||||
@ -107,10 +107,6 @@ public:
|
|||||||
bool Connect(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
|
bool Connect(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
|
||||||
~Database();
|
~Database();
|
||||||
|
|
||||||
|
|
||||||
// void ExtraOptions();
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* General Character Related Stuff
|
* General Character Related Stuff
|
||||||
*/
|
*/
|
||||||
@ -256,7 +252,6 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void HandleMysqlError(uint32 errnum);
|
void HandleMysqlError(uint32 errnum);
|
||||||
//bool RunQuery(const char* query, uint32 querylen, char* errbuf = 0, MYSQL_RES** result = 0, uint32* affected_rows = 0, uint32* errnum = 0, bool retry = true);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void DBInitVars();
|
void DBInitVars();
|
||||||
|
|||||||
@ -100,6 +100,8 @@ bool EQEMuLog::open(LogIDs id) {
|
|||||||
snprintf(exename, sizeof(exename), "_ucs");
|
snprintf(exename, sizeof(exename), "_ucs");
|
||||||
} else if(platform == ExePlatformQueryServ) {
|
} else if(platform == ExePlatformQueryServ) {
|
||||||
snprintf(exename, sizeof(exename), "_queryserv");
|
snprintf(exename, sizeof(exename), "_queryserv");
|
||||||
|
} else if(platform == ExePlatformSharedMemory) {
|
||||||
|
snprintf(exename, sizeof(exename), "_shared_memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
char filename[200];
|
char filename[200];
|
||||||
|
|||||||
@ -10,6 +10,7 @@ enum EQEmuExePlatform
|
|||||||
ExePlatformQueryServ,
|
ExePlatformQueryServ,
|
||||||
ExePlatformUCS,
|
ExePlatformUCS,
|
||||||
ExePlatformLaunch,
|
ExePlatformLaunch,
|
||||||
|
ExePlatformSharedMemory
|
||||||
};
|
};
|
||||||
|
|
||||||
void RegisterExecutablePlatform(EQEmuExePlatform p);
|
void RegisterExecutablePlatform(EQEmuExePlatform p);
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "skills.h"
|
#include "skills.h"
|
||||||
#include "../zone/spdat.h"
|
#include "spdat.h"
|
||||||
#include "Item.h"
|
#include "Item.h"
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
@ -82,8 +82,6 @@ public:
|
|||||||
const NPCFactionList* GetNPCFactionEntry(uint32 id);
|
const NPCFactionList* GetNPCFactionEntry(uint32 id);
|
||||||
uint16 GetSkillCap(uint8 Class_, SkillType Skill, uint8 Level);
|
uint16 GetSkillCap(uint8 Class_, SkillType Skill, uint8 Level);
|
||||||
uint8 GetTrainLevel(uint8 Class_, SkillType Skill, uint8 Level);
|
uint8 GetTrainLevel(uint8 Class_, SkillType Skill, uint8 Level);
|
||||||
// const Door* GetDoor(uint8 door_id, const char* zone_name);
|
|
||||||
// const Door* GetDoorDBID(uint32 db_id);
|
|
||||||
const LootTable_Struct* GetLootTable(uint32 loottable_id);
|
const LootTable_Struct* GetLootTable(uint32 loottable_id);
|
||||||
const LootDrop_Struct* GetLootDrop(uint32 lootdrop_id);
|
const LootDrop_Struct* GetLootDrop(uint32 lootdrop_id);
|
||||||
bool LoadItems();
|
bool LoadItems();
|
||||||
|
|||||||
@ -72,20 +72,18 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "../common/debug.h"
|
#include "debug.h"
|
||||||
#include "spdat.h"
|
#include "spdat.h"
|
||||||
#include "masterentity.h"
|
#include "packet_dump.h"
|
||||||
#include "../common/packet_dump.h"
|
#include "moremath.h"
|
||||||
#include "../common/moremath.h"
|
#include "Item.h"
|
||||||
#include "../common/Item.h"
|
#include "skills.h"
|
||||||
#include "worldserver.h"
|
#include "bodytypes.h"
|
||||||
#include "../common/skills.h"
|
#include "classes.h"
|
||||||
#include "../common/bodytypes.h"
|
|
||||||
#include "../common/classes.h"
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "../common/unix.h"
|
#include "unix.h"
|
||||||
#endif
|
#endif
|
||||||
extern bool spells_loaded;
|
extern bool spells_loaded;
|
||||||
|
|
||||||
@ -17,10 +17,53 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include "../common/debug.h"
|
||||||
|
#include "../common/shareddb.h"
|
||||||
|
#include "../common/EQEmuConfig.h"
|
||||||
|
#include "../common/platform.h"
|
||||||
|
#include "../common/crash.h"
|
||||||
|
#include "../common/rulesys.h"
|
||||||
|
#include "../common/eqemu_exception.h"
|
||||||
#include "spells.h"
|
#include "spells.h"
|
||||||
|
|
||||||
|
//blah global variables =(
|
||||||
|
RuleManager *rules = new RuleManager();
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
RegisterExecutablePlatform(ExePlatformSharedMemory);
|
||||||
|
set_exception_handler();
|
||||||
|
|
||||||
|
LogFile->write(EQEMuLog::Status, "Shared Memory Loader Program");
|
||||||
|
if(!EQEmuConfig::LoadConfig()) {
|
||||||
|
LogFile->write(EQEMuLog::Error, "Unable to load configuration file.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const EQEmuConfig *config = EQEmuConfig::get();
|
||||||
|
if(!load_log_settings(config->LogSettingsFile.c_str())) {
|
||||||
|
LogFile->write(EQEMuLog::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
SharedDatabase database;
|
||||||
|
LogFile->write(EQEMuLog::Status, "Connecting to database...");
|
||||||
|
if(!database.Connect(config->DatabaseHost.c_str(), config->DatabaseUsername.c_str(),
|
||||||
|
config->DatabasePassword.c_str(), config->DatabaseDB.c_str(), config->DatabasePort)) {
|
||||||
|
LogFile->write(EQEMuLog::Error, "Unable to connect to the database, cannot continue without a "
|
||||||
|
"database connection");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool load_all = true;
|
||||||
bool load_spells = true;
|
bool load_spells = true;
|
||||||
|
if(load_all || load_spells) {
|
||||||
|
LogFile->write(EQEMuLog::Status, "Loading spells...");
|
||||||
|
try {
|
||||||
|
LoadSpells(&database);
|
||||||
|
} catch(std::exception &ex) {
|
||||||
|
LogFile->write(EQEMuLog::Error, "%s", ex.what());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -15,3 +15,28 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
#include "spells.h"
|
||||||
|
#include "../common/debug.h"
|
||||||
|
#include "../common/shareddb.h"
|
||||||
|
#include "../common/ipc_mutex.h"
|
||||||
|
#include "../common/memory_mapped_file.h"
|
||||||
|
#include "../common/eqemu_exception.h"
|
||||||
|
#include "../common/spdat.h"
|
||||||
|
|
||||||
|
void LoadSpells(SharedDatabase *database) {
|
||||||
|
EQEmu::IPCMutex mutex("spells");
|
||||||
|
mutex.Lock();
|
||||||
|
int max_spells = 0; //database->GetMaxSpellID();
|
||||||
|
if(max_spells == -1) {
|
||||||
|
EQ_EXCEPT("Shared Memory", "Unable to get maximum number of spells from the database.");
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 size = max_spells * sizeof(SPDat_Spell_Struct);
|
||||||
|
EQEmu::MemoryMappedFile mmf("shared/spells", size);
|
||||||
|
|
||||||
|
void *ptr = mmf.Get();
|
||||||
|
//database->LoadSpells(ptr, max_spells);
|
||||||
|
|
||||||
|
//Mutex will unlock on destruction because it's RAII but still.
|
||||||
|
mutex.Unlock();
|
||||||
|
}
|
||||||
@ -15,3 +15,11 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __EQEMU_SHARED_MEMORY_SPELLS_H
|
||||||
|
#define __EQEMU_SHARED_MEMORY_SPELLS_H
|
||||||
|
|
||||||
|
class SharedDatabase;
|
||||||
|
void LoadSpells(SharedDatabase *database);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@ -24,7 +24,7 @@ Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
|
|||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "groups.h"
|
#include "groups.h"
|
||||||
#include "raids.h"
|
#include "raids.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "object.h"
|
#include "object.h"
|
||||||
#include "doors.h"
|
#include "doors.h"
|
||||||
#include "beacon.h"
|
#include "beacon.h"
|
||||||
|
|||||||
@ -65,7 +65,6 @@ SET(zone_sources
|
|||||||
spawn2.cpp
|
spawn2.cpp
|
||||||
spawn2.h
|
spawn2.h
|
||||||
spawngroup.cpp
|
spawngroup.cpp
|
||||||
spdat.cpp
|
|
||||||
special_attacks.cpp
|
special_attacks.cpp
|
||||||
spell_effects.cpp
|
spell_effects.cpp
|
||||||
spells.cpp
|
spells.cpp
|
||||||
@ -142,7 +141,6 @@ SET(zone_headers
|
|||||||
spawn2.cpp
|
spawn2.cpp
|
||||||
spawn2.h
|
spawn2.h
|
||||||
spawngroup.h
|
spawngroup.h
|
||||||
spdat.h
|
|
||||||
StringIDs.h
|
StringIDs.h
|
||||||
tasks.h
|
tasks.h
|
||||||
titles.h
|
titles.h
|
||||||
|
|||||||
@ -21,7 +21,7 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
|||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "faction.h"
|
#include "faction.h"
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "../common/skills.h"
|
#include "../common/skills.h"
|
||||||
#include "../common/MiscFunctions.h"
|
#include "../common/MiscFunctions.h"
|
||||||
#include "../common/rulesys.h"
|
#include "../common/rulesys.h"
|
||||||
|
|||||||
@ -35,7 +35,7 @@ using namespace std;
|
|||||||
#include "../common/eq_packet_structs.h"
|
#include "../common/eq_packet_structs.h"
|
||||||
#include "../common/eq_constants.h"
|
#include "../common/eq_constants.h"
|
||||||
#include "../common/skills.h"
|
#include "../common/skills.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "zone.h"
|
#include "zone.h"
|
||||||
#include "StringIDs.h"
|
#include "StringIDs.h"
|
||||||
#include "../common/MiscFunctions.h"
|
#include "../common/MiscFunctions.h"
|
||||||
|
|||||||
@ -34,7 +34,7 @@ target to center around.
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
|
|
||||||
extern EntityList entity_list;
|
extern EntityList entity_list;
|
||||||
extern Zone* zone;
|
extern Zone* zone;
|
||||||
|
|||||||
@ -16,7 +16,7 @@ Copyright (C) 2001-2004 EQEMu Development Team (http://eqemu.org)
|
|||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#include "../common/debug.h"
|
#include "../common/debug.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "../common/packet_dump.h"
|
#include "../common/packet_dump.h"
|
||||||
#include "../common/moremath.h"
|
#include "../common/moremath.h"
|
||||||
@ -595,7 +595,8 @@ void Client::CalcAABonuses(StatBonuses* newbon) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//A lot of the normal spell functions (IsBlankSpellEffect, etc) are set for just spells (in zone/spdat.h). For now, we'll just put them directly into the code and comment with the corresponding normal function
|
//A lot of the normal spell functions (IsBlankSpellEffect, etc) are set for just spells (in common/spdat.h).
|
||||||
|
//For now, we'll just put them directly into the code and comment with the corresponding normal function
|
||||||
//Maybe we'll fix it later? :-D
|
//Maybe we'll fix it later? :-D
|
||||||
void Client::ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon)
|
void Client::ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -51,7 +51,7 @@ extern bool spells_loaded;
|
|||||||
#include "worldserver.h"
|
#include "worldserver.h"
|
||||||
#include "../common/misc.h"
|
#include "../common/misc.h"
|
||||||
#include "zonedb.h"
|
#include "zonedb.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "net.h"
|
#include "net.h"
|
||||||
#include "../common/packet_dump.h"
|
#include "../common/packet_dump.h"
|
||||||
#include "../common/packet_functions.h"
|
#include "../common/packet_functions.h"
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "worldserver.h"
|
#include "worldserver.h"
|
||||||
#include "zonedb.h"
|
#include "zonedb.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "../common/packet_dump.h"
|
#include "../common/packet_dump.h"
|
||||||
#include "../common/packet_functions.h"
|
#include "../common/packet_functions.h"
|
||||||
#include "petitions.h"
|
#include "petitions.h"
|
||||||
|
|||||||
@ -52,7 +52,7 @@
|
|||||||
#include "../common/breakdowns.h"
|
#include "../common/breakdowns.h"
|
||||||
#include "../common/guilds.h"
|
#include "../common/guilds.h"
|
||||||
#include "../common/rulesys.h"
|
#include "../common/rulesys.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "petitions.h"
|
#include "petitions.h"
|
||||||
#include "NpcAI.h"
|
#include "NpcAI.h"
|
||||||
#include "../common/skills.h"
|
#include "../common/skills.h"
|
||||||
|
|||||||
@ -51,7 +51,7 @@
|
|||||||
#include "worldserver.h"
|
#include "worldserver.h"
|
||||||
#include "../common/packet_dump_file.h"
|
#include "../common/packet_dump_file.h"
|
||||||
#include "../common/MiscFunctions.h"
|
#include "../common/MiscFunctions.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "petitions.h"
|
#include "petitions.h"
|
||||||
#include "NpcAI.h"
|
#include "NpcAI.h"
|
||||||
#include "../common/skills.h"
|
#include "../common/skills.h"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
#define __EQEMU_ZONE_COMMON_H
|
#define __EQEMU_ZONE_COMMON_H
|
||||||
|
|
||||||
#include "../common/types.h"
|
#include "../common/types.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
|
|
||||||
#define HIGHEST_RESIST 9 //Max resist type value
|
#define HIGHEST_RESIST 9 //Max resist type value
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "worldserver.h"
|
#include "worldserver.h"
|
||||||
#include "zonedb.h"
|
#include "zonedb.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "../common/packet_dump.h"
|
#include "../common/packet_dump.h"
|
||||||
#include "../common/packet_functions.h"
|
#include "../common/packet_functions.h"
|
||||||
#include "petitions.h"
|
#include "petitions.h"
|
||||||
|
|||||||
@ -39,7 +39,7 @@ using namespace std;
|
|||||||
#include "../common/packet_dump.h"
|
#include "../common/packet_dump.h"
|
||||||
#include "../common/packet_functions.h"
|
#include "../common/packet_functions.h"
|
||||||
#include "petitions.h"
|
#include "petitions.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "features.h"
|
#include "features.h"
|
||||||
#include "StringIDs.h"
|
#include "StringIDs.h"
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
#include "worldserver.h"
|
#include "worldserver.h"
|
||||||
#include "net.h"
|
#include "net.h"
|
||||||
#include "../common/database.h"
|
#include "../common/database.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "../common/packet_dump.h"
|
#include "../common/packet_dump.h"
|
||||||
#include "../common/packet_functions.h"
|
#include "../common/packet_functions.h"
|
||||||
#include "petitions.h"
|
#include "petitions.h"
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
#include "worldserver.h"
|
#include "worldserver.h"
|
||||||
#include "net.h"
|
#include "net.h"
|
||||||
#include "zonedb.h"
|
#include "zonedb.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "../common/packet_dump.h"
|
#include "../common/packet_dump.h"
|
||||||
#include "../common/packet_functions.h"
|
#include "../common/packet_functions.h"
|
||||||
#include "petitions.h"
|
#include "petitions.h"
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
#include "../common/eq_packet_structs.h"
|
#include "../common/eq_packet_structs.h"
|
||||||
#include "../common/eq_constants.h"
|
#include "../common/eq_constants.h"
|
||||||
#include "../common/skills.h"
|
#include "../common/skills.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "zone.h"
|
#include "zone.h"
|
||||||
#include "StringIDs.h"
|
#include "StringIDs.h"
|
||||||
#include "../common/MiscFunctions.h"
|
#include "../common/MiscFunctions.h"
|
||||||
|
|||||||
@ -17,7 +17,7 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
|||||||
*/
|
*/
|
||||||
#include "../common/debug.h"
|
#include "../common/debug.h"
|
||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "StringIDs.h"
|
#include "StringIDs.h"
|
||||||
#include "worldserver.h"
|
#include "worldserver.h"
|
||||||
#include "QuestParserCollection.h"
|
#include "QuestParserCollection.h"
|
||||||
|
|||||||
35
zone/net.cpp
35
zone/net.cpp
@ -67,8 +67,6 @@ extern volatile bool ZoneLoaded;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "../common/queue.h"
|
#include "../common/queue.h"
|
||||||
#include "../common/timer.h"
|
#include "../common/timer.h"
|
||||||
#include "../common/EQStream.h"
|
#include "../common/EQStream.h"
|
||||||
@ -91,7 +89,7 @@ extern volatile bool ZoneLoaded;
|
|||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "worldserver.h"
|
#include "worldserver.h"
|
||||||
#include "net.h"
|
#include "net.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "zone.h"
|
#include "zone.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
@ -121,9 +119,6 @@ RuleManager *rules = new RuleManager();
|
|||||||
TaskManager *taskmanager = 0;
|
TaskManager *taskmanager = 0;
|
||||||
QuestParserCollection *parse = 0;
|
QuestParserCollection *parse = 0;
|
||||||
|
|
||||||
bool zoneprocess;
|
|
||||||
|
|
||||||
|
|
||||||
const SPDat_Spell_Struct* spells;
|
const SPDat_Spell_Struct* spells;
|
||||||
SPDat_Spell_Struct* spells_delete;
|
SPDat_Spell_Struct* spells_delete;
|
||||||
int32 GetMaxSpellID();
|
int32 GetMaxSpellID();
|
||||||
@ -141,9 +136,6 @@ int32 SPDAT_RECORDS = -1;
|
|||||||
void Shutdown();
|
void Shutdown();
|
||||||
extern void MapOpcodes();
|
extern void MapOpcodes();
|
||||||
|
|
||||||
//bool ZoneBootup(uint32 iZoneID, bool iStaticZone = false);
|
|
||||||
//char *strsep(char **stringp, const char *delim);
|
|
||||||
|
|
||||||
#ifdef ADDONCMD
|
#ifdef ADDONCMD
|
||||||
#include "addoncmd.h"
|
#include "addoncmd.h"
|
||||||
extern AddonCmd addonCmd;
|
extern AddonCmd addonCmd;
|
||||||
@ -213,7 +205,6 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
#ifdef _EQDEBUG
|
#ifdef _EQDEBUG
|
||||||
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
|
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
|
||||||
// _crtBreakAlloc = 2025;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_log(ZONE__INIT, "CURRENT_ZONE_VERSION: %s", CURRENT_ZONE_VERSION);
|
_log(ZONE__INIT, "CURRENT_ZONE_VERSION: %s", CURRENT_ZONE_VERSION);
|
||||||
@ -431,35 +422,35 @@ int main(int argc, char** argv) {
|
|||||||
entity_list.ChannelMessageFromWorld(0, 0, 6, 0, 0, "WARNING: World server connection lost");
|
entity_list.ChannelMessageFromWorld(0, 0, 6, 0, 0, "WARNING: World server connection lost");
|
||||||
worldwasconnected = false;
|
worldwasconnected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ZoneLoaded && temp_timer.Check()) {
|
if (ZoneLoaded && temp_timer.Check()) {
|
||||||
{
|
{
|
||||||
uint8 error2 = 4;
|
|
||||||
if(net.group_timer.Enabled() && net.group_timer.Check())
|
if(net.group_timer.Enabled() && net.group_timer.Check())
|
||||||
entity_list.GroupProcess();
|
entity_list.GroupProcess();
|
||||||
error2 = 99;
|
|
||||||
if(net.door_timer.Enabled() && net.door_timer.Check())
|
if(net.door_timer.Enabled() && net.door_timer.Check())
|
||||||
entity_list.DoorProcess();
|
entity_list.DoorProcess();
|
||||||
error2 = 98;
|
|
||||||
if(net.object_timer.Enabled() && net.object_timer.Check())
|
if(net.object_timer.Enabled() && net.object_timer.Check())
|
||||||
entity_list.ObjectProcess();
|
entity_list.ObjectProcess();
|
||||||
error2 = 97;
|
|
||||||
if(net.corpse_timer.Enabled() && net.corpse_timer.Check())
|
if(net.corpse_timer.Enabled() && net.corpse_timer.Check())
|
||||||
entity_list.CorpseProcess();
|
entity_list.CorpseProcess();
|
||||||
|
|
||||||
if(net.trap_timer.Enabled() && net.trap_timer.Check())
|
if(net.trap_timer.Enabled() && net.trap_timer.Check())
|
||||||
entity_list.TrapProcess();
|
entity_list.TrapProcess();
|
||||||
|
|
||||||
if(net.raid_timer.Enabled() && net.raid_timer.Check())
|
if(net.raid_timer.Enabled() && net.raid_timer.Check())
|
||||||
entity_list.RaidProcess();
|
entity_list.RaidProcess();
|
||||||
error2 = 98;
|
|
||||||
error2 = 96;
|
|
||||||
entity_list.Process();
|
entity_list.Process();
|
||||||
error2 = 95;
|
|
||||||
entity_list.MobProcess();
|
entity_list.MobProcess();
|
||||||
error2 = 94;
|
|
||||||
entity_list.BeaconProcess();
|
entity_list.BeaconProcess();
|
||||||
|
|
||||||
if (zone) {
|
if (zone) {
|
||||||
zoneprocess= zone->Process();
|
if(!zone->Process()) {
|
||||||
if (!zoneprocess) {
|
|
||||||
Zone::Shutdown();
|
Zone::Shutdown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -663,11 +654,7 @@ void LoadSPDat() {
|
|||||||
}
|
}
|
||||||
int32 MaxSpellID = GetMaxSpellID();
|
int32 MaxSpellID = GetMaxSpellID();
|
||||||
if (MaxSpellID == -1) {
|
if (MaxSpellID == -1) {
|
||||||
#ifdef NEW_LoadSPDat
|
|
||||||
_log(SPELLS__LOAD, "LoadSPDat() MaxSpellID == -1, %s missing?", ZoneConfig::get()->SpellsFile.c_str());
|
|
||||||
#else // defined(DB_LoadSPDat)
|
|
||||||
_log(SPELLS__LOAD, "LoadSPDat() MaxSpellID == -1, error in GetMaxSpellID()?");
|
_log(SPELLS__LOAD, "LoadSPDat() MaxSpellID == -1, error in GetMaxSpellID()?");
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef SHAREMEM
|
#ifdef SHAREMEM
|
||||||
|
|||||||
@ -38,7 +38,7 @@ using namespace std;
|
|||||||
#include "map.h"
|
#include "map.h"
|
||||||
#include "entity.h"
|
#include "entity.h"
|
||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "../common/bodytypes.h"
|
#include "../common/bodytypes.h"
|
||||||
#include "spawngroup.h"
|
#include "spawngroup.h"
|
||||||
#include "../common/MiscFunctions.h"
|
#include "../common/MiscFunctions.h"
|
||||||
|
|||||||
@ -22,7 +22,7 @@ using namespace std;
|
|||||||
#include "../common/classes.h"
|
#include "../common/classes.h"
|
||||||
#include "../common/races.h"
|
#include "../common/races.h"
|
||||||
#include "zonedb.h"
|
#include "zonedb.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "../common/packet_functions.h"
|
#include "../common/packet_functions.h"
|
||||||
#include "spawn2.h"
|
#include "spawn2.h"
|
||||||
#include "zone.h"
|
#include "zone.h"
|
||||||
|
|||||||
@ -34,7 +34,7 @@ typedef const char Const_char;
|
|||||||
|
|
||||||
#include "mob.h"
|
#include "mob.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
|
|
||||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
#ifdef THIS /* this macro seems to leak out on some systems */
|
||||||
#undef THIS
|
#undef THIS
|
||||||
|
|||||||
@ -16,7 +16,7 @@ Copyright (C) 2001-2004 EQEMu Development Team (http://eqemu.org)
|
|||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#include "../common/debug.h"
|
#include "../common/debug.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "../common/packet_dump.h"
|
#include "../common/packet_dump.h"
|
||||||
#include "../common/moremath.h"
|
#include "../common/moremath.h"
|
||||||
|
|||||||
@ -66,7 +66,7 @@ using namespace std;
|
|||||||
#include "../common/classes.h"
|
#include "../common/classes.h"
|
||||||
#include "../common/races.h"
|
#include "../common/races.h"
|
||||||
#include "zonedb.h"
|
#include "zonedb.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "../common/packet_functions.h"
|
#include "../common/packet_functions.h"
|
||||||
#include "../common/MiscFunctions.h"
|
#include "../common/MiscFunctions.h"
|
||||||
#include "spawn2.h"
|
#include "spawn2.h"
|
||||||
@ -76,7 +76,6 @@ using namespace std;
|
|||||||
#include "guild_mgr.h"
|
#include "guild_mgr.h"
|
||||||
#include "../common/rulesys.h"
|
#include "../common/rulesys.h"
|
||||||
#include "QGlobals.h"
|
#include "QGlobals.h"
|
||||||
#include "spdat.h"
|
|
||||||
#include "QuestParserCollection.h"
|
#include "QuestParserCollection.h"
|
||||||
|
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
|
|||||||
@ -16,7 +16,7 @@ Copyright (C) 2001-2004 EQEMu Development Team (http://eqemu.org)
|
|||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#include "../common/debug.h"
|
#include "../common/debug.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "../common/packet_dump.h"
|
#include "../common/packet_dump.h"
|
||||||
#include "../common/moremath.h"
|
#include "../common/moremath.h"
|
||||||
|
|||||||
@ -73,7 +73,7 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
|||||||
|
|
||||||
|
|
||||||
#include "../common/debug.h"
|
#include "../common/debug.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "../common/packet_dump.h"
|
#include "../common/packet_dump.h"
|
||||||
#include "../common/moremath.h"
|
#include "../common/moremath.h"
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
#include "../common/types.h"
|
#include "../common/types.h"
|
||||||
#include "entity.h"
|
#include "entity.h"
|
||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "spdat.h"
|
#include "../common/spdat.h"
|
||||||
#include "../common/MiscFunctions.h"
|
#include "../common/MiscFunctions.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user