Merge pull request #217 from KimLS/master

Renamed a bunch of files.
This commit is contained in:
Alex 2014-08-22 00:07:10 -07:00
commit 05ccab87f3
387 changed files with 871 additions and 4008 deletions

View File

@ -19,11 +19,11 @@
#include <stdio.h> #include <stdio.h>
#include "../../common/debug.h" #include "../../common/debug.h"
#include "../../common/shareddb.h" #include "../../common/shareddb.h"
#include "../../common/EQEmuConfig.h" #include "../../common/eqemu_config.h"
#include "../../common/platform.h" #include "../../common/platform.h"
#include "../../common/crash.h" #include "../../common/crash.h"
#include "../../common/rulesys.h" #include "../../common/rulesys.h"
#include "../../common/StringUtil.h" #include "../../common/string_util.h"
void ExportSpells(SharedDatabase *db); void ExportSpells(SharedDatabase *db);
void ExportSkillCaps(SharedDatabase *db); void ExportSkillCaps(SharedDatabase *db);

View File

@ -18,11 +18,11 @@
#include "../../common/debug.h" #include "../../common/debug.h"
#include "../../common/shareddb.h" #include "../../common/shareddb.h"
#include "../../common/EQEmuConfig.h" #include "../../common/eqemu_config.h"
#include "../../common/platform.h" #include "../../common/platform.h"
#include "../../common/crash.h" #include "../../common/crash.h"
#include "../../common/rulesys.h" #include "../../common/rulesys.h"
#include "../../common/StringUtil.h" #include "../../common/string_util.h"
void ImportSpells(SharedDatabase *db); void ImportSpells(SharedDatabase *db);
void ImportSkillCaps(SharedDatabase *db); void ImportSkillCaps(SharedDatabase *db);

View File

