mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
#include and forward declaration cleanup of
client.cpp net.cpp questmgr.cpp zone.cpp zone.h
This commit is contained in:
parent
8cd19670ab
commit
ad9c0df552
@ -17,13 +17,9 @@
|
||||
*/
|
||||
#include "../common/debug.h"
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <math.h>
|
||||
|
||||
// for windows compile
|
||||
#ifdef _WINDOWS
|
||||
@ -39,27 +35,17 @@
|
||||
extern volatile bool RunLoops;
|
||||
|
||||
#include "../common/features.h"
|
||||
#include "../common/misc.h"
|
||||
#include "../common/spdat.h"
|
||||
#include "../common/packet_dump.h"
|
||||
#include "../common/packet_functions.h"
|
||||
#include "../common/serverinfo.h"
|
||||
#include "../common/zone_numbers.h"
|
||||
#include "../common/moremath.h"
|
||||
#include "../common/guilds.h"
|
||||
#include "../common/breakdowns.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "../common/data_verification.h"
|
||||
#include "net.h"
|
||||
#include "masterentity.h"
|
||||
#include "worldserver.h"
|
||||
#include "zonedb.h"
|
||||
#include "petitions.h"
|
||||
#include "forage.h"
|
||||
#include "command.h"
|
||||
#include "string_ids.h"
|
||||
#include "npc_ai.h"
|
||||
#include "client_logs.h"
|
||||
#include "guild_mgr.h"
|
||||
#include "quest_parser_collection.h"
|
||||
|
||||
@ -97,7 +97,7 @@ extern Zone* zone;
|
||||
EQStreamFactory eqsf(ZoneStream);
|
||||
npcDecayTimes_Struct npcCorpseDecayTimes[100];
|
||||
TitleManager title_manager;
|
||||
QueryServ *QServ = 0;
|
||||
QueryServ *QServ = 0;
|
||||
TaskManager *taskmanager = 0;
|
||||
QuestParserCollection *parse = 0;
|
||||
|
||||
|
||||
@ -16,66 +16,28 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
Assuming you want to add a new perl quest function named joe
|
||||
that takes 1 integer argument....
|
||||
|
||||
1. Add the prototype to the quest manager:
|
||||
questmgr.h: add (~line 50)
|
||||
void joe(int arg);
|
||||
|
||||
2. Define the actual function in questmgr.cpp:
|
||||
void QuestManager::joe(int arg) {
|
||||
//... do something
|
||||
}
|
||||
|
||||
3. Copy one of the XS routines in perlparser.cpp, preferably
|
||||
one with the same number of arguments as your routine. Rename
|
||||
as needed.
|
||||
Finally, add your routine to the list at the bottom of perlparser.cpp
|
||||
|
||||
|
||||
4.
|
||||
If you want it to work in old mode perl and .qst, edit parser.cpp
|
||||
Parser::ExCommands (~line 777)
|
||||
else if (!strcmp(command,"joe")) {
|
||||
quest_manager.joe(atoi(arglist[0]));
|
||||
}
|
||||
|
||||
And then at then end of embparser.cpp, add:
|
||||
"sub joe{push(@cmd_queue,{func=>'joe',args=>join(',',@_)});}"
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#include "../common/debug.h"
|
||||
#include "entity.h"
|
||||
#include "masterentity.h"
|
||||
#include <limits.h>
|
||||
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
|
||||
#include "worldserver.h"
|
||||
#include "net.h"
|
||||
#include "../common/skills.h"
|
||||
#include "../common/classes.h"
|
||||
#include "../common/races.h"
|
||||
#include "zonedb.h"
|
||||
#include "../common/debug.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/skills.h"
|
||||
#include "../common/spdat.h"
|
||||
#include "../common/packet_functions.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "spawn2.h"
|
||||
#include "zone.h"
|
||||
#include "entity.h"
|
||||
#include "event_codes.h"
|
||||
#include "guild_mgr.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "net.h"
|
||||
#include "qglobals.h"
|
||||
#include "quest_parser_collection.h"
|
||||
#include "queryserv.h"
|
||||
#include "questmgr.h"
|
||||
#include "quest_parser_collection.h"
|
||||
#include "spawn2.h"
|
||||
#include "worldserver.h"
|
||||
#include "zone.h"
|
||||
#include "zonedb.h"
|
||||
#include <iostream>
|
||||
#include <limits.h>
|
||||
#include <list>
|
||||
|
||||
#ifdef BOTS
|
||||
#include "bot.h"
|
||||
#endif
|
||||
@ -85,9 +47,6 @@ extern Zone* zone;
|
||||
extern WorldServer worldserver;
|
||||
extern EntityList entity_list;
|
||||
|
||||
#include "questmgr.h"
|
||||
|
||||
//declare our global instance
|
||||
QuestManager quest_manager;
|
||||
|
||||
#define QuestManagerCurrentQuestVars() \
|
||||
|
||||
@ -15,17 +15,14 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "../common/debug.h"
|
||||
|
||||
#include <float.h>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <float.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#include <process.h>
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#else
|
||||
@ -33,31 +30,26 @@
|
||||
#include "../common/unix.h"
|
||||
#endif
|
||||
|
||||
#include "masterentity.h"
|
||||
#include "../common/debug.h"
|
||||
#include "../common/features.h"
|
||||
#include "spawngroup.h"
|
||||
#include "spawn2.h"
|
||||
#include "zone.h"
|
||||
#include "worldserver.h"
|
||||
#include "npc.h"
|
||||
#include "net.h"
|
||||
#include "../common/seperator.h"
|
||||
#include "../common/packet_dump_file.h"
|
||||
#include "../common/eq_stream_factory.h"
|
||||
#include "../common/eq_stream.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "zone_config.h"
|
||||
#include "../common/breakdowns.h"
|
||||
#include "map.h"
|
||||
#include "water_map.h"
|
||||
#include "object.h"
|
||||
#include "petitions.h"
|
||||
#include "pathing.h"
|
||||
#include "event_codes.h"
|
||||
#include "client_logs.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/seperator.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "client_logs.h"
|
||||
#include "guild_mgr.h"
|
||||
#include "map.h"
|
||||
#include "net.h"
|
||||
#include "npc.h"
|
||||
#include "object.h"
|
||||
#include "pathing.h"
|
||||
#include "petitions.h"
|
||||
#include "quest_parser_collection.h"
|
||||
#include "spawn2.h"
|
||||
#include "spawngroup.h"
|
||||
#include "water_map.h"
|
||||
#include "worldserver.h"
|
||||
#include "zone_config.h"
|
||||
#include "zone.h"
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#define snprintf _snprintf
|
||||
@ -65,18 +57,19 @@
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
|
||||
extern bool staticzone;
|
||||
extern NetConnection net;
|
||||
extern PetitionList petition_list;
|
||||
extern QuestParserCollection* parse;
|
||||
extern uint16 adverrornum;
|
||||
extern uint32 numclients;
|
||||
extern WorldServer worldserver;
|
||||
extern Zone* zone;
|
||||
extern uint32 numclients;
|
||||
extern NetConnection net;
|
||||
extern uint16 adverrornum;
|
||||
extern PetitionList petition_list;
|
||||
|
||||
Mutex MZoneShutdown;
|
||||
extern bool staticzone;
|
||||
Zone* zone = 0;
|
||||
|
||||
volatile bool ZoneLoaded = false;
|
||||
extern QuestParserCollection* parse;
|
||||
Zone* zone = 0;
|
||||
|
||||
bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||
const char* zonename = database.GetZoneName(iZoneID);
|
||||
|
||||
28
zone/zone.h
28
zone/zone.h
@ -18,25 +18,13 @@
|
||||
#ifndef ZONE_H
|
||||
#define ZONE_H
|
||||
|
||||
#include "../common/mutex.h"
|
||||
#include "../common/linked_list.h"
|
||||
#include "../common/types.h"
|
||||
#include "../common/eqtime.h"
|
||||
#include "../common/servertalk.h"
|
||||
#include "../common/linked_list.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/eq_packet_structs.h"
|
||||
#include "../common/features.h"
|
||||
#include "spawngroup.h"
|
||||
//#include "mob.h"
|
||||
#include "zonedump.h"
|
||||
#include "spawn2.h"
|
||||
#include "tasks.h"
|
||||
#include "pathing.h"
|
||||
#include "../common/types.h"
|
||||
#include "qglobals.h"
|
||||
#include <unordered_map>
|
||||
|
||||
class Map;
|
||||
class WaterMap;
|
||||
#include "spawn2.h"
|
||||
#include "spawngroup.h"
|
||||
|
||||
struct ZonePoint
|
||||
{
|
||||
@ -78,12 +66,10 @@ struct item_tick_struct {
|
||||
std::string qglobal;
|
||||
};
|
||||
|
||||
extern EntityList entity_list;
|
||||
class database;
|
||||
class Map;
|
||||
class WaterMap;
|
||||
class PathManager;
|
||||
struct SendAA_Struct;
|
||||
|
||||
class database;
|
||||
extern EntityList entity_list;
|
||||
|
||||
class Zone
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user