mirror of
https://github.com/EQEmu/Server.git
synced 2026-10-08 17:53:35 +00:00
merge from master
This commit is contained in:
commit
9ddb56088e
417 files changed
+6952
-10088
No files matched your search
+1
-1
@@ -259,7 +259,7 @@ OPTION(EQEMU_BUILD_CLIENT_FILES "Build Client Import/Export Data Programs." ON)
|
||||
|
||||
#C++11 stuff
|
||||
IF(NOT MSVC)
|
||||
ADD_DEFINITIONS(-std=c++0x)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
ENDIF(NOT MSVC)
|
||||
|
||||
#Various definitions
|
||||
|
||||
@@ -1,5 +1,85 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 08/26/2014 ==
|
||||
Uleat: Implemented 'Smart' Player Trade transfers. Trades are processed by containers, stackables and then all remaining. QueryServ logs have been updated to match these transactions.
|
||||
Note: QueryServ logs previously listed 'Items' on the main entry table. This indicated the number of slots affected and not the actual number of items.
|
||||
This field now indicates the actual number of items transferred. For non-stackable, the value is '1' and stackable is the number of charges. A _detail_count
|
||||
property has been added to both 'Trade' and 'Handin' structs to indicate the number of details recorded..though, not tracked..it could be added.
|
||||
|
||||
== 08/24/2014 ==
|
||||
Uleat: Fix (attempted) for zone crashes related to zone shut-down. This change disables all Mob AI and disables/deletes all Mob timers once Zone::ShutDown() is called. More areas will be addressed as reports come in.
|
||||
Note: Perl and Lua quests tested to work..please post any aberrant behavior. (I finally set my spell-check to US English...)
|
||||
Akkadius: Character creation process crash fix and query cleanup
|
||||
Akkadius: Created `character_lookup` table for applications that mirrors all `character_` table fields minus blob fields for application lookups
|
||||
- A 2.4GB character_ table will take 7 seconds to query on a SSD versus .1s on the character_lookup table
|
||||
- This also causes applications like Magelo to burst reads of the entire character table because of the blob fields that come with the reads, as much as 500-600MB/s even if a indexed id filter is provided
|
||||
- This field is synchronized on player save and has 0.001s DB hit
|
||||
- When we split out from the blob, ideally this table can be removed
|
||||
- Required SQL: utils\sql\git\required\2014_08_24_character_lookup.sql
|
||||
|
||||
== 08/23/2014 ==
|
||||
Akkadius: Changed zone process window title format, example: 'crushbone :: clients: 6 inst_id: 1 inst_ver: 0 :: port: 7015'
|
||||
Akkadius: Most of the following changes are QueryServ related, fully implemented its original functionality to be able to offload
|
||||
intensive or metric based logging to a remote server process that could exist on another server entirely
|
||||
Akkadius: Implemented Player Event Logging Types (Go to table `qs_player_events`):
|
||||
1 = Player_Log_Quest,
|
||||
2 = Player_Log_Zoning,
|
||||
3 = Player_Log_Deaths,
|
||||
4 = Player_Log_Connect_State,
|
||||
5 = Player_Log_Levels,
|
||||
6 = Player_Log_Keyring_Addition,
|
||||
7 = Player_Log_QGlobal_Update,
|
||||
8 = Player_Log_Task_Updates,
|
||||
9 = Player_Log_AA_Purchases,
|
||||
10 = Player_Log_Trade_Skill_Events,
|
||||
11 = Player_Log_Issued_Commands,
|
||||
12 = Player_Log_Money_Transactions,
|
||||
13 = Player_Log_Alternate_Currency_Transactions,
|
||||
- All QueryServ logging will be implemented with a front end in EoC 2.0 very soon
|
||||
- Architecture page: http://wiki.eqemulator.org/p?QueryServ_Architecture
|
||||
Akkadius: Changed all QS Error related logging to 'QUERYSERV__ERROR'
|
||||
Akkadius: (Natedog) (Crash Fix) Legacy MySQL bug revert for loading AA's COALESCE( from COALESCE (
|
||||
Akkadius: Implemented Perl Quest objects (LUA still needed to be exported):
|
||||
- quest::qs_send_query("MySQL query") - Will send a raw query to the QueryServ process, useful for custom logging
|
||||
- quest::qs_player_event(char_id, event_desc); - Will process a quest type event to table `qs_player_events`
|
||||
Akkadius: Added MySQL Tables
|
||||
- `qs_player_aa_rate_hourly`
|
||||
- `qs_player_events`
|
||||
- Source table structures from:
|
||||
- utils\sql\git\queryserv\required\08_23_2014_player_events_and_player_aa_rate_hourly
|
||||
To get the complete QueryServ schema, source from here:
|
||||
- utils\sql\git\queryserv\required\Complete_QueryServ_Table_Structures.sql
|
||||
Akkadius: Added rules for each logging type, source rules here with them enabled by default:
|
||||
- utils\sql\git\queryserv\required\Complete_QueryServ_Rules_Enabled.sql
|
||||
Akkadius: Spawn related logging cleanup
|
||||
Akkadius: General code cleanup
|
||||
Akkadius: More to come for QueryServ
|
||||
|
||||
== 08/22/2014 ==
|
||||
Uleat: Rework of Trade::FinishedTrade() and Trade::ResetTrade() to parse items a little more intelligently.
|
||||
|
||||
Trade window items are now sent to client inventory in this order:
|
||||
- Bags
|
||||
- Partial stack movements
|
||||
- All remaining items
|
||||
|
||||
If any of these procedures cause any problems, please post them immediately.
|
||||
|
||||
== 08/20/2014 ==
|
||||
Uleat: Rework of Trade::AddEntity() - function used to move items into the trade window. Now accepts argument for 'stack_size' and updates client properly.
|
||||
Note: I tested trade with Titanium:{SoF,SoD,UF,RoF} in both directions and no client generated an OP_MoveItem event for attempting to place a stackable
|
||||
onto a partial stack already in the trade window. The only way to achieve stacking is to click on the receiving client. If there is a partial stack remaining
|
||||
on the cursor after the OP_MoveItem event, and there is room available, the client will generate subsequent events to move the remaining count.
|
||||
|
||||
== 08/19/2014 ==
|
||||
Akkadius: Implemented a Stop_Return feature (Accidental item handin prevention) that will be symmetrically used with plugin::return_items that I am currently running live testing on EZ before releasing to EQEmu. This does not hurt to have this in the source.
|
||||
Akkadius: Fixed crash where 'attacker' validation is not being checked
|
||||
Akkadius: Removed petition console spam that does not follow traditional logging and is useless
|
||||
Akkadius: Made fix with SympatheticProcChances where it was checking for TempItem->Focus.Effect instead of TempItemAug->Focus.Effect
|
||||
|
||||
== 08/18/2014 ==
|
||||
Uleat: Fix for https://github.com/EQEmu/Server/issues/127 -- also activated a remarked action in doors.cpp to eliminate a memory leak.
|
||||
|
||||
== 08/16/2014 ==
|
||||
KLS: (addmoreice) Trying out some unstable DB changes. Do backup your database before trying them as master will be considered unstable for a few days at least.
|
||||
Uleat (Noudness): Fixed a floating-point comparison error that led to the notorious 'client bounce' (this is not related to the
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
#include <stdio.h>
|
||||
#include "../../common/debug.h"
|
||||
#include "../../common/shareddb.h"
|
||||
#include "../../common/EQEmuConfig.h"
|
||||
#include "../../common/eqemu_config.h"
|
||||
#include "../../common/platform.h"
|
||||
#include "../../common/crash.h"
|
||||
#include "../../common/rulesys.h"
|
||||
#include "../../common/StringUtil.h"
|
||||
#include "../../common/string_util.h"
|
||||
|
||||
void ExportSpells(SharedDatabase *db);
|
||||
void ExportSkillCaps(SharedDatabase *db);
|
||||
@@ -32,7 +32,7 @@ void ExportBaseData(SharedDatabase *db);
|
||||
int main(int argc, char **argv) {
|
||||
RegisterExecutablePlatform(ExePlatformClientExport);
|
||||
set_exception_handler();
|
||||
|
||||
|
||||
LogFile->write(EQEMuLog::Status, "Client Files Export Utility");
|
||||
if(!EQEmuConfig::LoadConfig()) {
|
||||
LogFile->write(EQEMuLog::Error, "Unable to load configuration file.");
|
||||
@@ -52,11 +52,11 @@ int main(int argc, char **argv) {
|
||||
"database connection");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
ExportSpells(&database);
|
||||
ExportSkillCaps(&database);
|
||||
ExportBaseData(&database);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -69,72 +69,67 @@ void ExportSpells(SharedDatabase *db) {
|
||||
return;
|
||||
}
|
||||
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
const char *query = "SELECT * FROM spells_new ORDER BY id";
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
if(db->RunQuery(query, strlen(query), errbuf, &result)) {
|
||||
while(row = mysql_fetch_row(result)) {
|
||||
const std::string query = "SELECT * FROM spells_new ORDER BY id";
|
||||
auto results = db->QueryDatabase(query);
|
||||
|
||||
if(results.Success()) {
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
std::string line;
|
||||
unsigned int fields = mysql_num_fields(result);
|
||||
unsigned int fields = results.ColumnCount();
|
||||
for(unsigned int i = 0; i < fields; ++i) {
|
||||
if(i != 0) {
|
||||
line.push_back('^');
|
||||
}
|
||||
|
||||
|
||||
line += row[i];
|
||||
}
|
||||
|
||||
|
||||
fprintf(f, "%s\n", line.c_str());
|
||||
}
|
||||
mysql_free_result(result);
|
||||
} else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in ExportSpells query '%s' %s", query, errbuf);
|
||||
LogFile->write(EQEMuLog::Error, "Error in ExportSpells query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
bool SkillUsable(SharedDatabase *db, int skill_id, int class_id) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = nullptr;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
bool res = false;
|
||||
if(db->RunQuery(query, MakeAnyLenString(&query, "SELECT max(cap) FROM skill_caps WHERE class=%d AND skillID=%d",
|
||||
class_id, skill_id), errbuf, &result)) {
|
||||
if(row = mysql_fetch_row(result)) {
|
||||
if(row[0] && atoi(row[0]) > 0) {
|
||||
res = true;
|
||||
}
|
||||
}
|
||||
mysql_free_result(result);
|
||||
} else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in skill_usable query '%s' %s", query, errbuf);
|
||||
}
|
||||
|
||||
safe_delete_array(query);
|
||||
return res;
|
||||
bool res = false;
|
||||
|
||||
std::string query = StringFormat("SELECT max(cap) FROM skill_caps WHERE class=%d AND skillID=%d",
|
||||
class_id, skill_id);
|
||||
auto results = db->QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
LogFile->write(EQEMuLog::Error, "Error in skill_usable query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (results.RowCount() == 0)
|
||||
return false;
|
||||
|
||||
auto row = results.begin();
|
||||
if(row[0] && atoi(row[0]) > 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int GetSkill(SharedDatabase *db, int skill_id, int class_id, int level) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = nullptr;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
int res = 0;
|
||||
if(db->RunQuery(query, MakeAnyLenString(&query, "SELECT cap FROM skill_caps WHERE class=%d AND skillID=%d AND level=%d",
|
||||
class_id, skill_id, level), errbuf, &result)) {
|
||||
if(row = mysql_fetch_row(result)) {
|
||||
res = atoi(row[0]);
|
||||
}
|
||||
mysql_free_result(result);
|
||||
} else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in get_skill query '%s' %s", query, errbuf);
|
||||
}
|
||||
|
||||
safe_delete_array(query);
|
||||
return res;
|
||||
std::string query = StringFormat("SELECT cap FROM skill_caps WHERE class=%d AND skillID=%d AND level=%d",
|
||||
class_id, skill_id, level);
|
||||
auto results = db->QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
LogFile->write(EQEMuLog::Error, "Error in get_skill query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (results.RowCount() == 0)
|
||||
return 0;
|
||||
|
||||
auto row = results.begin();
|
||||
return atoi(row[0]);
|
||||
}
|
||||
|
||||
void ExportSkillCaps(SharedDatabase *db) {
|
||||
@@ -175,27 +170,23 @@ void ExportBaseData(SharedDatabase *db) {
|
||||
return;
|
||||
}
|
||||
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
const char *query = "SELECT * FROM base_data ORDER BY level, class";
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
if(db->RunQuery(query, strlen(query), errbuf, &result)) {
|
||||
while(row = mysql_fetch_row(result)) {
|
||||
const std::string query = "SELECT * FROM base_data ORDER BY level, class";
|
||||
auto results = db->QueryDatabase(query);
|
||||
if(results.Success()) {
|
||||
for (auto row = results.begin();row != results.end();++row) {
|
||||
std::string line;
|
||||
unsigned int fields = mysql_num_fields(result);
|
||||
for(unsigned int i = 0; i < fields; ++i) {
|
||||
if(i != 0) {
|
||||
unsigned int fields = results.ColumnCount();
|
||||
for(unsigned int rowIndex = 0; rowIndex < fields; ++rowIndex) {
|
||||
if(rowIndex != 0)
|
||||
line.push_back('^');
|
||||
}
|
||||
|
||||
line += row[i];
|
||||
line += row[rowIndex];
|
||||
}
|
||||
|
||||
fprintf(f, "%s\n", line.c_str());
|
||||
}
|
||||
mysql_free_result(result);
|
||||
} else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in ExportBaseData query '%s' %s", query, errbuf);
|
||||
LogFile->write(EQEMuLog::Error, "Error in ExportBaseData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
#include "../../common/debug.h"
|
||||
#include "../../common/shareddb.h"
|
||||
#include "../../common/EQEmuConfig.h"
|
||||
#include "../../common/eqemu_config.h"
|
||||
#include "../../common/platform.h"
|
||||
#include "../../common/crash.h"
|
||||
#include "../../common/rulesys.h"
|
||||
#include "../../common/StringUtil.h"
|
||||
#include "../../common/string_util.h"
|
||||
|
||||
void ImportSpells(SharedDatabase *db);
|
||||
void ImportSkillCaps(SharedDatabase *db);
|
||||
@@ -31,7 +31,7 @@ void ImportBaseData(SharedDatabase *db);
|
||||
int main(int argc, char **argv) {
|
||||
RegisterExecutablePlatform(ExePlatformClientImport);
|
||||
set_exception_handler();
|
||||
|
||||
|
||||
LogFile->write(EQEMuLog::Status, "Client Files Import Utility");
|
||||
if(!EQEmuConfig::LoadConfig()) {
|
||||
LogFile->write(EQEMuLog::Error, "Unable to load configuration file.");
|
||||
@@ -55,26 +55,20 @@ int main(int argc, char **argv) {
|
||||
ImportSpells(&database);
|
||||
ImportSkillCaps(&database);
|
||||
ImportBaseData(&database);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int GetSpellColumns(SharedDatabase *db) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
const char *query = "DESCRIBE spells_new";
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
int res = 0;
|
||||
if(db->RunQuery(query, (uint32)strlen(query), errbuf, &result)) {
|
||||
while(row = mysql_fetch_row(result)) {
|
||||
++res;
|
||||
}
|
||||
mysql_free_result(result);
|
||||
} else {
|
||||
LogFile->write(EQEMuLog::Error, "Error in GetSpellColumns query '%s' %s", query, errbuf);
|
||||
}
|
||||
|
||||
return res;
|
||||
const std::string query = "DESCRIBE spells_new";
|
||||
auto results = db->QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
LogFile->write(EQEMuLog::Error, "Error in GetSpellColumns query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
return results.RowCount();
|
||||
}
|
||||
|
||||
void ImportSpells(SharedDatabase *db) {
|
||||
@@ -85,8 +79,8 @@ void ImportSpells(SharedDatabase *db) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string delete_sql = "DELETE FROM spells_new";
|
||||
db->RunQuery(delete_sql.c_str(), (uint32)delete_sql.length());
|
||||
std::string query = "DELETE FROM spells_new";
|
||||
db->QueryDatabase(query);
|
||||
|
||||
int columns = GetSpellColumns(db);
|
||||
int spells_imported = 0;
|
||||
@@ -103,8 +97,8 @@ void ImportSpells(SharedDatabase *db) {
|
||||
std::string escaped = ::EscapeString(buffer);
|
||||
auto split = SplitString(escaped, '^');
|
||||
int line_columns = (int)split.size();
|
||||
|
||||
std::string sql;
|
||||
|
||||
if(line_columns >= columns) {
|
||||
sql = "INSERT INTO spells_new VALUES(";
|
||||
for(int i = 0; i < columns; ++i) {
|
||||
@@ -140,7 +134,7 @@ void ImportSpells(SharedDatabase *db) {
|
||||
sql += ");";
|
||||
}
|
||||
|
||||
db->RunQuery(sql.c_str(), (uint32)sql.length());
|
||||
db->QueryDatabase(sql);
|
||||
|
||||
spells_imported++;
|
||||
if(spells_imported % 1000 == 0) {
|
||||
@@ -165,17 +159,17 @@ void ImportSkillCaps(SharedDatabase *db) {
|
||||
}
|
||||
|
||||
std::string delete_sql = "DELETE FROM skill_caps";
|
||||
db->RunQuery(delete_sql.c_str(), (uint32)delete_sql.length());
|
||||
db->QueryDatabase(delete_sql);
|
||||
|
||||
char buffer[2048];
|
||||
while(fgets(buffer, 2048, f)) {
|
||||
auto split = SplitString(buffer, '^');
|
||||
|
||||
|
||||
if(split.size() < 4) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int class_id, skill_id, level, cap;
|
||||
class_id = atoi(split[0].c_str());
|
||||
skill_id = atoi(split[1].c_str());
|
||||
@@ -185,7 +179,7 @@ void ImportSkillCaps(SharedDatabase *db) {
|
||||
std::string sql = StringFormat("INSERT INTO skill_caps(class, skillID, level, cap) VALUES(%d, %d, %d, %d)",
|
||||
class_id, skill_id, level, cap);
|
||||
|
||||
db->RunQuery(sql.c_str(), (uint32)sql.length());
|
||||
db->QueryDatabase(sql);
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
@@ -201,7 +195,7 @@ void ImportBaseData(SharedDatabase *db) {
|
||||
}
|
||||
|
||||
std::string delete_sql = "DELETE FROM base_data";
|
||||
db->RunQuery(delete_sql.c_str(), (uint32)delete_sql.length());
|
||||
db->QueryDatabase(delete_sql);
|
||||
|
||||
char buffer[2048];
|
||||
while(fgets(buffer, 2048, f)) {
|
||||
@@ -230,7 +224,7 @@ void ImportBaseData(SharedDatabase *db) {
|
||||
"mana_fac, end_fac) VALUES(%d, %d, %f, %f, %f, %f, %f, %f, %f, %f)",
|
||||
level, class_id, hp, mana, end, unk1, unk2, hp_fac, mana_fac, end_fac);
|
||||
|
||||
db->RunQuery(sql.c_str(), (uint32)sql.length());
|
||||
db->QueryDatabase(sql);
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
|
||||
+140
-153
@@ -1,55 +1,55 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
|
||||
SET(common_sources
|
||||
BasePacket.cpp
|
||||
base_packet.cpp
|
||||
classes.cpp
|
||||
Condition.cpp
|
||||
condition.cpp
|
||||
crash.cpp
|
||||
CRC16.cpp
|
||||
crc16.cpp
|
||||
crc32.cpp
|
||||
database.cpp
|
||||
dbasync.cpp
|
||||
dbcore.cpp
|
||||
debug.cpp
|
||||
emu_opcodes.cpp
|
||||
EmuTCPConnection.cpp
|
||||
EmuTCPServer.cpp
|
||||
emu_tcp_connection.cpp
|
||||
emu_tcp_server.cpp
|
||||
eq_dictionary.cpp
|
||||
EQDB.cpp
|
||||
EQDBRes.cpp
|
||||
eqdb.cpp
|
||||
eqdb_res.cpp
|
||||
eqemu_exception.cpp
|
||||
EQEmuConfig.cpp
|
||||
EQEMuError.cpp
|
||||
EQPacket.cpp
|
||||
EQStream.cpp
|
||||
EQStreamFactory.cpp
|
||||
EQStreamIdent.cpp
|
||||
EQStreamProxy.cpp
|
||||
eqemu_config.cpp
|
||||
eqemu_error.cpp
|
||||
eq_packet.cpp
|
||||
eq_stream.cpp
|
||||
eq_stream_factory.cpp
|
||||
eq_stream_ident.cpp
|
||||
eq_stream_proxy.cpp
|
||||
eqtime.cpp
|
||||
extprofile.cpp
|
||||
faction.cpp
|
||||
guild_base.cpp
|
||||
guilds.cpp
|
||||
ipc_mutex.cpp
|
||||
Item.cpp
|
||||
item.cpp
|
||||
logsys.cpp
|
||||
logsys_eqemu.cpp
|
||||
md5.cpp
|
||||
memory_mapped_file.cpp
|
||||
misc.cpp
|
||||
MiscFunctions.cpp
|
||||
misc_functions.cpp
|
||||
moremath.cpp
|
||||
Mutex.cpp
|
||||
MySQLRequestResult.cpp
|
||||
MySQLRequestRow.cpp
|
||||
mutex.cpp
|
||||
mysql_request_result.cpp
|
||||
mysql_request_row.cpp
|
||||
opcode_map.cpp
|
||||
opcodemgr.cpp
|
||||
packet_dump.cpp
|
||||
packet_dump_file.cpp
|
||||
packet_functions.cpp
|
||||
perl_EQDB.cpp
|
||||
perl_EQDBRes.cpp
|
||||
ProcLauncher.cpp
|
||||
perl_eqdb.cpp
|
||||
perl_eqdb_res.cpp
|
||||
proc_launcher.cpp
|
||||
ptimer.cpp
|
||||
races.cpp
|
||||
rdtsc.cpp
|
||||
@@ -57,24 +57,23 @@ SET(common_sources
|
||||
serverinfo.cpp
|
||||
shareddb.cpp
|
||||
spdat.cpp
|
||||
StringUtil.cpp
|
||||
StructStrategy.cpp
|
||||
TCPConnection.cpp
|
||||
TCPServer.cpp
|
||||
string_util.cpp
|
||||
struct_strategy.cpp
|
||||
tcp_connection.cpp
|
||||
tcp_server.cpp
|
||||
timeoutmgr.cpp
|
||||
timer.cpp
|
||||
unix.cpp
|
||||
worldconn.cpp
|
||||
XMLParser.cpp
|
||||
xml_parser.cpp
|
||||
platform.cpp
|
||||
patches/Client62.cpp
|
||||
patches/client62.cpp
|
||||
patches/patches.cpp
|
||||
patches/SoD.cpp
|
||||
patches/SoF.cpp
|
||||
patches/RoF.cpp
|
||||
#patches/RoF2.cpp
|
||||
patches/Titanium.cpp
|
||||
patches/Underfoot.cpp
|
||||
patches/sod.cpp
|
||||
patches/sof.cpp
|
||||
patches/rof.cpp
|
||||
patches/titanium.cpp
|
||||
patches/underfoot.cpp
|
||||
SocketLib/Base64.cpp
|
||||
SocketLib/File.cpp
|
||||
SocketLib/HttpdCookies.cpp
|
||||
@@ -94,14 +93,14 @@ SET(common_sources
|
||||
)
|
||||
|
||||
SET(common_headers
|
||||
BasePacket.h
|
||||
base_packet.h
|
||||
base_data.h
|
||||
bodytypes.h
|
||||
breakdowns.h
|
||||
classes.h
|
||||
Condition.h
|
||||
condition.h
|
||||
crash.h
|
||||
CRC16.h
|
||||
crc16.h
|
||||
crc32.h
|
||||
database.h
|
||||
dbasync.h
|
||||
@@ -110,25 +109,25 @@ SET(common_headers
|
||||
deity.h
|
||||
emu_opcodes.h
|
||||
emu_oplist.h
|
||||
EmuTCPConnection.h
|
||||
EmuTCPServer.h
|
||||
emu_tcp_connection.h
|
||||
emu_tcp_server.h
|
||||
eq_constants.h
|
||||
eq_dictionary.h
|
||||
eq_packet_structs.h
|
||||
EQDB.h
|
||||
EQDBRes.h
|
||||
eqdb.h
|
||||
eqdb_res.h
|
||||
eqemu_exception.h
|
||||
EQEmuConfig.h
|
||||
EQEmuConfig_elements.h
|
||||
EQEMuError.h
|
||||
EQPacket.h
|
||||
EQStream.h
|
||||
EQStreamFactory.h
|
||||
EQStreamIdent.h
|
||||
EQStreamIntf.h
|
||||
EQStreamLocator.h
|
||||
EQStreamProxy.h
|
||||
EQStreamType.h
|
||||
eqemu_config.h
|
||||
eqemu_config_elements.h
|
||||
eqemu_error.h
|
||||
eq_packet.h
|
||||
eq_stream.h
|
||||
eq_stream_factory.h
|
||||
eq_stream_ident.h
|
||||
eq_stream_intf.h
|
||||
eq_stream_locator.h
|
||||
eq_stream_proxy.h
|
||||
eq_stream_type.h
|
||||
eqtime.h
|
||||
errmsg.h
|
||||
extprofile.h
|
||||
@@ -139,7 +138,7 @@ SET(common_headers
|
||||
guild_base.h
|
||||
guilds.h
|
||||
ipc_mutex.h
|
||||
Item.h
|
||||
item.h
|
||||
item_fieldlist.h
|
||||
item_struct.h
|
||||
languages.h
|
||||
@@ -151,18 +150,19 @@ SET(common_headers
|
||||
md5.h
|
||||
memory_mapped_file.h
|
||||
misc.h
|
||||
MiscFunctions.h
|
||||
misc_functions.h
|
||||
moremath.h
|
||||
Mutex.h
|
||||
MySQLRequestResult.h
|
||||
MySQLRequestRow.h
|
||||
mutex.h
|
||||
mysql_request_result.h
|
||||
mysql_request_row.h
|
||||
op_codes.h
|
||||
opcode_dispatch.h
|
||||
opcodemgr.h
|
||||
packet_dump.h
|
||||
packet_dump_file.h
|
||||
packet_functions.h
|
||||
ProcLauncher.h
|
||||
platform.h
|
||||
proc_launcher.h
|
||||
profiler.h
|
||||
ptimer.h
|
||||
queue.h
|
||||
@@ -176,11 +176,11 @@ SET(common_headers
|
||||
shareddb.h
|
||||
skills.h
|
||||
spdat.h
|
||||
StringUtil.h
|
||||
StructStrategy.h
|
||||
TCPBasicServer.h
|
||||
TCPConnection.h
|
||||
TCPServer.h
|
||||
string_util.h
|
||||
struct_strategy.h
|
||||
tcp_basic_server.h
|
||||
tcp_connection.h
|
||||
tcp_server.h
|
||||
timeoutmgr.h
|
||||
timer.h
|
||||
types.h
|
||||
@@ -188,49 +188,43 @@ SET(common_headers
|
||||
useperl.h
|
||||
version.h
|
||||
worldconn.h
|
||||
XMLParser.h
|
||||
ZoneNumbers.h
|
||||
platform.h
|
||||
patches/Client62.h
|
||||
patches/Client62_constants.h
|
||||
patches/Client62_itemfields.h
|
||||
patches/Client62_ops.h
|
||||
patches/Client62_structs.h
|
||||
xml_parser.h
|
||||
zone_numbers.h
|
||||
patches/client62.h
|
||||
patches/client62_constants.h
|
||||
patches/client62_itemfields.h
|
||||
patches/client62_ops.h
|
||||
patches/client62_structs.h
|
||||
patches/patches.h
|
||||
patches/SoD.h
|
||||
patches/SoD_constants.h
|
||||
patches/SoD_itemfields.h
|
||||
patches/SoD_ops.h
|
||||
patches/SoD_structs.h
|
||||
patches/SoF.h
|
||||
patches/SoF_constants.h
|
||||
patches/SoF_itemfields.h
|
||||
patches/SoF_opcode_list.h
|
||||
patches/SoF_ops.h
|
||||
patches/SoF_structs.h
|
||||
patches/SSDeclare.h
|
||||
patches/SSDefine.h
|
||||
patches/SSRegister.h
|
||||
patches/RoF.h
|
||||
patches/RoF_constants.h
|
||||
patches/RoF_itemfields.h
|
||||
patches/RoF_ops.h
|
||||
patches/RoF_structs.h
|
||||
#patches/RoF2.h
|
||||
#patches/RoF2_constants.h
|
||||
#patches/RoF2_itemfields.h
|
||||
#patches/RoF2_ops.h
|
||||
#patches/RoF2_structs.h
|
||||
patches/Titanium.h
|
||||
patches/Titanium_constants.h
|
||||
patches/Titanium_itemfields.h
|
||||
patches/Titanium_ops.h
|
||||
patches/Titanium_structs.h
|
||||
patches/Underfoot.h
|
||||
patches/Underfoot_constants.h
|
||||
patches/Underfoot_itemfields.h
|
||||
patches/Underfoot_ops.h
|
||||
patches/Underfoot_structs.h
|
||||
patches/sod.h
|
||||
patches/sod_constants.h
|
||||
patches/sod_itemfields.h
|
||||
patches/sod_ops.h
|
||||
patches/sod_structs.h
|
||||
patches/sof.h
|
||||
patches/sof_constants.h
|
||||
patches/sof_itemfields.h
|
||||
patches/sof_opcode_list.h
|
||||
patches/sof_ops.h
|
||||
patches/sof_structs.h
|
||||
patches/ss_declare.h
|
||||
patches/ss_define.h
|
||||
patches/ss_register.h
|
||||
patches/rof.h
|
||||
patches/rof_constants.h
|
||||
patches/rof_itemfields.h
|
||||
patches/rof_ops.h
|
||||
patches/rof_structs.h
|
||||
patches/titanium.h
|
||||
patches/titanium_constants.h
|
||||
patches/titanium_itemfields.h
|
||||
patches/titanium_ops.h
|
||||
patches/titanium_structs.h
|
||||
patches/underfoot.h
|
||||
patches/underfoot_constants.h
|
||||
patches/underfoot_itemfields.h
|
||||
patches/underfoot_ops.h
|
||||
patches/underfoot_structs.h
|
||||
SocketLib/Base64.h
|
||||
SocketLib/File.h
|
||||
SocketLib/HttpdCookies.h
|
||||
@@ -249,54 +243,48 @@ SET(common_headers
|
||||
)
|
||||
|
||||
SOURCE_GROUP(Patches FILES
|
||||
patches/Client62.h
|
||||
patches/Client62_itemfields.h
|
||||
patches/Client62_ops.h
|
||||
patches/Client62_constants.h
|
||||
patches/Client62_structs.h
|
||||
patches/client62.h
|
||||
patches/client62_itemfields.h
|
||||
patches/client62_ops.h
|
||||
patches/client62_constants.h
|
||||
patches/client62_structs.h
|
||||
patches/patches.h
|
||||
patches/SoD.h
|
||||
patches/SoD_itemfields.h
|
||||
patches/SoD_ops.h
|
||||
patches/SoD_constants.h
|
||||
patches/SoD_structs.h
|
||||
patches/SoF.h
|
||||
patches/SoF_itemfields.h
|
||||
patches/SoF_opcode_list.h
|
||||
patches/SoF_ops.h
|
||||
patches/SoF_constants.h
|
||||
patches/SoF_structs.h
|
||||
patches/SSDeclare.h
|
||||
patches/SSDefine.h
|
||||
patches/SSRegister.h
|
||||
patches/RoF.h
|
||||
patches/RoF_itemfields.h
|
||||
patches/RoF_ops.h
|
||||
patches/RoF_constants.h
|
||||
patches/RoF_structs.h
|
||||
#patches/RoF2.h
|
||||
#patches/RoF2_itemfields.h
|
||||
#patches/RoF2_ops.h
|
||||
#patches/RoF2_constants.h
|
||||
#patches/RoF2_structs.h
|
||||
patches/Titanium.h
|
||||
patches/Titanium_itemfields.h
|
||||
patches/Titanium_ops.h
|
||||
patches/Titanium_constants.h
|
||||
patches/Titanium_structs.h
|
||||
patches/Underfoot.h
|
||||
patches/Underfoot_itemfields.h
|
||||
patches/Underfoot_ops.h
|
||||
patches/Underfoot_constants.h
|
||||
patches/Underfoot_structs.h
|
||||
patches/Client62.cpp
|
||||
patches/sod.h
|
||||
patches/sod_itemfields.h
|
||||
patches/sod_ops.h
|
||||
patches/sod_constants.h
|
||||
patches/sod_structs.h
|
||||
patches/sof.h
|
||||
patches/sof_itemfields.h
|
||||
patches/sof_opcode_list.h
|
||||
patches/sof_ops.h
|
||||
patches/sof_constants.h
|
||||
patches/sof_structs.h
|
||||
patches/ss_declare.h
|
||||
patches/ss_define.h
|
||||
patches/ss_register.h
|
||||
patches/rof.h
|
||||
patches/rof_itemfields.h
|
||||
patches/rof_ops.h
|
||||
patches/rof_constants.h
|
||||
patches/rof_structs.h
|
||||
patches/titanium.h
|
||||
patches/titanium_itemfields.h
|
||||
patches/titanium_ops.h
|
||||
patches/titanium_constants.h
|
||||
patches/titanium_structs.h
|
||||
patches/underfoot.h
|
||||
patches/underfoot_itemfields.h
|
||||
patches/underfoot_ops.h
|
||||
patches/underfoot_constants.h
|
||||
patches/underfoot_structs.h
|
||||
patches/client62.cpp
|
||||
patches/patches.cpp
|
||||
patches/SoD.cpp
|
||||
patches/SoF.cpp
|
||||
patches/RoF.cpp
|
||||
#patches/RoF2.cpp
|
||||
patches/Titanium.cpp
|
||||
patches/Underfoot.cpp
|
||||
patches/sod.cpp
|
||||
patches/sof.cpp
|
||||
patches/rof.cpp
|
||||
patches/titanium.cpp
|
||||
patches/underfoot.cpp
|
||||
)
|
||||
|
||||
SOURCE_GROUP(SocketLib FILES
|
||||
@@ -345,8 +333,7 @@ ADD_LIBRARY(common ${common_sources} ${common_headers})
|
||||
|
||||
IF(UNIX)
|
||||
ADD_DEFINITIONS(-fPIC)
|
||||
#TODO: Add "patches/RoF2.cpp" when it becomes active
|
||||
SET_SOURCE_FILES_PROPERTIES("patches/SoD.cpp" "patches/SoF.cpp" "patches/RoF.cpp" "patches/Underfoot.cpp" PROPERTIES COMPILE_FLAGS -O0)
|
||||
SET_SOURCE_FILES_PROPERTIES("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/underfoot.cpp" PROPERTIES COMPILE_FLAGS -O0)
|
||||
ENDIF(UNIX)
|
||||
|
||||
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||
@@ -1,405 +0,0 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
/*
|
||||
* EQStream classes, by Quagmire
|
||||
*/
|
||||
|
||||
#include "../common/debug.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#ifdef WIN32
|
||||
#include <process.h>
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
#include "../common/unix.h"
|
||||
#define SOCKET_ERROR -1
|
||||
#endif
|
||||
#include "EQNetwork.h"
|
||||
#include "EQStream.h"
|
||||
#include "../common/packet_dump.h"
|
||||
#include "../common/packet_dump_file.h"
|
||||
#include "../common/packet_functions.h"
|
||||
#include "../common/MiscFunctions.h"
|
||||
#include "../common/crc32.h"
|
||||
#include "../common/eq_packet_structs.h"
|
||||
|
||||
#define EQN_DEBUG 0
|
||||
#define EQN_DEBUG_Error 0
|
||||
#define EQN_DEBUG_Packet 0
|
||||
#define EQN_DEBUG_Fragment 0
|
||||
#define EQN_DEBUG_ACK 0
|
||||
#define EQN_DEBUG_Unknown 0
|
||||
#define EQN_DEBUG_NewStream 0
|
||||
#define LOG_PACKETS 0
|
||||
#define LOG_RAW_PACKETS_OUT 0
|
||||
#define LOG_RAW_PACKETS_IN 0
|
||||
//#define PRIORITYTEST
|
||||
|
||||
template <typename type> // LO_BYTE
|
||||
type LO_BYTE (type a) {return (a&=0xff);}
|
||||
template <typename type> // HI_BYTE
|
||||
type HI_BYTE (type a) {return (a&=0xff00);}
|
||||
template <typename type> // LO_WORD
|
||||
type LO_WORD (type a) {return (a&=0xffff);}
|
||||
template <typename type> // HI_WORD
|
||||
type HI_WORD (type a) {return (a&=0xffff0000);}
|
||||
template <typename type> // HI_LOSWAPshort
|
||||
type HI_LOSWAPshort (type a) {return (LO_BYTE(a)<<8) | (HI_BYTE(a)>>8);}
|
||||
template <typename type> // HI_LOSWAPlong
|
||||
type HI_LOSWAPlong (type x) {return (LO_WORD(a)<<16) | (HIWORD(a)>>16);}
|
||||
|
||||
EQStreamServer::EQStreamServer(uint16 iPort) {
|
||||
RunLoop = false;
|
||||
pPort = iPort;
|
||||
pOpen = false;
|
||||
#ifdef WIN32
|
||||
WORD version = MAKEWORD (1,1);
|
||||
WSADATA wsadata;
|
||||
WSAStartup (version, &wsadata);
|
||||
#endif
|
||||
sock = 0;
|
||||
}
|
||||
|
||||
EQStreamServer::~EQStreamServer() {
|
||||
Close();
|
||||
RunLoop = false;
|
||||
MLoopRunning.lock();
|
||||
MLoopRunning.unlock();
|
||||
#ifdef WIN32
|
||||
WSACleanup();
|
||||
#endif
|
||||
connection_list.clear();
|
||||
while (!NewQueue.empty())
|
||||
NewQueue.pop(); // they're deleted with the list, clear this queue so it doesnt try to delete them again
|
||||
}
|
||||
|
||||
bool EQStreamServer::Open(uint16 iPort) {
|
||||
LockMutex lock(&MOpen);
|
||||
if (iPort && pPort != iPort) {
|
||||
if (pOpen)
|
||||
return false;
|
||||
pPort = iPort;
|
||||
}
|
||||
if (!RunLoop) {
|
||||
RunLoop = true;
|
||||
#ifdef WIN32
|
||||
_beginthread(EQStreamServerLoop, 0, this);
|
||||
#else
|
||||
pthread_t thread;
|
||||
pthread_create(&thread, NULL, &EQStreamServerLoop, this);
|
||||
#endif
|
||||
}
|
||||
if (pOpen) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
struct sockaddr_in address;
|
||||
// int reuse_addr = 1;
|
||||
int bufsize = 64 * 1024; // 64kbyte send/recieve buffers, up from default of 8k
|
||||
#ifdef WIN32
|
||||
unsigned long nonblocking = 1;
|
||||
#endif
|
||||
|
||||
/* Setup internet address information.
|
||||
This is used with the bind() call */
|
||||
memset((char *) &address, 0, sizeof(address));
|
||||
address.sin_family = AF_INET;
|
||||
address.sin_port = htons(pPort);
|
||||
address.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
|
||||
/* Setting up UDP port for new clients */
|
||||
sock = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (sock < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//#ifdef WIN32
|
||||
// setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &reuse_addr, sizeof(reuse_addr));
|
||||
setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char*) &bufsize, sizeof(bufsize));
|
||||
setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char*) &bufsize, sizeof(bufsize));
|
||||
//#else
|
||||
// setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &reuse_addr, sizeof(reuse_addr));
|
||||
// setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &bufsize, sizeof(bufsize));
|
||||
// setsockopt(sock, SOL_SOCKET, SO_SNDBUF, &bufsize, sizeof(bufsize));
|
||||
//#endif
|
||||
|
||||
if (bind(sock, (struct sockaddr *) &address, sizeof(address)) < 0) {
|
||||
#ifdef WIN32
|
||||
closesocket(sock);
|
||||
#else
|
||||
close(sock);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
ioctlsocket (sock, FIONBIO, &nonblocking);
|
||||
#else
|
||||
fcntl(sock, F_SETFL, O_NONBLOCK);
|
||||
#endif
|
||||
pOpen = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void EQStreamServer::Close() {
|
||||
SetOpen(false);
|
||||
if (sock) {
|
||||
#ifdef WIN32
|
||||
closesocket(sock);
|
||||
#else
|
||||
close(sock);
|
||||
#endif
|
||||
}
|
||||
sock = 0;
|
||||
}
|
||||
|
||||
bool EQStreamServer::IsOpen() {
|
||||
MOpen.lock();
|
||||
bool ret = pOpen;
|
||||
MOpen.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void EQStreamServer::SetOpen(bool iOpen) {
|
||||
MOpen.lock();
|
||||
pOpen = iOpen;
|
||||
MOpen.unlock();
|
||||
}
|
||||
|
||||
void EQStreamServer::Process() {
|
||||
_CP(EQStreamServer_Process);
|
||||
if (!IsOpen()) {
|
||||
if (sock) {
|
||||
#ifdef WIN32
|
||||
closesocket(sock);
|
||||
#else
|
||||
close(sock);
|
||||
#endif
|
||||
sock = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
uchar buffer[1518];
|
||||
|
||||
int status;
|
||||
struct sockaddr_in from;
|
||||
unsigned int fromlen;
|
||||
|
||||
from.sin_family = AF_INET;
|
||||
fromlen = sizeof(from);
|
||||
|
||||
while (1) {
|
||||
#ifdef WIN32
|
||||
status = recvfrom(sock, (char *) buffer, sizeof(buffer), 0,(struct sockaddr*) &from, (int *) &fromlen);
|
||||
#else
|
||||
status = recvfrom(sock, buffer, sizeof(buffer), 0,(struct sockaddr*) &from, &fromlen);
|
||||
#endif
|
||||
if (status >= 1) {
|
||||
cout << "Got data from recvfrom" << endl;
|
||||
RecvData(buffer, status, from.sin_addr.s_addr, from.sin_port);
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
std::map <std::string, EQStream*>::iterator connection;
|
||||
for (connection = connection_list.begin(); connection != connection_list.end();) {
|
||||
if (!connection->second) {
|
||||
connection = connection_list.erase(connection);
|
||||
continue;
|
||||
}
|
||||
EQStream* eqs_data = connection->second;
|
||||
if (eqs_data->IsFree() && (!eqs_data->CheckNetActive())) {
|
||||
safe_delete(eqs_data);
|
||||
connection = connection_list.erase(connection);
|
||||
} else if (!eqs_data->RunLoop) {
|
||||
eqs_data->Process(sock);
|
||||
++connection;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EQStreamServer::RecvData(uchar* data, uint32 size, uint32 irIP, uint16 irPort) {
|
||||
/*
|
||||
CHANGE HISTORY
|
||||
|
||||
Version Author Date Comment
|
||||
1 Unknown Unknown Initial Revision
|
||||
2 Joolz 05-Jan-2003 Optimised
|
||||
3 Quagmire 05-Feb-2003 Changed so 2 connection objects wouldnt be created for the same ip/port pair, often happened
|
||||
*/
|
||||
|
||||
// Check for invalid data
|
||||
if (!data || size <= 4) return;
|
||||
//if (CRC32::Generate(data, size-4) != ntohl(*((uint32*) &data[size-4]))) {
|
||||
#if EQN_DEBUG_Error >= 1
|
||||
//cout << "Incomming Packet failed checksum" << endl;
|
||||
#endif
|
||||
//return;
|
||||
//}
|
||||
|
||||
char temp[25];
|
||||
sprintf(temp,"%lu:%u",(unsigned long)irIP,irPort);
|
||||
cout << "Data from " << temp << endl;
|
||||
EQStream* tmp = NULL;
|
||||
std::map <std::string, EQStream*>::iterator connection;
|
||||
if ((connection=connection_list.find(temp))!=connection_list.end())
|
||||
tmp=connection->second;
|
||||
if(tmp != NULL && tmp->GetrPort() == irPort)
|
||||
{
|
||||
tmp->RecvData(data, size);
|
||||
return;
|
||||
}
|
||||
else if(tmp != NULL && tmp->GetrPort() != irPort)
|
||||
{
|
||||
printf("Conflicting IPs & Ports: IP %i and Port %i is conflicting with IP %i and Port %i\n",irIP,irPort,tmp->GetrIP(),tmp->GetrPort());
|
||||
return;
|
||||
}
|
||||
|
||||
if (data[1]==0x01) {
|
||||
cout << "New EQStream Connection." << endl;
|
||||
EQStream* tmp = new EQStream(irIP, irPort);
|
||||
tmp->RecvData(data, size);
|
||||
connection_list[temp]=tmp;
|
||||
if (connection_list.find(temp)==connection_list.end()) {
|
||||
cerr <<"Could not find new connection we just added!" << endl;
|
||||
}
|
||||
MNewQueue.lock();
|
||||
NewQueue.push(tmp);
|
||||
MNewQueue.unlock();
|
||||
return;
|
||||
}
|
||||
#if EQN_DEBUG >= 4
|
||||
struct in_addr in;
|
||||
in.s_addr = irIP;
|
||||
cout << "WARNING: Stray packet? " << inet_ntoa(in) << ":" << irPort << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
EQStream* EQStreamServer::NewQueuePop() {
|
||||
EQStream* ret = 0;
|
||||
MNewQueue.lock();
|
||||
if (!NewQueue.empty()) {
|
||||
ret = NewQueue.front();
|
||||
NewQueue.pop();
|
||||
}
|
||||
MNewQueue.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
void EQStreamServerLoop(void* tmp)
|
||||
#else
|
||||
void* EQStreamServerLoop(void* tmp)
|
||||
#endif
|
||||
{
|
||||
#ifdef WIN32
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
|
||||
#endif
|
||||
EQStreamServer* eqns = (EQStreamServer*) tmp;
|
||||
eqns->MLoopRunning.lock();
|
||||
while (eqns->RunLoop) {
|
||||
{
|
||||
_CP(EQStreamServerLoop);
|
||||
eqns->Process();
|
||||
}
|
||||
Sleep(1);
|
||||
}
|
||||
eqns->MLoopRunning.unlock();
|
||||
#ifdef WIN32
|
||||
_endthread();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
void EQStreamInLoop(void* tmp)
|
||||
#else
|
||||
void* EQStreamInLoop(void* tmp)
|
||||
#endif
|
||||
{
|
||||
EQStream* eqs = (EQStream*) tmp;
|
||||
#ifdef _DEBUG
|
||||
if (eqs->ConnectionType != Outgoing) {
|
||||
ThrowError("EQStreamInLoop: eqs->ConnectionType != Outgoing");
|
||||
}
|
||||
#endif
|
||||
eqs->MLoopRunning.lock();
|
||||
Timer* tmp_timer = new Timer(100);
|
||||
tmp_timer->Start();
|
||||
while (eqs->RunLoop) {
|
||||
{
|
||||
_CP(EQStreamInLoop);
|
||||
if(tmp_timer->Check())
|
||||
eqs->DoRecvData();
|
||||
}
|
||||
Sleep(1);
|
||||
}
|
||||
safe_delete(tmp_timer);
|
||||
eqs->MLoopRunning.unlock();
|
||||
#ifdef WIN32
|
||||
_endthread();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
void EQStreamOutLoop(void* tmp)
|
||||
#else
|
||||
void* EQStreamOutLoop(void* tmp)
|
||||
#endif
|
||||
{
|
||||
EQStream* eqs = (EQStream*) tmp;
|
||||
#ifdef _DEBUG
|
||||
if (eqs->ConnectionType != Outgoing) {
|
||||
ThrowError("EQStreamOutLoop: eqs->ConnectionType != Outgoing");
|
||||
}
|
||||
#endif
|
||||
eqs->MLoopRunning.lock();
|
||||
Timer* tmp_timer = new Timer(100);
|
||||
tmp_timer->Start();
|
||||
while (eqs->RunLoop) {
|
||||
{
|
||||
_CP(EQStreamOutLoop);
|
||||
if(tmp_timer->Check())
|
||||
eqs->Process(eqs->outsock);
|
||||
}
|
||||
Sleep(1);
|
||||
}
|
||||
safe_delete(tmp_timer);
|
||||
eqs->MLoopRunning.unlock();
|
||||
#ifdef WIN32
|
||||
_endthread();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#ifndef EQNETWORK_H
|
||||
#define EQNETWORK_H
|
||||
|
||||
#include "../common/debug.h"
|
||||
|
||||
//uncomment this to enable the packet profiler. Counts the number
|
||||
//of each type of packet sent or received on a connection.
|
||||
#ifdef ZONE
|
||||
//#define PACKET_PROFILER 1
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <map>
|
||||
#include <list>
|
||||
#include <queue>
|
||||
|
||||
#include "../common/types.h"
|
||||
#include "../common/timer.h"
|
||||
#include "../common/linked_list.h"
|
||||
#include "../common/queue.h"
|
||||
#include "../common/Mutex.h"
|
||||
#include "../common/packet_functions.h"
|
||||
#include "EQStream.h"
|
||||
#ifdef PACKET_PROFILER
|
||||
#include "../common/rdtsc.h"
|
||||
#endif
|
||||
|
||||
#define EQNC_TIMEOUT 60000
|
||||
#define NAS_TIMER 100
|
||||
#define KA_TIMER 400 /* keeps the lag bar constant */
|
||||
#define MAX_HEADER_SIZE 39 // Quag: 39 is the max header + opcode + crc32 + unknowns size
|
||||
|
||||
class EQStreamServer;
|
||||
class EQStream;
|
||||
class EQStreamPacket;
|
||||
class EQStreamFragmentGroupList;
|
||||
class EQStreamFragmentGroup;
|
||||
typedef EQStreamServer EQNServer;
|
||||
typedef EQStream EQNConnection;
|
||||
typedef EQStreamPacket EQNPacket;
|
||||
typedef EQStreamFragmentGroupList EQNFragmentGroupList;
|
||||
typedef EQStreamFragmentGroup EQNFragmentGroup;
|
||||
|
||||
#define FLAG_COMPRESSED 0x1000
|
||||
#define FLAG_COMBINED 0x2000
|
||||
#define FLAG_ENCRYPTED 0x4000
|
||||
#define FLAG_IMPLICIT 0x8000
|
||||
#define FLAG_ALL 0xF000
|
||||
#define StripFlags(x) (x & ~FLAG_ALL)
|
||||
|
||||
// Optimistic compression, used for guessing pre-alloc size on debug output
|
||||
#define BEST_COMPR_RATIO 300
|
||||
|
||||
enum eappCompressed { appNormal, appInflated, appDeflated };
|
||||
|
||||
#ifdef WIN32
|
||||
void EQStreamServerLoop(void* tmp);
|
||||
void EQStreamInLoop(void* tmp);
|
||||
void EQStreamOutLoop(void* tmp);
|
||||
#else
|
||||
void* EQStreamServerLoop(void* tmp);
|
||||
void* EQStreamInLoop(void* tmp);
|
||||
void* EQStreamOutLoop(void* tmp);
|
||||
#endif
|
||||
class EQStreamServer {
|
||||
public:
|
||||
EQStreamServer(uint16 iPort = 0);
|
||||
virtual ~EQStreamServer();
|
||||
|
||||
bool Open(uint16 iPort = 0); // opens the port
|
||||
void Close(); // closes the port
|
||||
void KillAll(); // kills all clients
|
||||
inline uint16 GetPort() { return pPort; }
|
||||
|
||||
EQStream* NewQueuePop();
|
||||
protected:
|
||||
#ifdef WIN32
|
||||
friend void EQStreamServerLoop(void* tmp);
|
||||
#else
|
||||
friend void* EQStreamServerLoop(void* tmp);
|
||||
#endif
|
||||
void Process();
|
||||
bool IsOpen();
|
||||
void SetOpen(bool iOpen);
|
||||
bool RunLoop;
|
||||
Mutex MLoopRunning;
|
||||
private:
|
||||
void RecvData(uchar* data, uint32 size, uint32 irIP, uint16 irPort);
|
||||
#ifdef WIN32
|
||||
SOCKET sock;
|
||||
#else
|
||||
int sock;
|
||||
#endif
|
||||
uint16 pPort;
|
||||
bool pOpen;
|
||||
Mutex MNewQueue;
|
||||
Mutex MOpen;
|
||||
|
||||
std::map<std::string,EQStream*> connection_list;
|
||||
std::queue<EQStream *> NewQueue;
|
||||
};
|
||||
|
||||
#endif
|
||||
-1900
File diff suppressed because it is too large.
Load diff
@@ -46,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#include <stdarg.h>
|
||||
#include "Parse.h"
|
||||
#include "HTTPSocket.h"
|
||||
#include "../TCPConnection.h"
|
||||
#include "../tcp_connection.h"
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "../TCPConnection.h"
|
||||
#include "../tcp_connection.h"
|
||||
|
||||
|
||||
#ifdef SOCKETS_NAMESPACE
|
||||
|
||||
@@ -211,7 +211,7 @@ typedef unsigned short port_t;
|
||||
#endif
|
||||
|
||||
#ifdef _THREADSAFE_SOCKETS
|
||||
#include "Mutex.h"
|
||||
#include "mutex.h"
|
||||
#include "Lock.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "debug.h"
|
||||
#include "BasePacket.h"
|
||||
#include "base_packet.h"
|
||||
#include "misc.h"
|
||||
#include "packet_dump.h"
|
||||
|
||||
File renamed without changes.
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "debug.h"
|
||||
#include "Condition.h"
|
||||
#include "condition.h"
|
||||
|
||||
#ifdef _WINDOWS
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+5
-4
@@ -43,7 +43,7 @@
|
||||
#include "database.h"
|
||||
#include "eq_packet_structs.h"
|
||||
#include "guilds.h"
|
||||
#include "StringUtil.h"
|
||||
#include "string_util.h"
|
||||
#include "extprofile.h"
|
||||
extern Client client;
|
||||
|
||||
@@ -608,10 +608,11 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
|
||||
for (int16 i=EmuConstants::EQUIPMENT_BEGIN; i<=EmuConstants::BANK_BAGS_END;)
|
||||
{
|
||||
const ItemInst* newinv = inv->GetItem(i);
|
||||
if (!newinv)
|
||||
if (newinv)
|
||||
{
|
||||
invquery = StringFormat("INSERT INTO inventory SET charid=%0u, slotid=%0d, itemid=%0u, charges=%0d, color=%0u",
|
||||
charid, i, newinv->GetItem()->ID,newinv->GetCharges(), newinv->GetColor());
|
||||
invquery = StringFormat("INSERT INTO `inventory` (charid, slotid, itemid, charges, color) VALUES (%u, %i, %u, %i, %u)",
|
||||
charid, i, newinv->GetItem()->ID, newinv->GetCharges(), newinv->GetColor());
|
||||
|
||||
auto results = QueryDatabase(invquery);
|
||||
|
||||
if (!results.RowsAffected())
|
||||
|
||||
+4
-4
@@ -26,11 +26,11 @@
|
||||
#include "dbcore.h"
|
||||
#include "linked_list.h"
|
||||
#include "eq_packet_structs.h"
|
||||
/*#include "EQStream.h"
|
||||
/*#include "eq_stream.h"
|
||||
#include "guilds.h"
|
||||
#include "MiscFunctions.h"
|
||||
#include "Mutex.h"
|
||||
#include "Item.h"
|
||||
#include "misc_functions.h"
|
||||
#include "mutex.h"
|
||||
#include "item.h"
|
||||
#include "extprofile.h"*/
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@
|
||||
#include <limits.h>
|
||||
#include "dbcore.h"
|
||||
#include <string.h>
|
||||
//#include "../common/MiscFunctions.h"
|
||||
#include "StringUtil.h"
|
||||
//#include "../common/misc_functions.h"
|
||||
#include "string_util.h"
|
||||
#define ASYNC_LOOP_GRANULARITY 4 //# of ms between checking our work
|
||||
|
||||
bool DBAsyncCB_LoadVariables(DBAsyncWork* iWork) {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
#include <limits.h>
|
||||
#include "dbcore.h"
|
||||
#include <string.h>
|
||||
#include "../common/MiscFunctions.h"
|
||||
#include "../common/misc_functions.h"
|
||||
#include <cstdlib>
|
||||
|
||||
#ifdef _WINDOWS
|
||||
|
||||
+3
-3
@@ -9,12 +9,12 @@
|
||||
#include <mysql.h>
|
||||
#include <string.h>
|
||||
#include "../common/types.h"
|
||||
#include "../common/Mutex.h"
|
||||
#include "../common/mutex.h"
|
||||
#include "../common/linked_list.h"
|
||||
#include "../common/queue.h"
|
||||
#include "../common/timer.h"
|
||||
#include "../common/Condition.h"
|
||||
#include "../common/MySQLRequestResult.h"
|
||||
#include "../common/condition.h"
|
||||
#include "../common/mysql_request_result.h"
|
||||
|
||||
class DBcore {
|
||||
public:
|
||||
|
||||
+2
-2
@@ -19,8 +19,8 @@
|
||||
#endif
|
||||
|
||||
#include "debug.h"
|
||||
#include "StringUtil.h"
|
||||
#include "MiscFunctions.h"
|
||||
#include "string_util.h"
|
||||
#include "misc_functions.h"
|
||||
#include "platform.h"
|
||||
|
||||
#ifndef va_copy
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@
|
||||
|
||||
#include "logsys.h"
|
||||
|
||||
#include "../common/Mutex.h"
|
||||
#include "../common/mutex.h"
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ tremendously.
|
||||
#include <stdio.h>
|
||||
#include <iomanip>
|
||||
|
||||
#include "EmuTCPConnection.h"
|
||||
#include "EmuTCPServer.h"
|
||||
#include "emu_tcp_connection.h"
|
||||
#include "emu_tcp_server.h"
|
||||
#include "../common/servertalk.h"
|
||||
#include "../common/packet_dump.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef EmuTCPCONNECTION_H_
|
||||
#define EmuTCPCONNECTION_H_
|
||||
|
||||
#include "TCPConnection.h"
|
||||
#include "tcp_connection.h"
|
||||
#include "timer.h"
|
||||
|
||||
//moved out of TCPConnection:: to be more exportable
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "debug.h"
|
||||
#include "EmuTCPServer.h"
|
||||
#include "EmuTCPConnection.h"
|
||||
#include "emu_tcp_server.h"
|
||||
#include "emu_tcp_connection.h"
|
||||
|
||||
EmuTCPServer::EmuTCPServer(uint16 iPort, bool iOldFormat)
|
||||
: TCPServer<EmuTCPConnection>(iPort),
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef EmuTCPSERVER_H_
|
||||
#define EmuTCPSERVER_H_
|
||||
|
||||
#include "TCPServer.h"
|
||||
#include "tcp_server.h"
|
||||
|
||||
class EmuTCPConnection;
|
||||
struct EmuTCPNetPacket_Struct;
|
||||
@@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "eq_dictionary.h"
|
||||
#include "StringUtil.h"
|
||||
#include "string_util.h"
|
||||
|
||||
//
|
||||
// class EmuConstants
|
||||
|
||||
@@ -26,13 +26,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include "eq_constants.h"
|
||||
#include "clientversions.h"
|
||||
#include <string>
|
||||
#include "../common/patches/Client62_constants.h"
|
||||
#include "../common/patches/Titanium_constants.h"
|
||||
#include "../common/patches/SoF_constants.h"
|
||||
#include "../common/patches/SoD_constants.h"
|
||||
#include "../common/patches/Underfoot_constants.h"
|
||||
#include "../common/patches/RoF_constants.h"
|
||||
//#include "../common/patches/RoF2_constants.h"
|
||||
#include "../common/patches/client62_constants.h"
|
||||
#include "../common/patches/titanium_constants.h"
|
||||
#include "../common/patches/sof_constants.h"
|
||||
#include "../common/patches/sod_constants.h"
|
||||
#include "../common/patches/underfoot_constants.h"
|
||||
#include "../common/patches/rof_constants.h"
|
||||
//#include "../common/patches/rof2_constants.h"
|
||||
|
||||
// *** DO NOT CHANGE without a full understanding of the consequences..the server is set up to use these settings explicitly!! ***
|
||||
// *** You will cause compilation failures and corrupt your database if partial or incorrect attempts to change them are made!! ***
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include "EQPacket.h"
|
||||
#include "eq_packet.h"
|
||||
#include "misc.h"
|
||||
#include "op_codes.h"
|
||||
#include "CRC16.h"
|
||||
#include "crc16.h"
|
||||
#include "platform.h"
|
||||
#ifndef STATIC_OPCODE
|
||||
#include "opcodemgr.h"
|
||||
@@ -476,7 +476,7 @@ EQRawApplicationPacket::EQRawApplicationPacket(const unsigned char *buf, const u
|
||||
const unsigned char *packet_start = (buf + 3);
|
||||
const int32 packet_length = len - 3;
|
||||
safe_delete_array(pBuffer);
|
||||
if(len >= 0)
|
||||
if(packet_length >= 0)
|
||||
{
|
||||
size = packet_length;
|
||||
pBuffer = new unsigned char[size];
|
||||
@@ -18,8 +18,8 @@
|
||||
#ifndef _EQPACKET_H
|
||||
#define _EQPACKET_H
|
||||
|
||||
#include "BasePacket.h"
|
||||
#include "EQStreamType.h"
|
||||
#include "base_packet.h"
|
||||
#include "eq_stream_type.h"
|
||||
#include "op_codes.h"
|
||||
#include "platform.h"
|
||||
|
||||
@@ -3468,6 +3468,7 @@ struct MerchantList {
|
||||
int8 level_required;
|
||||
uint16 alt_currency_cost;
|
||||
uint32 classes_required;
|
||||
uint8 probability;
|
||||
};
|
||||
|
||||
struct TempMerchantList {
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
*/
|
||||
|
||||
#include "debug.h"
|
||||
#include "EQPacket.h"
|
||||
#include "EQStream.h"
|
||||
#include "eq_packet.h"
|
||||
#include "eq_stream.h"
|
||||
#include "misc.h"
|
||||
#include "Mutex.h"
|
||||
#include "mutex.h"
|
||||
#include "op_codes.h"
|
||||
#include "CRC16.h"
|
||||
#include "crc16.h"
|
||||
#include "platform.h"
|
||||
|
||||
#include <string>
|
||||
@@ -9,13 +9,13 @@
|
||||
#ifndef WIN32
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#include "EQStreamType.h"
|
||||
#include "EQPacket.h"
|
||||
#include "EQStreamIntf.h"
|
||||
#include "Mutex.h"
|
||||
#include "eq_stream_type.h"
|
||||
#include "eq_packet.h"
|
||||
#include "eq_stream_intf.h"
|
||||
#include "mutex.h"
|
||||
#include "../common/opcodemgr.h"
|
||||
#include "../common/misc.h"
|
||||
#include "../common/Condition.h"
|
||||
#include "../common/condition.h"
|
||||
#include "../common/timer.h"
|
||||
|
||||
#define FLAG_COMPRESSED 0x01
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "debug.h"
|
||||
#include "EQStreamFactory.h"
|
||||
#include "eq_stream_factory.h"
|
||||
#ifdef _WINDOWS
|
||||
#include <winsock.h>
|
||||
#include <process.h>
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <iostream>
|
||||
#include "op_codes.h"
|
||||
#include "EQStream.h"
|
||||
#include "eq_stream.h"
|
||||
#include "logsys.h"
|
||||
|
||||
ThreadReturnType EQStreamFactoryReaderLoop(void *eqfs)
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#include <queue>
|
||||
#include <map>
|
||||
#include "../common/EQStream.h"
|
||||
#include "../common/Condition.h"
|
||||
#include "../common/eq_stream.h"
|
||||
#include "../common/condition.h"
|
||||
#include "../common/timeoutmgr.h"
|
||||
#include "../common/opcodemgr.h"
|
||||
#include "../common/timer.h"
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "debug.h"
|
||||
#include "EQStreamIdent.h"
|
||||
#include "EQStreamProxy.h"
|
||||
#include "eq_stream_ident.h"
|
||||
#include "eq_stream_proxy.h"
|
||||
#include "logsys.h"
|
||||
|
||||
EQStreamIdentifier::~EQStreamIdentifier() {
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef EQSTREAMIDENT_H_
|
||||
#define EQSTREAMIDENT_H_
|
||||
|
||||
#include "EQStream.h"
|
||||
#include "eq_stream.h"
|
||||
#include "timer.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
File renamed without changes.
File renamed without changes.
@@ -1,8 +1,8 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "EQStreamProxy.h"
|
||||
#include "EQStream.h"
|
||||
#include "StructStrategy.h"
|
||||
#include "eq_stream_proxy.h"
|
||||
#include "eq_stream.h"
|
||||
#include "struct_strategy.h"
|
||||
|
||||
|
||||
EQStreamProxy::EQStreamProxy(EQStream *&stream, const StructStrategy *structs, OpcodeManager **opcodes)
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
#include "types.h"
|
||||
#include "EQStreamIntf.h"
|
||||
#include "eq_stream_intf.h"
|
||||
|
||||
class EQStream;
|
||||
class StructStrategy;
|
||||
File renamed without changes.
@@ -16,7 +16,7 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "debug.h"
|
||||
#include "EQDB.h"
|
||||
#include "eqdb.h"
|
||||
#include "database.h"
|
||||
#include <mysql.h>
|
||||
#include <cstring>
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include "types.h"
|
||||
#include "EQDBRes.h"
|
||||
#include "eqdb_res.h"
|
||||
#include <mysql.h>
|
||||
|
||||
//this is the main object exported to perl.
|
||||
@@ -16,7 +16,7 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "debug.h"
|
||||
#include "EQDBRes.h"
|
||||
#include "eqdb_res.h"
|
||||
#include <mysql.h>
|
||||
|
||||
std::vector<std::string> EQDBRes::fetch_row_array() {
|
||||
File renamed without changes.
@@ -16,8 +16,8 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "../common/debug.h"
|
||||
#include "EQEmuConfig.h"
|
||||
#include "MiscFunctions.h"
|
||||
#include "eqemu_config.h"
|
||||
#include "misc_functions.h"
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifndef __EQEmuConfig_H
|
||||
#define __EQEmuConfig_H
|
||||
|
||||
#include "XMLParser.h"
|
||||
#include "xml_parser.h"
|
||||
#include "linked_list.h"
|
||||
|
||||
struct LoginConfig {
|
||||
@@ -112,14 +112,14 @@ protected:
|
||||
|
||||
#define ELEMENT(name) \
|
||||
void do_##name(TiXmlElement *ele);
|
||||
#include "EQEmuConfig_elements.h"
|
||||
#include "eqemu_config_elements.h"
|
||||
|
||||
|
||||
EQEmuConfig() {
|
||||
// import the needed handler prototypes
|
||||
#define ELEMENT(name) \
|
||||
Handlers[#name]=(ElementHandler)&EQEmuConfig::do_##name;
|
||||
#include "EQEmuConfig_elements.h"
|
||||
#include "eqemu_config_elements.h"
|
||||
|
||||
// Set sane defaults
|
||||
|
||||
File renamed without changes.
@@ -18,10 +18,10 @@
|
||||
#ifdef _WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include "EQEMuError.h"
|
||||
#include "eqemu_error.h"
|
||||
#include "linked_list.h"
|
||||
#include "Mutex.h"
|
||||
#include "MiscFunctions.h"
|
||||
#include "mutex.h"
|
||||
#include "misc_functions.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef _WINDOWS
|
||||
File renamed without changes.
+1
-1
@@ -19,7 +19,7 @@
|
||||
#define EXTENDED_PROFILE_H
|
||||
|
||||
#include "eq_packet_structs.h"
|
||||
#include "Item.h"
|
||||
#include "item.h"
|
||||
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
+272
-586
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -108,7 +108,7 @@ protected:
|
||||
bool DBSetAltFlag(uint32 charid, bool is_alt);
|
||||
bool DBSetTributeFlag(uint32 charid, bool enabled);
|
||||
bool DBSetPublicNote(uint32 charid, const char *note);
|
||||
bool _RunQuery(char *&query, int len, const char *errmsg);
|
||||
bool QueryWithLogging(std::string query, const char *errmsg);
|
||||
// void DBSetPublicNote(uint32 guild_id,char* charname, char* note);
|
||||
|
||||
bool LocalDeleteGuild(uint32 guild_id);
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "../common/debug.h"
|
||||
#include "MiscFunctions.h"
|
||||
#include "misc_functions.h"
|
||||
#include "guilds.h"
|
||||
#include "database.h"
|
||||
#include "eq_packet_structs.h"
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
#include "debug.h"
|
||||
#include "StringUtil.h"
|
||||
#include "Item.h"
|
||||
#include "string_util.h"
|
||||
#include "item.h"
|
||||
#include "database.h"
|
||||
#include "misc.h"
|
||||
#include "races.h"
|
||||
@@ -654,6 +654,99 @@ int16 Inventory::FindFreeSlot(bool for_bag, bool try_cursor, uint8 min_size, boo
|
||||
return INVALID_INDEX;
|
||||
}
|
||||
|
||||
// This is a mix of HasSpaceForItem and FindFreeSlot..due to existing coding behavior, it was better to add a new helper function...
|
||||
int16 Inventory::FindFreeSlotForTradeItem(const ItemInst* inst) {
|
||||
// Do not arbitrarily use this function..it is designed for use with Client::ResetTrade() and Client::FinishTrade().
|
||||
// If you have a need, use it..but, understand it is not a compatible replacement for Inventory::FindFreeSlot().
|
||||
//
|
||||
// I'll probably implement a bitmask in the new inventory system to avoid having to adjust stack bias -U
|
||||
|
||||
if (!inst || !inst->GetID())
|
||||
return INVALID_INDEX;
|
||||
|
||||
// step 1: find room for bags (caller should really ask for slots for bags first to avoid sending them to cursor..and bag item loss)
|
||||
if (inst->IsType(ItemClassContainer)) {
|
||||
for (int16 free_slot = EmuConstants::GENERAL_BEGIN; free_slot <= EmuConstants::GENERAL_END; ++free_slot)
|
||||
if (!m_inv[free_slot])
|
||||
return free_slot;
|
||||
|
||||
return MainCursor; // return cursor since bags do not stack and will not fit inside other bags..yet...)
|
||||
}
|
||||
|
||||
// step 2: find partial room for stackables
|
||||
if (inst->IsStackable()) {
|
||||
for (int16 free_slot = EmuConstants::GENERAL_BEGIN; free_slot <= EmuConstants::GENERAL_END; ++free_slot) {
|
||||
const ItemInst* main_inst = m_inv[free_slot];
|
||||
|
||||
if (!main_inst)
|
||||
continue;
|
||||
|
||||
if ((main_inst->GetID() == inst->GetID()) && (main_inst->GetCharges() < main_inst->GetItem()->StackSize))
|
||||
return free_slot;
|
||||
|
||||
if (main_inst->IsType(ItemClassContainer)) { // if item-specific containers already have bad items, we won't fix it here...
|
||||
for (uint8 free_bag_slot = SUB_BEGIN; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < EmuConstants::ITEM_CONTAINER_SIZE); ++free_bag_slot) {
|
||||
const ItemInst* sub_inst = main_inst->GetItem(free_bag_slot);
|
||||
|
||||
if (!sub_inst)
|
||||
continue;
|
||||
|
||||
if ((sub_inst->GetID() == inst->GetID()) && (sub_inst->GetCharges() < sub_inst->GetItem()->StackSize))
|
||||
return Inventory::CalcSlotId(free_slot, free_bag_slot);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// step 3a: find room for container-specific items (ItemClassArrow)
|
||||
if (inst->GetItem()->ItemType == ItemTypeArrow) {
|
||||
for (int16 free_slot = EmuConstants::GENERAL_BEGIN; free_slot <= EmuConstants::GENERAL_END; ++free_slot) {
|
||||
const ItemInst* main_inst = m_inv[free_slot];
|
||||
|
||||
if (!main_inst || (main_inst->GetItem()->BagType != BagTypeQuiver) || !main_inst->IsType(ItemClassContainer))
|
||||
continue;
|
||||
|
||||
for (uint8 free_bag_slot = SUB_BEGIN; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < EmuConstants::ITEM_CONTAINER_SIZE); ++free_bag_slot)
|
||||
if (!main_inst->GetItem(free_bag_slot))
|
||||
return Inventory::CalcSlotId(free_slot, free_bag_slot);
|
||||
}
|
||||
}
|
||||
|
||||
// step 3b: find room for container-specific items (ItemClassSmallThrowing)
|
||||
if (inst->GetItem()->ItemType == ItemTypeSmallThrowing) {
|
||||
for (int16 free_slot = EmuConstants::GENERAL_BEGIN; free_slot <= EmuConstants::GENERAL_END; ++free_slot) {
|
||||
const ItemInst* main_inst = m_inv[free_slot];
|
||||
|
||||
if (!main_inst || (main_inst->GetItem()->BagType != BagTypeBandolier) || !main_inst->IsType(ItemClassContainer))
|
||||
continue;
|
||||
|
||||
for (uint8 free_bag_slot = SUB_BEGIN; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < EmuConstants::ITEM_CONTAINER_SIZE); ++free_bag_slot)
|
||||
if (!main_inst->GetItem(free_bag_slot))
|
||||
return Inventory::CalcSlotId(free_slot, free_bag_slot);
|
||||
}
|
||||
}
|
||||
|
||||
// step 4: just find an empty slot
|
||||
for (int16 free_slot = EmuConstants::GENERAL_BEGIN; free_slot <= EmuConstants::GENERAL_END; ++free_slot) {
|
||||
const ItemInst* main_inst = m_inv[free_slot];
|
||||
|
||||
if (!main_inst)
|
||||
return free_slot;
|
||||
|
||||
if (main_inst->IsType(ItemClassContainer)) {
|
||||
if ((main_inst->GetItem()->BagSize < inst->GetItem()->Size) || (main_inst->GetItem()->BagType == BagTypeBandolier) || (main_inst->GetItem()->BagType == BagTypeQuiver))
|
||||
continue;
|
||||
|
||||
for (uint8 free_bag_slot = SUB_BEGIN; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < EmuConstants::ITEM_CONTAINER_SIZE); ++free_bag_slot)
|
||||
if (!main_inst->GetItem(free_bag_slot))
|
||||
return Inventory::CalcSlotId(free_slot, free_bag_slot);
|
||||
}
|
||||
}
|
||||
|
||||
//return INVALID_INDEX; // everything else pushes to the cursor
|
||||
return MainCursor;
|
||||
}
|
||||
|
||||
// Opposite of below: Get parent bag slot_id from a slot inside of bag
|
||||
int16 Inventory::CalcSlotId(int16 slot_id) {
|
||||
int16 parent_slot_id = INVALID_INDEX;
|
||||
@@ -172,6 +172,7 @@ public:
|
||||
|
||||
// Locate an available inventory slot
|
||||
int16 FindFreeSlot(bool for_bag, bool try_cursor, uint8 min_size = 0, bool is_arrow = false);
|
||||
int16 FindFreeSlotForTradeItem(const ItemInst* inst);
|
||||
|
||||
// Calculate slot_id for an item within a bag
|
||||
static int16 CalcSlotId(int16 slot_id); // Calc parent bag's slot_id
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "misc.h"
|
||||
#include "EQPacket.h"
|
||||
#include "eq_packet.h"
|
||||
|
||||
|
||||
#define LOG_CATEGORY(category) #category ,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "logsys.h"
|
||||
#include "StringUtil.h"
|
||||
#include "string_util.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
+9
-8
@@ -60,17 +60,17 @@ LOG_TYPE( UCS, PACKETS, DISABLED)
|
||||
|
||||
LOG_CATEGORY( QUERYSERV )
|
||||
LOG_TYPE( QUERYSERV, INIT, ENABLED )
|
||||
LOG_TYPE( QUERYSERV, ERROR, ENABLED )
|
||||
LOG_TYPE( QUERYSERV, ERROR, ENABLED )
|
||||
LOG_TYPE( QUERYSERV, CLIENT, DISABLED )
|
||||
LOG_TYPE( QUERYSERV, TRACE, DISABLED )
|
||||
LOG_TYPE( QUERYSERV, PACKETS, DISABLED)
|
||||
|
||||
LOG_CATEGORY(SOCKET_SERVER)
|
||||
LOG_TYPE(SOCKET_SERVER, INIT, ENABLED)
|
||||
LOG_TYPE(SOCKET_SERVER, ERROR, ENABLED)
|
||||
LOG_TYPE(SOCKET_SERVER, CLIENT, DISABLED)
|
||||
LOG_TYPE(SOCKET_SERVER, TRACE, DISABLED)
|
||||
LOG_TYPE(SOCKET_SERVER, PACKETS, DISABLED)
|
||||
LOG_CATEGORY( SOCKET_SERVER)
|
||||
LOG_TYPE( SOCKET_SERVER, INIT, ENABLED)
|
||||
LOG_TYPE( SOCKET_SERVER, ERROR, ENABLED)
|
||||
LOG_TYPE( SOCKET_SERVER, CLIENT, DISABLED)
|
||||
LOG_TYPE( SOCKET_SERVER, TRACE, DISABLED)
|
||||
LOG_TYPE( SOCKET_SERVER, PACKETS, DISABLED)
|
||||
|
||||
LOG_CATEGORY( SPAWNS )
|
||||
LOG_TYPE( SPAWNS, MAIN, DISABLED )
|
||||
@@ -108,6 +108,7 @@ LOG_CATEGORY( FACTION )
|
||||
|
||||
LOG_CATEGORY( ZONE )
|
||||
LOG_TYPE( ZONE, GROUND_SPAWNS, DISABLED )
|
||||
LOG_TYPE( ZONE, SPAWNS, ENABLED)
|
||||
LOG_TYPE( ZONE, INIT, ENABLED )
|
||||
LOG_TYPE( ZONE, INIT_ERR, ENABLED )
|
||||
LOG_TYPE( ZONE, WORLD, ENABLED )
|
||||
@@ -116,7 +117,7 @@ LOG_TYPE( ZONE, WORLD_TRACE, DISABLED )
|
||||
|
||||
LOG_CATEGORY( TASKS )
|
||||
LOG_TYPE( TASKS, GLOBALLOAD, DISABLED )
|
||||
LOG_TYPE( TASKS, CLIENTLOAD, DISABLED )
|
||||
LOG_TYPE( TASKS, CLIENTLOAD, DISABLED )
|
||||
LOG_TYPE( TASKS, UPDATE, DISABLED )
|
||||
LOG_TYPE( TASKS, CLIENTSAVE, DISABLED )
|
||||
LOG_TYPE( TASKS, PACKETS, DISABLED )
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
#include <string.h> /* for memcpy() */
|
||||
#include "../common/md5.h"
|
||||
#include "../common/StringUtil.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "../common/seperator.h"
|
||||
|
||||
MD5::MD5() {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "../common/debug.h"
|
||||
#include "MiscFunctions.h"
|
||||
#include "misc_functions.h"
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
File renamed without changes.
@@ -16,7 +16,7 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "../common/debug.h"
|
||||
#include "../common/Mutex.h"
|
||||
#include "../common/mutex.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
File renamed without changes.
@@ -1,4 +1,4 @@
|
||||
#include "MySQLRequestResult.h"
|
||||
#include "mysql_request_result.h"
|
||||
|
||||
|
||||
MySQLRequestResult::MySQLRequestResult()
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include <mysql.h>
|
||||
#include "types.h"
|
||||
#include "MySQLRequestRow.h"
|
||||
#include "mysql_request_row.h"
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "MySQLRequestRow.h"
|
||||
#include "mysql_request_row.h"
|
||||
|
||||
MySQLRequestRow::MySQLRequestRow(const MySQLRequestRow& row)
|
||||
: m_Result(row.m_Result), m_MySQLRow(row.m_MySQLRow)
|
||||
File renamed without changes.
+1
-1
@@ -20,7 +20,7 @@
|
||||
#define OPCODE_MANAGER_H
|
||||
|
||||
#include "types.h"
|
||||
#include "Mutex.h"
|
||||
#include "mutex.h"
|
||||
#include "emu_opcodes.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "packet_dump.h"
|
||||
#include "EQPacket.h"
|
||||
#include "eq_packet.h"
|
||||
#include "../common/servertalk.h"
|
||||
|
||||
void DumpPacketAscii(const uchar* buf, uint32 size, uint32 cols, uint32 skip) {
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#include "EQStream.h"
|
||||
#include "eq_stream.h"
|
||||
#include "packet_dump_file.h"
|
||||
|
||||
void FileDumpPacketAscii(const char* filename, const uchar* buf, uint32 size, uint32 cols, uint32 skip) {
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
|
||||
#include "../debug.h"
|
||||
#include "Client62.h"
|
||||
#include "client62.h"
|
||||
#include "../opcodemgr.h"
|
||||
#include "../logsys.h"
|
||||
#include "../EQStreamIdent.h"
|
||||
#include "../eq_stream_ident.h"
|
||||
#include "../crc32.h"
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../MiscFunctions.h"
|
||||
#include "../StringUtil.h"
|
||||
#include "../Item.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "../clientversions.h"
|
||||
#include "Client62_structs.h"
|
||||
#include "client62_structs.h"
|
||||
|
||||
namespace Client62 {
|
||||
|
||||
@@ -84,8 +84,8 @@ Strategy::Strategy()
|
||||
: StructStrategy()
|
||||
{
|
||||
//all opcodes default to passthrough.
|
||||
#include "SSRegister.h"
|
||||
#include "Client62_ops.h"
|
||||
#include "ss_register.h"
|
||||
#include "client62_ops.h"
|
||||
}
|
||||
|
||||
std::string Strategy::Describe() const {
|
||||
@@ -100,7 +100,7 @@ const EQClientVersion Strategy::ClientVersion() const
|
||||
return EQClient62;
|
||||
}
|
||||
|
||||
#include "SSDefine.h"
|
||||
#include "ss_define.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -1042,7 +1042,7 @@ char *SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 d
|
||||
#define C(field) "|%s"
|
||||
#define S(field) "|%s"
|
||||
#define F(field) "|%f"
|
||||
#include "Client62_itemfields.h"
|
||||
#include "client62_itemfields.h"
|
||||
"%.*s\"" // Quotes (and protection, if needed) around static data
|
||||
"|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s" // Sub items
|
||||
"%.*s%s" // For trailing quotes (and protection) if a subitem;
|
||||
@@ -1054,7 +1054,7 @@ char *SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 d
|
||||
#define C(field) ,field
|
||||
#define S(field) ,item->field
|
||||
#define F(field) ,item->field
|
||||
#include "Client62_itemfields.h"
|
||||
#include "client62_itemfields.h"
|
||||
,depth,protection
|
||||
,sub_items[0] ? sub_items[0] : ""
|
||||
,sub_items[1] ? sub_items[1] : ""
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef CLIENT62_H_
|
||||
#define CLIENT62_H_
|
||||
|
||||
#include "../StructStrategy.h"
|
||||
#include "../Item.h"
|
||||
#include "../struct_strategy.h"
|
||||
#include "../item.h"
|
||||
|
||||
class EQStreamIdentifier;
|
||||
|
||||
@@ -27,8 +27,8 @@ namespace Client62 {
|
||||
virtual const EQClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "SSDeclare.h"
|
||||
#include "Client62_ops.h"
|
||||
#include "ss_declare.h"
|
||||
#include "client62_ops.h"
|
||||
|
||||
};
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -2,13 +2,13 @@
|
||||
#include "../debug.h"
|
||||
#include "patches.h"
|
||||
|
||||
#include "Client62.h"
|
||||
#include "Titanium.h"
|
||||
#include "Underfoot.h"
|
||||
#include "SoF.h"
|
||||
#include "SoD.h"
|
||||
#include "RoF.h"
|
||||
//#include "RoF2.h"
|
||||
#include "client62.h"
|
||||
#include "titanium.h"
|
||||
#include "underfoot.h"
|
||||
#include "sof.h"
|
||||
#include "sod.h"
|
||||
#include "rof.h"
|
||||
//#include "rof2.h"
|
||||
|
||||
void RegisterAllPatches(EQStreamIdentifier &into) {
|
||||
Client62::Register(into);
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
|
||||
#include "../debug.h"
|
||||
#include "RoF.h"
|
||||
#include "rof.h"
|
||||
#include "../opcodemgr.h"
|
||||
#include "../logsys.h"
|
||||
#include "../EQStreamIdent.h"
|
||||
#include "../eq_stream_ident.h"
|
||||
#include "../crc32.h"
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../MiscFunctions.h"
|
||||
#include "../StringUtil.h"
|
||||
#include "../Item.h"
|
||||
#include "RoF_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "rof_structs.h"
|
||||
#include "../rulesys.h"
|
||||
|
||||
#include <iostream>
|
||||
@@ -89,8 +89,8 @@ Strategy::Strategy()
|
||||
: StructStrategy()
|
||||
{
|
||||
//all opcodes default to passthrough.
|
||||
#include "SSRegister.h"
|
||||
#include "RoF_ops.h"
|
||||
#include "ss_register.h"
|
||||
#include "rof_ops.h"
|
||||
}
|
||||
|
||||
std::string Strategy::Describe() const {
|
||||
@@ -105,7 +105,7 @@ const EQClientVersion Strategy::ClientVersion() const
|
||||
return EQClientRoF;
|
||||
}
|
||||
|
||||
#include "SSDefine.h"
|
||||
#include "ss_define.h"
|
||||
|
||||
|
||||
// Converts Server Slot IDs to RoF Slot IDs for use in Encodes
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef RoF_H_
|
||||
#define RoF_H_
|
||||
|
||||
#include "../StructStrategy.h"
|
||||
#include "../struct_strategy.h"
|
||||
|
||||
class EQStreamIdentifier;
|
||||
|
||||
@@ -26,8 +26,8 @@ namespace RoF {
|
||||
virtual const EQClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "SSDeclare.h"
|
||||
#include "RoF_ops.h"
|
||||
#include "ss_declare.h"
|
||||
#include "rof_ops.h"
|
||||
};
|
||||
|
||||
};
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,16 +1,16 @@
|
||||
|
||||
#include "../debug.h"
|
||||
#include "SoD.h"
|
||||
#include "sod.h"
|
||||
#include "../opcodemgr.h"
|
||||
#include "../logsys.h"
|
||||
#include "../EQStreamIdent.h"
|
||||
#include "../eq_stream_ident.h"
|
||||
#include "../crc32.h"
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../MiscFunctions.h"
|
||||
#include "../StringUtil.h"
|
||||
#include "../Item.h"
|
||||
#include "SoD_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "sod_structs.h"
|
||||
#include "../rulesys.h"
|
||||
|
||||
#include <iostream>
|
||||
@@ -89,8 +89,8 @@ Strategy::Strategy()
|
||||
: StructStrategy()
|
||||
{
|
||||
//all opcodes default to passthrough.
|
||||
#include "SSRegister.h"
|
||||
#include "SoD_ops.h"
|
||||
#include "ss_register.h"
|
||||
#include "sod_ops.h"
|
||||
}
|
||||
|
||||
std::string Strategy::Describe() const {
|
||||
@@ -105,7 +105,7 @@ const EQClientVersion Strategy::ClientVersion() const
|
||||
return EQClientSoD;
|
||||
}
|
||||
|
||||
#include "SSDefine.h"
|
||||
#include "ss_define.h"
|
||||
|
||||
|
||||
// Converts Server Slot IDs to SoD Slot IDs for use in Encodes
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef SoD_H_
|
||||
#define SoD_H_
|
||||
|
||||
#include "../StructStrategy.h"
|
||||
#include "../struct_strategy.h"
|
||||
|
||||
class EQStreamIdentifier;
|
||||
|
||||
@@ -26,8 +26,8 @@ namespace SoD {
|
||||
virtual const EQClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "SSDeclare.h"
|
||||
#include "SoD_ops.h"
|
||||
#include "ss_declare.h"
|
||||
#include "sod_ops.h"
|
||||
};
|
||||
|
||||
};
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,15 +1,15 @@
|
||||
|
||||
#include "../debug.h"
|
||||
#include "SoF.h"
|
||||
#include "sof.h"
|
||||
#include "../opcodemgr.h"
|
||||
#include "../logsys.h"
|
||||
#include "../EQStreamIdent.h"
|
||||
#include "../eq_stream_ident.h"
|
||||
#include "../crc32.h"
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../StringUtil.h"
|
||||
#include "../Item.h"
|
||||
#include "SoF_structs.h"
|
||||
#include "../string_util.h"
|
||||
#include "../item.h"
|
||||
#include "sof_structs.h"
|
||||
#include "../rulesys.h"
|
||||
|
||||
#include <iostream>
|
||||
@@ -88,8 +88,8 @@ Strategy::Strategy()
|
||||
: StructStrategy()
|
||||
{
|
||||
//all opcodes default to passthrough.
|
||||
#include "SSRegister.h"
|
||||
#include "SoF_ops.h"
|
||||
#include "ss_register.h"
|
||||
#include "sof_ops.h"
|
||||
}
|
||||
|
||||
std::string Strategy::Describe() const {
|
||||
@@ -104,7 +104,7 @@ const EQClientVersion Strategy::ClientVersion() const
|
||||
return EQClientSoF;
|
||||
}
|
||||
|
||||
#include "SSDefine.h"
|
||||
#include "ss_define.h"
|
||||
|
||||
|
||||
// Converts Server Slot IDs to SoF Slot IDs for use in Encodes
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef SoF_H_
|
||||
#define SoF_H_
|
||||
|
||||
#include "../StructStrategy.h"
|
||||
#include "../struct_strategy.h"
|
||||
|
||||
class EQStreamIdentifier;
|
||||
|
||||
@@ -26,8 +26,8 @@ namespace SoF {
|
||||
virtual const EQClientVersion ClientVersion() const;
|
||||
|
||||
//magic macro to declare our opcode processors
|
||||
#include "SSDeclare.h"
|
||||
#include "SoF_ops.h"
|
||||
#include "ss_declare.h"
|
||||
#include "sof_ops.h"
|
||||
};
|
||||
|
||||
};
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 417 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user