mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 12:31:31 +00:00
Merge remote-tracking branch 'remotes/origin/master' into web_interface
Conflicts: common/CMakeLists.txt common/eqemu_config.cpp common/eqemu_config.h common/shareddb.h
This commit is contained in:
commit
fffe59c52e
@ -69,7 +69,6 @@ SET(common_sources
|
|||||||
web_interface_utils.cpp
|
web_interface_utils.cpp
|
||||||
xml_parser.cpp
|
xml_parser.cpp
|
||||||
platform.cpp
|
platform.cpp
|
||||||
patches/client62.cpp
|
|
||||||
patches/patches.cpp
|
patches/patches.cpp
|
||||||
patches/sod.cpp
|
patches/sod.cpp
|
||||||
patches/sof.cpp
|
patches/sof.cpp
|
||||||
@ -197,12 +196,6 @@ SET(common_headers
|
|||||||
web_interface_utils.h
|
web_interface_utils.h
|
||||||
xml_parser.h
|
xml_parser.h
|
||||||
zone_numbers.h
|
zone_numbers.h
|
||||||
platform.h
|
|
||||||
patches/Client62.h
|
|
||||||
patches/Client62_constants.h
|
|
||||||
patches/Client62_itemfields.h
|
|
||||||
patches/Client62_ops.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
|
||||||
@ -256,11 +249,6 @@ SET(common_headers
|
|||||||
)
|
)
|
||||||
|
|
||||||
SOURCE_GROUP(Patches FILES
|
SOURCE_GROUP(Patches FILES
|
||||||
patches/client62.h
|
|
||||||
patches/client62_itemfields.h
|
|
||||||
patches/client62_ops.h
|
|
||||||
patches/client62_constants.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
|
||||||
@ -296,7 +284,6 @@ SOURCE_GROUP(Patches FILES
|
|||||||
patches/underfoot_ops.h
|
patches/underfoot_ops.h
|
||||||
patches/underfoot_constants.h
|
patches/underfoot_constants.h
|
||||||
patches/underfoot_structs.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
|
||||||
|
|||||||
@ -27,13 +27,10 @@ tremendously.
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <iomanip>
|
|
||||||
|
|
||||||
#include "emu_tcp_connection.h"
|
#include "emu_tcp_connection.h"
|
||||||
#include "emu_tcp_server.h"
|
#include "emu_tcp_server.h"
|
||||||
#include "../common/servertalk.h"
|
#include "../common/servertalk.h"
|
||||||
#include "../common/packet_dump.h"
|
|
||||||
|
|
||||||
#ifdef FREEBSD //Timothy Whitman - January 7, 2003
|
#ifdef FREEBSD //Timothy Whitman - January 7, 2003
|
||||||
#define MSG_NOSIGNAL 0
|
#define MSG_NOSIGNAL 0
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
struct SPackSendQueue;
|
struct SPackSendQueue;
|
||||||
class EmuTCPServer;
|
class EmuTCPServer;
|
||||||
|
class ServerPacket;
|
||||||
|
|
||||||
class EmuTCPConnection : public TCPConnection {
|
class EmuTCPConnection : public TCPConnection {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -548,7 +548,6 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
|||||||
},
|
},
|
||||||
{ // local[MapBank]
|
{ // local[MapBank]
|
||||||
/*Unknown*/ NOT_USED,
|
/*Unknown*/ NOT_USED,
|
||||||
/*62*/ Client62::consts::MAP_BANK_SIZE,
|
|
||||||
/*Titanium*/ Titanium::consts::MAP_BANK_SIZE,
|
/*Titanium*/ Titanium::consts::MAP_BANK_SIZE,
|
||||||
/*SoF*/ EmuConstants::MAP_BANK_SIZE,
|
/*SoF*/ EmuConstants::MAP_BANK_SIZE,
|
||||||
/*SoD*/ EmuConstants::MAP_BANK_SIZE,
|
/*SoD*/ EmuConstants::MAP_BANK_SIZE,
|
||||||
@ -698,7 +697,6 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
|||||||
},
|
},
|
||||||
{ // local[MapCorpse]
|
{ // local[MapCorpse]
|
||||||
/*Unknown*/ NOT_USED,
|
/*Unknown*/ NOT_USED,
|
||||||
/*62*/ Client62::consts::MAP_CORPSE_SIZE,
|
|
||||||
/*Titanium*/ Titanium::consts::MAP_CORPSE_SIZE,
|
/*Titanium*/ Titanium::consts::MAP_CORPSE_SIZE,
|
||||||
/*SoF*/ SoF::consts::MAP_CORPSE_SIZE,
|
/*SoF*/ SoF::consts::MAP_CORPSE_SIZE,
|
||||||
/*SoD*/ SoD::consts::MAP_CORPSE_SIZE,
|
/*SoD*/ SoD::consts::MAP_CORPSE_SIZE,
|
||||||
@ -728,7 +726,6 @@ uint16 EQLimits::InventoryMapSize(int16 map, uint32 version) {
|
|||||||
},
|
},
|
||||||
{ // local[MapInspect]
|
{ // local[MapInspect]
|
||||||
/*Unknown*/ NOT_USED,
|
/*Unknown*/ NOT_USED,
|
||||||
/*62*/ Client62::consts::MAP_INSPECT_SIZE,
|
|
||||||
/*Titanium*/ Titanium::consts::MAP_INSPECT_SIZE,
|
/*Titanium*/ Titanium::consts::MAP_INSPECT_SIZE,
|
||||||
/*SoF*/ SoF::consts::MAP_INSPECT_SIZE,
|
/*SoF*/ SoF::consts::MAP_INSPECT_SIZE,
|
||||||
/*SoD*/ SoD::consts::MAP_INSPECT_SIZE,
|
/*SoD*/ SoD::consts::MAP_INSPECT_SIZE,
|
||||||
@ -1006,7 +1003,6 @@ uint64 EQLimits::CursorBitmask(uint32 version) {
|
|||||||
bool EQLimits::AllowsEmptyBagInBag(uint32 version) {
|
bool EQLimits::AllowsEmptyBagInBag(uint32 version) {
|
||||||
static const bool local[_EmuClientCount] = {
|
static const bool local[_EmuClientCount] = {
|
||||||
/*Unknown*/ false,
|
/*Unknown*/ false,
|
||||||
/*62*/ Client62::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
|
||||||
/*Titanium*/ Titanium::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
/*Titanium*/ Titanium::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||||
/*SoF*/ SoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
/*SoF*/ SoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||||
/*SoD*/ SoD::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
/*SoD*/ SoD::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
||||||
@ -1027,8 +1023,6 @@ bool EQLimits::AllowsEmptyBagInBag(uint32 version) {
|
|||||||
bool EQLimits::AllowsClickCastFromBag(uint32 version) {
|
bool EQLimits::AllowsClickCastFromBag(uint32 version) {
|
||||||
static const bool local[_EmuClientCount] = {
|
static const bool local[_EmuClientCount] = {
|
||||||
/*Unknown*/ false,
|
/*Unknown*/ false,
|
||||||
/*62*/ Client62::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
|
||||||
/*Titanium*/ Titanium::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
|
||||||
/*SoF*/ SoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
/*SoF*/ SoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||||
/*SoD*/ SoD::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
/*SoD*/ SoD::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||||
/*Underfoot*/ Underfoot::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
/*Underfoot*/ Underfoot::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
||||||
@ -1088,7 +1082,6 @@ uint16 EQLimits::ItemContainerSize(uint32 version) {
|
|||||||
bool EQLimits::CoinHasWeight(uint32 version) {
|
bool EQLimits::CoinHasWeight(uint32 version) {
|
||||||
static const bool local[_EmuClientCount] = {
|
static const bool local[_EmuClientCount] = {
|
||||||
/*Unknown*/ true,
|
/*Unknown*/ true,
|
||||||
/*62*/ Client62::limits::COIN_HAS_WEIGHT,
|
|
||||||
/*Titanium*/ Titanium::limits::COIN_HAS_WEIGHT,
|
/*Titanium*/ Titanium::limits::COIN_HAS_WEIGHT,
|
||||||
/*SoF*/ SoF::limits::COIN_HAS_WEIGHT,
|
/*SoF*/ SoF::limits::COIN_HAS_WEIGHT,
|
||||||
/*SoD*/ SoD::limits::COIN_HAS_WEIGHT,
|
/*SoD*/ SoD::limits::COIN_HAS_WEIGHT,
|
||||||
|
|||||||
@ -26,7 +26,6 @@ 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/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"
|
||||||
|
|||||||
@ -15,18 +15,21 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
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 "crc16.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include <iostream>
|
|
||||||
#include <iomanip>
|
|
||||||
#include "eq_packet.h"
|
#include "eq_packet.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "op_codes.h"
|
#include "op_codes.h"
|
||||||
#include "crc16.h"
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
#include <iomanip>
|
||||||
|
#include <iostream>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifndef STATIC_OPCODE
|
#ifndef STATIC_OPCODE
|
||||||
#include "opcodemgr.h"
|
#include "opcodemgr.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "packet_dump.h"
|
#include "packet_dump.h"
|
||||||
#include "packet_functions.h"
|
#include "packet_functions.h"
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|||||||
@ -19,8 +19,6 @@
|
|||||||
#define _EQPACKET_H
|
#define _EQPACKET_H
|
||||||
|
|
||||||
#include "base_packet.h"
|
#include "base_packet.h"
|
||||||
#include "eq_stream_type.h"
|
|
||||||
#include "op_codes.h"
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
|
||||||
#ifdef STATIC_OPCODE
|
#ifdef STATIC_OPCODE
|
||||||
@ -30,9 +28,6 @@
|
|||||||
#include "emu_opcodes.h"
|
#include "emu_opcodes.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class EQStream;
|
|
||||||
class EQStreamPair;
|
|
||||||
|
|
||||||
class EQPacket : public BasePacket {
|
class EQPacket : public BasePacket {
|
||||||
friend class EQStream;
|
friend class EQStream;
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -19,15 +19,12 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "eq_packet.h"
|
#include "eq_packet.h"
|
||||||
#include "eq_stream.h"
|
#include "eq_stream.h"
|
||||||
#include "misc.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>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|||||||
@ -1,22 +1,26 @@
|
|||||||
#ifndef _EQSTREAM_H
|
#ifndef _EQSTREAM_H
|
||||||
#define _EQSTREAM_H
|
#define _EQSTREAM_H
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
#include "eq_stream_type.h"
|
|
||||||
|
#include "../common/misc.h"
|
||||||
|
#include "../common/opcodemgr.h"
|
||||||
|
#include "../common/timer.h"
|
||||||
|
|
||||||
#include "eq_packet.h"
|
#include "eq_packet.h"
|
||||||
#include "eq_stream_intf.h"
|
#include "eq_stream_intf.h"
|
||||||
|
#include "eq_stream_type.h"
|
||||||
#include "mutex.h"
|
#include "mutex.h"
|
||||||
#include "../common/opcodemgr.h"
|
|
||||||
#include "../common/misc.h"
|
class EQApplicationPacket;
|
||||||
#include "../common/condition.h"
|
class EQProtocolPacket;
|
||||||
#include "../common/timer.h"
|
|
||||||
|
|
||||||
#define FLAG_COMPRESSED 0x01
|
#define FLAG_COMPRESSED 0x01
|
||||||
#define FLAG_ENCODED 0x04
|
#define FLAG_ENCODED 0x04
|
||||||
@ -78,7 +82,6 @@ struct SessionStats {
|
|||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
class OpcodeManager;
|
class OpcodeManager;
|
||||||
class EQStreamPair;
|
|
||||||
class EQRawApplicationPacket;
|
class EQRawApplicationPacket;
|
||||||
|
|
||||||
class EQStream : public EQStreamInterface {
|
class EQStream : public EQStreamInterface {
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "eq_stream_factory.h"
|
#include "eq_stream_factory.h"
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
@ -13,11 +14,11 @@
|
|||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#endif
|
#endif
|
||||||
#include <fcntl.h>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include "op_codes.h"
|
#include "op_codes.h"
|
||||||
#include "eq_stream.h"
|
|
||||||
#include "logsys.h"
|
|
||||||
|
|
||||||
ThreadReturnType EQStreamFactoryReaderLoop(void *eqfs)
|
ThreadReturnType EQStreamFactoryReaderLoop(void *eqfs)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,11 +4,13 @@
|
|||||||
|
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "../common/eq_stream.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/timer.h"
|
class EQStream;
|
||||||
|
class Timer;
|
||||||
|
|
||||||
class EQStreamFactory : private Timeoutable {
|
class EQStreamFactory : private Timeoutable {
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -4,13 +4,13 @@
|
|||||||
#include "eq_stream.h"
|
#include "eq_stream.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
#define STREAM_IDENT_WAIT_MS 10000
|
#define STREAM_IDENT_WAIT_MS 10000
|
||||||
|
|
||||||
class OpcodeManager;
|
class OpcodeManager;
|
||||||
class StructStrategy;
|
class StructStrategy;
|
||||||
|
class EQStreamInterface;
|
||||||
|
|
||||||
class EQStreamIdentifier {
|
class EQStreamIdentifier {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -15,62 +15,65 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
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 "eqemu_config.h"
|
#include "eqemu_config.h"
|
||||||
#include "misc_functions.h"
|
#include "misc_functions.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
std::string EQEmuConfig::ConfigFile = "eqemu_config.xml";
|
std::string EQEmuConfig::ConfigFile = "eqemu_config.xml";
|
||||||
EQEmuConfig *EQEmuConfig::_config = nullptr;
|
EQEmuConfig *EQEmuConfig::_config = nullptr;
|
||||||
|
|
||||||
void EQEmuConfig::do_world(TiXmlElement *ele) {
|
void EQEmuConfig::do_world(TiXmlElement *ele)
|
||||||
|
{
|
||||||
const char *text;
|
const char *text;
|
||||||
TiXmlElement * sub_ele;
|
TiXmlElement * sub_ele;
|
||||||
|
|
||||||
text = ParseTextBlock(ele, "shortname");
|
text = ParseTextBlock(ele, "shortname");
|
||||||
if (text)
|
if (text) {
|
||||||
ShortName = text;
|
ShortName = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "longname");
|
text = ParseTextBlock(ele, "longname");
|
||||||
if (text)
|
if (text) {
|
||||||
LongName = text;
|
LongName = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "address", true);
|
text = ParseTextBlock(ele, "address", true);
|
||||||
if (text)
|
if (text) {
|
||||||
WorldAddress = text;
|
WorldAddress = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "localaddress", true);
|
text = ParseTextBlock(ele, "localaddress", true);
|
||||||
if (text)
|
if (text) {
|
||||||
LocalAddress = text;
|
LocalAddress = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "maxclients", true);
|
text = ParseTextBlock(ele, "maxclients", true);
|
||||||
if (text)
|
if (text) {
|
||||||
MaxClients = atoi(text);
|
MaxClients = atoi(text);
|
||||||
|
}
|
||||||
// Get the <key> element
|
// Get the <key> element
|
||||||
text = ParseTextBlock(ele, "key", true);
|
text = ParseTextBlock(ele, "key", true);
|
||||||
if (text)
|
if (text) {
|
||||||
SharedKey = text;
|
SharedKey = text;
|
||||||
|
}
|
||||||
// Get the <loginserver> element
|
// Get the <loginserver> element
|
||||||
sub_ele = ele->FirstChildElement("loginserver");
|
sub_ele = ele->FirstChildElement("loginserver");
|
||||||
if (sub_ele) {
|
if (sub_ele) {
|
||||||
text = ParseTextBlock(sub_ele, "host", true);
|
text = ParseTextBlock(sub_ele, "host", true);
|
||||||
if (text)
|
if (text) {
|
||||||
LoginHost = text;
|
LoginHost = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(sub_ele, "port", true);
|
text = ParseTextBlock(sub_ele, "port", true);
|
||||||
if (text)
|
if (text) {
|
||||||
LoginPort = atoi(text);
|
LoginPort = atoi(text);
|
||||||
|
}
|
||||||
text = ParseTextBlock(sub_ele, "account", true);
|
text = ParseTextBlock(sub_ele, "account", true);
|
||||||
if (text)
|
if (text) {
|
||||||
LoginAccount = text;
|
LoginAccount = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(sub_ele, "password", true);
|
text = ParseTextBlock(sub_ele, "password", true);
|
||||||
if (text)
|
if (text) {
|
||||||
LoginPassword = text;
|
LoginPassword = text;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
char str[32];
|
char str[32];
|
||||||
do {
|
do {
|
||||||
@ -79,354 +82,369 @@ void EQEmuConfig::do_world(TiXmlElement *ele) {
|
|||||||
if (sub_ele) {
|
if (sub_ele) {
|
||||||
LoginConfig* loginconfig = new LoginConfig;
|
LoginConfig* loginconfig = new LoginConfig;
|
||||||
text = ParseTextBlock(sub_ele, "host", true);
|
text = ParseTextBlock(sub_ele, "host", true);
|
||||||
if (text)
|
if (text) {
|
||||||
loginconfig->LoginHost = text;
|
loginconfig->LoginHost = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(sub_ele, "port", true);
|
text = ParseTextBlock(sub_ele, "port", true);
|
||||||
if (text)
|
if (text) {
|
||||||
loginconfig->LoginPort = atoi(text);
|
loginconfig->LoginPort = atoi(text);
|
||||||
|
}
|
||||||
text = ParseTextBlock(sub_ele, "account", true);
|
text = ParseTextBlock(sub_ele, "account", true);
|
||||||
if (text)
|
if (text) {
|
||||||
loginconfig->LoginAccount = text;
|
loginconfig->LoginAccount = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(sub_ele, "password", true);
|
text = ParseTextBlock(sub_ele, "password", true);
|
||||||
if (text)
|
if (text) {
|
||||||
loginconfig->LoginPassword = text;
|
loginconfig->LoginPassword = text;
|
||||||
|
}
|
||||||
loginlist.Insert(loginconfig);
|
loginlist.Insert(loginconfig);
|
||||||
}
|
}
|
||||||
} while (sub_ele);
|
} while (sub_ele);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for locked
|
// Check for locked
|
||||||
sub_ele = ele->FirstChildElement("locked");
|
sub_ele = ele->FirstChildElement("locked");
|
||||||
if (sub_ele != nullptr)
|
if (sub_ele != nullptr) {
|
||||||
Locked = true;
|
Locked = true;
|
||||||
|
}
|
||||||
// Get the <tcp> element
|
// Get the <tcp> element
|
||||||
sub_ele = ele->FirstChildElement("tcp");
|
sub_ele = ele->FirstChildElement("tcp");
|
||||||
if (sub_ele != nullptr) {
|
if (sub_ele != nullptr) {
|
||||||
|
|
||||||
text = sub_ele->Attribute("ip");
|
text = sub_ele->Attribute("ip");
|
||||||
if (text)
|
if (text) {
|
||||||
WorldIP = text;
|
WorldIP = text;
|
||||||
|
|
||||||
text = sub_ele->Attribute("port");
|
|
||||||
if (text)
|
|
||||||
WorldTCPPort=atoi(text);
|
|
||||||
|
|
||||||
text = sub_ele->Attribute("telnet");
|
|
||||||
if (text && !strcasecmp(text,"enabled"))
|
|
||||||
TelnetEnabled=true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
text = sub_ele->Attribute("port");
|
||||||
|
if (text) {
|
||||||
|
WorldTCPPort = atoi(text);
|
||||||
|
}
|
||||||
|
text = sub_ele->Attribute("telnet");
|
||||||
|
if (text && !strcasecmp(text, "enabled")) {
|
||||||
|
TelnetEnabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
// Get the <http> element
|
// Get the <http> element
|
||||||
sub_ele = ele->FirstChildElement("http");
|
sub_ele = ele->FirstChildElement("http");
|
||||||
if (sub_ele != nullptr) {
|
if (sub_ele != nullptr) {
|
||||||
|
|
||||||
// text = sub_ele->Attribute("ip");
|
// text = sub_ele->Attribute("ip");
|
||||||
// if (text)
|
// if (text)
|
||||||
// WorldIP=text;
|
// WorldIP=text;
|
||||||
|
|
||||||
text = sub_ele->Attribute("mimefile");
|
text = sub_ele->Attribute("mimefile");
|
||||||
if (text)
|
if (text) {
|
||||||
WorldHTTPMimeFile = text;
|
WorldHTTPMimeFile = text;
|
||||||
|
}
|
||||||
text = sub_ele->Attribute("port");
|
text = sub_ele->Attribute("port");
|
||||||
if (text)
|
if (text) {
|
||||||
WorldHTTPPort = atoi(text);
|
WorldHTTPPort = atoi(text);
|
||||||
|
}
|
||||||
text = sub_ele->Attribute("enabled");
|
text = sub_ele->Attribute("enabled");
|
||||||
if (text && !strcasecmp(text,"true"))
|
if (text && !strcasecmp(text, "true")) {
|
||||||
WorldHTTPEnabled = true;
|
WorldHTTPEnabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQEmuConfig::do_chatserver(TiXmlElement *ele) {
|
void EQEmuConfig::do_chatserver(TiXmlElement *ele)
|
||||||
|
{
|
||||||
const char *text;
|
const char *text;
|
||||||
|
|
||||||
text = ParseTextBlock(ele, "host", true);
|
text = ParseTextBlock(ele, "host", true);
|
||||||
if (text)
|
if (text) {
|
||||||
ChatHost = text;
|
ChatHost = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "port", true);
|
text = ParseTextBlock(ele, "port", true);
|
||||||
if (text)
|
if (text) {
|
||||||
ChatPort = atoi(text);
|
ChatPort = atoi(text);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void EQEmuConfig::do_mailserver(TiXmlElement *ele) {
|
void EQEmuConfig::do_mailserver(TiXmlElement *ele)
|
||||||
|
{
|
||||||
const char *text;
|
const char *text;
|
||||||
|
|
||||||
text = ParseTextBlock(ele, "host", true);
|
text = ParseTextBlock(ele, "host", true);
|
||||||
if (text)
|
if (text) {
|
||||||
MailHost = text;
|
MailHost = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "port", true);
|
text = ParseTextBlock(ele, "port", true);
|
||||||
if (text)
|
if (text) {
|
||||||
MailPort = atoi(text);
|
MailPort = atoi(text);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void EQEmuConfig::do_database(TiXmlElement *ele) {
|
void EQEmuConfig::do_database(TiXmlElement *ele)
|
||||||
|
{
|
||||||
const char *text;
|
const char *text;
|
||||||
|
|
||||||
text = ParseTextBlock(ele, "host", true);
|
text = ParseTextBlock(ele, "host", true);
|
||||||
if (text)
|
if (text) {
|
||||||
DatabaseHost = text;
|
DatabaseHost = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "port", true);
|
text = ParseTextBlock(ele, "port", true);
|
||||||
if (text)
|
if (text) {
|
||||||
DatabasePort = atoi(text);
|
DatabasePort = atoi(text);
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "username", true);
|
text = ParseTextBlock(ele, "username", true);
|
||||||
if (text)
|
if (text) {
|
||||||
DatabaseUsername = text;
|
DatabaseUsername = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "password", true);
|
text = ParseTextBlock(ele, "password", true);
|
||||||
if (text)
|
if (text) {
|
||||||
DatabasePassword = text;
|
DatabasePassword = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "db", true);
|
text = ParseTextBlock(ele, "db", true);
|
||||||
if (text)
|
if (text) {
|
||||||
DatabaseDB = text;
|
DatabaseDB = text;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void EQEmuConfig::do_qsdatabase(TiXmlElement *ele) {
|
void EQEmuConfig::do_qsdatabase(TiXmlElement *ele)
|
||||||
|
{
|
||||||
const char *text;
|
const char *text;
|
||||||
|
|
||||||
text = ParseTextBlock(ele, "host", true);
|
text = ParseTextBlock(ele, "host", true);
|
||||||
if (text)
|
if (text) {
|
||||||
QSDatabaseHost = text;
|
QSDatabaseHost = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "port", true);
|
text = ParseTextBlock(ele, "port", true);
|
||||||
if (text)
|
if (text) {
|
||||||
QSDatabasePort = atoi(text);
|
QSDatabasePort = atoi(text);
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "username", true);
|
text = ParseTextBlock(ele, "username", true);
|
||||||
if (text)
|
if (text) {
|
||||||
QSDatabaseUsername = text;
|
QSDatabaseUsername = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "password", true);
|
text = ParseTextBlock(ele, "password", true);
|
||||||
if (text)
|
if (text) {
|
||||||
QSDatabasePassword = text;
|
QSDatabasePassword = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "db", true);
|
text = ParseTextBlock(ele, "db", true);
|
||||||
if (text)
|
if (text) {
|
||||||
QSDatabaseDB = text;
|
QSDatabaseDB = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQEmuConfig::do_web_interface(TiXmlElement *ele) {
|
|
||||||
const char *text;
|
|
||||||
|
|
||||||
text = ParseTextBlock(ele, "port", true);
|
|
||||||
if (text)
|
|
||||||
WebInterfacePort = atoi(text);
|
|
||||||
|
|
||||||
text = ParseTextBlock(ele, "cert", true);
|
|
||||||
if (text)
|
|
||||||
WebInterfaceCert = text;
|
|
||||||
|
|
||||||
text = ParseTextBlock(ele, "priv_key", true);
|
|
||||||
if (text)
|
|
||||||
WebInterfacePrivKey = text;
|
|
||||||
|
|
||||||
TiXmlElement *sub_ele = ele->FirstChildElement("ssl");
|
|
||||||
if (sub_ele != nullptr) {
|
|
||||||
WebInterfaceUseSSL = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQEmuConfig::do_zones(TiXmlElement *ele) {
|
void EQEmuConfig::do_zones(TiXmlElement *ele)
|
||||||
|
{
|
||||||
const char *text;
|
const char *text;
|
||||||
TiXmlElement *sub_ele;
|
TiXmlElement *sub_ele;
|
||||||
// TiXmlNode *node,*sub_node;
|
// TiXmlNode *node,*sub_node;
|
||||||
|
|
||||||
text = ParseTextBlock(ele, "defaultstatus", true);
|
text = ParseTextBlock(ele, "defaultstatus", true);
|
||||||
if (text)
|
if (text) {
|
||||||
DefaultStatus = atoi(text);
|
DefaultStatus = atoi(text);
|
||||||
|
}
|
||||||
// Get the <ports> element
|
// Get the <ports> element
|
||||||
sub_ele = ele->FirstChildElement("ports");
|
sub_ele = ele->FirstChildElement("ports");
|
||||||
if (sub_ele != nullptr) {
|
if (sub_ele != nullptr) {
|
||||||
|
|
||||||
text = sub_ele->Attribute("low");
|
text = sub_ele->Attribute("low");
|
||||||
if (text)
|
if (text) {
|
||||||
ZonePortLow=atoi(text);;
|
ZonePortLow = atoi(text);
|
||||||
|
};
|
||||||
text = sub_ele->Attribute("high");
|
text = sub_ele->Attribute("high");
|
||||||
if (text)
|
if (text) {
|
||||||
ZonePortHigh = atoi(text);
|
ZonePortHigh = atoi(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void EQEmuConfig::do_files(TiXmlElement *ele) {
|
void EQEmuConfig::do_files(TiXmlElement *ele)
|
||||||
|
{
|
||||||
const char *text;
|
const char *text;
|
||||||
|
|
||||||
text = ParseTextBlock(ele, "spells", true);
|
text = ParseTextBlock(ele, "spells", true);
|
||||||
if (text)
|
if (text) {
|
||||||
SpellsFile = text;
|
SpellsFile = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "opcodes", true);
|
text = ParseTextBlock(ele, "opcodes", true);
|
||||||
if (text)
|
if (text) {
|
||||||
OpCodesFile = text;
|
OpCodesFile = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "logsettings", true);
|
text = ParseTextBlock(ele, "logsettings", true);
|
||||||
if (text)
|
if (text) {
|
||||||
LogSettingsFile = text;
|
LogSettingsFile = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "eqtime", true);
|
text = ParseTextBlock(ele, "eqtime", true);
|
||||||
if (text)
|
if (text) {
|
||||||
EQTimeFile = text;
|
EQTimeFile = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQEmuConfig::do_directories(TiXmlElement *ele) {
|
|
||||||
const char *text;
|
|
||||||
|
|
||||||
text=ParseTextBlock(ele,"maps",true);
|
|
||||||
if (text)
|
|
||||||
MapDir=text;
|
|
||||||
|
|
||||||
text=ParseTextBlock(ele,"quests",true);
|
|
||||||
if (text)
|
|
||||||
QuestDir=text;
|
|
||||||
|
|
||||||
text=ParseTextBlock(ele,"plugins",true);
|
|
||||||
if (text)
|
|
||||||
PluginDir=text;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQEmuConfig::do_launcher(TiXmlElement *ele) {
|
void EQEmuConfig::do_directories(TiXmlElement *ele)
|
||||||
|
{
|
||||||
|
const char *text;
|
||||||
|
text = ParseTextBlock(ele, "maps", true);
|
||||||
|
if (text) {
|
||||||
|
MapDir = text;
|
||||||
|
}
|
||||||
|
text = ParseTextBlock(ele, "quests", true);
|
||||||
|
if (text) {
|
||||||
|
QuestDir = text;
|
||||||
|
}
|
||||||
|
text = ParseTextBlock(ele, "plugins", true);
|
||||||
|
if (text) {
|
||||||
|
PluginDir = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmuConfig::do_launcher(TiXmlElement *ele)
|
||||||
|
{
|
||||||
const char *text;
|
const char *text;
|
||||||
TiXmlElement *sub_ele;
|
TiXmlElement *sub_ele;
|
||||||
|
|
||||||
text = ParseTextBlock(ele, "logprefix", true);
|
text = ParseTextBlock(ele, "logprefix", true);
|
||||||
if (text)
|
if (text) {
|
||||||
LogPrefix = text;
|
LogPrefix = text;
|
||||||
|
}
|
||||||
text = ParseTextBlock(ele, "logsuffix", true);
|
text = ParseTextBlock(ele, "logsuffix", true);
|
||||||
if (text)
|
if (text) {
|
||||||
LogSuffix = text;
|
LogSuffix = text;
|
||||||
|
}
|
||||||
// Get the <exe> element
|
// Get the <exe> element
|
||||||
text = ParseTextBlock(ele, "exe", true);
|
text = ParseTextBlock(ele, "exe", true);
|
||||||
if (text)
|
if (text) {
|
||||||
ZoneExe = text;
|
ZoneExe = text;
|
||||||
|
}
|
||||||
// Get the <timers> element
|
// Get the <timers> element
|
||||||
sub_ele = ele->FirstChildElement("timers");
|
sub_ele = ele->FirstChildElement("timers");
|
||||||
if (sub_ele != nullptr) {
|
if (sub_ele != nullptr) {
|
||||||
text = sub_ele->Attribute("restart");
|
text = sub_ele->Attribute("restart");
|
||||||
if (text)
|
if (text) {
|
||||||
RestartWait = atoi(text);
|
RestartWait = atoi(text);
|
||||||
|
}
|
||||||
text = sub_ele->Attribute("reterminate");
|
text = sub_ele->Attribute("reterminate");
|
||||||
if (text)
|
if (text) {
|
||||||
TerminateWait = atoi(text);
|
TerminateWait = atoi(text);
|
||||||
|
}
|
||||||
text = sub_ele->Attribute("initial");
|
text = sub_ele->Attribute("initial");
|
||||||
if (text)
|
if (text) {
|
||||||
InitialBootWait = atoi(text);
|
InitialBootWait = atoi(text);
|
||||||
|
}
|
||||||
text = sub_ele->Attribute("interval");
|
text = sub_ele->Attribute("interval");
|
||||||
if (text)
|
if (text) {
|
||||||
ZoneBootInterval = atoi(text);
|
ZoneBootInterval = atoi(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string EQEmuConfig::GetByName(const std::string &var_name) const {
|
std::string EQEmuConfig::GetByName(const std::string &var_name) const
|
||||||
if(var_name == "ShortName")
|
{
|
||||||
|
if (var_name == "ShortName") {
|
||||||
return (ShortName);
|
return (ShortName);
|
||||||
if(var_name == "LongName")
|
}
|
||||||
|
if (var_name == "LongName") {
|
||||||
return (LongName);
|
return (LongName);
|
||||||
if(var_name == "WorldAddress")
|
}
|
||||||
|
if (var_name == "WorldAddress") {
|
||||||
return (WorldAddress);
|
return (WorldAddress);
|
||||||
if(var_name == "LoginHost")
|
}
|
||||||
|
if (var_name == "LoginHost") {
|
||||||
return (LoginHost);
|
return (LoginHost);
|
||||||
if(var_name == "LoginAccount")
|
}
|
||||||
|
if (var_name == "LoginAccount") {
|
||||||
return (LoginAccount);
|
return (LoginAccount);
|
||||||
if(var_name == "LoginPassword")
|
}
|
||||||
|
if (var_name == "LoginPassword") {
|
||||||
return (LoginPassword);
|
return (LoginPassword);
|
||||||
if(var_name == "LoginPort")
|
}
|
||||||
|
if (var_name == "LoginPort") {
|
||||||
return (itoa(LoginPort));
|
return (itoa(LoginPort));
|
||||||
if(var_name == "Locked")
|
}
|
||||||
|
if (var_name == "Locked") {
|
||||||
return (Locked ? "true" : "false");
|
return (Locked ? "true" : "false");
|
||||||
if(var_name == "WorldTCPPort")
|
}
|
||||||
|
if (var_name == "WorldTCPPort") {
|
||||||
return (itoa(WorldTCPPort));
|
return (itoa(WorldTCPPort));
|
||||||
if(var_name == "WorldIP")
|
}
|
||||||
|
if (var_name == "WorldIP") {
|
||||||
return (WorldIP);
|
return (WorldIP);
|
||||||
if(var_name == "TelnetEnabled")
|
}
|
||||||
|
if (var_name == "TelnetEnabled") {
|
||||||
return (TelnetEnabled ? "true" : "false");
|
return (TelnetEnabled ? "true" : "false");
|
||||||
if(var_name == "WorldHTTPPort")
|
}
|
||||||
|
if (var_name == "WorldHTTPPort") {
|
||||||
return (itoa(WorldHTTPPort));
|
return (itoa(WorldHTTPPort));
|
||||||
if(var_name == "WorldHTTPMimeFile")
|
}
|
||||||
|
if (var_name == "WorldHTTPMimeFile") {
|
||||||
return (WorldHTTPMimeFile);
|
return (WorldHTTPMimeFile);
|
||||||
if(var_name == "WorldHTTPEnabled")
|
}
|
||||||
|
if (var_name == "WorldHTTPEnabled") {
|
||||||
return (WorldHTTPEnabled ? "true" : "false");
|
return (WorldHTTPEnabled ? "true" : "false");
|
||||||
if(var_name == "ChatHost")
|
}
|
||||||
|
if (var_name == "ChatHost") {
|
||||||
return (ChatHost);
|
return (ChatHost);
|
||||||
if(var_name == "ChatPort")
|
}
|
||||||
|
if (var_name == "ChatPort") {
|
||||||
return (itoa(ChatPort));
|
return (itoa(ChatPort));
|
||||||
if(var_name == "MailHost")
|
}
|
||||||
|
if (var_name == "MailHost") {
|
||||||
return (MailHost);
|
return (MailHost);
|
||||||
if(var_name == "MailPort")
|
}
|
||||||
|
if (var_name == "MailPort") {
|
||||||
return (itoa(MailPort));
|
return (itoa(MailPort));
|
||||||
if(var_name == "DatabaseHost")
|
}
|
||||||
|
if (var_name == "DatabaseHost") {
|
||||||
return (DatabaseHost);
|
return (DatabaseHost);
|
||||||
if(var_name == "DatabaseUsername")
|
}
|
||||||
|
if (var_name == "DatabaseUsername") {
|
||||||
return (DatabaseUsername);
|
return (DatabaseUsername);
|
||||||
if(var_name == "DatabasePassword")
|
}
|
||||||
|
if (var_name == "DatabasePassword") {
|
||||||
return (DatabasePassword);
|
return (DatabasePassword);
|
||||||
if(var_name == "DatabaseDB")
|
}
|
||||||
|
if (var_name == "DatabaseDB") {
|
||||||
return (DatabaseDB);
|
return (DatabaseDB);
|
||||||
if(var_name == "DatabasePort")
|
}
|
||||||
|
if (var_name == "DatabasePort") {
|
||||||
return (itoa(DatabasePort));
|
return (itoa(DatabasePort));
|
||||||
if(var_name == "QSDatabaseHost")
|
}
|
||||||
|
if (var_name == "QSDatabaseHost") {
|
||||||
return (QSDatabaseHost);
|
return (QSDatabaseHost);
|
||||||
if(var_name == "QSDatabaseUsername")
|
}
|
||||||
|
if (var_name == "QSDatabaseUsername") {
|
||||||
return (QSDatabaseUsername);
|
return (QSDatabaseUsername);
|
||||||
if(var_name == "QSDatabasePassword")
|
}
|
||||||
|
if (var_name == "QSDatabasePassword") {
|
||||||
return (QSDatabasePassword);
|
return (QSDatabasePassword);
|
||||||
if(var_name == "QSDatabaseDB")
|
}
|
||||||
|
if (var_name == "QSDatabaseDB") {
|
||||||
return (QSDatabaseDB);
|
return (QSDatabaseDB);
|
||||||
if(var_name == "QSDatabasePort")
|
}
|
||||||
|
if (var_name == "QSDatabasePort") {
|
||||||
return (itoa(QSDatabasePort));
|
return (itoa(QSDatabasePort));
|
||||||
if (var_name == "WebInterfacePort")
|
}
|
||||||
return(itoa(WebInterfacePort));
|
if (var_name == "SpellsFile") {
|
||||||
if (var_name == "WebInterfaceUseSSL")
|
|
||||||
return(itoa(WebInterfaceUseSSL));
|
|
||||||
if (var_name == "WebInterfaceCert")
|
|
||||||
return(WebInterfaceCert);
|
|
||||||
if (var_name == "WebInterfacePrivKey")
|
|
||||||
return(WebInterfacePrivKey);
|
|
||||||
if(var_name == "SpellsFile")
|
|
||||||
return (SpellsFile);
|
return (SpellsFile);
|
||||||
if(var_name == "OpCodesFile")
|
}
|
||||||
|
if (var_name == "OpCodesFile") {
|
||||||
return (OpCodesFile);
|
return (OpCodesFile);
|
||||||
if(var_name == "EQTimeFile")
|
}
|
||||||
|
if (var_name == "EQTimeFile") {
|
||||||
return (EQTimeFile);
|
return (EQTimeFile);
|
||||||
if(var_name == "LogSettingsFile")
|
}
|
||||||
|
if (var_name == "LogSettingsFile") {
|
||||||
return (LogSettingsFile);
|
return (LogSettingsFile);
|
||||||
if(var_name == "MapDir")
|
}
|
||||||
|
if (var_name == "MapDir") {
|
||||||
return (MapDir);
|
return (MapDir);
|
||||||
if(var_name == "QuestDir")
|
}
|
||||||
|
if (var_name == "QuestDir") {
|
||||||
return (QuestDir);
|
return (QuestDir);
|
||||||
if(var_name == "PluginDir")
|
}
|
||||||
|
if (var_name == "PluginDir") {
|
||||||
return (PluginDir);
|
return (PluginDir);
|
||||||
if(var_name == "LogPrefix")
|
}
|
||||||
|
if (var_name == "LogPrefix") {
|
||||||
return (LogPrefix);
|
return (LogPrefix);
|
||||||
if(var_name == "LogSuffix")
|
}
|
||||||
|
if (var_name == "LogSuffix") {
|
||||||
return (LogSuffix);
|
return (LogSuffix);
|
||||||
if(var_name == "ZoneExe")
|
}
|
||||||
|
if (var_name == "ZoneExe") {
|
||||||
return (ZoneExe);
|
return (ZoneExe);
|
||||||
if(var_name == "ZonePortLow")
|
}
|
||||||
|
if (var_name == "ZonePortLow") {
|
||||||
return (itoa(ZonePortLow));
|
return (itoa(ZonePortLow));
|
||||||
if(var_name == "ZonePortHigh")
|
}
|
||||||
|
if (var_name == "ZonePortHigh") {
|
||||||
return (itoa(ZonePortHigh));
|
return (itoa(ZonePortHigh));
|
||||||
if(var_name == "DefaultStatus")
|
}
|
||||||
|
if (var_name == "DefaultStatus") {
|
||||||
return (itoa(DefaultStatus));
|
return (itoa(DefaultStatus));
|
||||||
|
}
|
||||||
// if(var_name == "DynamicCount")
|
// if(var_name == "DynamicCount")
|
||||||
// return(itoa(DynamicCount));
|
// return(itoa(DynamicCount));
|
||||||
return ("");
|
return ("");
|
||||||
|
|||||||
@ -28,7 +28,8 @@ struct LoginConfig {
|
|||||||
uint16 LoginPort;
|
uint16 LoginPort;
|
||||||
};
|
};
|
||||||
|
|
||||||
class EQEmuConfig : public XMLParser {
|
class EQEmuConfig : public XMLParser
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
virtual std::string GetByName(const std::string &var_name) const;
|
virtual std::string GetByName(const std::string &var_name) const;
|
||||||
|
|
||||||
@ -75,12 +76,6 @@ public:
|
|||||||
std::string QSDatabaseDB;
|
std::string QSDatabaseDB;
|
||||||
uint16 QSDatabasePort;
|
uint16 QSDatabasePort;
|
||||||
|
|
||||||
// from <web_interface>
|
|
||||||
uint16 WebInterfacePort;
|
|
||||||
bool WebInterfaceUseSSL;
|
|
||||||
std::string WebInterfaceCert;
|
|
||||||
std::string WebInterfacePrivKey;
|
|
||||||
|
|
||||||
// From <files/>
|
// From <files/>
|
||||||
std::string SpellsFile;
|
std::string SpellsFile;
|
||||||
std::string OpCodesFile;
|
std::string OpCodesFile;
|
||||||
@ -121,18 +116,16 @@ protected:
|
|||||||
#include "eqemu_config_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 "eqemu_config_elements.h"
|
#include "eqemu_config_elements.h"
|
||||||
|
|
||||||
// Set sane defaults
|
// Set sane defaults
|
||||||
|
|
||||||
// Login server
|
// Login server
|
||||||
LoginHost = "eqemulator.net";
|
LoginHost = "eqemulator.net";
|
||||||
LoginPort = 5998;
|
LoginPort = 5998;
|
||||||
|
|
||||||
// World
|
// World
|
||||||
Locked = false;
|
Locked = false;
|
||||||
WorldTCPPort = 9000;
|
WorldTCPPort = 9000;
|
||||||
@ -141,46 +134,33 @@ protected:
|
|||||||
WorldHTTPPort = 9080;
|
WorldHTTPPort = 9080;
|
||||||
WorldHTTPMimeFile = "mime.types";
|
WorldHTTPMimeFile = "mime.types";
|
||||||
SharedKey = ""; //blank disables authentication
|
SharedKey = ""; //blank disables authentication
|
||||||
|
|
||||||
// Mail
|
// Mail
|
||||||
ChatHost = "eqchat.eqemulator.net";
|
ChatHost = "eqchat.eqemulator.net";
|
||||||
ChatPort = 7778;
|
ChatPort = 7778;
|
||||||
|
|
||||||
// Mail
|
// Mail
|
||||||
MailHost = "eqmail.eqemulator.net";
|
MailHost = "eqmail.eqemulator.net";
|
||||||
MailPort = 7779;
|
MailPort = 7779;
|
||||||
|
|
||||||
// Mysql
|
// Mysql
|
||||||
DatabaseHost = "localhost";
|
DatabaseHost = "localhost";
|
||||||
DatabasePort = 3306;
|
DatabasePort = 3306;
|
||||||
DatabaseUsername = "eq";
|
DatabaseUsername = "eq";
|
||||||
DatabasePassword = "eq";
|
DatabasePassword = "eq";
|
||||||
DatabaseDB = "eq";
|
DatabaseDB = "eq";
|
||||||
|
|
||||||
// QueryServ Database
|
// QueryServ Database
|
||||||
QSDatabaseHost = "localhost";
|
QSDatabaseHost = "localhost";
|
||||||
QSDatabasePort = 3306;
|
QSDatabasePort = 3306;
|
||||||
QSDatabaseUsername = "eq";
|
QSDatabaseUsername = "eq";
|
||||||
QSDatabasePassword = "eq";
|
QSDatabasePassword = "eq";
|
||||||
QSDatabaseDB = "eq";
|
QSDatabaseDB = "eq";
|
||||||
|
|
||||||
// web_interface
|
|
||||||
WebInterfacePort = 9081;
|
|
||||||
WebInterfaceUseSSL = false;
|
|
||||||
WebInterfaceCert = "";
|
|
||||||
WebInterfacePrivKey = "";
|
|
||||||
|
|
||||||
// Files
|
// Files
|
||||||
SpellsFile = "spells_us.txt";
|
SpellsFile = "spells_us.txt";
|
||||||
OpCodesFile = "opcodes.conf";
|
OpCodesFile = "opcodes.conf";
|
||||||
EQTimeFile = "eqtime.cfg";
|
EQTimeFile = "eqtime.cfg";
|
||||||
LogSettingsFile = "log.ini";
|
LogSettingsFile = "log.ini";
|
||||||
|
|
||||||
// Dirs
|
// Dirs
|
||||||
MapDir = "Maps";
|
MapDir = "Maps";
|
||||||
QuestDir = "quests";
|
QuestDir = "quests";
|
||||||
PluginDir = "plugins";
|
PluginDir = "plugins";
|
||||||
|
|
||||||
// Launcher
|
// Launcher
|
||||||
LogPrefix = "logs/zone-";
|
LogPrefix = "logs/zone-";
|
||||||
LogSuffix = ".log";
|
LogSuffix = ".log";
|
||||||
@ -193,43 +173,43 @@ protected:
|
|||||||
#else
|
#else
|
||||||
ZoneExe = "./zone";
|
ZoneExe = "./zone";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Zones
|
// Zones
|
||||||
ZonePortLow = 7000;
|
ZonePortLow = 7000;
|
||||||
ZonePortHigh = 7999;
|
ZonePortHigh = 7999;
|
||||||
DefaultStatus = 0;
|
DefaultStatus = 0;
|
||||||
|
|
||||||
// For where zones need to connect to.
|
// For where zones need to connect to.
|
||||||
WorldIP = "127.0.0.1";
|
WorldIP = "127.0.0.1";
|
||||||
|
|
||||||
// Dynamics to start
|
// Dynamics to start
|
||||||
//DynamicCount=5;
|
//DynamicCount=5;
|
||||||
|
|
||||||
MaxClients = -1;
|
MaxClients = -1;
|
||||||
|
|
||||||
LoginCount = 0;
|
LoginCount = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
virtual ~EQEmuConfig() {}
|
virtual ~EQEmuConfig() {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Produce a const singleton
|
// Produce a const singleton
|
||||||
static const EQEmuConfig *get() {
|
static const EQEmuConfig *get()
|
||||||
if (_config == nullptr)
|
{
|
||||||
|
if (_config == nullptr) {
|
||||||
LoadConfig();
|
LoadConfig();
|
||||||
|
}
|
||||||
return (_config);
|
return (_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow the use to set the conf file to be used.
|
// Allow the use to set the conf file to be used.
|
||||||
static void SetConfigFile(std::string file) { EQEmuConfig::ConfigFile = file; }
|
static void SetConfigFile(std::string file)
|
||||||
|
{
|
||||||
|
EQEmuConfig::ConfigFile = file;
|
||||||
|
}
|
||||||
|
|
||||||
// Load the config
|
// Load the config
|
||||||
static bool LoadConfig() {
|
static bool LoadConfig()
|
||||||
if (_config != nullptr)
|
{
|
||||||
|
if (_config != nullptr) {
|
||||||
delete _config;
|
delete _config;
|
||||||
|
}
|
||||||
_config = new EQEmuConfig;
|
_config = new EQEmuConfig;
|
||||||
|
|
||||||
return _config->ParseFile(EQEmuConfig::ConfigFile.c_str(), "server");
|
return _config->ParseFile(EQEmuConfig::ConfigFile.c_str(), "server");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,11 +15,12 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
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 "faction.h"
|
#include "faction.h"
|
||||||
#include "races.h"
|
#include "races.h"
|
||||||
|
|
||||||
const char *FactionValueToString(FACTION_VALUE fv) {
|
const char *FactionValueToString(FACTION_VALUE fv)
|
||||||
|
{
|
||||||
switch (fv) {
|
switch (fv) {
|
||||||
case FACTION_ALLY:
|
case FACTION_ALLY:
|
||||||
return ("Ally");
|
return ("Ally");
|
||||||
@ -55,52 +56,74 @@ const char *FactionValueToString(FACTION_VALUE fv) {
|
|||||||
FACTION_VALUE CalculateFaction(FactionMods* fm, int32 tmpCharacter_value)
|
FACTION_VALUE CalculateFaction(FactionMods* fm, int32 tmpCharacter_value)
|
||||||
{
|
{
|
||||||
int32 character_value = tmpCharacter_value;
|
int32 character_value = tmpCharacter_value;
|
||||||
if (fm)
|
if (fm) {
|
||||||
character_value += fm->base + fm->class_mod + fm->race_mod + fm->deity_mod;
|
character_value += fm->base + fm->class_mod + fm->race_mod + fm->deity_mod;
|
||||||
if(character_value >= 1101) return FACTION_ALLY;
|
}
|
||||||
if(character_value >= 701 && character_value <= 1100) return FACTION_WARMLY;
|
if (character_value >= 1101) {
|
||||||
if(character_value >= 401 && character_value <= 700) return FACTION_KINDLY;
|
return FACTION_ALLY;
|
||||||
if(character_value >= 101 && character_value <= 400) return FACTION_AMIABLE;
|
}
|
||||||
if(character_value >= 0 && character_value <= 100) return FACTION_INDIFFERENT;
|
if (character_value >= 701 && character_value <= 1100) {
|
||||||
if(character_value >= -100 && character_value <= -1) return FACTION_APPREHENSIVE;
|
return FACTION_WARMLY;
|
||||||
if(character_value >= -700 && character_value <= -101) return FACTION_DUBIOUS;
|
}
|
||||||
if(character_value >= -999 && character_value <= -701) return FACTION_THREATENLY;
|
if (character_value >= 401 && character_value <= 700) {
|
||||||
if(character_value <= -1000) return FACTION_SCOWLS;
|
return FACTION_KINDLY;
|
||||||
|
}
|
||||||
|
if (character_value >= 101 && character_value <= 400) {
|
||||||
|
return FACTION_AMIABLE;
|
||||||
|
}
|
||||||
|
if (character_value >= 0 && character_value <= 100) {
|
||||||
|
return FACTION_INDIFFERENT;
|
||||||
|
}
|
||||||
|
if (character_value >= -100 && character_value <= -1) {
|
||||||
|
return FACTION_APPREHENSIVE;
|
||||||
|
}
|
||||||
|
if (character_value >= -700 && character_value <= -101) {
|
||||||
|
return FACTION_DUBIOUS;
|
||||||
|
}
|
||||||
|
if (character_value >= -999 && character_value <= -701) {
|
||||||
|
return FACTION_THREATENLY;
|
||||||
|
}
|
||||||
|
if (character_value <= -1000) {
|
||||||
|
return FACTION_SCOWLS;
|
||||||
|
}
|
||||||
return FACTION_INDIFFERENT;
|
return FACTION_INDIFFERENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// this function should check if some races have more than one race define
|
// this function should check if some races have more than one race define
|
||||||
bool IsOfEqualRace(int r1, int r2)
|
bool IsOfEqualRace(int r1, int r2)
|
||||||
{
|
{
|
||||||
if (r1 == r2)
|
if (r1 == r2) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
// TODO: add more values
|
// TODO: add more values
|
||||||
switch(r1)
|
switch (r1) {
|
||||||
{
|
|
||||||
case DARK_ELF:
|
case DARK_ELF:
|
||||||
if (r2 == 77)
|
if (r2 == 77) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case BARBARIAN:
|
case BARBARIAN:
|
||||||
if (r2 == 90)
|
if (r2 == 90) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// trolls endure ogres, dark elves, ...
|
// trolls endure ogres, dark elves, ...
|
||||||
bool IsOfIndiffRace(int r1, int r2)
|
bool IsOfIndiffRace(int r1, int r2)
|
||||||
{
|
{
|
||||||
if (r1 == r2)
|
if (r1 == r2) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
// TODO: add more values
|
// TODO: add more values
|
||||||
switch(r1)
|
switch (r1) {
|
||||||
{
|
|
||||||
case DARK_ELF:
|
case DARK_ELF:
|
||||||
case OGRE:
|
case OGRE:
|
||||||
case TROLL:
|
case TROLL:
|
||||||
if (r2 == OGRE || r2 == TROLL || r2 == DARK_ELF)
|
if (r2 == OGRE || r2 == TROLL || r2 == DARK_ELF) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case HUMAN:
|
case HUMAN:
|
||||||
case BARBARIAN:
|
case BARBARIAN:
|
||||||
@ -116,20 +139,24 @@ bool IsOfIndiffRace(int r1, int r2)
|
|||||||
r2 == HALFLING ||
|
r2 == HALFLING ||
|
||||||
r2 == DWARF ||
|
r2 == DWARF ||
|
||||||
r2 == HIGH_ELF ||
|
r2 == HIGH_ELF ||
|
||||||
r2 == WOOD_ELF)
|
r2 == WOOD_ELF) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ERUDITE:
|
case ERUDITE:
|
||||||
if (r2 == HUMAN || r2 == HALF_ELF)
|
if (r2 == HUMAN || r2 == HALF_ELF) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case DWARF:
|
case DWARF:
|
||||||
if (r2 == HALFLING || r2 == GNOME)
|
if (r2 == HALFLING || r2 == GNOME) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case HIGH_ELF:
|
case HIGH_ELF:
|
||||||
if (r2 == WOOD_ELF)
|
if (r2 == WOOD_ELF) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case VAHSHIR:
|
case VAHSHIR:
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -16,7 +16,6 @@
|
|||||||
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 "guild_base.h"
|
#include "guild_base.h"
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "logsys.h"
|
#include "logsys.h"
|
||||||
|
|||||||
@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
class Database;
|
class Database;
|
||||||
|
|
||||||
class CharGuildInfo {
|
class CharGuildInfo
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
//fields from `characer_`
|
//fields from `characer_`
|
||||||
uint32 char_id;
|
uint32 char_id;
|
||||||
@ -30,13 +31,17 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//this object holds guild functionality shared between world and zone.
|
//this object holds guild functionality shared between world and zone.
|
||||||
class BaseGuildManager {
|
class BaseGuildManager
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
BaseGuildManager();
|
BaseGuildManager();
|
||||||
virtual ~BaseGuildManager();
|
virtual ~BaseGuildManager();
|
||||||
|
|
||||||
//this must be called before doing anything else with this object
|
//this must be called before doing anything else with this object
|
||||||
void SetDatabase(Database *db) { m_db = db; }
|
void SetDatabase(Database *db)
|
||||||
|
{
|
||||||
|
m_db = db;
|
||||||
|
}
|
||||||
|
|
||||||
bool LoadGuilds();
|
bool LoadGuilds();
|
||||||
bool RefreshGuild(uint32 guild_id);
|
bool RefreshGuild(uint32 guild_id);
|
||||||
@ -114,13 +119,15 @@ protected:
|
|||||||
|
|
||||||
bool LocalDeleteGuild(uint32 guild_id);
|
bool LocalDeleteGuild(uint32 guild_id);
|
||||||
|
|
||||||
class RankInfo {
|
class RankInfo
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
RankInfo();
|
RankInfo();
|
||||||
std::string name;
|
std::string name;
|
||||||
bool permissions[_MaxGuildAction];
|
bool permissions[_MaxGuildAction];
|
||||||
};
|
};
|
||||||
class GuildInfo {
|
class GuildInfo
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
GuildInfo();
|
GuildInfo();
|
||||||
std::string name;
|
std::string name;
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
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 "misc_functions.h"
|
#include "misc_functions.h"
|
||||||
#include "guilds.h"
|
#include "guilds.h"
|
||||||
|
|||||||
@ -16,19 +16,16 @@
|
|||||||
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 "string_util.h"
|
|
||||||
#include "item.h"
|
|
||||||
#include "database.h"
|
|
||||||
#include "misc.h"
|
|
||||||
#include "races.h"
|
|
||||||
#include "shareddb.h"
|
|
||||||
#include "classes.h"
|
#include "classes.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "item.h"
|
||||||
|
#include "races.h"
|
||||||
#include "rulesys.h"
|
#include "rulesys.h"
|
||||||
|
#include "shareddb.h"
|
||||||
|
#include "string_util.h"
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include <sstream>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
std::list<ItemInst*> dirty_inst;
|
std::list<ItemInst*> dirty_inst;
|
||||||
|
|||||||
@ -23,21 +23,16 @@
|
|||||||
#ifndef __ITEM_H
|
#ifndef __ITEM_H
|
||||||
#define __ITEM_H
|
#define __ITEM_H
|
||||||
|
|
||||||
class ItemInst; // Item belonging to a client (contains info on item, dye, augments, charges, etc)
|
|
||||||
class ItemInstQueue; // Queue of ItemInst objects (i.e., cursor)
|
|
||||||
class Inventory; // Character inventory
|
|
||||||
class ItemParse; // Parses item packets
|
class ItemParse; // Parses item packets
|
||||||
class EvolveInfo; // Stores information about an evolving item family
|
class EvolveInfo; // Stores information about an evolving item family
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include <map>
|
|
||||||
#include <list>
|
|
||||||
#include "../common/eq_packet_structs.h"
|
|
||||||
#include "../common/eq_constants.h"
|
#include "../common/eq_constants.h"
|
||||||
#include "../common/item_struct.h"
|
#include "../common/item_struct.h"
|
||||||
#include "../common/timer.h"
|
#include "../common/timer.h"
|
||||||
|
|
||||||
|
#include <list>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
// Helper typedefs
|
// Helper typedefs
|
||||||
typedef std::list<ItemInst*>::const_iterator iter_queue;
|
typedef std::list<ItemInst*>::const_iterator iter_queue;
|
||||||
typedef std::map<int16, ItemInst*>::const_iterator iter_inst;
|
typedef std::map<int16, ItemInst*>::const_iterator iter_inst;
|
||||||
|
|||||||
@ -16,13 +16,14 @@
|
|||||||
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 "logsys.h"
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
#include "eq_packet.h"
|
||||||
|
#include "logsys.h"
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "misc.h"
|
|
||||||
#include "eq_packet.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define LOG_CATEGORY(category) #category ,
|
#define LOG_CATEGORY(category) #category ,
|
||||||
|
|||||||
@ -9,13 +9,14 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#define ENC(c) (((c) & 0x3f) + ' ')
|
#define ENC(c) (((c) & 0x3f) + ' ')
|
||||||
|
|||||||
@ -15,11 +15,13 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
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 "misc_functions.h"
|
#include "misc_functions.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <math.h>
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|||||||
@ -19,8 +19,6 @@
|
|||||||
#define MISCFUNCTIONS_H
|
#define MISCFUNCTIONS_H
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
|||||||
@ -9,9 +9,6 @@
|
|||||||
#include <mysql.h>
|
#include <mysql.h>
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "mysql_request_row.h"
|
#include "mysql_request_row.h"
|
||||||
#include <string>
|
|
||||||
#include <string.h>
|
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
class MySQLRequestResult {
|
class MySQLRequestResult {
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -7,9 +7,9 @@ std::map<unsigned long, std::string> opcode_map;
|
|||||||
std::string get_opcode_name(unsigned long opcode)
|
std::string get_opcode_name(unsigned long opcode)
|
||||||
{
|
{
|
||||||
std::map<unsigned long, std::string>::iterator itr;;
|
std::map<unsigned long, std::string>::iterator itr;;
|
||||||
|
|
||||||
return (itr = opcode_map.find(opcode)) != opcode_map.end() ? itr->second : "OP_Unknown";
|
return (itr = opcode_map.find(opcode)) != opcode_map.end() ? itr->second : "OP_Unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
void load_opcode_names()
|
void load_opcode_names()
|
||||||
{
|
{
|
||||||
opcode_map[0x0176] = "LiveOP_Heartbeat";
|
opcode_map[0x0176] = "LiveOP_Heartbeat";
|
||||||
|
|||||||
@ -15,15 +15,13 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
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 <stdio.h>
|
|
||||||
#include "opcodemgr.h"
|
|
||||||
#include "debug.h"
|
|
||||||
#include "emu_opcodes.h"
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
|
#include "emu_opcodes.h"
|
||||||
|
#include "opcodemgr.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <stdio.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
OpcodeManager::OpcodeManager() {
|
OpcodeManager::OpcodeManager() {
|
||||||
|
|||||||
@ -15,13 +15,12 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
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 <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "packet_dump.h"
|
#include "packet_dump.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) {
|
||||||
|
|||||||
@ -15,16 +15,18 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
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 <fstream>
|
|
||||||
#include <iostream>
|
|
||||||
#include <iomanip>
|
|
||||||
#include "../common/debug.h"
|
#include "../common/debug.h"
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
|
#include <iomanip>
|
||||||
|
#include <iostream>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
//#ifdef _CRTDBG_MAP_ALLOC
|
//#ifdef _CRTDBG_MAP_ALLOC
|
||||||
// #undef new
|
// #undef new
|
||||||
// #define new new(_NORMAL_BLOCK, __FILE__, __LINE__)
|
// #define new new(_NORMAL_BLOCK, __FILE__, __LINE__)
|
||||||
//#endif
|
//#endif
|
||||||
#include <time.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,37 +0,0 @@
|
|||||||
#ifndef CLIENT62_H_
|
|
||||||
#define CLIENT62_H_
|
|
||||||
|
|
||||||
#include "../struct_strategy.h"
|
|
||||||
#include "../item.h"
|
|
||||||
|
|
||||||
class EQStreamIdentifier;
|
|
||||||
|
|
||||||
namespace Client62 {
|
|
||||||
|
|
||||||
//these are the only public member of this namespace.
|
|
||||||
extern void Register(EQStreamIdentifier &into);
|
|
||||||
extern void Reload();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//you should not directly access anything below..
|
|
||||||
//I just dont feel like making a seperate header for it.
|
|
||||||
|
|
||||||
class Strategy : public StructStrategy {
|
|
||||||
public:
|
|
||||||
Strategy();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
virtual std::string Describe() const;
|
|
||||||
virtual const EQClientVersion ClientVersion() const;
|
|
||||||
|
|
||||||
//magic macro to declare our opcode processors
|
|
||||||
#include "ss_declare.h"
|
|
||||||
#include "client62_ops.h"
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*CLIENT62_H_*/
|
|
||||||
@ -1,212 +0,0 @@
|
|||||||
/*
|
|
||||||
EQEMu: Everquest Server Emulator
|
|
||||||
|
|
||||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
|
||||||
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 CLIENT62_CONSTANTS_H_
|
|
||||||
#define CLIENT62_CONSTANTS_H_
|
|
||||||
|
|
||||||
#include "../types.h"
|
|
||||||
|
|
||||||
namespace Client62 {
|
|
||||||
namespace maps {
|
|
||||||
typedef enum : int16 {
|
|
||||||
// this needs work to match actual client equivilents
|
|
||||||
MapPossessions = 0,
|
|
||||||
MapBank,
|
|
||||||
MapSharedBank,
|
|
||||||
MapTrade,
|
|
||||||
MapWorld,
|
|
||||||
MapLimbo,
|
|
||||||
MapTribute,
|
|
||||||
MapTrophyTribute,
|
|
||||||
MapGuildTribute,
|
|
||||||
MapMerchant,
|
|
||||||
MapDeleted,
|
|
||||||
MapCorpse,
|
|
||||||
MapBazaar,
|
|
||||||
MapInspect,
|
|
||||||
MapRealEstate,
|
|
||||||
MapViewMODPC,
|
|
||||||
MapViewMODBank,
|
|
||||||
MapViewMODSharedBank,
|
|
||||||
MapViewMODLimbo,
|
|
||||||
MapAltStorage,
|
|
||||||
MapArchived,
|
|
||||||
MapMail,
|
|
||||||
MapGuildTrophyTribute,
|
|
||||||
MapOther,
|
|
||||||
_MapCount
|
|
||||||
} InventoryMaps;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace slots {
|
|
||||||
typedef enum : int16 {
|
|
||||||
MainCharm = 0,
|
|
||||||
MainEar1,
|
|
||||||
MainHead,
|
|
||||||
MainFace,
|
|
||||||
MainEar2,
|
|
||||||
MainNeck,
|
|
||||||
MainShoulders,
|
|
||||||
MainArms,
|
|
||||||
MainBack,
|
|
||||||
MainWrist1,
|
|
||||||
MainWrist2,
|
|
||||||
MainRange,
|
|
||||||
MainHands,
|
|
||||||
MainPrimary,
|
|
||||||
MainSecondary,
|
|
||||||
MainFinger1,
|
|
||||||
MainFinger2,
|
|
||||||
MainChest,
|
|
||||||
MainLegs,
|
|
||||||
MainFeet,
|
|
||||||
MainWaist,
|
|
||||||
MainAmmo,
|
|
||||||
MainGeneral1,
|
|
||||||
MainGeneral2,
|
|
||||||
MainGeneral3,
|
|
||||||
MainGeneral4,
|
|
||||||
MainGeneral5,
|
|
||||||
MainGeneral6,
|
|
||||||
MainGeneral7,
|
|
||||||
MainGeneral8,
|
|
||||||
MainCursor,
|
|
||||||
_MainCount,
|
|
||||||
_MainEquipmentBegin = MainCharm,
|
|
||||||
_MainEquipmentEnd = MainAmmo,
|
|
||||||
_MainEquipmentCount = (_MainEquipmentEnd - _MainEquipmentBegin + 1),
|
|
||||||
_MainGeneralBegin = MainGeneral1,
|
|
||||||
_MainGeneralEnd = MainGeneral8,
|
|
||||||
_MainGeneralCount = (_MainGeneralEnd - _MainGeneralBegin + 1)
|
|
||||||
} EquipmentSlots;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace consts {
|
|
||||||
static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount;
|
|
||||||
static const uint16 MAP_BANK_SIZE = 16;
|
|
||||||
static const uint16 MAP_SHARED_BANK_SIZE = 2;
|
|
||||||
static const uint16 MAP_TRADE_SIZE = 8;
|
|
||||||
static const uint16 MAP_WORLD_SIZE = 10;
|
|
||||||
static const uint16 MAP_LIMBO_SIZE = 36;
|
|
||||||
static const uint16 MAP_TRIBUTE_SIZE = 0; //?
|
|
||||||
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
|
|
||||||
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
|
|
||||||
static const uint16 MAP_MERCHANT_SIZE = 0;
|
|
||||||
static const uint16 MAP_DELETED_SIZE = 0;
|
|
||||||
static const uint16 MAP_CORPSE_SIZE = slots::_MainCount;
|
|
||||||
static const uint16 MAP_BAZAAR_SIZE = 80;
|
|
||||||
static const uint16 MAP_INSPECT_SIZE = slots::_MainEquipmentCount;
|
|
||||||
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
|
|
||||||
static const uint16 MAP_VIEW_MOD_PC_SIZE = MAP_POSSESSIONS_SIZE;
|
|
||||||
static const uint16 MAP_VIEW_MOD_BANK_SIZE = MAP_BANK_SIZE;
|
|
||||||
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = MAP_SHARED_BANK_SIZE;
|
|
||||||
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = MAP_LIMBO_SIZE;
|
|
||||||
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
|
|
||||||
static const uint16 MAP_ARCHIVED_SIZE = 0;
|
|
||||||
static const uint16 MAP_MAIL_SIZE = 0;
|
|
||||||
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
|
||||||
static const uint16 MAP_KRONO_SIZE = NOT_USED;
|
|
||||||
static const uint16 MAP_OTHER_SIZE = 0;
|
|
||||||
|
|
||||||
static const int16 EQUIPMENT_BEGIN = slots::MainCharm;
|
|
||||||
static const int16 EQUIPMENT_END = slots::MainAmmo;
|
|
||||||
static const uint16 EQUIPMENT_SIZE = slots::_MainEquipmentCount;
|
|
||||||
|
|
||||||
static const int16 GENERAL_BEGIN = slots::MainGeneral1;
|
|
||||||
static const int16 GENERAL_END = slots::MainGeneral8;
|
|
||||||
static const uint16 GENERAL_SIZE = slots::_MainGeneralCount;
|
|
||||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
|
||||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
|
||||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 CURSOR = slots::MainCursor;
|
|
||||||
static const int16 CURSOR_BAG_BEGIN = 331;
|
|
||||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
|
||||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 BANK_BEGIN = 2000;
|
|
||||||
static const int16 BANK_END = 2015;
|
|
||||||
static const int16 BANK_BAGS_BEGIN = 2031;
|
|
||||||
static const int16 BANK_BAGS_END_OFFSET = 159;
|
|
||||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
|
||||||
static const int16 SHARED_BANK_END = 2501;
|
|
||||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
|
|
||||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
|
||||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 TRADE_BEGIN = 3000;
|
|
||||||
static const int16 TRADE_END = 3007;
|
|
||||||
static const int16 TRADE_NPC_END = 3003;
|
|
||||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
|
||||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
|
||||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 WORLD_BEGIN = 4000;
|
|
||||||
static const int16 WORLD_END = 4009;
|
|
||||||
|
|
||||||
static const int16 TRIBUTE_BEGIN = 400;
|
|
||||||
static const int16 TRIBUTE_END = 404;
|
|
||||||
|
|
||||||
static const int16 CORPSE_BEGIN = slots::MainGeneral1;
|
|
||||||
static const int16 CORPSE_END = slots::MainGeneral1 + slots::MainCursor;
|
|
||||||
|
|
||||||
static const uint16 ITEM_COMMON_SIZE = 5;
|
|
||||||
static const uint16 ITEM_CONTAINER_SIZE = 10;
|
|
||||||
|
|
||||||
static const uint32 BANDOLIERS_COUNT = 4; // count = number of bandolier instances
|
|
||||||
static const uint32 BANDOLIER_SIZE = 4; // size = number of equipment slots in bandolier instance
|
|
||||||
static const uint32 POTION_BELT_SIZE = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace limits {
|
|
||||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = false;
|
|
||||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = false;
|
|
||||||
static const bool COIN_HAS_WEIGHT = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}; //end namespace Client62
|
|
||||||
|
|
||||||
#endif /*CLIENT62_CONSTANTS_H_*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
Client62 Notes:
|
|
||||||
** Integer-based inventory **
|
|
||||||
ok Possessions: 0 - 30 (Corpse: 22 - 52 [Offset 22])
|
|
||||||
ok [Equipment: 0 - 21]
|
|
||||||
ok [General: 22 - 29]
|
|
||||||
ok [Cursor: 30]
|
|
||||||
ok General Bags: 251 - 330
|
|
||||||
ok Cursor Bags: 331 - 340
|
|
||||||
|
|
||||||
ok Bank: 2000 - 2015
|
|
||||||
ok Bank Bags: 2031 - 2190
|
|
||||||
|
|
||||||
ok Shared Bank: 2500 - 2501
|
|
||||||
ok Shared Bank Bags: 2531 - 2550
|
|
||||||
|
|
||||||
Trade: 3000 - 3007
|
|
||||||
(Trade Bags: 3031 - 3110 -- server values)
|
|
||||||
|
|
||||||
World: 4000 - 4009
|
|
||||||
|
|
||||||
*/
|
|
||||||
@ -1,166 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
|
|
||||||
These fields must be in the order of how they are serialized!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* 000 */ //I(ItemClass) Leave this one off on purpose
|
|
||||||
/* 001 */ S(Name)
|
|
||||||
/* 002 */ S(Lore)
|
|
||||||
/* 003 */ S(IDFile)
|
|
||||||
/* 004 */ I(ID)
|
|
||||||
/* 005 */ I(Weight)
|
|
||||||
/* 006 */ I(NoRent)
|
|
||||||
/* 007 */ I(NoDrop)
|
|
||||||
/* 008 */ I(Size)
|
|
||||||
/* 009 */ I(Slots)
|
|
||||||
/* 010 */ I(Price)
|
|
||||||
/* 011 */ I(Icon)
|
|
||||||
/* 012 */ C("0")
|
|
||||||
/* 013 */ C("0")
|
|
||||||
/* 014 */ I(BenefitFlag)
|
|
||||||
/* 015 */ I(Tradeskills)
|
|
||||||
/* 016 */ I(CR)
|
|
||||||
/* 017 */ I(DR)
|
|
||||||
/* 018 */ I(PR)
|
|
||||||
/* 019 */ I(MR)
|
|
||||||
/* 020 */ I(FR)
|
|
||||||
/* 021 */ I(AStr)
|
|
||||||
/* 022 */ I(ASta)
|
|
||||||
/* 023 */ I(AAgi)
|
|
||||||
/* 024 */ I(ADex)
|
|
||||||
/* 025 */ I(ACha)
|
|
||||||
/* 026 */ I(AInt)
|
|
||||||
/* 027 */ I(AWis)
|
|
||||||
/* 028 */ I(HP)
|
|
||||||
/* 029 */ I(Mana)
|
|
||||||
/* 030 */ I(AC)
|
|
||||||
/* 031 */ I(Deity)
|
|
||||||
/* 032 */ C("0")
|
|
||||||
/* 033 */ I(SkillModValue)
|
|
||||||
/* 034 */ I(SkillModType)
|
|
||||||
/* 035 */ I(BaneDmgRace)
|
|
||||||
/* 036 */ I(BaneDmgAmt)
|
|
||||||
/* 037 */ I(BaneDmgBody)
|
|
||||||
/* 038 */ I(Magic)
|
|
||||||
/* 039 */ I(CastTime_)
|
|
||||||
/* 040 */ I(ReqLevel)
|
|
||||||
/* 041 */ I(BardType)
|
|
||||||
/* 042 */ I(BardValue)
|
|
||||||
/* 043 */ I(Light)
|
|
||||||
/* 044 */ I(Delay)
|
|
||||||
/* 045 */ I(RecLevel)
|
|
||||||
/* 046 */ I(RecSkill)
|
|
||||||
/* 047 */ I(ElemDmgType)
|
|
||||||
/* 048 */ I(ElemDmgAmt)
|
|
||||||
/* 049 */ I(Range)
|
|
||||||
/* 050 */ I(Damage)
|
|
||||||
/* 051 */ I(Color)
|
|
||||||
/* 052 */ I(Classes)
|
|
||||||
/* 053 */ I(Races)
|
|
||||||
/* 054 */ C("0")
|
|
||||||
/* 055 */ I(MaxCharges)
|
|
||||||
/* 056 */ I(ItemType)
|
|
||||||
/* 057 */ I(Material)
|
|
||||||
/* 058 */ F(SellRate)
|
|
||||||
/* 059 */ C("0")
|
|
||||||
/* 060 */ I(CastTime_)
|
|
||||||
/* 061 */ C("0")
|
|
||||||
/* 062 */ I(ProcRate)
|
|
||||||
/* 063 */ I(CombatEffects)
|
|
||||||
/* 064 */ I(Shielding)
|
|
||||||
/* 065 */ I(StunResist)
|
|
||||||
/* 066 */ I(StrikeThrough)
|
|
||||||
/* 067 */ I(ExtraDmgSkill)
|
|
||||||
/* 068 */ I(ExtraDmgAmt)
|
|
||||||
/* 069 */ I(SpellShield)
|
|
||||||
/* 070 */ I(Avoidance)
|
|
||||||
/* 071 */ I(Accuracy)
|
|
||||||
/* 072 */ I(CharmFileID)
|
|
||||||
/* 073 */ I(FactionMod1)
|
|
||||||
/* 074 */ I(FactionMod2)
|
|
||||||
/* 075 */ I(FactionMod3)
|
|
||||||
/* 076 */ I(FactionMod4)
|
|
||||||
/* 077 */ I(FactionAmt1)
|
|
||||||
/* 078 */ I(FactionAmt2)
|
|
||||||
/* 079 */ I(FactionAmt3)
|
|
||||||
/* 080 */ I(FactionAmt4)
|
|
||||||
/* 081 */ S(CharmFile)
|
|
||||||
/* 082 */ I(AugType)
|
|
||||||
/* 083 */ I(AugSlotType[0])
|
|
||||||
/* 084 */ I(AugSlotType[1])
|
|
||||||
/* 085 */ I(AugSlotType[2])
|
|
||||||
/* 086 */ I(AugSlotType[3])
|
|
||||||
/* 087 */ I(AugSlotType[4])
|
|
||||||
/* 088 */ I(LDoNTheme)
|
|
||||||
/* 089 */ I(LDoNPrice)
|
|
||||||
/* 090 */ I(LDoNSold)
|
|
||||||
/* 091 */ I(BagType)
|
|
||||||
/* 092 */ I(BagSlots)
|
|
||||||
/* 093 */ I(BagSize)
|
|
||||||
/* 094 */ I(BagWR)
|
|
||||||
/* 095 */ I(Book)
|
|
||||||
/* 096 */ I(BookType)
|
|
||||||
/* 097 */ S(Filename)
|
|
||||||
/* 098 */ I(BaneDmgRaceAmt)
|
|
||||||
/* 099 */ I(AugRestrict)
|
|
||||||
/* 100 */ I(LoreFlag)
|
|
||||||
/* 101 */ I(PendingLoreFlag)
|
|
||||||
/* 102 */ I(ArtifactFlag)
|
|
||||||
/* 103 */ I(SummonedFlag)
|
|
||||||
/* 104 */ I(Favor)
|
|
||||||
/* 105 */ I(FVNoDrop)
|
|
||||||
/* 106 */ I(Endur)
|
|
||||||
/* 107 */ I(DotShielding)
|
|
||||||
/* 108 */ I(Attack)
|
|
||||||
/* 109 */ I(Regen)
|
|
||||||
/* 110 */ I(ManaRegen)
|
|
||||||
/* 111 */ I(Haste)
|
|
||||||
/* 112 */ I(DamageShield)
|
|
||||||
/* 113 */ I(RecastDelay)
|
|
||||||
/* 114 */ I(RecastType)
|
|
||||||
/* 115 */ I(GuildFavor)
|
|
||||||
/* 116 */ I(AugDistiller)
|
|
||||||
/* 117 */ C("0")
|
|
||||||
/* 118 */ C("0")
|
|
||||||
/* 119 */ I(Attuneable)
|
|
||||||
/* 120 */ I(NoPet)
|
|
||||||
/* 121 */ C("0")
|
|
||||||
/* 122 */ I(PointType)
|
|
||||||
/* 123 */ I(PotionBelt)
|
|
||||||
/* 124 */ I(PotionBeltSlots)
|
|
||||||
/* 125 */ I(StackSize)
|
|
||||||
/* 126 */ I(Click.Effect)
|
|
||||||
/* 127 */ I(Click.Type)
|
|
||||||
/* 128 */ I(Click.Level2)
|
|
||||||
/* 129 */ I(Click.Level)
|
|
||||||
/* 130 */ C("0")
|
|
||||||
/* 131 */ I(Proc.Effect)
|
|
||||||
/* 132 */ I(Proc.Type)
|
|
||||||
/* 133 */ I(Proc.Level2)
|
|
||||||
/* 134 */ I(Proc.Level)
|
|
||||||
/* 135 */ C("0")
|
|
||||||
/* 136 */ I(Worn.Effect)
|
|
||||||
/* 137 */ I(Worn.Type)
|
|
||||||
/* 138 */ I(Worn.Level2)
|
|
||||||
/* 139 */ I(Worn.Level)
|
|
||||||
/* 140 */ C("0")
|
|
||||||
/* 141 */ I(Focus.Effect)
|
|
||||||
/* 142 */ I(Focus.Type)
|
|
||||||
/* 143 */ I(Focus.Level2)
|
|
||||||
/* 144 */ I(Focus.Level)
|
|
||||||
/* 145 */ C("0")
|
|
||||||
/* 146 */ I(Scroll.Effect)
|
|
||||||
/* 147 */ I(Scroll.Type)
|
|
||||||
/* 148 */ I(Scroll.Level2)
|
|
||||||
/* 149 */ I(Scroll.Level)
|
|
||||||
/* 150 */ C("0")
|
|
||||||
#undef I
|
|
||||||
#undef C
|
|
||||||
#undef S
|
|
||||||
#undef F
|
|
||||||
|
|
||||||
@ -1,54 +0,0 @@
|
|||||||
// out-going packets that require an ENCODE translation:
|
|
||||||
E(OP_Action)
|
|
||||||
E(OP_AdventureMerchantSell)
|
|
||||||
E(OP_ApplyPoison)
|
|
||||||
E(OP_BazaarSearch)
|
|
||||||
E(OP_BecomeTrader)
|
|
||||||
E(OP_CharInventory)
|
|
||||||
E(OP_DeleteCharge)
|
|
||||||
E(OP_DeleteItem)
|
|
||||||
E(OP_DeleteSpawn)
|
|
||||||
E(OP_GuildMemberLevelUpdate)
|
|
||||||
E(OP_GuildMemberList)
|
|
||||||
E(OP_Illusion)
|
|
||||||
E(OP_ItemLinkResponse)
|
|
||||||
E(OP_ItemPacket)
|
|
||||||
E(OP_LeadershipExpUpdate)
|
|
||||||
E(OP_LootItem)
|
|
||||||
E(OP_MoveItem)
|
|
||||||
E(OP_NewSpawn)
|
|
||||||
E(OP_OnLevelMessage)
|
|
||||||
E(OP_PetBuffWindow)
|
|
||||||
E(OP_PlayerProfile)
|
|
||||||
E(OP_ReadBook)
|
|
||||||
E(OP_RespondAA)
|
|
||||||
E(OP_SendAATable)
|
|
||||||
E(OP_SendCharInfo)
|
|
||||||
E(OP_ShopPlayerSell)
|
|
||||||
E(OP_Track)
|
|
||||||
E(OP_TributeItem)
|
|
||||||
E(OP_WearChange)
|
|
||||||
E(OP_ZoneEntry)
|
|
||||||
E(OP_ZoneServerReady)
|
|
||||||
E(OP_ZoneSpawns)
|
|
||||||
// incoming packets that require a DECODE translation:
|
|
||||||
D(OP_AdventureMerchantSell)
|
|
||||||
D(OP_ApplyPoison)
|
|
||||||
D(OP_AugmentItem)
|
|
||||||
D(OP_CastSpell)
|
|
||||||
D(OP_CharacterCreate)
|
|
||||||
D(OP_Consume)
|
|
||||||
D(OP_DeleteItem)
|
|
||||||
D(OP_FaceChange)
|
|
||||||
D(OP_ItemLinkClick)
|
|
||||||
D(OP_LootItem)
|
|
||||||
D(OP_MoveItem)
|
|
||||||
D(OP_ReadBook)
|
|
||||||
D(OP_SetServerFilter)
|
|
||||||
D(OP_ShopPlayerSell)
|
|
||||||
D(OP_TradeSkillCombine)
|
|
||||||
D(OP_TributeItem)
|
|
||||||
D(OP_WearChange)
|
|
||||||
D(OP_WhoAllRequest)
|
|
||||||
#undef E
|
|
||||||
#undef D
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,6 @@
|
|||||||
#include "../debug.h"
|
#include "../debug.h"
|
||||||
#include "patches.h"
|
#include "patches.h"
|
||||||
|
|
||||||
#include "client62.h"
|
|
||||||
#include "titanium.h"
|
#include "titanium.h"
|
||||||
#include "underfoot.h"
|
#include "underfoot.h"
|
||||||
#include "sof.h"
|
#include "sof.h"
|
||||||
@ -11,7 +10,6 @@
|
|||||||
#include "rof2.h"
|
#include "rof2.h"
|
||||||
|
|
||||||
void RegisterAllPatches(EQStreamIdentifier &into) {
|
void RegisterAllPatches(EQStreamIdentifier &into) {
|
||||||
Client62::Register(into);
|
|
||||||
Titanium::Register(into);
|
Titanium::Register(into);
|
||||||
SoF::Register(into);
|
SoF::Register(into);
|
||||||
SoD::Register(into);
|
SoD::Register(into);
|
||||||
@ -21,7 +19,6 @@ void RegisterAllPatches(EQStreamIdentifier &into) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ReloadAllPatches() {
|
void ReloadAllPatches() {
|
||||||
Client62::Reload();
|
|
||||||
Titanium::Reload();
|
Titanium::Reload();
|
||||||
SoF::Reload();
|
SoF::Reload();
|
||||||
SoD::Reload();
|
SoD::Reload();
|
||||||
|
|||||||
@ -15,15 +15,13 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
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 "timer.h"
|
#include "timer.h"
|
||||||
#include "ptimer.h"
|
#include "ptimer.h"
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "string_util.h"
|
#include "string_util.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|||||||
@ -15,8 +15,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
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/eq_packet_structs.h"
|
|
||||||
#include "../common/races.h"
|
#include "../common/races.h"
|
||||||
|
|
||||||
const char* GetRaceName(uint16 race) {
|
const char* GetRaceName(uint16 race) {
|
||||||
|
|||||||
@ -15,10 +15,9 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
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 "rdtsc.h"
|
#include "rdtsc.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#include <sys/timeb.h>
|
#include <sys/timeb.h>
|
||||||
|
|||||||
@ -1,24 +1,19 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <cstdlib>
|
|
||||||
#include <ctime>
|
|
||||||
|
|
||||||
#include "shareddb.h"
|
|
||||||
#include "mysql.h"
|
|
||||||
#include "item.h"
|
|
||||||
#include "classes.h"
|
#include "classes.h"
|
||||||
#include "rulesys.h"
|
|
||||||
#include "seperator.h"
|
|
||||||
#include "string_util.h"
|
|
||||||
#include "eq_packet_structs.h"
|
#include "eq_packet_structs.h"
|
||||||
#include "guilds.h"
|
|
||||||
#include "extprofile.h"
|
|
||||||
#include "memory_mapped_file.h"
|
|
||||||
#include "ipc_mutex.h"
|
|
||||||
#include "eqemu_exception.h"
|
#include "eqemu_exception.h"
|
||||||
#include "loottable.h"
|
|
||||||
#include "faction.h"
|
#include "faction.h"
|
||||||
#include "features.h"
|
#include "features.h"
|
||||||
|
#include "ipc_mutex.h"
|
||||||
|
#include "item.h"
|
||||||
|
#include "loottable.h"
|
||||||
|
#include "memory_mapped_file.h"
|
||||||
|
#include "mysql.h"
|
||||||
|
#include "rulesys.h"
|
||||||
|
#include "shareddb.h"
|
||||||
|
#include "string_util.h"
|
||||||
|
|
||||||
SharedDatabase::SharedDatabase()
|
SharedDatabase::SharedDatabase()
|
||||||
: Database(), skill_caps_mmf(nullptr), items_mmf(nullptr), items_hash(nullptr), faction_mmf(nullptr), faction_hash(nullptr),
|
: Database(), skill_caps_mmf(nullptr), items_mmf(nullptr), items_hash(nullptr), faction_mmf(nullptr), faction_hash(nullptr),
|
||||||
|
|||||||
@ -6,36 +6,42 @@
|
|||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "skills.h"
|
#include "skills.h"
|
||||||
#include "spdat.h"
|
#include "spdat.h"
|
||||||
#include "item.h"
|
|
||||||
#include "base_data.h"
|
#include "base_data.h"
|
||||||
#include "fixed_memory_hash_set.h"
|
#include "fixed_memory_hash_set.h"
|
||||||
#include "fixed_memory_variable_hash_set.h"
|
#include "fixed_memory_variable_hash_set.h"
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
|
class EvolveInfo;
|
||||||
|
class Inventory;
|
||||||
|
class ItemInst;
|
||||||
|
struct BaseDataStruct;
|
||||||
|
struct InspectMessage_Struct;
|
||||||
|
struct PlayerProfile_Struct;
|
||||||
|
struct SPDat_Spell_Struct;
|
||||||
struct Item_Struct;
|
struct Item_Struct;
|
||||||
struct NPCFactionList;
|
struct NPCFactionList;
|
||||||
struct Faction;
|
|
||||||
struct LootTable_Struct;
|
struct LootTable_Struct;
|
||||||
struct LootDrop_Struct;
|
struct LootDrop_Struct;
|
||||||
namespace EQEmu {
|
namespace EQEmu
|
||||||
|
{
|
||||||
class MemoryMappedFile;
|
class MemoryMappedFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This object is inherited by world and zone's DB object,
|
This object is inherited by world and zone's DB object,
|
||||||
* and is mainly here to facilitate shared memory, and other
|
and is mainly here to facilitate shared memory, and other
|
||||||
* things which only world and zone need.
|
things which only world and zone need.
|
||||||
*/
|
*/
|
||||||
class SharedDatabase : public Database {
|
class SharedDatabase : public Database
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
SharedDatabase();
|
SharedDatabase();
|
||||||
SharedDatabase(const char* host, const char* user, const char* passwd, const char* database, uint32 port);
|
SharedDatabase(const char* host, const char* user, const char* passwd, const char* database, uint32 port);
|
||||||
virtual ~SharedDatabase();
|
virtual ~SharedDatabase();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* General Character Related Stuff
|
General Character Related Stuff
|
||||||
*/
|
*/
|
||||||
bool SetGMSpeed(uint32 account_id, uint8 gmspeed);
|
bool SetGMSpeed(uint32 account_id, uint8 gmspeed);
|
||||||
uint8 GetGMSpeed(uint32 account_id);
|
uint8 GetGMSpeed(uint32 account_id);
|
||||||
@ -49,7 +55,7 @@ public:
|
|||||||
uint32 GetTotalTimeEntitledOnAccount(uint32 AccountID);
|
uint32 GetTotalTimeEntitledOnAccount(uint32 AccountID);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Character Inventory
|
Character Inventory
|
||||||
*/
|
*/
|
||||||
bool SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iterator &start, std::list<ItemInst*>::const_iterator &end);
|
bool SaveCursor(uint32 char_id, std::list<ItemInst*>::const_iterator &start, std::list<ItemInst*>::const_iterator &end);
|
||||||
bool SaveInventory(uint32 char_id, const ItemInst* inst, int16 slot_id);
|
bool SaveInventory(uint32 char_id, const ItemInst* inst, int16 slot_id);
|
||||||
@ -69,17 +75,14 @@ public:
|
|||||||
std::string GetBook(const char *txtfile);
|
std::string GetBook(const char *txtfile);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Item Methods
|
Item Methods
|
||||||
*/
|
*/
|
||||||
ItemInst* CreateItem(uint32 item_id, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
ItemInst* CreateItem(uint32 item_id, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
||||||
ItemInst* CreateItem(const Item_Struct* item, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
ItemInst* CreateItem(const Item_Struct* item, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0);
|
||||||
ItemInst* CreateBaseItem(const Item_Struct* item, int16 charges = 0);
|
ItemInst* CreateBaseItem(const Item_Struct* item, int16 charges = 0);
|
||||||
|
|
||||||
// Web Token Verification
|
|
||||||
bool VerifyToken(std::string token, int& status);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Shared Memory crap
|
Shared Memory crap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//items
|
//items
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
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 "types.h"
|
#include "types.h"
|
||||||
#include "skills.h"
|
#include "skills.h"
|
||||||
|
|
||||||
|
|||||||
@ -70,15 +70,12 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug.h"
|
#include "../common/logsys.h"
|
||||||
#include "spdat.h"
|
#include "../common/logtypes.h"
|
||||||
#include "packet_dump.h"
|
|
||||||
#include "moremath.h"
|
|
||||||
#include "item.h"
|
|
||||||
#include "skills.h"
|
|
||||||
#include "bodytypes.h"
|
|
||||||
#include "classes.h"
|
#include "classes.h"
|
||||||
#include <math.h>
|
#include "spdat.h"
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "unix.h"
|
#include "unix.h"
|
||||||
|
|||||||
@ -16,9 +16,6 @@
|
|||||||
|
|
||||||
#include "string_util.h"
|
#include "string_util.h"
|
||||||
|
|
||||||
#include <cstring> // for strncpy
|
|
||||||
#include <stdexcept>
|
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
|||||||
@ -17,9 +17,10 @@
|
|||||||
#define _STRINGUTIL_H_
|
#define _STRINGUTIL_H_
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <string.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
#include <string.h>
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,17 +15,14 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
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 <iostream>
|
#include <iostream>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
#include "tcp_connection.h"
|
#include "tcp_connection.h"
|
||||||
#include "../common/servertalk.h"
|
|
||||||
#include "../common/timer.h"
|
|
||||||
#include "../common/packet_dump.h"
|
|
||||||
|
|
||||||
#ifdef FREEBSD //Timothy Whitman - January 7, 2003
|
#ifdef FREEBSD //Timothy Whitman - January 7, 2003
|
||||||
#define MSG_NOSIGNAL 0
|
#define MSG_NOSIGNAL 0
|
||||||
|
|||||||
@ -48,8 +48,6 @@
|
|||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
#include "misc_functions.h"
|
#include "misc_functions.h"
|
||||||
|
|
||||||
class BaseTCPServer;
|
|
||||||
class ServerPacket;
|
|
||||||
|
|
||||||
#define TCPConnection_ErrorBufferSize 1024
|
#define TCPConnection_ErrorBufferSize 1024
|
||||||
#define MaxTCPReceiveBuffferSize 524288
|
#define MaxTCPReceiveBuffferSize 524288
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "tcp_server.h"
|
#include "tcp_server.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|||||||
@ -15,7 +15,8 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
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"
|
|
||||||
|
|
||||||
// Disgrace: for windows compile
|
// Disgrace: for windows compile
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
@ -23,8 +24,6 @@
|
|||||||
#include <sys/timeb.h>
|
#include <sys/timeb.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
uint32 current_time = 0;
|
uint32 current_time = 0;
|
||||||
|
|||||||
@ -17,18 +17,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common/debug.h"
|
#include "../common/debug.h"
|
||||||
#include <iostream>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <time.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#include "worldconn.h"
|
#include "worldconn.h"
|
||||||
#include "eqemu_config.h"
|
#include "eqemu_config.h"
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
#include "database.h"
|
|
||||||
#include "servertalk.h"
|
#include "servertalk.h"
|
||||||
|
|
||||||
WorldConnection::WorldConnection(EmuTCPConnection::ePacketMode mode, const char *password)
|
WorldConnection::WorldConnection(EmuTCPConnection::ePacketMode mode, const char *password)
|
||||||
|
|||||||
@ -1,539 +0,0 @@
|
|||||||
#ShowEQ Import Notes:
|
|
||||||
# ZERO THE FILE first
|
|
||||||
# sed 's/0x[0-9a-fA-F]{4}/0x0000/g'
|
|
||||||
#Unknown Mapping:
|
|
||||||
#OP_Action2 -> OP_Damage
|
|
||||||
#OP_EnvDamage -> OP_Damage ---> might have been a one time mistake
|
|
||||||
#Name Differences:
|
|
||||||
#OP_CancelInvite -> OP_GroupCancelInvite
|
|
||||||
#OP_GMFind -> OP_FindPersonRequest
|
|
||||||
|
|
||||||
OP_Unknown=0x0000
|
|
||||||
OP_ExploreUnknown=0x0292 #used for unknown explorer
|
|
||||||
#world packets
|
|
||||||
OP_ApproveWorld=0x41b1 # ShowEQ 06/29/05
|
|
||||||
OP_LogServer=0x4668 # EQEmu 06/29/05
|
|
||||||
OP_MOTD=0x7fea # EQEmu 06/29/05
|
|
||||||
OP_SendLoginInfo=0x2792 # EQEmu 06/29/05
|
|
||||||
OP_DeleteCharacter=0x0920 # ShowEQ 06/29/05
|
|
||||||
OP_SendCharInfo=0x732c # EQEmu 06/29/05
|
|
||||||
OP_ExpansionInfo=0x5c78 # EQEmu 06/29/05
|
|
||||||
OP_CharacterCreate=0x6160 # EQEmu 06/29/05
|
|
||||||
OP_RandomNameGenerator=0x23d4 # ShowEQ 06/29/05
|
|
||||||
OP_GuildsList=0x6957 # ShowEQ 06/29/05
|
|
||||||
OP_ApproveName=0x46b1 # EQEmu 06/29/05
|
|
||||||
OP_EnterWorld=0x7262 # EQEmu 06/29/05
|
|
||||||
OP_PostEnterWorld=0x0df0 # EQEmu 06/29/05
|
|
||||||
OP_World_Client_CRC1=0x254d # ShowEQ 06/29/05
|
|
||||||
OP_World_Client_CRC2=0x16c9 # ShowEQ 06/29/05
|
|
||||||
OP_SetChatServer=0x6238 # EQEmu 06/29/05
|
|
||||||
OP_SetChatServer2=0x6536 # EQEmu 06/29/05
|
|
||||||
OP_ZoneServerInfo=0x407c # EQEmu 06/29/05
|
|
||||||
OP_WorldComplete=0x509d # EQEmu 06/29/05
|
|
||||||
OP_WorldClientReady=0x5e99 # EQEmu 06/29/05 (Guess - Doodman)
|
|
||||||
OP_WorldUnknown001=0x7510 # EQEmu 06/29/05 (New to 6/29)
|
|
||||||
OP_SendSystemStats=0x681b # anonymous system stats reporting
|
|
||||||
OP_WorldLogout=0x7186
|
|
||||||
OP_ZoneUnavail=0x6d95
|
|
||||||
OP_WorldLevelTooHigh=0x583b # world->client. Cancels zone in.
|
|
||||||
OP_CharInacessable=0x28aa # world->client. Cancels zone in.
|
|
||||||
#OP_InvalidLoginPassword=0x52A4
|
|
||||||
|
|
||||||
#Zone in opcodes
|
|
||||||
OP_ZoneEntry=0x2ec9 # ShowEQ 06/29/05
|
|
||||||
OP_ZoneInUnknown=0x0000
|
|
||||||
OP_AckPacket=0x7752 # ShowEQ 06/29/05
|
|
||||||
OP_NewZone=0x7ac5 # ShowEQ 06/29/05
|
|
||||||
OP_ReqClientSpawn=0x0e76 # ShowEQ 06/29/05
|
|
||||||
OP_ZoneSpawns=0x5ee8 # ShowEQ 06/29/05
|
|
||||||
OP_CharInventory=0x15ff # EQEmu 06/29/05
|
|
||||||
OP_SetServerFilter=0x7709 # ShowEQ 06/29/05
|
|
||||||
OP_LockoutTimerInfo=0x7c12 # EQEmu 06/29/05
|
|
||||||
OP_SendZonepoints=0x775d # EQEmu 06/29/05
|
|
||||||
OP_SpawnDoor=0x4c24 # ShowEQ 06/29/05
|
|
||||||
OP_ReqNewZone=0x47c9 # ShowEQ 06/29/05
|
|
||||||
OP_PlayerProfile=0x75df # ShowEQ 06/29/05
|
|
||||||
OP_TimeOfDay=0x1580 # ShowEQ 06/29/05
|
|
||||||
OP_SendAATable=0x367d # ShowEQ 06/29/05
|
|
||||||
OP_ZoneServerReady=0x0000 #dosent exist in this version
|
|
||||||
|
|
||||||
|
|
||||||
OP_Logout=0x0701 # EQEmu 06/29/05
|
|
||||||
OP_LogoutReply=0x48c2 # ShowEQ 06/29/05 (OP_Logout)
|
|
||||||
OP_PreLogoutReply=0x711e #0 len packet sent during logout/zoning
|
|
||||||
OP_LevelUpdate=0x6d44 # ShowEQ 06/29/05
|
|
||||||
OP_MobUpdate=0x0000
|
|
||||||
OP_Stamina=0x74ab # ShowEQ 06/29/05
|
|
||||||
|
|
||||||
#Petition Opcodes
|
|
||||||
OP_PetitionSearch=0x2aec #search term for petition
|
|
||||||
OP_PetitionSearchResults=0x2aec #(list of?) matches from search
|
|
||||||
OP_PetitionSearchText=0x0000 #text results of search
|
|
||||||
OP_Petition=0x251f #0x73cb
|
|
||||||
OP_PetitionUpdate=0x3813 #guess
|
|
||||||
OP_PetitionCheckout=0x0000
|
|
||||||
OP_PetitionCheckIn=0x0000
|
|
||||||
OP_PetitionQue=0x0000
|
|
||||||
OP_PetitionUnCheckout=0x0000
|
|
||||||
OP_PetitionDelete=0x0000
|
|
||||||
OP_DeletePetition=0x0000
|
|
||||||
OP_PetitionResolve=0x6ea9 #0x688f # ShowEQ 5/11/05
|
|
||||||
OP_PDeletePetition=0x0000
|
|
||||||
OP_PetitionBug=0x0000
|
|
||||||
OP_PetitionRefresh=0x0000
|
|
||||||
OP_PetitionCheckout2=0x0000
|
|
||||||
OP_PetitionViewPetition=0x0000
|
|
||||||
|
|
||||||
#Guild Opcodes
|
|
||||||
OP_ZoneGuildList=0x68AC
|
|
||||||
OP_GuildMemberList=0x147d # ShowEQ 06/29/05
|
|
||||||
OP_GuildMemberUpdate=0x4cc7 # ShowEQ 06/29/05
|
|
||||||
OP_GuildMemberLevelUpdate=0x0000 #dosent exist in this version.
|
|
||||||
OP_GuildRemove=0x6cce # EQEmu - Doodman (found 8/26/05
|
|
||||||
OP_GuildPeace=0x0e37 # EQEmu - Doodman (found 8/26/05
|
|
||||||
OP_GuildWar=0x186d # EQEmu - Doodman (found 8/26/05
|
|
||||||
OP_GuildLeader=0x1ef1 # EQEmu - Doodman (found 8/26/05)
|
|
||||||
OP_GuildDemote=0x1f46 # EQEmu - Doodman (found 8/26/05)
|
|
||||||
OP_GuildMOTD=0x21ed # ShowEQ 06/29/05
|
|
||||||
OP_SetGuildMOTD=0x475a # EQEmu - Doodman (found 8/26/05)
|
|
||||||
OP_GetGuildsList=0x7fec # ShowEQ 06/29/05
|
|
||||||
OP_GuildInvite=0x61d0 # EQEmu - Doodman (found 8/26/05)
|
|
||||||
OP_GuildPublicNote=0x17a2 # EQEmu - Doodman (found 8/26/05)
|
|
||||||
OP_GuildDelete=0x5a4d # EQEmu - Doodman (found 8/26/05
|
|
||||||
OP_GuildInviteAccept=0x0179 # EQEmu - Doodman (found 8/26/05)
|
|
||||||
OP_GetGuildMOTD=0x3246
|
|
||||||
OP_GetGuildMOTDReply=0x5B14
|
|
||||||
OP_GuildManageBanker=0x3d1e
|
|
||||||
OP_GuildBank=0x0000
|
|
||||||
#guild opcodes: 549F (clear guild?), 0x0695, 0x0AC0, 0x1864, 0x32cf, 0x4cc7,
|
|
||||||
# 0x461A, 0x6966, 0x7085
|
|
||||||
|
|
||||||
|
|
||||||
#GM/guide opcodes
|
|
||||||
OP_GMServers=0x3387 #/servers
|
|
||||||
OP_GMBecomeNPC=0x7864 #/becomenpc
|
|
||||||
OP_GMZoneRequest=0x61ff #/zone
|
|
||||||
OP_GMSearchCorpse=0x7f3e #/searchcorpse
|
|
||||||
OP_GMHideMe=0x0581 #/hideme
|
|
||||||
OP_GMGoto=0x69c8 #/goto
|
|
||||||
OP_GMDelCorpse=0x727a #/delcorpse
|
|
||||||
OP_GMApproval=0x0000
|
|
||||||
OP_GMToggle=0x5ce2 #/toggle
|
|
||||||
OP_GMZoneRequest2=0x0000
|
|
||||||
OP_GMSummon=0x3383 #/summon
|
|
||||||
OP_GMEmoteZone=0x3905 #/emotezone
|
|
||||||
OP_GMFind=0x5e6a #/find
|
|
||||||
OP_GMKick=0x1cee #/kick
|
|
||||||
OP_GMNameChange=0x0000
|
|
||||||
|
|
||||||
OP_SafePoint=0x0000
|
|
||||||
OP_Bind_Wound=0x4796
|
|
||||||
OP_GMTraining=0x613d
|
|
||||||
OP_GMEndTraining=0x181c
|
|
||||||
OP_GMTrainSkill=0x3838
|
|
||||||
OP_GMEndTrainingResponse=0x0a94
|
|
||||||
OP_Animation=0x0b71 # EQEmu 06/29/05
|
|
||||||
OP_Taunt=0x5306
|
|
||||||
OP_Stun=0x7DCF
|
|
||||||
OP_MoneyUpdate=0x425c
|
|
||||||
OP_SendAAStats=0x5966 # EQEmu 06/29/05
|
|
||||||
OP_SendExpZonein=0x0587 # ShowEQ 06/29/05
|
|
||||||
OP_RespondAA=0x35e8
|
|
||||||
OP_UpdateAA=0x0000
|
|
||||||
OP_IncreaseStats=0x0000
|
|
||||||
OP_ReadBook=0x1496
|
|
||||||
OP_CombatAbility=0x5e55
|
|
||||||
OP_Dye=0x773f # ShowEQ 06/29/05
|
|
||||||
OP_Consume=0x7a83 # ShowEQ 06/29/05
|
|
||||||
OP_Begging=0x2c81 # ShowEQ 06/29/05
|
|
||||||
OP_InspectRequest=0x2403
|
|
||||||
OP_Action2=0x0000 # ShowEQ 06/29/05
|
|
||||||
OP_BeginCast=0x3990 # ShowEQ 06/29/05
|
|
||||||
OP_WhoAllRequest=0x5cdd # ShowEQ 06/29/05
|
|
||||||
OP_ColoredText=0x4bc6 # ShowEQ 06/29/05
|
|
||||||
OP_Consent=0x1081 # ShowEQ 06/29/05
|
|
||||||
OP_LFGCommand=0x022f # ShowEQ 06/29/05
|
|
||||||
OP_LFGGetMatchesRequest=0x6f82 # ShowEQ 06/29/05
|
|
||||||
OP_LFGAppearance=0x024d
|
|
||||||
OP_LFGResponse=0x1fe1 # ShowEQ 5/11/05
|
|
||||||
OP_LFGGetMatchesResponse=0x06c5 # ShowEQ 06/29/05
|
|
||||||
OP_LootItem=0x2acf # ShowEQ 06/29/05
|
|
||||||
OP_Bug=0x3eba # ShowEQ 06/29/05
|
|
||||||
OP_BoardBoat=0x67c9 # ShowEQ 06/29/05
|
|
||||||
OP_Save=0x6d9b # ShowEQ 06/29/05
|
|
||||||
OP_Camp=0x2844 # ShowEQ 06/29/05
|
|
||||||
OP_EndLootRequest=0x7fe4 # ShowEQ 06/29/05
|
|
||||||
OP_LoadSpellSet=0x403e # ShowEQ 06/29/05
|
|
||||||
OP_AutoAttack=0x6c47 # ShowEQ 06/29/05
|
|
||||||
OP_AutoFire=0x6c53
|
|
||||||
OP_Consider=0x2717 # ShowEQ 06/29/05
|
|
||||||
OP_Emote=0x55bc # ShowEQ 06/29/05
|
|
||||||
OP_PetCommands=0x58b2 # ShowEQ 06/29/05
|
|
||||||
OP_PetBuffWindow=0x4e31
|
|
||||||
OP_SpawnAppearance=0x18b7 # ShowEQ 06/29/05
|
|
||||||
OP_DeleteSpawn=0x1a64 # ShowEQ 06/29/05
|
|
||||||
OP_FormattedMessage=0x42cd # ShowEQ 06/29/05
|
|
||||||
OP_WhoAllResponse=0x6686 # ShowEQ 06/29/05
|
|
||||||
OP_AutoAttack2=0x0fa6 # ShowEQ 06/29/05
|
|
||||||
OP_SetRunMode=0x0342 # ShowEQ 06/29/05
|
|
||||||
OP_SimpleMessage=0x5a48 # ShowEQ 06/29/05
|
|
||||||
OP_SaveOnZoneReq=0x2baf # ShowEQ 06/29/05
|
|
||||||
OP_MoveDoor=0x0ef7 # ShowEQ 06/29/05
|
|
||||||
OP_SenseHeading=0x5666 # ShowEQ 06/29/05
|
|
||||||
OP_Buff=0x33dc # ShowEQ 06/29/05
|
|
||||||
OP_LootComplete=0x20b2 # ShowEQ 06/29/05
|
|
||||||
OP_EnvDamage=0x0990
|
|
||||||
OP_Split=0x6a53 # ShowEQ 06/29/05
|
|
||||||
OP_Surname=0x48fe # ShowEQ 06/29/05
|
|
||||||
OP_ClearSurname=0x0000
|
|
||||||
OP_MoveItem=0x7657 # ShowEQ 06/29/05
|
|
||||||
OP_FaceChange=0x763b # ShowEQ 06/29/05
|
|
||||||
OP_ItemPacket=0x3397 # ShowEQ 06/29/05
|
|
||||||
OP_ItemLinkResponse=0x1d43 # ShowEQ 06/29/05
|
|
||||||
OP_ClientReady=0x5e20 # ShowEQ 06/29/05
|
|
||||||
OP_ZoneChange=0x60ef # ShowEQ 06/29/05
|
|
||||||
OP_MemorizeSpell=0x05ac # ShowEQ 06/29/05
|
|
||||||
OP_ItemLinkClick=0x53e5 # ShowEQ 06/29/05
|
|
||||||
OP_SwapSpell=0x36b2 # ShowEQ 06/29/05
|
|
||||||
OP_Forage=0x7c32 # ShowEQ 06/29/05
|
|
||||||
OP_ConsentResponse=0x6380 # ShowEQ 06/29/05
|
|
||||||
OP_BazaarSearch=0x524e # ShowEQ 06/29/05
|
|
||||||
OP_NewSpawn=0x4f11 # ShowEQ 06/29/05
|
|
||||||
OP_WearChange=0x601d # ShowEQ 06/29/05
|
|
||||||
OP_Action=0x4513 # ShowEQ 06/29/05
|
|
||||||
OP_SpecialMesg=0x5ef7 # ShowEQ 06/29/05
|
|
||||||
OP_Bazaar=0x0000
|
|
||||||
OP_LeaveBoat=0x7187 # ShowEQ 06/29/05
|
|
||||||
OP_Weather=0x65ca # ShowEQ 06/29/05
|
|
||||||
OP_LFPGetMatchesRequest=0x45d0 # ShowEQ 06/29/05
|
|
||||||
OP_Illusion=0x7441 # ShowEQ 06/29/05
|
|
||||||
OP_TargetMouse=0x2274 # ShowEQ 06/29/05
|
|
||||||
OP_InspectAnswer=0x2dd6 # ShowEQ 06/29/05
|
|
||||||
OP_GMKill=0x692c # ShowEQ 06/29/05
|
|
||||||
OP_MoneyOnCorpse=0x2fca # ShowEQ 06/29/05
|
|
||||||
OP_ClickDoor=0x700d # ShowEQ 06/29/05
|
|
||||||
OP_LootRequest=0x2316 # ShowEQ 06/29/05
|
|
||||||
OP_YellForHelp=0x2e20 # ShowEQ 06/29/05
|
|
||||||
OP_ManaChange=0x0b2d # ShowEQ 06/29/05
|
|
||||||
OP_ConsentDeny=0x4e8c # ShowEQ 06/29/05
|
|
||||||
OP_LFPCommand=0x35a6 # ShowEQ 06/29/05
|
|
||||||
OP_RandomReply=0x6cd5 # ShowEQ 06/29/05
|
|
||||||
OP_DenyResponse=0x7c66 # ShowEQ 06/29/05
|
|
||||||
OP_ConsiderCorpse=0x673c # ShowEQ 06/29/05
|
|
||||||
OP_CorpseDrag=0x50c0 #
|
|
||||||
OP_CorpseDrop=0x7c7c #
|
|
||||||
OP_ConfirmDelete=0x28f2 # ShowEQ 06/29/05
|
|
||||||
OP_MobHealth=0x3d2d # ShowEQ 06/29/05
|
|
||||||
OP_SkillUpdate=0x6a93 # ShowEQ 06/29/05
|
|
||||||
OP_RandomReq=0x21e0 # ShowEQ 06/29/05
|
|
||||||
OP_CastSpell=0x4839 # ShowEQ 06/29/05
|
|
||||||
OP_ClientUpdate=0x14cb # ShowEQ 06/29/05
|
|
||||||
OP_MobUpdate=0x0000 #not used anymore, here for backwards compat
|
|
||||||
OP_Report=0x0375 # ShowEQ 06/29/05
|
|
||||||
OP_GroundSpawn=0x736b # ShowEQ 06/29/05
|
|
||||||
OP_TargetCommand=0x6563 #0x0dfe # ShowEQ 06/29/05
|
|
||||||
OP_TargetHoTT=0x3ef6
|
|
||||||
OP_LFPGetMatchesResponse=0x63fe # ShowEQ 06/29/05
|
|
||||||
OP_Jump=0x4dbc # ShowEQ 06/29/05
|
|
||||||
OP_ExpUpdate=0x5ecd # ShowEQ 06/29/05
|
|
||||||
OP_AAAction=0x3af4 # ShowEQ 06/29/05
|
|
||||||
OP_Death=0x5188 # ShowEQ 06/29/05
|
|
||||||
OP_BecomeCorpse=0x128c
|
|
||||||
OP_GMLastName=0x0c81 # ShowEQ 06/29/05
|
|
||||||
OP_InitialMobHealth=0x2ecc # ShowEQ 06/29/05
|
|
||||||
OP_Mend=0x14ef # ShowEQ 06/29/05
|
|
||||||
OP_MendHPUpdate=0x1ffa # ShowEQ 5/11/05
|
|
||||||
OP_Feedback=0x224d # ShowEQ 06/29/05
|
|
||||||
OP_TGB=0x5e51 # ShowEQ 06/29/05
|
|
||||||
OP_InterruptCast=0x0db3
|
|
||||||
OP_Damage=0x1848 # ShowEQ 06/29/05 (OP_Action2)
|
|
||||||
OP_ChannelMessage=0x1004 # ShowEQ 06/29/05 (OP_CommonMessage)
|
|
||||||
OP_LevelAppearance=0x358e
|
|
||||||
OP_MultiLineMsg=0x0000
|
|
||||||
OP_Charm=0x10a1
|
|
||||||
OP_DeleteSpell=0x3fe6
|
|
||||||
OP_ApproveZone=0x0000
|
|
||||||
OP_Assist=0x5D02
|
|
||||||
OP_AugmentItem=0x539b
|
|
||||||
OP_BazaarInspect=0x0000
|
|
||||||
OP_AAExpUpdate=0x6dd8 # ShowEQ 06/29/05
|
|
||||||
OP_ClientError=0x0000
|
|
||||||
OP_DeleteItem=0x1c4a
|
|
||||||
OP_DeleteCharge=0x0841
|
|
||||||
OP_ControlBoat=0x0000
|
|
||||||
OP_DumpName=0x0000
|
|
||||||
OP_FeignDeath=0x2ad8
|
|
||||||
OP_Fishing=0x0b36
|
|
||||||
OP_Heartbeat=0x0000
|
|
||||||
OP_InstillDoubt=0x389e
|
|
||||||
OP_ItemName=0x0000
|
|
||||||
OP_LDoNButton=0x0000
|
|
||||||
OP_LDoNOpen=0x083b
|
|
||||||
OP_MoveCoin=0x1dd9
|
|
||||||
OP_ReloadUI=0x0000
|
|
||||||
OP_ZonePlayerToBind=0x385e # FNW Discovered on Feb 9, 2007
|
|
||||||
OP_Translocate=0x78c1
|
|
||||||
OP_Sacrifice=0x5f62
|
|
||||||
OP_ApplyPoison=0x4298
|
|
||||||
|
|
||||||
#bazaar trader stuff stuff:
|
|
||||||
#become and buy from
|
|
||||||
#Server->Client: [ Opcode: OP_Unknown (0x2403) Size: 8 ]
|
|
||||||
# 0: 46 01 00 00 39 01 00 00 | F...9...
|
|
||||||
OP_TraderDelItem=0x0da9
|
|
||||||
OP_BecomeTrader=0x66f9
|
|
||||||
OP_TraderShop=0x19d8
|
|
||||||
OP_TraderItemUpdate=0x0000
|
|
||||||
OP_Trader=0x0681
|
|
||||||
OP_ShopItem=0x0000
|
|
||||||
OP_TraderBuy=0x0f8e # ShowEQ 06/29/05
|
|
||||||
OP_Barter=0x7460
|
|
||||||
|
|
||||||
#pc/npc trading
|
|
||||||
OP_TradeRequest=0x372f # ShowEQ 06/29/05
|
|
||||||
OP_TradeAcceptClick=0x0065 # ShowEQ 06/29/05
|
|
||||||
OP_TradeRequestAck=0x4048 # ShowEQ 06/29/05
|
|
||||||
OP_TradeCoins=0x34c1
|
|
||||||
OP_FinishTrade=0x6014
|
|
||||||
OP_CancelTrade=0x2dc1 # ShowEQ 06/29/05
|
|
||||||
OP_TradeMoneyUpdate=0x3e63 #not sure
|
|
||||||
|
|
||||||
#merchant crap
|
|
||||||
OP_ShopPlayerSell=0x0e13 # ShowEQ 06/29/05
|
|
||||||
OP_ShopEnd=0x7e03 # ShowEQ 06/29/05
|
|
||||||
OP_ShopEndConfirm=0x0000
|
|
||||||
OP_ShopPlayerBuy=0x221e
|
|
||||||
OP_ShopRequest=0x3c4b # ShowEQ 06/29/05
|
|
||||||
OP_ShopDelItem=0x0000 #0x0da9 maybe, 16 bytes though
|
|
||||||
|
|
||||||
#tradeskill stuff:
|
|
||||||
OP_ClickObject=0x0f47 # ShowEQ 06/29/05
|
|
||||||
OP_ClickObjectAction=0x6937 # EQEMu 06/29/05
|
|
||||||
OP_RecipeDetails=0x0353 # EQEMu 06/29/05
|
|
||||||
OP_RecipesFavorite=0x23f0
|
|
||||||
OP_RecipesSearch=0x31f8 # EQEmu 06/29/05
|
|
||||||
OP_RecipeReply=0x4ea2 # EQEmu 06/29/05
|
|
||||||
OP_RecipeAutoCombine=0x7822
|
|
||||||
OP_TradeSkillCombine=0x0b40 # ShowEQ 06/29/05
|
|
||||||
|
|
||||||
OP_RequestDuel=0x28e1
|
|
||||||
OP_DuelResponse=0x2e78
|
|
||||||
OP_DuelResponse2=0x3bad #when accepted
|
|
||||||
|
|
||||||
OP_RezzComplete=0x60fa
|
|
||||||
OP_RezzRequest=0x417a
|
|
||||||
OP_RezzAnswer=0x6219
|
|
||||||
OP_SafeFallSuccess=0x5309
|
|
||||||
OP_Shielding=0x0000
|
|
||||||
OP_TargetReject=0x0000
|
|
||||||
OP_TestBuff=0x0000
|
|
||||||
OP_Track=0x5205 # ShowEQ 06/29/05
|
|
||||||
OP_TrackTarget=0x71ae
|
|
||||||
OP_TrackUnknown=0x74e1 #size 0 right after OP_Track
|
|
||||||
|
|
||||||
#Tribute Packets:
|
|
||||||
OP_OpenGuildTributeMaster=0x60b6 #open guild tribute master window
|
|
||||||
OP_OpenTributeMaster=0x512e #open tribute master window
|
|
||||||
OP_OpenTributeReply=0x0000 #reply to open request
|
|
||||||
OP_SelectTribute=0x625d #clicking on a tribute, and text reply
|
|
||||||
OP_TributeItem=0x6f6c #donating an item
|
|
||||||
OP_TributeMoney=0x27b3 #donating money
|
|
||||||
OP_TributeNPC=0x0000 #seems to be missing now
|
|
||||||
OP_TributeToggle=0x2688 #activating/deactivating tribute
|
|
||||||
OP_TributeTimer=0x4665 #a 4 byte tier update, 10 minutes for seconds
|
|
||||||
OP_TributePointUpdate=0x6463 #16 byte point packet
|
|
||||||
OP_TributeUpdate=0x5639 # ShowEQ 06/29/05
|
|
||||||
OP_GuildTributeInfo=0x5e3d # EQEmu 06/29/05
|
|
||||||
OP_TributeInfo=0x152d # EQEmu 06/29/05
|
|
||||||
OP_SendGuildTributes=0x5e3a # request packet, 4 bytes
|
|
||||||
OP_SendTributes=0x067a # request packet, 4 bytes, migth be backwards
|
|
||||||
OP_CloseTributeMaster=0x7f25 #sent by client when they close window
|
|
||||||
|
|
||||||
#Adventure packets:
|
|
||||||
OP_LeaveAdventure=0x0c0d
|
|
||||||
OP_AdventureFinish=0x3906
|
|
||||||
OP_AdventureInfoRequest=0x2aaf #right click adventure recruiter
|
|
||||||
OP_AdventureInfo=0x1db5 #text reply to right click
|
|
||||||
OP_AdventureRequest=0x43fd
|
|
||||||
OP_AdventureDetails=0x3f26
|
|
||||||
OP_AdventureData=0x0677
|
|
||||||
OP_AdventureUpdate=0x64ac
|
|
||||||
OP_AdventureMerchantRequest=0x0950
|
|
||||||
OP_AdventureMerchantResponse=0x4416
|
|
||||||
OP_AdventureMerchantPurchase=0x413d
|
|
||||||
OP_AdventureMerchantSell=0x0097
|
|
||||||
OP_AdventurePointsUpdate=0x420a #not sure, followed purchase
|
|
||||||
OP_AdventureStatsRequest=0x5fc7
|
|
||||||
OP_AdventureStatsReply=0x56cd
|
|
||||||
OP_AdventureLeaderboardRequest=0x230a
|
|
||||||
OP_AdventureLeaderboardReply=0x0d0f
|
|
||||||
# request stats: 0x5fc7, reply 0x56cd
|
|
||||||
# request leaderboard: 0x230a, reply 0x0d0f
|
|
||||||
|
|
||||||
#Group Opcodes
|
|
||||||
OP_GroupDisband=0x4033 # ShowEQ 06/29/05
|
|
||||||
OP_GroupInvite=0x3853 # ShowEQ 06/29/05
|
|
||||||
OP_GroupFollow=0x1b48 # ShowEQ 06/29/05
|
|
||||||
OP_GroupUpdate=0x66ba # ShowEQ 06/29/05
|
|
||||||
OP_GroupAcknowledge=0x0797
|
|
||||||
OP_GroupCancelInvite=0x42c9 # ShowEQ 06/29/05
|
|
||||||
OP_GroupDelete=0x0000
|
|
||||||
OP_GroupFollow2=0x0000 #used with GroupInvite2
|
|
||||||
OP_GroupInvite2=0x1f27 #this is sometimes sent instead of OP_GroupInvite
|
|
||||||
OP_CancelInvite=0x0000
|
|
||||||
|
|
||||||
OP_RaidJoin=0x0000 # ShowEQ 06/29/05
|
|
||||||
OP_RaidInvite=0x1f21 # ShowEQ 06/29/05
|
|
||||||
OP_RaidUpdate=0x1974 # EQEmu 06/29/05
|
|
||||||
|
|
||||||
|
|
||||||
OP_ZoneComplete=0x0000
|
|
||||||
OP_ItemLinkText=0x0000
|
|
||||||
OP_ClearObject=0x8258
|
|
||||||
OP_DisciplineUpdate=0x7180
|
|
||||||
OP_DisciplineTimer=0x53df
|
|
||||||
OP_LocInfo=0x0000
|
|
||||||
OP_FindPersonRequest=0x3c41 # ShowEQ 06/29/05
|
|
||||||
OP_FindPersonReply=0x5711
|
|
||||||
OP_ForceFindPerson=0x0000
|
|
||||||
OP_LoginComplete=0x0000
|
|
||||||
OP_Sound=0x4a1d
|
|
||||||
#OP_Zone_MissingName01=0x0000 #remove on recompile
|
|
||||||
OP_MobRename=0x3230
|
|
||||||
OP_BankerChange=0x6a5b
|
|
||||||
|
|
||||||
#Rogue packets
|
|
||||||
OP_SenseTraps=0x24ab # ShowEQ 06/29/05
|
|
||||||
OP_PickPocket=0x4a2a
|
|
||||||
OP_DisarmTraps=0x0000
|
|
||||||
OP_Disarm=0x17d9
|
|
||||||
OP_Hide=0x6f64 # ShowEQ 06/29/05
|
|
||||||
OP_Sneak=0x4312 # ShowEQ 06/29/05
|
|
||||||
|
|
||||||
#Task packets
|
|
||||||
#task complete related: 0x54eb (24 bytes), 0x4c8c (8 bytes), 0x6a1d (4 bytes)
|
|
||||||
OP_TaskActivityComplete=0x54eb
|
|
||||||
OP_CompletedTasks=0x53c4 # ShowEQ 06/29/05
|
|
||||||
OP_TaskDescription=0x682d # ShowEQ 06/29/05
|
|
||||||
OP_TaskActivity=0x3ba8 # ShowEQ 06/29/05
|
|
||||||
OP_TaskMemberList=0x09b6 #not sure
|
|
||||||
OP_OpenNewTasksWindow=0x5e7c #combined with OP_AvaliableTask I think
|
|
||||||
OP_AvaliableTask=0x0000
|
|
||||||
OP_AcceptNewTask=0x207f
|
|
||||||
OP_TaskHistoryRequest=0x3274
|
|
||||||
OP_TaskHistoryReply=0x009c
|
|
||||||
OP_CancelTask=0x4c8c
|
|
||||||
OP_DeclineAllTasks=0x207f #not sure, 12 bytes
|
|
||||||
|
|
||||||
|
|
||||||
OP_RequestClientZoneChange=0x1235
|
|
||||||
OP_PurchaseLeadershipAA=0x07f1
|
|
||||||
OP_UpdateLeadershipAA=0x3eec
|
|
||||||
OP_LeadershipExpUpdate=0x7416
|
|
||||||
OP_LeadershipExpToggle=0x17bf
|
|
||||||
OP_GroupUpdateLeaderAA=0x4c3f
|
|
||||||
OP_MarkNPC=0x5b37
|
|
||||||
OP_ClearNPCMarks=0x1794
|
|
||||||
OP_DoGroupLeadershipAbility=0x4ffe
|
|
||||||
OP_DelegateAbility=0x56eb
|
|
||||||
|
|
||||||
#The following 4 Opcodes are for SoF only:
|
|
||||||
OP_FinishWindow=0x0000 #Trevius 03/15/09
|
|
||||||
OP_FinishWindow2=0x0000 #Trevius 03/15/09
|
|
||||||
OP_ItemVerifyRequest=0x0000 #Trevius 03/15/09
|
|
||||||
OP_ItemVerifyReply=0x0000 #Trevius 03/15/09
|
|
||||||
|
|
||||||
#discovered opcodes not yet used:
|
|
||||||
OP_CrashDump=0x6d5d
|
|
||||||
OP_PlayMP3=0x0000
|
|
||||||
OP_FriendsWho=0x41db
|
|
||||||
OP_MoveLogRequest=0x78e8 #gone I think
|
|
||||||
OP_MoveLogDisregard=0x0000 #gone I think
|
|
||||||
OP_ReclaimCrystals=0x12fd
|
|
||||||
OP_CrystalCountUpdate=0x0000
|
|
||||||
OP_DynamicWall=0x0000
|
|
||||||
OP_CustomTitles=0x2a28 # ShowEQ 06/29/05
|
|
||||||
OP_RequestTitles=0x5eba # EQEmu 06/29/05
|
|
||||||
OP_SendTitleList=0x3e89 # EQEmu 06/29/05
|
|
||||||
OP_SetTitle=0x1f22 # EQEmu 06/29/05
|
|
||||||
OP_SetTitleReply=0x5eab # EQEmu 06/29/05
|
|
||||||
OP_Bandolier=0x6f0c
|
|
||||||
OP_PotionBelt=0x0719
|
|
||||||
OP_OpenDiscordMerchant=0x0000 #8 bytes
|
|
||||||
OP_DiscordMerchantInventory=0x0000 #long item packet
|
|
||||||
OP_GiveMoney=0x56d4 #16 bytes, pp, gp, sp, cp.
|
|
||||||
OP_OnLevelMessage=0x1dde
|
|
||||||
OP_PopupResponse=0x3816
|
|
||||||
OP_RequestKnowledgeBase=0x7584
|
|
||||||
OP_KnowledgeBase=0x4a52
|
|
||||||
OP_PlayerUnderWorld=0x46d9
|
|
||||||
OP_PVPStats=0x5cc0
|
|
||||||
OP_PVPLeaderBoardRequest=0x61d2
|
|
||||||
OP_PVPLeaderBoardReply=0x1a59
|
|
||||||
OP_PVPLeaderBoardDetailsRequest=0x06a2
|
|
||||||
OP_PVPLeaderBoardDetailsReply=0x246a
|
|
||||||
OP_WeaponEquip1=0x6c5e
|
|
||||||
OP_WeaponEquip2=0x63da
|
|
||||||
OP_WeaponUnequip2=0x381d
|
|
||||||
OP_VoiceMacroIn=0x2866
|
|
||||||
OP_VoiceMacroOut=0x2ec6
|
|
||||||
|
|
||||||
#named unknowns, to make looking for real unknown easier
|
|
||||||
OP_AnnoyingZoneUnknown=0x0000 # EQEmu 06/29/05
|
|
||||||
OP_Some6ByteHPUpdate=0x0000 #seems to happen when you target group members
|
|
||||||
OP_SomeItemPacketMaybe=0x497c # EQEmu 06/29/05
|
|
||||||
OP_QueryResponseThing=0x6379
|
|
||||||
OP_FloatListThing=0x7510 # EQEmu 06/29/05
|
|
||||||
|
|
||||||
#Login opcodes
|
|
||||||
OP_SessionReady=0x0001
|
|
||||||
OP_Login=0x0002
|
|
||||||
OP_ServerListRequest=0x0004
|
|
||||||
OP_PlayEverquestRequest=0x000d
|
|
||||||
OP_PlayEverquestResponse=0x0021
|
|
||||||
OP_ChatMessage=0x0016
|
|
||||||
OP_LoginAccepted=0x0017
|
|
||||||
OP_ServerListResponse=0x0018
|
|
||||||
OP_Poll=0x0029
|
|
||||||
OP_EnterChat=0x000f
|
|
||||||
OP_PollResponse=0x0011
|
|
||||||
|
|
||||||
#raw opcodes
|
|
||||||
OP_RAWSessionRequest=0x0000
|
|
||||||
OP_RAWSessionResponse=0x0000
|
|
||||||
OP_RAWCombined=0x0000
|
|
||||||
OP_RAWSessionDisconnect=0x0000
|
|
||||||
OP_RAWKeepAlive=0x0000
|
|
||||||
OP_RAWSessionStatRequest=0x0000
|
|
||||||
OP_RAWSessionStatResponse=0x0000
|
|
||||||
OP_RAWPacket=0x0000
|
|
||||||
OP_RAWFragment=0x0000
|
|
||||||
OP_RAWOutOfOrderAck=0x0000
|
|
||||||
OP_RAWAck=0x0000
|
|
||||||
OP_RAWAppCombined=0x0000
|
|
||||||
OP_RAWOutOfSession=0x0000
|
|
||||||
|
|
||||||
#mail opcodes
|
|
||||||
OP_Command=0x0000
|
|
||||||
OP_MailboxHeader=0x0000
|
|
||||||
OP_MailHeader=0x0000
|
|
||||||
OP_MailBody=0x0000
|
|
||||||
OP_NewMail=0x0000
|
|
||||||
OP_SentConfirm=0x0000
|
|
||||||
|
|
||||||
|
|
||||||
#we need to document the differences between these packets to make identifying them easier
|
|
||||||
OP_MobHealth=0x3d2d # ShowEQ 06/29/05
|
|
||||||
OP_HPUpdate=0x217b # ShowEQ 06/29/05
|
|
||||||
OP_Some3ByteHPUpdate=0x0000 #initial HP update for mobs
|
|
||||||
OP_InitialHPUpdate=0x7ac2 # ShowEQ 06/29/05
|
|
||||||
|
|
||||||
#remove these
|
|
||||||
#junk
|
|
||||||
OP_0x0193=0x0000
|
|
||||||
OP_0x0347=0x0000
|
|
||||||
OP_ConsumeAmmo=0x0000
|
|
||||||
OP_EmoteAnim=0x0000
|
|
||||||
OP_Deny=0x0000
|
|
||||||
OP_SetDataRate=0x0000
|
|
||||||
|
|
||||||
@ -314,7 +314,7 @@
|
|||||||
9058|2014_11_26_InventoryTableUpdate.sql|SHOW COLUMNS FROM `inventory` LIKE 'ornamenticon'|empty|
|
9058|2014_11_26_InventoryTableUpdate.sql|SHOW COLUMNS FROM `inventory` LIKE 'ornamenticon'|empty|
|
||||||
9059|2014_12_01_mercs_table_update.sql|SHOW COLUMNS FROM `mercs` LIKE 'MercSize'|empty|
|
9059|2014_12_01_mercs_table_update.sql|SHOW COLUMNS FROM `mercs` LIKE 'MercSize'|empty|
|
||||||
9060|2014_12_09_items_table_update.sql|SHOW COLUMNS FROM `items` LIKE 'herosforgemodel'|empty|
|
9060|2014_12_09_items_table_update.sql|SHOW COLUMNS FROM `items` LIKE 'herosforgemodel'|empty|
|
||||||
9061|2014_12_11_inventory_table_update.sql|SHOW COLUMNS FROM `inventory` LIKE 'ornament_hero_model'|empty|
|
9061|2014_12_13_inventory_table_update.sql|SHOW COLUMNS FROM `inventory` LIKE 'ornament_hero_model'|empty|
|
||||||
9062|2014_12_15_multiple_table_updates.sql|SHOW COLUMNS FROM `items` LIKE 'augslot6type'|empty|
|
9062|2014_12_15_multiple_table_updates.sql|SHOW COLUMNS FROM `items` LIKE 'augslot6type'|empty|
|
||||||
|
|
||||||
# Upgrade conditions:
|
# Upgrade conditions:
|
||||||
|
|||||||
@ -1296,7 +1296,6 @@ void ClientList::GetClients(const char *zone_name, std::vector<ClientListEntry *
|
|||||||
|
|
||||||
void ClientList::SendClientVersionSummary(const char *Name)
|
void ClientList::SendClientVersionSummary(const char *Name)
|
||||||
{
|
{
|
||||||
uint32 Client62Count = 0;
|
|
||||||
uint32 ClientTitaniumCount = 0;
|
uint32 ClientTitaniumCount = 0;
|
||||||
uint32 ClientSoFCount = 0;
|
uint32 ClientSoFCount = 0;
|
||||||
uint32 ClientSoDCount = 0;
|
uint32 ClientSoDCount = 0;
|
||||||
@ -1317,7 +1316,6 @@ void ClientList::SendClientVersionSummary(const char *Name)
|
|||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
++Client62Count;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
@ -1354,7 +1352,7 @@ void ClientList::SendClientVersionSummary(const char *Name)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
zoneserver_list.SendEmoteMessage(Name, 0, 0, 13, "There are %i 6.2, %i Titanium, %i SoF, %i SoD, %i UF, %i RoF clients currently connected.",
|
zoneserver_list.SendEmoteMessage(Name, 0, 0, 13, "There are %i Titanium, %i SoF, %i SoD, %i UF, %i RoF clients currently connected.",
|
||||||
Client62Count, ClientTitaniumCount, ClientSoFCount, ClientSoDCount, ClientUnderfootCount, ClientRoFCount);
|
ClientTitaniumCount, ClientSoFCount, ClientSoDCount, ClientUnderfootCount, ClientRoFCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1759,7 +1759,6 @@ luabind::scope lua_register_client_version() {
|
|||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[
|
||||||
luabind::value("Unknown", static_cast<int>(EQClientUnknown)),
|
luabind::value("Unknown", static_cast<int>(EQClientUnknown)),
|
||||||
luabind::value("62", static_cast<int>(EQClient62)),
|
|
||||||
luabind::value("Titanium", static_cast<int>(EQClientTitanium)),
|
luabind::value("Titanium", static_cast<int>(EQClientTitanium)),
|
||||||
luabind::value("SoF", static_cast<int>(EQClientSoF)),
|
luabind::value("SoF", static_cast<int>(EQClientSoF)),
|
||||||
luabind::value("SoD", static_cast<int>(EQClientSoD)),
|
luabind::value("SoD", static_cast<int>(EQClientSoD)),
|
||||||
|
|||||||
@ -2773,13 +2773,6 @@ void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, int SequenceN
|
|||||||
if(strlen(Tasks[TaskID]->Reward) != 0) {
|
if(strlen(Tasks[TaskID]->Reward) != 0) {
|
||||||
|
|
||||||
switch(c->GetClientVersion()) {
|
switch(c->GetClientVersion()) {
|
||||||
|
|
||||||
case EQClient62:
|
|
||||||
{
|
|
||||||
MakeAnyLenString(&RewardTmp, "%c%07i-00001-00001-00001-00001-000013E0ABA6B%s%c",
|
|
||||||
0x12, ItemID, Tasks[TaskID]->Reward,0x12);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case EQClientTitanium:
|
case EQClientTitanium:
|
||||||
{
|
{
|
||||||
MakeAnyLenString(&RewardTmp, "%c%06X000000000000000000000000000000014505DC2%s%c",
|
MakeAnyLenString(&RewardTmp, "%c%06X000000000000000000000000000000014505DC2%s%c",
|
||||||
@ -2807,13 +2800,6 @@ void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, int SequenceN
|
|||||||
if(Item) {
|
if(Item) {
|
||||||
|
|
||||||
switch(c->GetClientVersion()) {
|
switch(c->GetClientVersion()) {
|
||||||
|
|
||||||
case EQClient62:
|
|
||||||
{
|
|
||||||
MakeAnyLenString(&RewardTmp, "%c%07i-00001-00001-00001-00001-000013E0ABA6B%s%c",
|
|
||||||
0x12, ItemID, Item->Name,0x12);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case EQClientTitanium:
|
case EQClientTitanium:
|
||||||
{
|
{
|
||||||
MakeAnyLenString(&RewardTmp, "%c%06X000000000000000000000000000000014505DC2%s%c",
|
MakeAnyLenString(&RewardTmp, "%c%06X000000000000000000000000000000014505DC2%s%c",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user