Working on world <-> zone communication needs a ton of work really need to rewrite how world works with zones.

This commit is contained in:
KimLS
2017-01-02 22:38:47 -08:00
parent 0264c0d60a
commit 2447c38c82
28 changed files with 3080 additions and 3304 deletions
+1
View File
@@ -24,6 +24,7 @@
#include "../common/spdat.h"
#include "../common/string_util.h"
#include "../common/data_verification.h"
#include "../common/misc_functions.h"
#include "queryserv.h"
#include "quest_parser_collection.h"
#include "string_ids.h"
-12
View File
@@ -172,7 +172,6 @@ int command_init(void)
command_add("chat", "[channel num] [message] - Send a channel message to all zones", 200, command_chat) ||
command_add("checklos", "- Check for line of sight to your target", 50, command_checklos) ||
command_add("clearinvsnapshots", "[use rule] - Clear inventory snapshot history (true - elapsed entries, false - all entries)", 200, command_clearinvsnapshots) ||
command_add("connectworldserver", "- Make zone attempt to connect to worldserver", 200, command_connectworldserver) ||
command_add("corpse", "- Manipulate corpses, use with no arguments for help", 50, command_corpse) ||
command_add("crashtest", "- Crash the zoneserver", 255, command_crashtest) ||
command_add("cvs", "- Summary of client versions currently online.", 200, command_cvs) ||
@@ -820,17 +819,6 @@ void command_setanim(Client *c, const Seperator *sep)
c->Message(0, "Usage: #setanim [animnum]");
}
void command_connectworldserver(Client *c, const Seperator *sep)
{
if(worldserver.Connected())
c->Message(0, "Error: Already connected to world server");
else
{
c->Message(0, "Attempting to connect to world server...");
worldserver.AsyncConnect();
}
}
void command_serverinfo(Client *c, const Seperator *sep)
{
#ifdef _WINDOWS
+1
View File
@@ -19,6 +19,7 @@
#include "../common/global_define.h"
#include "../common/eqemu_logsys.h"
#include "../common/spdat.h"
#include "../common/misc_functions.h"
#include "client.h"
#include "entity.h"
+1
View File
@@ -18,6 +18,7 @@
#include "../common/spdat.h"
#include "../common/string_util.h"
#include "../common/misc_functions.h"
#include "quest_parser_collection.h"
#include "string_ids.h"
+1 -11
View File
@@ -216,7 +216,6 @@ int main(int argc, char** argv) {
worldserver.SetLauncherName("NONE");
}
worldserver.SetPassword(Config->SharedKey.c_str());
Log.Out(Logs::General, Logs::Zone_Server, "Connecting to MySQL...");
if (!database.Connect(
@@ -397,9 +396,7 @@ int main(int argc, char** argv) {
Log.Out(Logs::General, Logs::Zone_Server, "Loading quests");
parse->ReloadQuests();
if (!worldserver.Connect()) {
Log.Out(Logs::General, Logs::Error, "Worldserver Connection Failed :: worldserver.Connect()");
}
worldserver.Connect();
Timer InterserverTimer(INTERSERVER_TIMER); // does MySQL pings and auto-reconnect
#ifdef EQPROFILE
@@ -440,8 +437,6 @@ int main(int argc, char** argv) {
//Advance the timer to our current point in time
Timer::SetCurrentTime();
worldserver.Process();
if (!eqsf_open && Config->ZonePort != 0) {
Log.Out(Logs::General, Logs::Zone_Server, "Starting EQ Network server on port %d", Config->ZonePort);
@@ -524,10 +519,7 @@ int main(int argc, char** argv) {
if (InterserverTimer.Check()) {
InterserverTimer.Start();
database.ping();
// AsyncLoadVariables(dbasync, &database);
entity_list.UpdateWho();
if (worldserver.TryReconnect() && (!worldserver.Connected()))
worldserver.AsyncConnect();
}
});
@@ -553,7 +545,6 @@ int main(int argc, char** argv) {
if (zone != 0)
Zone::Shutdown(true);
//Fix for Linux world server problem.
worldserver.Disconnect();
safe_delete(taskmanager);
command_deinit();
#ifdef BOTS
@@ -576,7 +567,6 @@ void Shutdown()
{
Zone::Shutdown(true);
RunLoops = false;
worldserver.Disconnect();
Log.Out(Logs::General, Logs::Zone_Server, "Shutting down...");
Log.CloseFileLogs();
}
+1
View File
@@ -25,6 +25,7 @@
#include "../common/skills.h"
#include "../common/spdat.h"
#include "../common/data_verification.h"
#include "../common/misc_functions.h"
#include "quest_parser_collection.h"
#include "string_ids.h"
+1
View File
@@ -76,6 +76,7 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
#include "../common/spdat.h"
#include "../common/string_util.h"
#include "../common/data_verification.h"
#include "../common/misc_functions.h"
#include "quest_parser_collection.h"
#include "string_ids.h"
+1
View File
@@ -18,6 +18,7 @@
#include "../common/eq_packet_structs.h"
#include "../common/string_util.h"
#include "../common/misc_functions.h"
#include "client.h"
#include "entity.h"
+1
View File
@@ -20,6 +20,7 @@
#include "../common/eqemu_logsys.h"
#include "../common/rulesys.h"
#include "../common/string_util.h"
#include "../common/misc_functions.h"
#include "client.h"
#include "entity.h"
+1666 -1671
View File
File diff suppressed because it is too large Load Diff
+12 -6
View File
@@ -18,27 +18,31 @@
#ifndef WORLDSERVER_H
#define WORLDSERVER_H
#include "../common/worldconn.h"
#include "../common/eq_packet_structs.h"
#include "../common/net/servertalk_client_connection.h"
class ServerPacket;
class EQApplicationPacket;
class Client;
class WorldServer : public WorldConnection {
class WorldServer {
public:
WorldServer();
virtual ~WorldServer();
~WorldServer();
virtual void Process();
void Connect();
bool SendPacket(ServerPacket* pack);
std::string GetIP() const;
uint16 GetPort() const;
bool Connected() const;
void HandleMessage(uint16 opcode, const EQ::Net::Packet &p);
void SendGuildJoin(GuildJoin_Struct* gj);
bool SendChannelMessage(Client* from, const char* to, uint8 chan_num, uint32 guilddbid, uint8 language, const char* message, ...);
bool SendEmoteMessage(const char* to, uint32 to_guilddbid, uint32 type, const char* message, ...);
bool SendEmoteMessage(const char* to, uint32 to_guilddbid, int16 to_minstatus, uint32 type, const char* message, ...);
bool SendVoiceMacro(Client* From, uint32 Type, char* Target, uint32 MacroNumber, uint32 GroupOrRaidID = 0);
void SetZoneData(uint32 iZoneID, uint32 iInstanceID = 0);
uint32 SendGroupIdRequest();
bool RezzPlayer(EQApplicationPacket* rpack, uint32 rezzexp, uint32 dbid, uint16 opcode);
bool IsOOCMuted() const { return(oocmuted); }
@@ -67,6 +71,8 @@ private:
uint32 cur_groupid;
uint32 last_groupid;
std::unique_ptr<EQ::Net::ServertalkClient> m_connection;
};
#endif