@ -1,55 +1,55 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(common_sources SET(common_sources
BasePacket.cpp base_packet.cpp
classes.cpp classes.cpp
Condition.cpp condition.cpp
crash.cpp crash.cpp
CRC16.cpp crc16.cpp
crc32.cpp crc32.cpp
database.cpp database.cpp
dbasync.cpp dbasync.cpp
dbcore.cpp dbcore.cpp
debug.cpp debug.cpp
emu_opcodes.cpp emu_opcodes.cpp
EmuTCPConnection.cpp emu_tcp_connection.cpp
EmuTCPServer.cpp emu_tcp_server.cpp
eq_dictionary.cpp eq_dictionary.cpp
EQDB.cpp eqdb.cpp
EQDBRes.cpp eqdb_res.cpp
eqemu_exception.cpp eqemu_exception.cpp
EQEmuConfig.cpp eqemu_config.cpp
EQEMuError.cpp eqemu_error.cpp
EQPacket.cpp eq_packet.cpp
EQStream.cpp eq_stream.cpp
EQStreamFactory.cpp eq_stream_factory.cpp
EQStreamIdent.cpp eq_stream_ident.cpp
EQStreamProxy.cpp eq_stream_proxy.cpp
eqtime.cpp eqtime.cpp
extprofile.cpp extprofile.cpp
faction.cpp faction.cpp
guild_base.cpp guild_base.cpp
guilds.cpp guilds.cpp
ipc_mutex.cpp ipc_mutex.cpp
Item.cpp item.cpp
logsys.cpp logsys.cpp
logsys_eqemu.cpp logsys_eqemu.cpp
md5.cpp md5.cpp
memory_mapped_file.cpp memory_mapped_file.cpp
misc.cpp misc.cpp
MiscFunctions.cpp misc_functions.cpp
moremath.cpp moremath.cpp
Mutex.cpp mutex.cpp
MySQLRequestResult.cpp mysql_request_result.cpp
MySQLRequestRow.cpp mysql_request_row.cpp
opcode_map.cpp opcode_map.cpp
opcodemgr.cpp opcodemgr.cpp
packet_dump.cpp packet_dump.cpp
packet_dump_file.cpp packet_dump_file.cpp
packet_functions.cpp packet_functions.cpp
perl_EQDB.cpp perl_eqdb.cpp
perl_EQDBRes.cpp perl_eqdb_res.cpp
ProcLauncher.cpp proc_launcher.cpp
ptimer.cpp ptimer.cpp
races.cpp races.cpp
rdtsc.cpp rdtsc.cpp
@ -57,24 +57,23 @@ SET(common_sources
serverinfo.cpp serverinfo.cpp
shareddb.cpp shareddb.cpp
spdat.cpp spdat.cpp
StringUtil.cpp string_util.cpp
StructStrategy.cpp struct_strategy.cpp
TCPConnection.cpp tcp_connection.cpp
TCPServer.cpp tcp_server.cpp
timeoutmgr.cpp timeoutmgr.cpp
timer.cpp timer.cpp
unix.cpp unix.cpp
worldconn.cpp worldconn.cpp
XMLParser.cpp xml_parser.cpp
platform.cpp platform.cpp
patches/Client62.cpp patches/client62.cpp
patches/patches.cpp patches/patches.cpp
patches/SoD.cpp patches/sod.cpp
patches/SoF.cpp patches/sof.cpp
patches/RoF.cpp patches/rof.cpp
#patches/RoF2.cpp patches/titanium.cpp
patches/Titanium.cpp patches/underfoot.cpp
patches/Underfoot.cpp
SocketLib/Base64.cpp SocketLib/Base64.cpp
SocketLib/File.cpp SocketLib/File.cpp
SocketLib/HttpdCookies.cpp SocketLib/HttpdCookies.cpp
@ -94,14 +93,14 @@ SET(common_sources
) )
SET(common_headers SET(common_headers
BasePacket.h base_packet.h
base_data.h base_data.h
bodytypes.h bodytypes.h
breakdowns.h breakdowns.h
classes.h classes.h
Condition.h condition.h
crash.h crash.h
CRC16.h crc16.h
crc32.h crc32.h
database.h database.h
dbasync.h dbasync.h
@ -110,25 +109,25 @@ SET(common_headers
deity.h deity.h
emu_opcodes.h emu_opcodes.h
emu_oplist.h emu_oplist.h
EmuTCPConnection.h emu_tcp_connection.h
EmuTCPServer.h emu_tcp_server.h
eq_constants.h eq_constants.h
eq_dictionary.h eq_dictionary.h
eq_packet_structs.h eq_packet_structs.h
EQDB.h eqdb.h
EQDBRes.h eqdb_res.h
eqemu_exception.h eqemu_exception.h
EQEmuConfig.h eqemu_config.h
EQEmuConfig_elements.h eqemu_config_elements.h
EQEMuError.h eqemu_error.h
EQPacket.h eq_packet.h
EQStream.h eq_stream.h
EQStreamFactory.h eq_stream_factory.h
EQStreamIdent.h eq_stream_ident.h
EQStreamIntf.h eq_stream_intf.h
EQStreamLocator.h eq_stream_locator.h
EQStreamProxy.h eq_stream_proxy.h
EQStreamType.h eq_stream_type.h
eqtime.h eqtime.h
errmsg.h errmsg.h
extprofile.h extprofile.h
@ -139,7 +138,7 @@ SET(common_headers
guild_base.h guild_base.h
guilds.h guilds.h
ipc_mutex.h ipc_mutex.h
Item.h item.h
item_fieldlist.h item_fieldlist.h
item_struct.h item_struct.h
languages.h languages.h
@ -151,18 +150,19 @@ SET(common_headers
md5.h md5.h
memory_mapped_file.h memory_mapped_file.h
misc.h misc.h
MiscFunctions.h misc_functions.h
moremath.h moremath.h
Mutex.h mutex.h
MySQLRequestResult.h mysql_request_result.h
MySQLRequestRow.h mysql_request_row.h
op_codes.h op_codes.h
opcode_dispatch.h opcode_dispatch.h
opcodemgr.h opcodemgr.h
packet_dump.h packet_dump.h
packet_dump_file.h packet_dump_file.h
packet_functions.h packet_functions.h
ProcLauncher.h platform.h
proc_launcher.h
profiler.h profiler.h
ptimer.h ptimer.h
queue.h queue.h
@ -176,11 +176,11 @@ SET(common_headers
shareddb.h shareddb.h
skills.h skills.h
spdat.h spdat.h
StringUtil.h string_util.h
StructStrategy.h struct_strategy.h
TCPBasicServer.h tcp_basic_server.h
TCPConnection.h tcp_connection.h
TCPServer.h tcp_server.h
timeoutmgr.h timeoutmgr.h
timer.h timer.h
types.h types.h
@ -188,49 +188,43 @@ SET(common_headers
useperl.h useperl.h
version.h version.h
worldconn.h worldconn.h
XMLParser.h xml_parser.h
ZoneNumbers.h zone_numbers.h
platform.h patches/client62.h
patches/Client62.h patches/client62_constants.h
patches/Client62_constants.h patches/client62_itemfields.h
patches/Client62_itemfields.h patches/client62_ops.h
patches/Client62_ops.h patches/client62_structs.h
patches/Client62_structs.h
patches/patches.h patches/patches.h
patches/SoD.h patches/sod.h
patches/SoD_constants.h patches/sod_constants.h
patches/SoD_itemfields.h patches/sod_itemfields.h
patches/SoD_ops.h patches/sod_ops.h
patches/SoD_structs.h patches/sod_structs.h
patches/SoF.h patches/sof.h
patches/SoF_constants.h patches/sof_constants.h
patches/SoF_itemfields.h patches/sof_itemfields.h
patches/SoF_opcode_list.h patches/sof_opcode_list.h
patches/SoF_ops.h patches/sof_ops.h
patches/SoF_structs.h patches/sof_structs.h
patches/SSDeclare.h patches/ss_declare.h
patches/SSDefine.h patches/ss_define.h
patches/SSRegister.h patches/ss_register.h
patches/RoF.h patches/rof.h
patches/RoF_constants.h patches/rof_constants.h
patches/RoF_itemfields.h patches/rof_itemfields.h
patches/RoF_ops.h patches/rof_ops.h
patches/RoF_structs.h patches/rof_structs.h
#patches/RoF2.h patches/titanium.h
#patches/RoF2_constants.h patches/titanium_constants.h
#patches/RoF2_itemfields.h patches/titanium_itemfields.h
#patches/RoF2_ops.h patches/titanium_ops.h
#patches/RoF2_structs.h patches/titanium_structs.h
patches/Titanium.h patches/underfoot.h
patches/Titanium_constants.h patches/underfoot_constants.h
patches/Titanium_itemfields.h patches/underfoot_itemfields.h
patches/Titanium_ops.h patches/underfoot_ops.h
patches/Titanium_structs.h patches/underfoot_structs.h
patches/Underfoot.h
patches/Underfoot_constants.h
patches/Underfoot_itemfields.h
patches/Underfoot_ops.h
patches/Underfoot_structs.h
SocketLib/Base64.h SocketLib/Base64.h
SocketLib/File.h SocketLib/File.h
SocketLib/HttpdCookies.h SocketLib/HttpdCookies.h
@ -249,54 +243,48 @@ SET(common_headers
) )
SOURCE_GROUP(Patches FILES SOURCE_GROUP(Patches FILES
patches/Client62.h patches/client62.h
patches/Client62_itemfields.h patches/client62_itemfields.h
patches/Client62_ops.h patches/client62_ops.h
patches/Client62_constants.h patches/client62_constants.h
patches/Client62_structs.h patches/client62_structs.h
patches/patches.h patches/patches.h
patches/SoD.h patches/sod.h
patches/SoD_itemfields.h patches/sod_itemfields.h
patches/SoD_ops.h patches/sod_ops.h
patches/SoD_constants.h patches/sod_constants.h
patches/SoD_structs.h patches/sod_structs.h
patches/SoF.h patches/sof.h
patches/SoF_itemfields.h patches/sof_itemfields.h
patches/SoF_opcode_list.h patches/sof_opcode_list.h
patches/SoF_ops.h patches/sof_ops.h
patches/SoF_constants.h patches/sof_constants.h
patches/SoF_structs.h patches/sof_structs.h
patches/SSDeclare.h patches/ss_declare.h
patches/SSDefine.h patches/ss_define.h
patches/SSRegister.h patches/ss_register.h
patches/RoF.h patches/rof.h
patches/RoF_itemfields.h patches/rof_itemfields.h
patches/RoF_ops.h patches/rof_ops.h
patches/RoF_constants.h patches/rof_constants.h
patches/RoF_structs.h patches/rof_structs.h
#patches/RoF2.h patches/titanium.h
#patches/RoF2_itemfields.h patches/titanium_itemfields.h
#patches/RoF2_ops.h patches/titanium_ops.h
#patches/RoF2_constants.h patches/titanium_constants.h
#patches/RoF2_structs.h patches/titanium_structs.h
patches/Titanium.h patches/underfoot.h
patches/Titanium_itemfields.h patches/underfoot_itemfields.h
patches/Titanium_ops.h patches/underfoot_ops.h
patches/Titanium_constants.h patches/underfoot_constants.h
patches/Titanium_structs.h patches/underfoot_structs.h
patches/Underfoot.h patches/client62.cpp
patches/Underfoot_itemfields.h
patches/Underfoot_ops.h
patches/Underfoot_constants.h
patches/Underfoot_structs.h
patches/Client62.cpp
patches/patches.cpp patches/patches.cpp
patches/SoD.cpp patches/sod.cpp
patches/SoF.cpp patches/sof.cpp
patches/RoF.cpp patches/rof.cpp
#patches/RoF2.cpp patches/titanium.cpp
patches/Titanium.cpp patches/underfoot.cpp
patches/Underfoot.cpp
) )
SOURCE_GROUP(SocketLib FILES SOURCE_GROUP(SocketLib FILES
@ -345,8 +333,7 @@ ADD_LIBRARY(common ${common_sources} ${common_headers})
IF(UNIX) IF(UNIX)
ADD_DEFINITIONS(-fPIC) ADD_DEFINITIONS(-fPIC)
#TODO: Add "patches/RoF2.cpp" when it becomes active SET_SOURCE_FILES_PROPERTIES("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/underfoot.cpp" PROPERTIES COMPILE_FLAGS -O0)
SET_SOURCE_FILES_PROPERTIES("patches/SoD.cpp" "patches/SoF.cpp" "patches/RoF.cpp" "patches/Underfoot.cpp" PROPERTIES COMPILE_FLAGS -O0)
ENDIF(UNIX) ENDIF(UNIX)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

View File

@ -1,405 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
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
*/
/*
* EQStream classes, by Quagmire
*/
#include "../common/debug.h"
#include <iostream>
#include <iomanip>
#ifdef WIN32
#include <process.h>
#else
#include <arpa/inet.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include "../common/unix.h"
#define SOCKET_ERROR -1
#endif
#include "EQNetwork.h"
#include "EQStream.h"
#include "../common/packet_dump.h"
#include "../common/packet_dump_file.h"
#include "../common/packet_functions.h"
#include "../common/MiscFunctions.h"
#include "../common/crc32.h"
#include "../common/eq_packet_structs.h"
#define EQN_DEBUG 0
#define EQN_DEBUG_Error 0
#define EQN_DEBUG_Packet 0
#define EQN_DEBUG_Fragment 0
#define EQN_DEBUG_ACK 0
#define EQN_DEBUG_Unknown 0
#define EQN_DEBUG_NewStream 0
#define LOG_PACKETS 0
#define LOG_RAW_PACKETS_OUT 0
#define LOG_RAW_PACKETS_IN 0
//#define PRIORITYTEST
template <typename type> // LO_BYTE
type LO_BYTE (type a) {return (a&=0xff);}
template <typename type> // HI_BYTE
type HI_BYTE (type a) {return (a&=0xff00);}
template <typename type> // LO_WORD
type LO_WORD (type a) {return (a&=0xffff);}
template <typename type> // HI_WORD
type HI_WORD (type a) {return (a&=0xffff0000);}
template <typename type> // HI_LOSWAPshort
type HI_LOSWAPshort (type a) {return (LO_BYTE(a)<<8) | (HI_BYTE(a)>>8);}
template <typename type> // HI_LOSWAPlong
type HI_LOSWAPlong (type x) {return (LO_WORD(a)<<16) | (HIWORD(a)>>16);}
EQStreamServer::EQStreamServer(uint16 iPort) {
RunLoop = false;
pPort = iPort;
pOpen = false;
#ifdef WIN32
WORD version = MAKEWORD (1,1);
WSADATA wsadata;
WSAStartup (version, &wsadata);
#endif
sock = 0;
}
EQStreamServer::~EQStreamServer() {
Close();
RunLoop = false;
MLoopRunning.lock();
MLoopRunning.unlock();
#ifdef WIN32
WSACleanup();
#endif
connection_list.clear();
while (!NewQueue.empty())
NewQueue.pop(); // they're deleted with the list, clear this queue so it doesnt try to delete them again
}
bool EQStreamServer::Open(uint16 iPort) {
LockMutex lock(&MOpen);
if (iPort && pPort != iPort) {
if (pOpen)
return false;
pPort = iPort;
}
if (!RunLoop) {
RunLoop = true;
#ifdef WIN32
_beginthread(EQStreamServerLoop, 0, this);
#else
pthread_t thread;
pthread_create(&thread, NULL, &EQStreamServerLoop, this);
#endif
}
if (pOpen) {
return true;
}
else {
struct sockaddr_in address;
// int reuse_addr = 1;
int bufsize = 64 * 1024; // 64kbyte send/recieve buffers, up from default of 8k
#ifdef WIN32
unsigned long nonblocking = 1;
#endif
/* Setup internet address information.
This is used with the bind() call */
memset((char *) &address, 0, sizeof(address));
address.sin_family = AF_INET;
address.sin_port = htons(pPort);
address.sin_addr.s_addr = htonl(INADDR_ANY);
/* Setting up UDP port for new clients */
sock = socket(AF_INET, SOCK_DGRAM, 0);
if (sock < 0) {
return false;
}
//#ifdef WIN32
// setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &reuse_addr, sizeof(reuse_addr));
setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char*) &bufsize, sizeof(bufsize));
setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char*) &bufsize, sizeof(bufsize));
//#else
// setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &reuse_addr, sizeof(reuse_addr));
// setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &bufsize, sizeof(bufsize));
// setsockopt(sock, SOL_SOCKET, SO_SNDBUF, &bufsize, sizeof(bufsize));
//#endif
if (bind(sock, (struct sockaddr *) &address, sizeof(address)) < 0) {
#ifdef WIN32
closesocket(sock);
#else
close(sock);
#endif
return false;
}
#ifdef WIN32
ioctlsocket (sock, FIONBIO, &nonblocking);
#else
fcntl(sock, F_SETFL, O_NONBLOCK);
#endif
pOpen = true;
return true;
}
}
void EQStreamServer::Close() {
SetOpen(false);
if (sock) {
#ifdef WIN32
closesocket(sock);
#else
close(sock);
#endif
}
sock = 0;
}
bool EQStreamServer::IsOpen() {
MOpen.lock();
bool ret = pOpen;
MOpen.unlock();
return ret;
}
void EQStreamServer::SetOpen(bool iOpen) {
MOpen.lock();
pOpen = iOpen;
MOpen.unlock();
}
void EQStreamServer::Process() {
_CP(EQStreamServer_Process);
if (!IsOpen()) {
if (sock) {
#ifdef WIN32
closesocket(sock);
#else
close(sock);
#endif
sock = 0;
}
return;
}
uchar buffer[1518];
int status;
struct sockaddr_in from;
unsigned int fromlen;
from.sin_family = AF_INET;
fromlen = sizeof(from);
while (1) {
#ifdef WIN32
status = recvfrom(sock, (char *) buffer, sizeof(buffer), 0,(struct sockaddr*) &from, (int *) &fromlen);
#else
status = recvfrom(sock, buffer, sizeof(buffer), 0,(struct sockaddr*) &from, &fromlen);
#endif
if (status >= 1) {
cout << "Got data from recvfrom" << endl;
RecvData(buffer, status, from.sin_addr.s_addr, from.sin_port);
}
else {
break;
}
}
std::map <std::string, EQStream*>::iterator connection;
for (connection = connection_list.begin(); connection != connection_list.end();) {
if (!connection->second) {
connection = connection_list.erase(connection);
continue;
}
EQStream* eqs_data = connection->second;
if (eqs_data->IsFree() && (!eqs_data->CheckNetActive())) {
safe_delete(eqs_data);
connection = connection_list.erase(connection);
} else if (!eqs_data->RunLoop) {
eqs_data->Process(sock);
++connection;
}
}
}
void EQStreamServer::RecvData(uchar* data, uint32 size, uint32 irIP, uint16 irPort) {
/*
CHANGE HISTORY
Version Author Date Comment
1 Unknown Unknown Initial Revision
2 Joolz 05-Jan-2003 Optimised
3 Quagmire 05-Feb-2003 Changed so 2 connection objects wouldnt be created for the same ip/port pair, often happened
*/
// Check for invalid data
if (!data || size <= 4) return;
//if (CRC32::Generate(data, size-4) != ntohl(*((uint32*) &data[size-4]))) {
#if EQN_DEBUG_Error >= 1
//cout << "Incomming Packet failed checksum" << endl;
#endif
//return;
//}
char temp[25];
sprintf(temp,"%lu:%u",(unsigned long)irIP,irPort);
cout << "Data from " << temp << endl;
EQStream* tmp = NULL;
std::map <std::string, EQStream*>::iterator connection;
if ((connection=connection_list.find(temp))!=connection_list.end())
tmp=connection->second;
if(tmp != NULL && tmp->GetrPort() == irPort)
{
tmp->RecvData(data, size);
return;
}
else if(tmp != NULL && tmp->GetrPort() != irPort)
{
printf("Conflicting IPs & Ports: IP %i and Port %i is conflicting with IP %i and Port %i\n",irIP,irPort,tmp->GetrIP(),tmp->GetrPort());
return;
}
if (data[1]==0x01) {
cout << "New EQStream Connection." << endl;
EQStream* tmp = new EQStream(irIP, irPort);
tmp->RecvData(data, size);
connection_list[temp]=tmp;
if (connection_list.find(temp)==connection_list.end()) {
cerr <<"Could not find new connection we just added!" << endl;
}
MNewQueue.lock();
NewQueue.push(tmp);
MNewQueue.unlock();
return;
}
#if EQN_DEBUG >= 4
struct in_addr in;
in.s_addr = irIP;
cout << "WARNING: Stray packet? " << inet_ntoa(in) << ":" << irPort << endl;
#endif
}
EQStream* EQStreamServer::NewQueuePop() {
EQStream* ret = 0;
MNewQueue.lock();
if (!NewQueue.empty()) {
ret = NewQueue.front();
NewQueue.pop();
}
MNewQueue.unlock();
return ret;
}
#ifdef WIN32
void EQStreamServerLoop(void* tmp)
#else
void* EQStreamServerLoop(void* tmp)
#endif
{
#ifdef WIN32
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
#endif
EQStreamServer* eqns = (EQStreamServer*) tmp;
eqns->MLoopRunning.lock();
while (eqns->RunLoop) {
{
_CP(EQStreamServerLoop);
eqns->Process();
}
Sleep(1);
}
eqns->MLoopRunning.unlock();
#ifdef WIN32
_endthread();
#else
return 0;
#endif
}
#ifdef WIN32
void EQStreamInLoop(void* tmp)
#else
void* EQStreamInLoop(void* tmp)
#endif
{
EQStream* eqs = (EQStream*) tmp;
#ifdef _DEBUG
if (eqs->ConnectionType != Outgoing) {
ThrowError("EQStreamInLoop: eqs->ConnectionType != Outgoing");
}
#endif
eqs->MLoopRunning.lock();
Timer* tmp_timer = new Timer(100);
tmp_timer->Start();
while (eqs->RunLoop) {
{
_CP(EQStreamInLoop);
if(tmp_timer->Check())
eqs->DoRecvData();
}
Sleep(1);
}
safe_delete(tmp_timer);
eqs->MLoopRunning.unlock();
#ifdef WIN32
_endthread();
#else
return 0;
#endif
}
#ifdef WIN32
void EQStreamOutLoop(void* tmp)
#else
void* EQStreamOutLoop(void* tmp)
#endif
{
EQStream* eqs = (EQStream*) tmp;
#ifdef _DEBUG
if (eqs->ConnectionType != Outgoing) {
ThrowError("EQStreamOutLoop: eqs->ConnectionType != Outgoing");
}
#endif
eqs->MLoopRunning.lock();
Timer* tmp_timer = new Timer(100);
tmp_timer->Start();
while (eqs->RunLoop) {
{
_CP(EQStreamOutLoop);
if(tmp_timer->Check())
eqs->Process(eqs->outsock);
}
Sleep(1);
}
safe_delete(tmp_timer);
eqs->MLoopRunning.unlock();
#ifdef WIN32
_endthread();
#else
return 0;
#endif
}

View File

@ -1,120 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
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
*/
#ifndef EQNETWORK_H
#define EQNETWORK_H
#include "../common/debug.h"
//uncomment this to enable the packet profiler. Counts the number
//of each type of packet sent or received on a connection.
#ifdef ZONE
//#define PACKET_PROFILER 1
#endif
#include <string.h>
#include <map>
#include <list>
#include <queue>
#include "../common/types.h"
#include "../common/timer.h"
#include "../common/linked_list.h"
#include "../common/queue.h"
#include "../common/Mutex.h"
#include "../common/packet_functions.h"
#include "EQStream.h"
#ifdef PACKET_PROFILER
#include "../common/rdtsc.h"
#endif
#define EQNC_TIMEOUT 60000
#define NAS_TIMER 100
#define KA_TIMER 400 /* keeps the lag bar constant */
#define MAX_HEADER_SIZE 39 // Quag: 39 is the max header + opcode + crc32 + unknowns size
class EQStreamServer;
class EQStream;
class EQStreamPacket;
class EQStreamFragmentGroupList;
class EQStreamFragmentGroup;
typedef EQStreamServer EQNServer;
typedef EQStream EQNConnection;
typedef EQStreamPacket EQNPacket;
typedef EQStreamFragmentGroupList EQNFragmentGroupList;
typedef EQStreamFragmentGroup EQNFragmentGroup;
#define FLAG_COMPRESSED 0x1000
#define FLAG_COMBINED 0x2000
#define FLAG_ENCRYPTED 0x4000
#define FLAG_IMPLICIT 0x8000
#define FLAG_ALL 0xF000
#define StripFlags(x) (x & ~FLAG_ALL)
// Optimistic compression, used for guessing pre-alloc size on debug output
#define BEST_COMPR_RATIO 300
enum eappCompressed { appNormal, appInflated, appDeflated };
#ifdef WIN32
void EQStreamServerLoop(void* tmp);
void EQStreamInLoop(void* tmp);
void EQStreamOutLoop(void* tmp);
#else
void* EQStreamServerLoop(void* tmp);
void* EQStreamInLoop(void* tmp);
void* EQStreamOutLoop(void* tmp);
#endif
class EQStreamServer {
public:
EQStreamServer(uint16 iPort = 0);
virtual ~EQStreamServer();
bool Open(uint16 iPort = 0); // opens the port
void Close(); // closes the port
void KillAll(); // kills all clients
inline uint16 GetPort() { return pPort; }
EQStream* NewQueuePop();
protected:
#ifdef WIN32
friend void EQStreamServerLoop(void* tmp);
#else
friend void* EQStreamServerLoop(void* tmp);
#endif
void Process();
bool IsOpen();
void SetOpen(bool iOpen);
bool RunLoop;
Mutex MLoopRunning;
private:
void RecvData(uchar* data, uint32 size, uint32 irIP, uint16 irPort);
#ifdef WIN32
SOCKET sock;
#else
int sock;
#endif
uint16 pPort;
bool pOpen;
Mutex MNewQueue;
Mutex MOpen;
std::map<std::string,EQStream*> connection_list;
std::queue<EQStream *> NewQueue;
};
#endif

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <stdarg.h> #include <stdarg.h>
#include "Parse.h" #include "Parse.h"
#include "HTTPSocket.h" #include "HTTPSocket.h"
#include "../TCPConnection.h" #include "../tcp_connection.h"
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>

View File

@ -42,7 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <map> #include <map>
#include <string> #include <string>
#include "../TCPConnection.h" #include "../tcp_connection.h"
#ifdef SOCKETS_NAMESPACE #ifdef SOCKETS_NAMESPACE

View File

@ -211,7 +211,7 @@ typedef unsigned short port_t;
#endif #endif
#ifdef _THREADSAFE_SOCKETS #ifdef _THREADSAFE_SOCKETS
#include "Mutex.h" #include "mutex.h"
#include "Lock.h" #include "Lock.h"
#endif #endif

View File

@ -16,7 +16,7 @@
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 "debug.h" #include "debug.h"
#include "BasePacket.h" #include "base_packet.h"
#include "misc.h" #include "misc.h"
#include "packet_dump.h" #include "packet_dump.h"

View File

@ -17,7 +17,7 @@
*/ */
#include "debug.h" #include "debug.h"
#include "Condition.h" #include "condition.h"
#ifdef _WINDOWS #ifdef _WINDOWS

View File

@ -43,7 +43,7 @@
#include "database.h" #include "database.h"
#include "eq_packet_structs.h" #include "eq_packet_structs.h"
#include "guilds.h" #include "guilds.h"
#include "StringUtil.h" #include "string_util.h"
#include "extprofile.h" #include "extprofile.h"
extern Client client; extern Client client;

View File

@ -26,11 +26,11 @@
#include "dbcore.h" #include "dbcore.h"
#include "linked_list.h" #include "linked_list.h"
#include "eq_packet_structs.h" #include "eq_packet_structs.h"
/*#include "EQStream.h" /*#include "eq_stream.h"
#include "guilds.h" #include "guilds.h"
#include "MiscFunctions.h" #include "misc_functions.h"
#include "Mutex.h" #include "mutex.h"
#include "Item.h" #include "item.h"
#include "extprofile.h"*/ #include "extprofile.h"*/
#include <string> #include <string>
#include <vector> #include <vector>

View File

@ -12,8 +12,8 @@
#include <limits.h> #include <limits.h>
#include "dbcore.h" #include "dbcore.h"
#include <string.h> #include <string.h>
//#include "../common/MiscFunctions.h" //#include "../common/misc_functions.h"
#include "StringUtil.h" #include "string_util.h"
#define ASYNC_LOOP_GRANULARITY 4 //# of ms between checking our work #define ASYNC_LOOP_GRANULARITY 4 //# of ms between checking our work
bool DBAsyncCB_LoadVariables(DBAsyncWork* iWork) { bool DBAsyncCB_LoadVariables(DBAsyncWork* iWork) {

View File

@ -10,7 +10,7 @@
#include <limits.h> #include <limits.h>
#include "dbcore.h" #include "dbcore.h"
#include <string.h> #include <string.h>
#include "../common/MiscFunctions.h" #include "../common/misc_functions.h"
#include <cstdlib> #include <cstdlib>
#ifdef _WINDOWS #ifdef _WINDOWS

View File

@ -9,12 +9,12 @@
#include <mysql.h> #include <mysql.h>
#include <string.h> #include <string.h>
#include "../common/types.h" #include "../common/types.h"
#include "../common/Mutex.h" #include "../common/mutex.h"
#include "../common/linked_list.h" #include "../common/linked_list.h"
#include "../common/queue.h" #include "../common/queue.h"
#include "../common/timer.h" #include "../common/timer.h"
#include "../common/Condition.h" #include "../common/condition.h"
#include "../common/MySQLRequestResult.h" #include "../common/mysql_request_result.h"
class DBcore { class DBcore {
public: public:

View File

@ -19,8 +19,8 @@
#endif #endif
#include "debug.h" #include "debug.h"
#include "StringUtil.h" #include "string_util.h"
#include "MiscFunctions.h" #include "misc_functions.h"
#include "platform.h" #include "platform.h"
#ifndef va_copy #ifndef va_copy

View File

@ -69,7 +69,7 @@
#include "logsys.h" #include "logsys.h"
#include "../common/Mutex.h" #include "../common/mutex.h"
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>

View File

@ -30,8 +30,8 @@ tremendously.
#include <stdio.h> #include <stdio.h>
#include <iomanip> #include <iomanip>
#include "EmuTCPConnection.h" #include "emu_tcp_connection.h"
#include "EmuTCPServer.h" #include "emu_tcp_server.h"
#include "../common/servertalk.h" #include "../common/servertalk.h"
#include "../common/packet_dump.h" #include "../common/packet_dump.h"

View File

@ -1,7 +1,7 @@
#ifndef EmuTCPCONNECTION_H_ #ifndef EmuTCPCONNECTION_H_
#define EmuTCPCONNECTION_H_ #define EmuTCPCONNECTION_H_
#include "TCPConnection.h" #include "tcp_connection.h"
#include "timer.h" #include "timer.h"
//moved out of TCPConnection:: to be more exportable //moved out of TCPConnection:: to be more exportable

View File

@ -1,6 +1,6 @@
#include "debug.h" #include "debug.h"
#include "EmuTCPServer.h" #include "emu_tcp_server.h"
#include "EmuTCPConnection.h" #include "emu_tcp_connection.h"
EmuTCPServer::EmuTCPServer(uint16 iPort, bool iOldFormat) EmuTCPServer::EmuTCPServer(uint16 iPort, bool iOldFormat)
: TCPServer<EmuTCPConnection>(iPort), : TCPServer<EmuTCPConnection>(iPort),

View File

@ -1,7 +1,7 @@
#ifndef EmuTCPSERVER_H_ #ifndef EmuTCPSERVER_H_
#define EmuTCPSERVER_H_ #define EmuTCPSERVER_H_
#include "TCPServer.h" #include "tcp_server.h"
class EmuTCPConnection; class EmuTCPConnection;
struct EmuTCPNetPacket_Struct; struct EmuTCPNetPacket_Struct;

View File

@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "eq_dictionary.h" #include "eq_dictionary.h"
#include "StringUtil.h" #include "string_util.h"
// //
// class EmuConstants // class EmuConstants

View File

@ -26,13 +26,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "eq_constants.h" #include "eq_constants.h"
#include "clientversions.h" #include "clientversions.h"
#include <string> #include <string>
#include "../common/patches/Client62_constants.h" #include "../common/patches/client62_constants.h"
#include "../common/patches/Titanium_constants.h" #include "../common/patches/titanium_constants.h"
#include "../common/patches/SoF_constants.h" #include "../common/patches/sof_constants.h"
#include "../common/patches/SoD_constants.h" #include "../common/patches/sod_constants.h"
#include "../common/patches/Underfoot_constants.h" #include "../common/patches/underfoot_constants.h"
#include "../common/patches/RoF_constants.h" #include "../common/patches/rof_constants.h"
//#include "../common/patches/RoF2_constants.h" //#include "../common/patches/rof2_constants.h"
// *** DO NOT CHANGE without a full understanding of the consequences..the server is set up to use these settings explicitly!! *** // *** DO NOT CHANGE without a full understanding of the consequences..the server is set up to use these settings explicitly!! ***
// *** You will cause compilation failures and corrupt your database if partial or incorrect attempts to change them are made!! *** // *** You will cause compilation failures and corrupt your database if partial or incorrect attempts to change them are made!! ***

View File

@ -19,10 +19,10 @@
#include <stdio.h> #include <stdio.h>
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
#include "EQPacket.h" #include "eq_packet.h"
#include "misc.h" #include "misc.h"
#include "op_codes.h" #include "op_codes.h"
#include "CRC16.h" #include "crc16.h"
#include "platform.h" #include "platform.h"
#ifndef STATIC_OPCODE #ifndef STATIC_OPCODE
#include "opcodemgr.h" #include "opcodemgr.h"

View File

@ -18,8 +18,8 @@
#ifndef _EQPACKET_H #ifndef _EQPACKET_H
#define _EQPACKET_H #define _EQPACKET_H
#include "BasePacket.h" #include "base_packet.h"
#include "EQStreamType.h" #include "eq_stream_type.h"
#include "op_codes.h" #include "op_codes.h"
#include "platform.h" #include "platform.h"

View File

@ -17,12 +17,12 @@
*/ */
#include "debug.h" #include "debug.h"
#include "EQPacket.h" #include "eq_packet.h"
#include "EQStream.h" #include "eq_stream.h"
#include "misc.h" #include "misc.h"
#include "Mutex.h" #include "mutex.h"
#include "op_codes.h" #include "op_codes.h"
#include "CRC16.h" #include "crc16.h"
#include "platform.h" #include "platform.h"
#include <string> #include <string>

View File

@ -9,13 +9,13 @@
#ifndef WIN32 #ifndef WIN32
#include <netinet/in.h> #include <netinet/in.h>
#endif #endif
#include "EQStreamType.h" #include "eq_stream_type.h"
#include "EQPacket.h" #include "eq_packet.h"
#include "EQStreamIntf.h" #include "eq_stream_intf.h"
#include "Mutex.h" #include "mutex.h"
#include "../common/opcodemgr.h" #include "../common/opcodemgr.h"
#include "../common/misc.h" #include "../common/misc.h"
#include "../common/Condition.h" #include "../common/condition.h"
#include "../common/timer.h" #include "../common/timer.h"
#define FLAG_COMPRESSED 0x01 #define FLAG_COMPRESSED 0x01

View File

@ -1,5 +1,5 @@
#include "debug.h" #include "debug.h"
#include "EQStreamFactory.h" #include "eq_stream_factory.h"
#ifdef _WINDOWS #ifdef _WINDOWS
#include <winsock.h> #include <winsock.h>
#include <process.h> #include <process.h>
@ -16,7 +16,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <iostream> #include <iostream>
#include "op_codes.h" #include "op_codes.h"
#include "EQStream.h" #include "eq_stream.h"
#include "logsys.h" #include "logsys.h"
ThreadReturnType EQStreamFactoryReaderLoop(void *eqfs) ThreadReturnType EQStreamFactoryReaderLoop(void *eqfs)

View File

@ -4,8 +4,8 @@
#include <queue> #include <queue>
#include <map> #include <map>
#include "../common/EQStream.h" #include "../common/eq_stream.h"
#include "../common/Condition.h" #include "../common/condition.h"
#include "../common/timeoutmgr.h" #include "../common/timeoutmgr.h"
#include "../common/opcodemgr.h" #include "../common/opcodemgr.h"
#include "../common/timer.h" #include "../common/timer.h"

View File

@ -1,6 +1,6 @@
#include "debug.h" #include "debug.h"
#include "EQStreamIdent.h" #include "eq_stream_ident.h"
#include "EQStreamProxy.h" #include "eq_stream_proxy.h"
#include "logsys.h" #include "logsys.h"
EQStreamIdentifier::~EQStreamIdentifier() { EQStreamIdentifier::~EQStreamIdentifier() {

View File

@ -1,7 +1,7 @@
#ifndef EQSTREAMIDENT_H_ #ifndef EQSTREAMIDENT_H_
#define EQSTREAMIDENT_H_ #define EQSTREAMIDENT_H_
#include "EQStream.h" #include "eq_stream.h"
#include "timer.h" #include "timer.h"
#include <vector> #include <vector>
#include <string> #include <string>

View File

@ -1,8 +1,8 @@
#include "debug.h" #include "debug.h"
#include "EQStreamProxy.h" #include "eq_stream_proxy.h"
#include "EQStream.h" #include "eq_stream.h"
#include "StructStrategy.h" #include "struct_strategy.h"
EQStreamProxy::EQStreamProxy(EQStream *&stream, const StructStrategy *structs, OpcodeManager **opcodes) EQStreamProxy::EQStreamProxy(EQStream *&stream, const StructStrategy *structs, OpcodeManager **opcodes)

View File

@ -3,7 +3,7 @@
#include "types.h" #include "types.h"
#include "EQStreamIntf.h" #include "eq_stream_intf.h"
class EQStream; class EQStream;
class StructStrategy; class StructStrategy;

View File

@ -16,7 +16,7 @@
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 "debug.h" #include "debug.h"
#include "EQDB.h" #include "eqdb.h"
#include "database.h" #include "database.h"
#include <mysql.h> #include <mysql.h>
#include <cstring> #include <cstring>

View File

@ -22,7 +22,7 @@
#include <vector> #include <vector>
#include <map> #include <map>
#include "types.h" #include "types.h"
#include "EQDBRes.h" #include "eqdb_res.h"
#include <mysql.h> #include <mysql.h>
//this is the main object exported to perl. //this is the main object exported to perl.

View File

@ -16,7 +16,7 @@
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 "debug.h" #include "debug.h"
#include "EQDBRes.h" #include "eqdb_res.h"
#include <mysql.h> #include <mysql.h>
std::vector<std::string> EQDBRes::fetch_row_array() { std::vector<std::string> EQDBRes::fetch_row_array() {

View File

@ -16,8 +16,8 @@
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 "EQEmuConfig.h" #include "eqemu_config.h"
#include "MiscFunctions.h" #include "misc_functions.h"
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>

View File

@ -18,7 +18,7 @@
#ifndef __EQEmuConfig_H #ifndef __EQEmuConfig_H
#define __EQEmuConfig_H #define __EQEmuConfig_H
#include "XMLParser.h" #include "xml_parser.h"
#include "linked_list.h" #include "linked_list.h"
struct LoginConfig { struct LoginConfig {
@ -112,14 +112,14 @@ protected:
#define ELEMENT(name) \ #define ELEMENT(name) \
void do_##name(TiXmlElement *ele); void do_##name(TiXmlElement *ele);
#include "EQEmuConfig_elements.h" #include "eqemu_config_elements.h"
EQEmuConfig() { EQEmuConfig() {
// import the needed handler prototypes // import the needed handler prototypes
#define ELEMENT(name) \ #define ELEMENT(name) \
Handlers[#name]=(ElementHandler)&EQEmuConfig::do_##name; Handlers[#name]=(ElementHandler)&EQEmuConfig::do_##name;
#include "EQEmuConfig_elements.h" #include "eqemu_config_elements.h"
// Set sane defaults // Set sane defaults

View File

@ -18,10 +18,10 @@
#ifdef _WINDOWS #ifdef _WINDOWS
#include <windows.h> #include <windows.h>
#endif #endif
#include "EQEMuError.h" #include "eqemu_error.h"
#include "linked_list.h" #include "linked_list.h"
#include "Mutex.h" #include "mutex.h"
#include "MiscFunctions.h" #include "misc_functions.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#ifdef _WINDOWS #ifdef _WINDOWS

View File

@ -19,7 +19,7 @@
#define EXTENDED_PROFILE_H #define EXTENDED_PROFILE_H
#include "eq_packet_structs.h" #include "eq_packet_structs.h"
#include "Item.h" #include "item.h"
#pragma pack(1) #pragma pack(1)

View File

@ -20,8 +20,8 @@
#include "guild_base.h" #include "guild_base.h"
#include "database.h" #include "database.h"
#include "logsys.h" #include "logsys.h"
//#include "MiscFunctions.h" //#include "misc_functions.h"
#include "StringUtil.h" #include "string_util.h"
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>

View File

@ -16,7 +16,7 @@
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 "MiscFunctions.h" #include "misc_functions.h"
#include "guilds.h" #include "guilds.h"
#include "database.h" #include "database.h"
#include "eq_packet_structs.h" #include "eq_packet_structs.h"

View File

@ -17,8 +17,8 @@
*/ */
#include "debug.h" #include "debug.h"
#include "StringUtil.h" #include "string_util.h"
#include "Item.h" #include "item.h"
#include "database.h" #include "database.h"
#include "misc.h" #include "misc.h"
#include "races.h" #include "races.h"

View File

@ -22,7 +22,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "misc.h" #include "misc.h"
#include "EQPacket.h" #include "eq_packet.h"
#define LOG_CATEGORY(category) #category , #define LOG_CATEGORY(category) #category ,

View File

@ -18,7 +18,7 @@
#include "debug.h" #include "debug.h"
#include "logsys.h" #include "logsys.h"
#include "StringUtil.h" #include "string_util.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>

View File

@ -9,7 +9,7 @@
*/ */
#include <string.h> /* for memcpy() */ #include <string.h> /* for memcpy() */
#include "../common/md5.h" #include "../common/md5.h"
#include "../common/StringUtil.h" #include "../common/string_util.h"
#include "../common/seperator.h" #include "../common/seperator.h"
MD5::MD5() { MD5::MD5() {

View File

@ -16,7 +16,7 @@
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 "MiscFunctions.h" #include "misc_functions.h"
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <math.h> #include <math.h>

View File

@ -16,7 +16,7 @@
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 "../common/Mutex.h" #include "../common/mutex.h"
#include <iostream> #include <iostream>

View File

@ -1,4 +1,4 @@
#include "MySQLRequestResult.h" #include "mysql_request_result.h"
MySQLRequestResult::MySQLRequestResult() MySQLRequestResult::MySQLRequestResult()

View File

@ -8,7 +8,7 @@
#include <mysql.h> #include <mysql.h>
#include "types.h" #include "types.h"
#include "MySQLRequestRow.h" #include "mysql_request_row.h"
#include <string> #include <string>
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>

View File

@ -1,4 +1,4 @@
#include "MySQLRequestRow.h" #include "mysql_request_row.h"
MySQLRequestRow::MySQLRequestRow(const MySQLRequestRow& row) MySQLRequestRow::MySQLRequestRow(const MySQLRequestRow& row)
: m_Result(row.m_Result), m_MySQLRow(row.m_MySQLRow) : m_Result(row.m_Result), m_MySQLRow(row.m_MySQLRow)

View File

@ -20,7 +20,7 @@
#define OPCODE_MANAGER_H #define OPCODE_MANAGER_H
#include "types.h" #include "types.h"
#include "Mutex.h" #include "mutex.h"
#include "emu_opcodes.h" #include "emu_opcodes.h"
#include <map> #include <map>

View File

@ -21,7 +21,7 @@
#include <stdio.h> #include <stdio.h>
#include "packet_dump.h" #include "packet_dump.h"
#include "EQPacket.h" #include "eq_packet.h"
#include "../common/servertalk.h" #include "../common/servertalk.h"
void DumpPacketAscii(const uchar* buf, uint32 size, uint32 cols, uint32 skip) { void DumpPacketAscii(const uchar* buf, uint32 size, uint32 cols, uint32 skip) {

View File

@ -35,7 +35,7 @@
#include <stdarg.h> #include <stdarg.h>
#endif #endif
#include "EQStream.h" #include "eq_stream.h"
#include "packet_dump_file.h" #include "packet_dump_file.h"
void FileDumpPacketAscii(const char* filename, const uchar* buf, uint32 size, uint32 cols, uint32 skip) { void FileDumpPacketAscii(const char* filename, const uchar* buf, uint32 size, uint32 cols, uint32 skip) {

View File

@ -1,17 +1,17 @@
#include "../debug.h" #include "../debug.h"
#include "Client62.h" #include "client62.h"
#include "../opcodemgr.h" #include "../opcodemgr.h"
#include "../logsys.h" #include "../logsys.h"
#include "../EQStreamIdent.h" #include "../eq_stream_ident.h"
#include "../crc32.h" #include "../crc32.h"
#include "../eq_packet_structs.h" #include "../eq_packet_structs.h"
#include "../MiscFunctions.h" #include "../misc_functions.h"
#include "../StringUtil.h" #include "../string_util.h"
#include "../Item.h" #include "../item.h"
#include "../clientversions.h" #include "../clientversions.h"
#include "Client62_structs.h" #include "client62_structs.h"
namespace Client62 { namespace Client62 {
@ -84,8 +84,8 @@ Strategy::Strategy()
: StructStrategy() : StructStrategy()
{ {
//all opcodes default to passthrough. //all opcodes default to passthrough.
#include "SSRegister.h" #include "ss_register.h"
#include "Client62_ops.h" #include "client62_ops.h"
} }
std::string Strategy::Describe() const { std::string Strategy::Describe() const {
@ -100,7 +100,7 @@ const EQClientVersion Strategy::ClientVersion() const
return EQClient62; return EQClient62;
} }
#include "SSDefine.h" #include "ss_define.h"
/* /*
@ -1042,7 +1042,7 @@ char *SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 d
#define C(field) "|%s" #define C(field) "|%s"
#define S(field) "|%s" #define S(field) "|%s"
#define F(field) "|%f" #define F(field) "|%f"
#include "Client62_itemfields.h" #include "client62_itemfields.h"
"%.*s\"" // Quotes (and protection, if needed) around static data "%.*s\"" // Quotes (and protection, if needed) around static data
"|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s" // Sub items "|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s" // Sub items
"%.*s%s" // For trailing quotes (and protection) if a subitem; "%.*s%s" // For trailing quotes (and protection) if a subitem;
@ -1054,7 +1054,7 @@ char *SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 d
#define C(field) ,field #define C(field) ,field
#define S(field) ,item->field #define S(field) ,item->field
#define F(field) ,item->field #define F(field) ,item->field
#include "Client62_itemfields.h" #include "client62_itemfields.h"
,depth,protection ,depth,protection
,sub_items[0] ? sub_items[0] : "" ,sub_items[0] ? sub_items[0] : ""
,sub_items[1] ? sub_items[1] : "" ,sub_items[1] ? sub_items[1] : ""

View File

@ -1,8 +1,8 @@
#ifndef CLIENT62_H_ #ifndef CLIENT62_H_
#define CLIENT62_H_ #define CLIENT62_H_
#include "../StructStrategy.h" #include "../struct_strategy.h"
#include "../Item.h" #include "../item.h"
class EQStreamIdentifier; class EQStreamIdentifier;
@ -27,8 +27,8 @@ namespace Client62 {
virtual const EQClientVersion ClientVersion() const; virtual const EQClientVersion ClientVersion() const;
//magic macro to declare our opcode processors //magic macro to declare our opcode processors
#include "SSDeclare.h" #include "ss_declare.h"
#include "Client62_ops.h" #include "client62_ops.h"
}; };

View File

@ -2,13 +2,13 @@
#include "../debug.h" #include "../debug.h"
#include "patches.h" #include "patches.h"
#include "Client62.h" #include "client62.h"
#include "Titanium.h" #include "titanium.h"
#include "Underfoot.h" #include "underfoot.h"
#include "SoF.h" #include "sof.h"
#include "SoD.h" #include "sod.h"
#include "RoF.h" #include "rof.h"
//#include "RoF2.h" //#include "rof2.h"
void RegisterAllPatches(EQStreamIdentifier &into) { void RegisterAllPatches(EQStreamIdentifier &into) {
Client62::Register(into); Client62::Register(into);

View File

@ -1,16 +1,16 @@
#include "../debug.h" #include "../debug.h"
#include "RoF.h" #include "rof.h"
#include "../opcodemgr.h" #include "../opcodemgr.h"
#include "../logsys.h" #include "../logsys.h"
#include "../EQStreamIdent.h" #include "../eq_stream_ident.h"
#include "../crc32.h" #include "../crc32.h"
#include "../eq_packet_structs.h" #include "../eq_packet_structs.h"
#include "../MiscFunctions.h" #include "../misc_functions.h"
#include "../StringUtil.h" #include "../string_util.h"
#include "../Item.h" #include "../item.h"
#include "RoF_structs.h" #include "rof_structs.h"
#include "../rulesys.h" #include "../rulesys.h"
#include <iostream> #include <iostream>
@ -89,8 +89,8 @@ Strategy::Strategy()
: StructStrategy() : StructStrategy()
{ {
//all opcodes default to passthrough. //all opcodes default to passthrough.
#include "SSRegister.h" #include "ss_register.h"
#include "RoF_ops.h" #include "rof_ops.h"
} }
std::string Strategy::Describe() const { std::string Strategy::Describe() const {
@ -105,7 +105,7 @@ const EQClientVersion Strategy::ClientVersion() const
return EQClientRoF; return EQClientRoF;
} }
#include "SSDefine.h" #include "ss_define.h"
// Converts Server Slot IDs to RoF Slot IDs for use in Encodes // Converts Server Slot IDs to RoF Slot IDs for use in Encodes

View File

@ -1,7 +1,7 @@
#ifndef RoF_H_ #ifndef RoF_H_
#define RoF_H_ #define RoF_H_
#include "../StructStrategy.h" #include "../struct_strategy.h"
class EQStreamIdentifier; class EQStreamIdentifier;
@ -26,8 +26,8 @@ namespace RoF {
virtual const EQClientVersion ClientVersion() const; virtual const EQClientVersion ClientVersion() const;
//magic macro to declare our opcode processors //magic macro to declare our opcode processors
#include "SSDeclare.h" #include "ss_declare.h"
#include "RoF_ops.h" #include "rof_ops.h"
}; };
}; };

View File

@ -1,16 +1,16 @@
#include "../debug.h" #include "../debug.h"
#include "SoD.h" #include "sod.h"
#include "../opcodemgr.h" #include "../opcodemgr.h"
#include "../logsys.h" #include "../logsys.h"
#include "../EQStreamIdent.h" #include "../eq_stream_ident.h"
#include "../crc32.h" #include "../crc32.h"
#include "../eq_packet_structs.h" #include "../eq_packet_structs.h"
#include "../MiscFunctions.h" #include "../misc_functions.h"
#include "../StringUtil.h" #include "../string_util.h"
#include "../Item.h" #include "../item.h"
#include "SoD_structs.h" #include "sod_structs.h"
#include "../rulesys.h" #include "../rulesys.h"
#include <iostream> #include <iostream>
@ -89,8 +89,8 @@ Strategy::Strategy()
: StructStrategy() : StructStrategy()
{ {
//all opcodes default to passthrough. //all opcodes default to passthrough.
#include "SSRegister.h" #include "ss_register.h"
#include "SoD_ops.h" #include "sod_ops.h"
} }
std::string Strategy::Describe() const { std::string Strategy::Describe() const {
@ -105,7 +105,7 @@ const EQClientVersion Strategy::ClientVersion() const
return EQClientSoD; return EQClientSoD;
} }
#include "SSDefine.h" #include "ss_define.h"
// Converts Server Slot IDs to SoD Slot IDs for use in Encodes // Converts Server Slot IDs to SoD Slot IDs for use in Encodes

View File

@ -1,7 +1,7 @@
#ifndef SoD_H_ #ifndef SoD_H_
#define SoD_H_ #define SoD_H_
#include "../StructStrategy.h" #include "../struct_strategy.h"
class EQStreamIdentifier; class EQStreamIdentifier;
@ -26,8 +26,8 @@ namespace SoD {
virtual const EQClientVersion ClientVersion() const; virtual const EQClientVersion ClientVersion() const;
//magic macro to declare our opcode processors //magic macro to declare our opcode processors
#include "SSDeclare.h" #include "ss_declare.h"
#include "SoD_ops.h" #include "sod_ops.h"
}; };
}; };

View File

@ -1,15 +1,15 @@
#include "../debug.h" #include "../debug.h"
#include "SoF.h" #include "sof.h"
#include "../opcodemgr.h" #include "../opcodemgr.h"
#include "../logsys.h" #include "../logsys.h"
#include "../EQStreamIdent.h" #include "../eq_stream_ident.h"
#include "../crc32.h" #include "../crc32.h"
#include "../eq_packet_structs.h" #include "../eq_packet_structs.h"
#include "../StringUtil.h" #include "../string_util.h"
#include "../Item.h" #include "../item.h"
#include "SoF_structs.h" #include "sof_structs.h"
#include "../rulesys.h" #include "../rulesys.h"
#include <iostream> #include <iostream>
@ -88,8 +88,8 @@ Strategy::Strategy()
: StructStrategy() : StructStrategy()
{ {
//all opcodes default to passthrough. //all opcodes default to passthrough.
#include "SSRegister.h" #include "ss_register.h"
#include "SoF_ops.h" #include "sof_ops.h"
} }
std::string Strategy::Describe() const { std::string Strategy::Describe() const {
@ -104,7 +104,7 @@ const EQClientVersion Strategy::ClientVersion() const
return EQClientSoF; return EQClientSoF;
} }
#include "SSDefine.h" #include "ss_define.h"
// Converts Server Slot IDs to SoF Slot IDs for use in Encodes // Converts Server Slot IDs to SoF Slot IDs for use in Encodes

View File

@ -1,7 +1,7 @@
#ifndef SoF_H_ #ifndef SoF_H_
#define SoF_H_ #define SoF_H_
#include "../StructStrategy.h" #include "../struct_strategy.h"
class EQStreamIdentifier; class EQStreamIdentifier;
@ -26,8 +26,8 @@ namespace SoF {
virtual const EQClientVersion ClientVersion() const; virtual const EQClientVersion ClientVersion() const;
//magic macro to declare our opcode processors //magic macro to declare our opcode processors
#include "SSDeclare.h" #include "ss_declare.h"
#include "SoF_ops.h" #include "sof_ops.h"
}; };
}; };

View File

@ -2,7 +2,7 @@
#include "TEMPLATE.h" #include "TEMPLATE.h"
#include "../opcodemgr.h" #include "../opcodemgr.h"
#include "../logsys.h" #include "../logsys.h"
#include "../EQStreamIdent.h" #include "../eq_stream_ident.h"
#include "../eq_packet_structs.h" #include "../eq_packet_structs.h"
#include "TEMPLATE_structs.h" #include "TEMPLATE_structs.h"
@ -68,7 +68,7 @@ Strategy::Strategy()
: StructStrategy() : StructStrategy()
{ {
//all opcodes default to passthrough. //all opcodes default to passthrough.
#include "SSRegister.h" #include "ss_register.h"
#include "TEMPLATE_ops.h" #include "TEMPLATE_ops.h"
} }
@ -80,7 +80,7 @@ std::string Strategy::Describe() const {
} }
#include "SSDefine.h" #include "ss_define.h"
/*ENCODE(OP_PlayerProfile) { /*ENCODE(OP_PlayerProfile) {

View File

@ -1,7 +1,7 @@
#ifndef TEMPLATE_H_ #ifndef TEMPLATE_H_
#define TEMPLATE_H_ #define TEMPLATE_H_
#include "../StructStrategy.h" #include "../struct_strategy.h"
class EQStreamIdentifier; class EQStreamIdentifier;
@ -25,7 +25,7 @@ namespace TEMPLATE {
virtual std::string Describe() const; virtual std::string Describe() const;
virtual const EQClientVersion ClientVersion() const; virtual const EQClientVersion ClientVersion() const;
//magic macro to declare our opcodes //magic macro to declare our opcodes
#include "SSDeclare.h" #include "ss_declare.h"
#include "TEMPLATE_ops.h" #include "TEMPLATE_ops.h"
}; };

Some files were not shown because too many files have changed in this diff Show More