mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 16:28:28 +00:00
Merge branch 'master' into StringFormatting.
Cleaned up the problems. Tested on Linux. Still need to test on windows. Conflicts: common/CMakeLists.txt common/MiscFunctions.cpp common/MiscFunctions.h common/debug.cpp world/Adventure.cpp
This commit is contained in:
+25
-25
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
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 "worldserver.h"
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
WorldServer::WorldServer(map<string, ZoneLaunch *> &zones, const char *name, const EQEmuConfig *config)
|
||||
: WorldConnection(EmuTCPConnection::packetModeLauncher, config->SharedKey.c_str()),
|
||||
m_name(name),
|
||||
m_config(config),
|
||||
m_zones(zones)
|
||||
m_name(name),
|
||||
m_config(config),
|
||||
m_zones(zones)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ WorldServer::~WorldServer() {
|
||||
|
||||
void WorldServer::OnConnected() {
|
||||
WorldConnection::OnConnected();
|
||||
|
||||
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_LauncherConnectInfo, sizeof(LauncherConnectInfo));
|
||||
LauncherConnectInfo* sci = (LauncherConnectInfo*) pack->pBuffer;
|
||||
strn0cpy(sci->name, m_name, sizeof(sci->name));
|
||||
@@ -44,7 +44,7 @@ void WorldServer::OnConnected() {
|
||||
// strcpy(sci->address, net.GetZoneAddress());
|
||||
SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
|
||||
|
||||
//send status for all zones...
|
||||
std::map<std::string, ZoneLaunch *>::iterator cur, end;
|
||||
cur = m_zones.begin();
|
||||
@@ -55,9 +55,9 @@ void WorldServer::OnConnected() {
|
||||
}
|
||||
|
||||
void WorldServer::Process() {
|
||||
|
||||
|
||||
WorldConnection::Process();
|
||||
|
||||
|
||||
if (!Connected())
|
||||
return;
|
||||
|
||||
@@ -84,8 +84,8 @@ void WorldServer::Process() {
|
||||
break;
|
||||
}
|
||||
const LauncherZoneRequest *lzr = (const LauncherZoneRequest *) pack->pBuffer;
|
||||
|
||||
|
||||
|
||||
|
||||
switch(ZoneRequestCommands(lzr->command)) {
|
||||
case ZR_Start: {
|
||||
if(m_zones.find(lzr->short_name) != m_zones.end()) {
|
||||
@@ -124,7 +124,7 @@ void WorldServer::Process() {
|
||||
//ignore this, world is still being dumb
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
default: {
|
||||
_log(LAUNCHER__NET, "Unknown opcode 0x%x from World of len %d", pack->opcode, pack->size);
|
||||
break;
|
||||
@@ -139,11 +139,11 @@ void WorldServer::Process() {
|
||||
void WorldServer::SendStatus(const char *short_name, uint32 start_count, bool running) {
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_LauncherZoneStatus, sizeof(LauncherZoneStatus));
|
||||
LauncherZoneStatus* it =(LauncherZoneStatus*) pack->pBuffer;
|
||||
|
||||
|
||||
strn0cpy(it->short_name, short_name, 32);
|
||||
it->start_count = start_count;
|
||||
it->running = running?1:0;
|
||||
|
||||
|
||||
SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user