mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
Tons of renames
This commit is contained in:
parent
e429260763
commit
7fc21b9e3a
@ -23,7 +23,7 @@
|
||||
#include "../../common/platform.h"
|
||||
#include "../../common/crash.h"
|
||||
#include "../../common/rulesys.h"
|
||||
#include "../../common/StringUtil.h"
|
||||
#include "../../common/string_util.h"
|
||||
|
||||
void ExportSpells(SharedDatabase *db);
|
||||
void ExportSkillCaps(SharedDatabase *db);
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#include "../../common/platform.h"
|
||||
#include "../../common/crash.h"
|
||||
#include "../../common/rulesys.h"
|
||||
#include "../../common/StringUtil.h"
|
||||
#include "../../common/string_util.h"
|
||||
|
||||
void ImportSpells(SharedDatabase *db);
|
||||
void ImportSkillCaps(SharedDatabase *db);
|
||||
|
||||
@ -119,15 +119,15 @@ SET(common_headers
|
||||
eqemu_exception.h
|
||||
eqemu_config.h
|
||||
eqemu_config_elements.h
|
||||
EQEMuError.h
|
||||
EQPacket.h
|
||||
EQStream.h
|
||||
EQStreamFactory.h
|
||||
EQStreamIdent.h
|
||||
EQStreamIntf.h
|
||||
EQStreamLocator.h
|
||||
EQStreamProxy.h
|
||||
EQStreamType.h
|
||||
eqemu_error.h
|
||||
eq_packet.h
|
||||
eq_stream.h
|
||||
eq_stream_factory.h
|
||||
eq_stream_ident.h
|
||||
eq_stream_intf.h
|
||||
eq_stream_locator.h
|
||||
eq_stream_proxy.h
|
||||
eq_stream_type.h
|
||||
eqtime.h
|
||||
errmsg.h
|
||||
extprofile.h
|
||||
@ -138,7 +138,7 @@ SET(common_headers
|
||||
guild_base.h
|
||||
guilds.h
|
||||
ipc_mutex.h
|
||||
Item.h
|
||||
item.h
|
||||
item_fieldlist.h
|
||||
item_struct.h
|
||||
languages.h
|
||||
@ -150,18 +150,19 @@ SET(common_headers
|
||||
md5.h
|
||||
memory_mapped_file.h
|
||||
misc.h
|
||||
MiscFunctions.h
|
||||
misc_functions.h
|
||||
moremath.h
|
||||
Mutex.h
|
||||
MySQLRequestResult.h
|
||||
MySQLRequestRow.h
|
||||
mysql_request_result.h
|
||||
mysql_request_row.h
|
||||
op_codes.h
|
||||
opcode_dispatch.h
|
||||
opcodemgr.h
|
||||
packet_dump.h
|
||||
packet_dump_file.h
|
||||
packet_functions.h
|
||||
ProcLauncher.h
|
||||
platform.h
|
||||
proc_launcher.h
|
||||
profiler.h
|
||||
ptimer.h
|
||||
queue.h
|
||||
@ -175,11 +176,11 @@ SET(common_headers
|
||||
shareddb.h
|
||||
skills.h
|
||||
spdat.h
|
||||
StringUtil.h
|
||||
StructStrategy.h
|
||||
TCPBasicServer.h
|
||||
TCPConnection.h
|
||||
TCPServer.h
|
||||
string_util.h
|
||||
struct_strategy.h
|
||||
tcp_basic_server.h
|
||||
tcp_connection.h
|
||||
tcp_server.h
|
||||
timeoutmgr.h
|
||||
timer.h
|
||||
types.h
|
||||
@ -187,44 +188,43 @@ SET(common_headers
|
||||
useperl.h
|
||||
version.h
|
||||
worldconn.h
|
||||
XMLParser.h
|
||||
ZoneNumbers.h
|
||||
platform.h
|
||||
patches/Client62.h
|
||||
patches/Client62_constants.h
|
||||
patches/Client62_itemfields.h
|
||||
patches/Client62_ops.h
|
||||
patches/Client62_structs.h
|
||||
xml_parser.h
|
||||
zone_numbers.h
|
||||
patches/client62.h
|
||||
patches/client62_constants.h
|
||||
patches/client62_itemfields.h
|
||||
patches/client62_ops.h
|
||||
patches/client62_structs.h
|
||||
patches/patches.h
|
||||
patches/SoD.h
|
||||
patches/SoD_constants.h
|
||||
patches/SoD_itemfields.h
|
||||
patches/SoD_ops.h
|
||||
patches/SoD_structs.h
|
||||
patches/SoF.h
|
||||
patches/SoF_constants.h
|
||||
patches/SoF_itemfields.h
|
||||
patches/SoF_opcode_list.h
|
||||
patches/SoF_ops.h
|
||||
patches/SoF_structs.h
|
||||
patches/SSDeclare.h
|
||||
patches/SSDefine.h
|
||||
patches/SSRegister.h
|
||||
patches/RoF.h
|
||||
patches/RoF_constants.h
|
||||
patches/RoF_itemfields.h
|
||||
patches/RoF_ops.h
|
||||
patches/RoF_structs.h
|
||||
patches/Titanium.h
|
||||
patches/Titanium_constants.h
|
||||
patches/Titanium_itemfields.h
|
||||
patches/Titanium_ops.h
|
||||
patches/Titanium_structs.h
|
||||
patches/Underfoot.h
|
||||
patches/Underfoot_constants.h
|
||||
patches/Underfoot_itemfields.h
|
||||
patches/Underfoot_ops.h
|
||||
patches/Underfoot_structs.h
|
||||
patches/sod.h
|
||||
patches/sod_constants.h
|
||||
patches/sod_itemfields.h
|
||||
patches/sod_ops.h
|
||||
patches/sod_structs.h
|
||||
patches/sof.h
|
||||
patches/sof_constants.h
|
||||
patches/sof_itemfields.h
|
||||
patches/sof_opcode_list.h
|
||||
patches/sof_ops.h
|
||||
patches/sof_structs.h
|
||||
patches/ss_declare.h
|
||||
patches/ss_define.h
|
||||
patches/ss_register.h
|
||||
patches/rof.h
|
||||
patches/rof_constants.h
|
||||
patches/rof_itemfields.h
|
||||
patches/rof_ops.h
|
||||
patches/rof_structs.h
|
||||
patches/titanium.h
|
||||
patches/titanium_constants.h
|
||||
patches/titanium_itemfields.h
|
||||
patches/titanium_ops.h
|
||||
patches/titanium_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/File.h
|
||||
SocketLib/HttpdCookies.h
|
||||
@ -243,54 +243,48 @@ SET(common_headers
|
||||
)
|
||||
|
||||
SOURCE_GROUP(Patches FILES
|
||||
patches/Client62.h
|
||||
patches/Client62_itemfields.h
|
||||
patches/Client62_ops.h
|
||||
patches/Client62_constants.h
|
||||
patches/Client62_structs.h
|
||||
patches/client62.h
|
||||
patches/client62_itemfields.h
|
||||
patches/client62_ops.h
|
||||
patches/client62_constants.h
|
||||
patches/client62_structs.h
|
||||
patches/patches.h
|
||||
patches/SoD.h
|
||||
patches/SoD_itemfields.h
|
||||
patches/SoD_ops.h
|
||||
patches/SoD_constants.h
|
||||
patches/SoD_structs.h
|
||||
patches/SoF.h
|
||||
patches/SoF_itemfields.h
|
||||
patches/SoF_opcode_list.h
|
||||
patches/SoF_ops.h
|
||||
patches/SoF_constants.h
|
||||
patches/SoF_structs.h
|
||||
patches/SSDeclare.h
|
||||
patches/SSDefine.h
|
||||
patches/SSRegister.h
|
||||
patches/RoF.h
|
||||
patches/RoF_itemfields.h
|
||||
patches/RoF_ops.h
|
||||
patches/RoF_constants.h
|
||||
patches/RoF_structs.h
|
||||
#patches/RoF2.h
|
||||
#patches/RoF2_itemfields.h
|
||||
#patches/RoF2_ops.h
|
||||
#patches/RoF2_constants.h
|
||||
#patches/RoF2_structs.h
|
||||
patches/Titanium.h
|
||||
patches/Titanium_itemfields.h
|
||||
patches/Titanium_ops.h
|
||||
patches/Titanium_constants.h
|
||||
patches/Titanium_structs.h
|
||||
patches/Underfoot.h
|
||||
patches/Underfoot_itemfields.h
|
||||
patches/Underfoot_ops.h
|
||||
patches/Underfoot_constants.h
|
||||
patches/Underfoot_structs.h
|
||||
patches/Client62.cpp
|
||||
patches/sod.h
|
||||
patches/sod_itemfields.h
|
||||
patches/sod_ops.h
|
||||
patches/sod_constants.h
|
||||
patches/sod_structs.h
|
||||
patches/sof.h
|
||||
patches/sof_itemfields.h
|
||||
patches/sof_opcode_list.h
|
||||
patches/sof_ops.h
|
||||
patches/sof_constants.h
|
||||
patches/sof_structs.h
|
||||
patches/ss_declare.h
|
||||
patches/ss_define.h
|
||||
patches/ss_register.h
|
||||
patches/rof.h
|
||||
patches/rof_itemfields.h
|
||||
patches/rof_ops.h
|
||||
patches/rof_constants.h
|
||||
patches/rof_structs.h
|
||||
patches/titanium.h
|
||||
patches/titanium_itemfields.h
|
||||
patches/titanium_ops.h
|
||||
patches/titanium_constants.h
|
||||
patches/titanium_structs.h
|
||||
patches/underfoot.h
|
||||
patches/underfoot_itemfields.h
|
||||
patches/underfoot_ops.h
|
||||
patches/underfoot_constants.h
|
||||
patches/underfoot_structs.h
|
||||
patches/client62.cpp
|
||||
patches/patches.cpp
|
||||
patches/SoD.cpp
|
||||
patches/SoF.cpp
|
||||
patches/RoF.cpp
|
||||
#patches/RoF2.cpp
|
||||
patches/Titanium.cpp
|
||||
patches/Underfoot.cpp
|
||||
patches/sod.cpp
|
||||
patches/sof.cpp
|
||||
patches/rof.cpp
|
||||
patches/titanium.cpp
|
||||
patches/underfoot.cpp
|
||||
)
|
||||
|
||||
SOURCE_GROUP(SocketLib FILES
|
||||
@ -339,8 +333,7 @@ ADD_LIBRARY(common ${common_sources} ${common_headers})
|
||||
|
||||
IF(UNIX)
|
||||
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)
|
||||
|
||||
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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
|
||||
1900
common/MaxSkill.cpp
1900
common/MaxSkill.cpp
File diff suppressed because it is too large
Load Diff
@ -46,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#include <stdarg.h>
|
||||
#include "Parse.h"
|
||||
#include "HTTPSocket.h"
|
||||
#include "../TCPConnection.h"
|
||||
#include "../tcp_connection.h"
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "../TCPConnection.h"
|
||||
#include "../tcp_connection.h"
|
||||
|
||||
|
||||
#ifdef SOCKETS_NAMESPACE
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
#include "database.h"
|
||||
#include "eq_packet_structs.h"
|
||||
#include "guilds.h"
|
||||
#include "StringUtil.h"
|
||||
#include "string_util.h"
|
||||
#include "extprofile.h"
|
||||
extern Client client;
|
||||
|
||||
|
||||
@ -26,11 +26,11 @@
|
||||
#include "dbcore.h"
|
||||
#include "linked_list.h"
|
||||
#include "eq_packet_structs.h"
|
||||
/*#include "EQStream.h"
|
||||
/*#include "eq_stream.h"
|
||||
#include "guilds.h"
|
||||
#include "MiscFunctions.h"
|
||||
#include "misc_functions.h"
|
||||
#include "Mutex.h"
|
||||
#include "Item.h"
|
||||
#include "item.h"
|
||||
#include "extprofile.h"*/
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
#include <limits.h>
|
||||
#include "dbcore.h"
|
||||
#include <string.h>
|
||||
//#include "../common/MiscFunctions.h"
|
||||
#include "StringUtil.h"
|
||||
//#include "../common/misc_functions.h"
|
||||
#include "string_util.h"
|
||||
#define ASYNC_LOOP_GRANULARITY 4 //# of ms between checking our work
|
||||
|
||||
bool DBAsyncCB_LoadVariables(DBAsyncWork* iWork) {
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include <limits.h>
|
||||
#include "dbcore.h"
|
||||
#include <string.h>
|
||||
#include "../common/MiscFunctions.h"
|
||||
#include "../common/misc_functions.h"
|
||||
#include <cstdlib>
|
||||
|
||||
#ifdef _WINDOWS
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
#include "../common/queue.h"
|
||||
#include "../common/timer.h"
|
||||
#include "../common/condition.h"
|
||||
#include "../common/MySQLRequestResult.h"
|
||||
#include "../common/mysql_request_result.h"
|
||||
|
||||
class DBcore {
|
||||
public:
|
||||
|
||||
@ -19,8 +19,8 @@
|
||||
#endif
|
||||
|
||||
#include "debug.h"
|
||||
#include "StringUtil.h"
|
||||
#include "MiscFunctions.h"
|
||||
#include "string_util.h"
|
||||
#include "misc_functions.h"
|
||||
#include "platform.h"
|
||||
|
||||
#ifndef va_copy
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef EmuTCPCONNECTION_H_
|
||||
#define EmuTCPCONNECTION_H_
|
||||
|
||||
#include "TCPConnection.h"
|
||||
#include "tcp_connection.h"
|
||||
#include "timer.h"
|
||||
|
||||
//moved out of TCPConnection:: to be more exportable
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef EmuTCPSERVER_H_
|
||||
#define EmuTCPSERVER_H_
|
||||
|
||||
#include "TCPServer.h"
|
||||
#include "tcp_server.h"
|
||||
|
||||
class EmuTCPConnection;
|
||||
struct EmuTCPNetPacket_Struct;
|
||||
|
||||
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "eq_dictionary.h"
|
||||
#include "StringUtil.h"
|
||||
#include "string_util.h"
|
||||
|
||||
//
|
||||
// class EmuConstants
|
||||
|
||||
@ -26,13 +26,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include "eq_constants.h"
|
||||
#include "clientversions.h"
|
||||
#include <string>
|
||||
#include "../common/patches/Client62_constants.h"
|
||||
#include "../common/patches/Titanium_constants.h"
|
||||
#include "../common/patches/SoF_constants.h"
|
||||
#include "../common/patches/SoD_constants.h"
|
||||
#include "../common/patches/Underfoot_constants.h"
|
||||
#include "../common/patches/RoF_constants.h"
|
||||
//#include "../common/patches/RoF2_constants.h"
|
||||
#include "../common/patches/client62_constants.h"
|
||||
#include "../common/patches/titanium_constants.h"
|
||||
#include "../common/patches/sof_constants.h"
|
||||
#include "../common/patches/sod_constants.h"
|
||||
#include "../common/patches/underfoot_constants.h"
|
||||
#include "../common/patches/rof_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!! ***
|
||||
// *** You will cause compilation failures and corrupt your database if partial or incorrect attempts to change them are made!! ***
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include "EQPacket.h"
|
||||
#include "eq_packet.h"
|
||||
#include "misc.h"
|
||||
#include "op_codes.h"
|
||||
#include "crc16.h"
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
#define _EQPACKET_H
|
||||
|
||||
#include "base_packet.h"
|
||||
#include "EQStreamType.h"
|
||||
#include "eq_stream_type.h"
|
||||
#include "op_codes.h"
|
||||
#include "platform.h"
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
#include "debug.h"
|
||||
#include "EQPacket.h"
|
||||
#include "EQStream.h"
|
||||
#include "eq_packet.h"
|
||||
#include "eq_stream.h"
|
||||
#include "misc.h"
|
||||
#include "Mutex.h"
|
||||
#include "op_codes.h"
|
||||
|
||||
@ -9,9 +9,9 @@
|
||||
#ifndef WIN32
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#include "EQStreamType.h"
|
||||
#include "EQPacket.h"
|
||||
#include "EQStreamIntf.h"
|
||||
#include "eq_stream_type.h"
|
||||
#include "eq_packet.h"
|
||||
#include "eq_stream_intf.h"
|
||||
#include "Mutex.h"
|
||||
#include "../common/opcodemgr.h"
|
||||
#include "../common/misc.h"
|
||||
@ -1,5 +1,5 @@
|
||||
#include "debug.h"
|
||||
#include "EQStreamFactory.h"
|
||||
#include "eq_stream_factory.h"
|
||||
#ifdef _WINDOWS
|
||||
#include <winsock.h>
|
||||
#include <process.h>
|
||||
@ -16,7 +16,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <iostream>
|
||||
#include "op_codes.h"
|
||||
#include "EQStream.h"
|
||||
#include "eq_stream.h"
|
||||
#include "logsys.h"
|
||||
|
||||
ThreadReturnType EQStreamFactoryReaderLoop(void *eqfs)
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
#include <queue>
|
||||
#include <map>
|
||||
#include "../common/EQStream.h"
|
||||
#include "../common/eq_stream.h"
|
||||
#include "../common/condition.h"
|
||||
#include "../common/timeoutmgr.h"
|
||||
#include "../common/opcodemgr.h"
|
||||
@ -1,6 +1,6 @@
|
||||
#include "debug.h"
|
||||
#include "EQStreamIdent.h"
|
||||
#include "EQStreamProxy.h"
|
||||
#include "eq_stream_ident.h"
|
||||
#include "eq_stream_proxy.h"
|
||||
#include "logsys.h"
|
||||
|
||||
EQStreamIdentifier::~EQStreamIdentifier() {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef EQSTREAMIDENT_H_
|
||||
#define EQSTREAMIDENT_H_
|
||||
|
||||
#include "EQStream.h"
|
||||
#include "eq_stream.h"
|
||||
#include "timer.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
@ -1,8 +1,8 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "EQStreamProxy.h"
|
||||
#include "EQStream.h"
|
||||
#include "StructStrategy.h"
|
||||
#include "eq_stream_proxy.h"
|
||||
#include "eq_stream.h"
|
||||
#include "struct_strategy.h"
|
||||
|
||||
|
||||
EQStreamProxy::EQStreamProxy(EQStream *&stream, const StructStrategy *structs, OpcodeManager **opcodes)
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
#include "types.h"
|
||||
#include "EQStreamIntf.h"
|
||||
#include "eq_stream_intf.h"
|
||||
|
||||
class EQStream;
|
||||
class StructStrategy;
|
||||
@ -17,7 +17,7 @@
|
||||
*/
|
||||
#include "../common/debug.h"
|
||||
#include "eqemu_config.h"
|
||||
#include "MiscFunctions.h"
|
||||
#include "misc_functions.h"
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
#ifndef __EQEmuConfig_H
|
||||
#define __EQEmuConfig_H
|
||||
|
||||
#include "XMLParser.h"
|
||||
#include "xml_parser.h"
|
||||
#include "linked_list.h"
|
||||
|
||||
struct LoginConfig {
|
||||
|
||||
@ -18,10 +18,10 @@
|
||||
#ifdef _WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include "EQEMuError.h"
|
||||
#include "eqemu_error.h"
|
||||
#include "linked_list.h"
|
||||
#include "Mutex.h"
|
||||
#include "MiscFunctions.h"
|
||||
#include "misc_functions.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef _WINDOWS
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
#define EXTENDED_PROFILE_H
|
||||
|
||||
#include "eq_packet_structs.h"
|
||||
#include "Item.h"
|
||||
#include "item.h"
|
||||
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
@ -20,8 +20,8 @@
|
||||
#include "guild_base.h"
|
||||
#include "database.h"
|
||||
#include "logsys.h"
|
||||
//#include "MiscFunctions.h"
|
||||
#include "StringUtil.h"
|
||||
//#include "misc_functions.h"
|
||||
#include "string_util.h"
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "../common/debug.h"
|
||||
#include "MiscFunctions.h"
|
||||
#include "misc_functions.h"
|
||||
#include "guilds.h"
|
||||
#include "database.h"
|
||||
#include "eq_packet_structs.h"
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
#include "debug.h"
|
||||
#include "StringUtil.h"
|
||||
#include "Item.h"
|
||||
#include "string_util.h"
|
||||
#include "item.h"
|
||||
#include "database.h"
|
||||
#include "misc.h"
|
||||
#include "races.h"
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "misc.h"
|
||||
#include "EQPacket.h"
|
||||
#include "eq_packet.h"
|
||||
|
||||
|
||||
#define LOG_CATEGORY(category) #category ,
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "logsys.h"
|
||||
#include "StringUtil.h"
|
||||
#include "string_util.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*/
|
||||
#include <string.h> /* for memcpy() */
|
||||
#include "../common/md5.h"
|
||||
#include "../common/StringUtil.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "../common/seperator.h"
|
||||
|
||||
MD5::MD5() {
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "../common/debug.h"
|
||||
#include "MiscFunctions.h"
|
||||
#include "misc_functions.h"
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "MySQLRequestResult.h"
|
||||
#include "mysql_request_result.h"
|
||||
|
||||
|
||||
MySQLRequestResult::MySQLRequestResult()
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
#include <mysql.h>
|
||||
#include "types.h"
|
||||
#include "MySQLRequestRow.h"
|
||||
#include "mysql_request_row.h"
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
@ -1,4 +1,4 @@
|
||||
#include "MySQLRequestRow.h"
|
||||
#include "mysql_request_row.h"
|
||||
|
||||
MySQLRequestRow::MySQLRequestRow(const MySQLRequestRow& row)
|
||||
: m_Result(row.m_Result), m_MySQLRow(row.m_MySQLRow)
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "packet_dump.h"
|
||||
#include "EQPacket.h"
|
||||
#include "eq_packet.h"
|
||||
#include "../common/servertalk.h"
|
||||
|
||||
void DumpPacketAscii(const uchar* buf, uint32 size, uint32 cols, uint32 skip) {
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#include "EQStream.h"
|
||||
#include "eq_stream.h"
|
||||
#include "packet_dump_file.h"
|
||||
|
||||
void FileDumpPacketAscii(const char* filename, const uchar* buf, uint32 size, uint32 cols, uint32 skip) {
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
|
||||
#include "../debug.h"
|
||||
#include "Client62.h"
|
||||
#include "client62.h"
|
||||
#include "../opcodemgr.h"
|
||||
#include "../logsys.h"
|
||||
#include "../EQStreamIdent.h"
|
||||
#include "../eq_stream_ident.h"
|
||||
#include "../crc32.h"
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../MiscFunctions.h"
|
||||
#include "../StringUtil.h"
|
||||
#include "../Item.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "../clientversions.h"
|
||||
#include "Client62_structs.h"
|
||||
#include "client62_structs.h"
|
||||
|
||||
namespace Client62 {
|
||||
|
||||
@ -84,8 +84,8 @@ Strategy::Strategy()
|
||||
: StructStrategy()
|
||||
{
|
||||
//all opcodes default to passthrough.
|
||||
#include "SSRegister.h"
|
||||
#include "Client62_ops.h"
|
||||
#include "ss_register.h"
|
||||
#include "client62_ops.h"
|
||||
}
|
||||
|
||||
std::string Strategy::Describe() const {
|
||||
@ -100,7 +100,7 @@ const EQClientVersion Strategy::ClientVersion() const
|
||||
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 S(field) "|%s"
|
||||
#define F(field) "|%f"
|
||||
#include "Client62_itemfields.h"
|
||||
#include "client62_itemfields.h"
|
||||
"%.*s\"" // Quotes (and protection, if needed) around static data
|
||||
"|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s" // Sub items
|
||||
"%.*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 S(field) ,item->field
|
||||
#define F(field) ,item->field
|
||||
#include "Client62_itemfields.h"
|
||||
#include "client62_itemfields.h"
|
||||
,depth,protection
|
||||
,sub_items[0] ? sub_items[0] : ""
|
||||
,sub_items[1] ? sub_items[1] : ""
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
#ifndef CLIENT62_H_
|
||||
#define CLIENT62_H_
|
||||
|
||||
#include "../StructStrategy.h"
|
||||
#include "../Item.h"
|
||||
#include "../struct_strategy.h"
|
||||
#include "../item.h"
|
||||
|
||||
class EQStreamIdentifier;
|
||||
|
||||
@ -27,8 +27,8 @@ namespace Client62 {
|
||||
virtual const EQClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "SSDeclare.h"
|
||||
#include "Client62_ops.h"
|
||||
#include "ss_declare.h"
|
||||
#include "client62_ops.h"
|
||||
|
||||
};
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
#include "../debug.h"
|
||||
#include "patches.h"
|
||||
|
||||
#include "Client62.h"
|
||||
#include "Titanium.h"
|
||||
#include "Underfoot.h"
|
||||
#include "SoF.h"
|
||||
#include "SoD.h"
|
||||
#include "RoF.h"
|
||||
//#include "RoF2.h"
|
||||
#include "client62.h"
|
||||
#include "titanium.h"
|
||||
#include "underfoot.h"
|
||||
#include "sof.h"
|
||||
#include "sod.h"
|
||||
#include "rof.h"
|
||||
//#include "rof2.h"
|
||||
|
||||
void RegisterAllPatches(EQStreamIdentifier &into) {
|
||||
Client62::Register(into);
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
|
||||
#include "../debug.h"
|
||||
#include "RoF.h"
|
||||
#include "rof.h"
|
||||
#include "../opcodemgr.h"
|
||||
#include "../logsys.h"
|
||||
#include "../EQStreamIdent.h"
|
||||
#include "../eq_stream_ident.h"
|
||||
#include "../crc32.h"
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../MiscFunctions.h"
|
||||
#include "../StringUtil.h"
|
||||
#include "../Item.h"
|
||||
#include "RoF_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "rof_structs.h"
|
||||
#include "../rulesys.h"
|
||||
|
||||
#include <iostream>
|
||||
@ -89,8 +89,8 @@ Strategy::Strategy()
|
||||
: StructStrategy()
|
||||
{
|
||||
//all opcodes default to passthrough.
|
||||
#include "SSRegister.h"
|
||||
#include "RoF_ops.h"
|
||||
#include "ss_register.h"
|
||||
#include "rof_ops.h"
|
||||
}
|
||||
|
||||
std::string Strategy::Describe() const {
|
||||
@ -105,7 +105,7 @@ const EQClientVersion Strategy::ClientVersion() const
|
||||
return EQClientRoF;
|
||||
}
|
||||
|
||||
#include "SSDefine.h"
|
||||
#include "ss_define.h"
|
||||
|
||||
|
||||
// Converts Server Slot IDs to RoF Slot IDs for use in Encodes
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef RoF_H_
|
||||
#define RoF_H_
|
||||
|
||||
#include "../StructStrategy.h"
|
||||
#include "../struct_strategy.h"
|
||||
|
||||
class EQStreamIdentifier;
|
||||
|
||||
@ -26,8 +26,8 @@ namespace RoF {
|
||||
virtual const EQClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "SSDeclare.h"
|
||||
#include "RoF_ops.h"
|
||||
#include "ss_declare.h"
|
||||
#include "rof_ops.h"
|
||||
};
|
||||
|
||||
};
|
||||
@ -1,16 +1,16 @@
|
||||
|
||||
#include "../debug.h"
|
||||
#include "SoD.h"
|
||||
#include "sod.h"
|
||||
#include "../opcodemgr.h"
|
||||
#include "../logsys.h"
|
||||
#include "../EQStreamIdent.h"
|
||||
#include "../eq_stream_ident.h"
|
||||
#include "../crc32.h"
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../MiscFunctions.h"
|
||||
#include "../StringUtil.h"
|
||||
#include "../Item.h"
|
||||
#include "SoD_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "sod_structs.h"
|
||||
#include "../rulesys.h"
|
||||
|
||||
#include <iostream>
|
||||
@ -89,8 +89,8 @@ Strategy::Strategy()
|
||||
: StructStrategy()
|
||||
{
|
||||
//all opcodes default to passthrough.
|
||||
#include "SSRegister.h"
|
||||
#include "SoD_ops.h"
|
||||
#include "ss_register.h"
|
||||
#include "sod_ops.h"
|
||||
}
|
||||
|
||||
std::string Strategy::Describe() const {
|
||||
@ -105,7 +105,7 @@ const EQClientVersion Strategy::ClientVersion() const
|
||||
return EQClientSoD;
|
||||
}
|
||||
|
||||
#include "SSDefine.h"
|
||||
#include "ss_define.h"
|
||||
|
||||
|
||||
// Converts Server Slot IDs to SoD Slot IDs for use in Encodes
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef SoD_H_
|
||||
#define SoD_H_
|
||||
|
||||
#include "../StructStrategy.h"
|
||||
#include "../struct_strategy.h"
|
||||
|
||||
class EQStreamIdentifier;
|
||||
|
||||
@ -26,8 +26,8 @@ namespace SoD {
|
||||
virtual const EQClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "SSDeclare.h"
|
||||
#include "SoD_ops.h"
|
||||
#include "ss_declare.h"
|
||||
#include "sod_ops.h"
|
||||
};
|
||||
|
||||
};
|
||||
@ -1,15 +1,15 @@
|
||||
|
||||
#include "../debug.h"
|
||||
#include "SoF.h"
|
||||
#include "sof.h"
|
||||
#include "../opcodemgr.h"
|
||||
#include "../logsys.h"
|
||||
#include "../EQStreamIdent.h"
|
||||
#include "../eq_stream_ident.h"
|
||||
#include "../crc32.h"
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../StringUtil.h"
|
||||
#include "../Item.h"
|
||||
#include "SoF_structs.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "sof_structs.h"
|
||||
#include "../rulesys.h"
|
||||
|
||||
#include <iostream>
|
||||
@ -88,8 +88,8 @@ Strategy::Strategy()
|
||||
: StructStrategy()
|
||||
{
|
||||
//all opcodes default to passthrough.
|
||||
#include "SSRegister.h"
|
||||
#include "SoF_ops.h"
|
||||
#include "ss_register.h"
|
||||
#include "sof_ops.h"
|
||||
}
|
||||
|
||||
std::string Strategy::Describe() const {
|
||||
@ -104,7 +104,7 @@ const EQClientVersion Strategy::ClientVersion() const
|
||||
return EQClientSoF;
|
||||
}
|
||||
|
||||
#include "SSDefine.h"
|
||||
#include "ss_define.h"
|
||||
|
||||
|
||||
// Converts Server Slot IDs to SoF Slot IDs for use in Encodes
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef SoF_H_
|
||||
#define SoF_H_
|
||||
|
||||
#include "../StructStrategy.h"
|
||||
#include "../struct_strategy.h"
|
||||
|
||||
class EQStreamIdentifier;
|
||||
|
||||
@ -26,8 +26,8 @@ namespace SoF {
|
||||
virtual const EQClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "SSDeclare.h"
|
||||
#include "SoF_ops.h"
|
||||
#include "ss_declare.h"
|
||||
#include "sof_ops.h"
|
||||
};
|
||||
|
||||
};
|
||||
@ -2,7 +2,7 @@
|
||||
#include "TEMPLATE.h"
|
||||
#include "../opcodemgr.h"
|
||||
#include "../logsys.h"
|
||||
#include "../EQStreamIdent.h"
|
||||
#include "../eq_stream_ident.h"
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "TEMPLATE_structs.h"
|
||||
@ -68,7 +68,7 @@ Strategy::Strategy()
|
||||
: StructStrategy()
|
||||
{
|
||||
//all opcodes default to passthrough.
|
||||
#include "SSRegister.h"
|
||||
#include "ss_register.h"
|
||||
#include "TEMPLATE_ops.h"
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ std::string Strategy::Describe() const {
|
||||
}
|
||||
|
||||
|
||||
#include "SSDefine.h"
|
||||
#include "ss_define.h"
|
||||
|
||||
|
||||
/*ENCODE(OP_PlayerProfile) {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef TEMPLATE_H_
|
||||
#define TEMPLATE_H_
|
||||
|
||||
#include "../StructStrategy.h"
|
||||
#include "../struct_strategy.h"
|
||||
|
||||
class EQStreamIdentifier;
|
||||
|
||||
@ -25,7 +25,7 @@ namespace TEMPLATE {
|
||||
virtual std::string Describe() const;
|
||||
virtual const EQClientVersion ClientVersion() const;
|
||||
//magic macro to declare our opcodes
|
||||
#include "SSDeclare.h"
|
||||
#include "ss_declare.h"
|
||||
#include "TEMPLATE_ops.h"
|
||||
|
||||
};
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
|
||||
#include "../debug.h"
|
||||
#include "Titanium.h"
|
||||
#include "titanium.h"
|
||||
#include "../opcodemgr.h"
|
||||
#include "../logsys.h"
|
||||
#include "../EQStreamIdent.h"
|
||||
#include "../eq_stream_ident.h"
|
||||
#include "../crc32.h"
|
||||
#include "../races.h"
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../StringUtil.h"
|
||||
#include "../Item.h"
|
||||
#include "Titanium_structs.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "titanium_structs.h"
|
||||
#include <sstream>
|
||||
|
||||
namespace Titanium {
|
||||
@ -86,8 +86,8 @@ Strategy::Strategy()
|
||||
: StructStrategy()
|
||||
{
|
||||
//all opcodes default to passthrough.
|
||||
#include "SSRegister.h"
|
||||
#include "Titanium_ops.h"
|
||||
#include "ss_register.h"
|
||||
#include "titanium_ops.h"
|
||||
}
|
||||
|
||||
std::string Strategy::Describe() const {
|
||||
@ -102,7 +102,7 @@ const EQClientVersion Strategy::ClientVersion() const
|
||||
return EQClientTitanium;
|
||||
}
|
||||
|
||||
#include "SSDefine.h"
|
||||
#include "ss_define.h"
|
||||
|
||||
|
||||
/*
|
||||
@ -1460,7 +1460,7 @@ char *SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 d
|
||||
#define C(field) "|%s"
|
||||
#define S(field) "|%s"
|
||||
#define F(field) "|%f"
|
||||
#include "Titanium_itemfields.h"
|
||||
#include "titanium_itemfields.h"
|
||||
"%.*s\"" // Quotes (and protection, if needed) around static data
|
||||
"|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s" // Sub items
|
||||
"%.*s%s" // For trailing quotes (and protection) if a subitem;
|
||||
@ -1472,7 +1472,7 @@ char *SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 d
|
||||
#define C(field) ,field
|
||||
#define S(field) ,item->field
|
||||
#define F(field) ,item->field
|
||||
#include "Titanium_itemfields.h"
|
||||
#include "titanium_itemfields.h"
|
||||
,depth,protection
|
||||
,sub_items[0] ? sub_items[0] : ""
|
||||
,sub_items[1] ? sub_items[1] : ""
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef Titanium_H_
|
||||
#define Titanium_H_
|
||||
|
||||
#include "../StructStrategy.h"
|
||||
#include "../struct_strategy.h"
|
||||
|
||||
class EQStreamIdentifier;
|
||||
|
||||
@ -26,8 +26,8 @@ namespace Titanium {
|
||||
virtual const EQClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "SSDeclare.h"
|
||||
#include "Titanium_ops.h"
|
||||
#include "ss_declare.h"
|
||||
#include "titanium_ops.h"
|
||||
};
|
||||
|
||||
};
|
||||
@ -1,16 +1,16 @@
|
||||
|
||||
#include "../debug.h"
|
||||
#include "Underfoot.h"
|
||||
#include "underfoot.h"
|
||||
#include "../opcodemgr.h"
|
||||
#include "../logsys.h"
|
||||
#include "../EQStreamIdent.h"
|
||||
#include "../eq_stream_ident.h"
|
||||
#include "../crc32.h"
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../MiscFunctions.h"
|
||||
#include "../StringUtil.h"
|
||||
#include "../Item.h"
|
||||
#include "Underfoot_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "underfoot_structs.h"
|
||||
#include "../rulesys.h"
|
||||
|
||||
#include <iostream>
|
||||
@ -90,8 +90,8 @@ Strategy::Strategy()
|
||||
: StructStrategy()
|
||||
{
|
||||
//all opcodes default to passthrough.
|
||||
#include "SSRegister.h"
|
||||
#include "Underfoot_ops.h"
|
||||
#include "ss_register.h"
|
||||
#include "underfoot_ops.h"
|
||||
}
|
||||
|
||||
std::string Strategy::Describe() const {
|
||||
@ -106,7 +106,7 @@ const EQClientVersion Strategy::ClientVersion() const
|
||||
return EQClientUnderfoot;
|
||||
}
|
||||
|
||||
#include "SSDefine.h"
|
||||
#include "ss_define.h"
|
||||
|
||||
|
||||
// Converts Server Slot IDs to Underfoot Slot IDs for use in Encodes
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef Underfoot_H_
|
||||
#define Underfoot_H_
|
||||
|
||||
#include "../StructStrategy.h"
|
||||
#include "../struct_strategy.h"
|
||||
|
||||
class EQStreamIdentifier;
|
||||
|
||||
@ -26,8 +26,8 @@ namespace Underfoot {
|
||||
virtual const EQClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "SSDeclare.h"
|
||||
#include "Underfoot_ops.h"
|
||||
#include "ss_declare.h"
|
||||
#include "underfoot_ops.h"
|
||||
};
|
||||
|
||||
};
|
||||
@ -20,7 +20,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "debug.h"
|
||||
#include "ProcLauncher.h"
|
||||
#include "proc_launcher.h"
|
||||
#ifdef _WINDOWS
|
||||
#include <windows.h>
|
||||
#else
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
#include "timer.h"
|
||||
#include "ptimer.h"
|
||||
#include "database.h"
|
||||
#include "StringUtil.h"
|
||||
#include "string_util.h"
|
||||
#include <stdio.h>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
#include "rulesys.h"
|
||||
#include "logsys.h"
|
||||
#include "database.h"
|
||||
#include "StringUtil.h"
|
||||
#include "string_util.h"
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
@ -4,11 +4,11 @@
|
||||
|
||||
#include "shareddb.h"
|
||||
#include "mysql.h"
|
||||
#include "Item.h"
|
||||
#include "item.h"
|
||||
#include "classes.h"
|
||||
#include "rulesys.h"
|
||||
#include "seperator.h"
|
||||
#include "StringUtil.h"
|
||||
#include "string_util.h"
|
||||
#include "eq_packet_structs.h"
|
||||
#include "guilds.h"
|
||||
#include "extprofile.h"
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
#include "database.h"
|
||||
#include "skills.h"
|
||||
#include "spdat.h"
|
||||
#include "Item.h"
|
||||
#include "item.h"
|
||||
#include "base_data.h"
|
||||
#include "fixed_memory_hash_set.h"
|
||||
#include "fixed_memory_variable_hash_set.h"
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
#include "spdat.h"
|
||||
#include "packet_dump.h"
|
||||
#include "moremath.h"
|
||||
#include "Item.h"
|
||||
#include "item.h"
|
||||
#include "skills.h"
|
||||
#include "bodytypes.h"
|
||||
#include "classes.h"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user