Compare commits
10 Commits
9871d5cee1
...
4feb3ef685
Author | SHA1 | Date | |
---|---|---|---|
4feb3ef685 | |||
d4585377af | |||
d00e7cce75 | |||
7e9f7eb061 | |||
a8c533f012 | |||
![]() |
6401247809 | ||
![]() |
00698d3eb0 | ||
![]() |
b961819115 | ||
![]() |
0f66a136bc | ||
![]() |
dce6e16ddb |
@ -327,6 +327,14 @@
|
||||
<ConfigType Type="PACKET" Level="9" Color="Yellow" Enabled="False" Logs="3" />
|
||||
<ConfigType Type="TRACE" Level="9" Color="Yellow" Enabled="False" Logs="1" />
|
||||
</LogConfig>
|
||||
<LogConfig Category="GROUP">
|
||||
<ConfigType Type="INFO" Level="9" Color="WhiteBold" Enabled="True" Logs="3" />
|
||||
<ConfigType Type="WARNING" Level="9" Color="YellowBold" Enabled="True" Logs="3" />
|
||||
<ConfigType Type="ERROR" Level="9" Color="RedBold" Enabled="True" Logs="3" />
|
||||
<ConfigType Type="DEBUG" Level="9" Color="GreenBold" Enabled="False" Logs="3" />
|
||||
<ConfigType Type="PACKET" Level="9" Color="Yellow" Enabled="False" Logs="3" />
|
||||
<ConfigType Type="TRACE" Level="9" Color="Yellow" Enabled="False" Logs="1" />
|
||||
</LogConfig>
|
||||
<!-- ZONE Loggers -->
|
||||
<LogConfig Category="ZONE">
|
||||
<ConfigType Type="INFO" Level="9" Color="WhiteBold" Enabled="True" Logs="3" />
|
||||
|
@ -1,25 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EQ2 Login", "Login.vcxproj", "{BE2C1914-FCCC-4F65-A7DD-105142B36104}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
EQ2Login|Win32 = EQ2Login|Win32
|
||||
MiniLogin Release|Win32 = MiniLogin Release|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{BE2C1914-FCCC-4F65-A7DD-105142B36104}.Debug|Win32.ActiveCfg = EQ2Login|Win32
|
||||
{BE2C1914-FCCC-4F65-A7DD-105142B36104}.Debug|Win32.Build.0 = EQ2Login|Win32
|
||||
{BE2C1914-FCCC-4F65-A7DD-105142B36104}.EQ2Login|Win32.ActiveCfg = EQ2Login|Win32
|
||||
{BE2C1914-FCCC-4F65-A7DD-105142B36104}.EQ2Login|Win32.Build.0 = EQ2Login|Win32
|
||||
{BE2C1914-FCCC-4F65-A7DD-105142B36104}.MiniLogin Release|Win32.ActiveCfg = EQ2Login|Win32
|
||||
{BE2C1914-FCCC-4F65-A7DD-105142B36104}.MiniLogin Release|Win32.Build.0 = EQ2Login|Win32
|
||||
{BE2C1914-FCCC-4F65-A7DD-105142B36104}.Release|Win32.ActiveCfg = EQ2Login|Win32
|
||||
{BE2C1914-FCCC-4F65-A7DD-105142B36104}.Release|Win32.Build.0 = EQ2Login|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Binary file not shown.
@ -1,447 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="Login" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=Login - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Login.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Login.mak" CFG="Login - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Login - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "Login - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "Login - Win32 MiniLogin" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "Login - Win32 PublicLogin" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "Login - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "../Build"
|
||||
# PROP Intermediate_Dir "../Build/Login"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /w /W0 /GX /Zi /O2 /Ob2 /D "LOGINCRYPTO" /D "INVERSEXY" /D _WIN32_WINNT=0x0400 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo /o"../Build/Login/Login.bsc"
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib zlib.lib mysqlclient.lib /nologo /subsystem:console /map:"../Build/Login.map" /debug /machine:I386
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "Login - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Login___Win32_Debug"
|
||||
# PROP BASE Intermediate_Dir "Login___Win32_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "../build/login/Debug"
|
||||
# PROP Intermediate_Dir "../build/login/debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /Gm /GX /ZI /Od /D "LOGINCRYPTO" /D "INVERSEXY" /D _WIN32_WINNT=0x0400 /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib zlib.lib mysqlclient.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"LIBCMT" /out:"../build/login/Debug/LoginDebug.exe" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "Login - Win32 MiniLogin"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Login___Win32_MiniLogin"
|
||||
# PROP BASE Intermediate_Dir "Login___Win32_MiniLogin"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "../Build"
|
||||
# PROP Intermediate_Dir "../Build/MiniLogin"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /w /W0 /GX /O2 /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "BUILD_FOR_WINDOWS" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MT /w /W0 /GX /O2 /Ob2 /D _WIN32_WINNT=0x0400 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "MINILOGIN" /FR /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo /o"../Build/Login/Login.bsc"
|
||||
# ADD BSC32 /nologo /o"../Build/MiniLogin/Login.bsc"
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib zlib.lib mysqlclient.lib /nologo /subsystem:console /machine:I386
|
||||
# SUBTRACT BASE LINK32 /pdb:none
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib zlib.lib mysqlclient.lib /nologo /subsystem:console /machine:I386 /out:"../Build/MiniLogin.exe"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "Login - Win32 PublicLogin"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Login___Win32_PublicLogin"
|
||||
# PROP BASE Intermediate_Dir "Login___Win32_PublicLogin"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "../Build"
|
||||
# PROP Intermediate_Dir "../Build/PublicLogin"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /w /W0 /GX /O2 /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "BUILD_FOR_WINDOWS" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MT /w /W0 /GX /O2 /Ob2 /D _WIN32_WINNT=0x0400 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "PUBLICLOGIN" /FR /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo /o"../Build/Login/Login.bsc"
|
||||
# ADD BSC32 /nologo /o"../Build/Login/Login.bsc"
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib zlib.lib mysqlclient.lib /nologo /subsystem:console /machine:I386
|
||||
# SUBTRACT BASE LINK32 /pdb:none
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib zlib.lib mysqlclient.lib /nologo /subsystem:console /machine:I386 /out:"../Build/PublicLogin.exe"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "Login - Win32 Release"
|
||||
# Name "Login - Win32 Debug"
|
||||
# Name "Login - Win32 MiniLogin"
|
||||
# Name "Login - Win32 PublicLogin"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\client.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EQCrypto.cpp
|
||||
|
||||
!IF "$(CFG)" == "Login - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Login - Win32 Debug"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Login - Win32 MiniLogin"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "Login - Win32 PublicLogin"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\logindatabase.cpp
|
||||
|
||||
!IF "$(CFG)" == "Login - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Login - Win32 Debug"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Login - Win32 MiniLogin"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "Login - Win32 PublicLogin"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LWorld.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\net.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\client.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EQCrypto.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\login_opcodes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\login_structs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LWorld.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\net.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Common Source Files"
|
||||
|
||||
# PROP Default_Filter ".cpp"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\crc32.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\database.cpp
|
||||
|
||||
!IF "$(CFG)" == "Login - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Login - Win32 Debug"
|
||||
|
||||
!ELSEIF "$(CFG)" == "Login - Win32 MiniLogin"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "Login - Win32 PublicLogin"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\dbcore.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\DBMemLeak.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\debug.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\EQNetwork.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\md5.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\MiscFunctions.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\Mutex.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\packet_dump.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\packet_functions.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\TCPConnection.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\timer.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Common Header Files"
|
||||
|
||||
# PROP Default_Filter ".h"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\classes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\crc32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\database.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\DBMemLeak.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\debug.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\deity.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\eq_opcodes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\eq_packet_structs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\EQCheckTable.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\EQFragment.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\EQNetwork.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\EQOpcodes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\EQPacket.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\EQPacketManager.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\errmsg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\Guilds.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\linked_list.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\md5.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\MiscFunctions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\moremath.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\Mutex.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\packet_dump.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\packet_dump_file.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\packet_functions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\queue.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\queues.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\races.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\Seperator.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\servertalk.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\TCPConnection.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\timer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\types.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\version.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Text Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Protocol.txt
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Tables.txt
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ThanksTo.txt
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
@ -1,29 +0,0 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "Login"=.\Login.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
@ -1,542 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="EQ2 Login"
|
||||
ProjectGUID="{BE2C1914-FCCC-4F65-A7DD-105142B36104}"
|
||||
RootNamespace="EQ2 Login"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="EQ2Login|Win32"
|
||||
OutputDirectory=".\../Build"
|
||||
IntermediateDirectory=".\../Build/EQ2Login"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TypeLibraryName=".\../Build/Login.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D EQDEBUG=5"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="0"
|
||||
PreprocessorDefinitions="_WIN32_WINNT=0x0400,WIN32,NDEBUG,_CONSOLE,LOGIN, EQ2, EQN_DEBUG,_CRT_SECURE_NO_DEPRECATE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\../Build/EQ2Login/Login.pch"
|
||||
AssemblerListingLocation=".\../Build/EQ2Login/"
|
||||
ObjectFile=".\../Build/EQ2Login/"
|
||||
ProgramDataBaseFileName=".\../Build/EQ2Login/"
|
||||
BrowseInformation="1"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="2"
|
||||
ShowIncludes="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib zlib.lib mysqlclient.lib"
|
||||
OutputFile="../Build/EQ2Login.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreAllDefaultLibraries="false"
|
||||
IgnoreDefaultLibraryNames="libcmtd;msvcrt"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\../Build/Eq2Login.pdb"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="MiniLogin Release|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TypeLibraryName=".\../Build/Login.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D EQDEBUG=5"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="0"
|
||||
FavorSizeOrSpeed="1"
|
||||
PreprocessorDefinitions="_WIN32_WINNT=0x0400,WIN32,NDEBUG,_CONSOLE,LOGIN, EQ2, EQN_DEBUG,_CRT_SECURE_NO_DEPRECATE,MINILOGIN"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\../Build/EQ2Login/Login.pch"
|
||||
AssemblerListingLocation=".\../Build/EQ2Login/"
|
||||
ObjectFile=".\../Build/EQ2Login/"
|
||||
ProgramDataBaseFileName=".\../Build/EQ2Login/"
|
||||
BrowseInformation="1"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="2"
|
||||
ShowIncludes="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib zlib.lib mysqlclient.lib"
|
||||
OutputFile="../Build/EQ2MiniLogin.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
IgnoreAllDefaultLibraries="false"
|
||||
IgnoreDefaultLibraryNames="libcmtd;msvcrt"
|
||||
GenerateDebugInformation="false"
|
||||
ProgramDatabaseFile=".\../Build/Eq2Login.pdb"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\client.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\LoginAccount.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\LoginDatabase.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\LWorld.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\net.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PacketHeaders.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\client.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\login_opcodes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\login_structs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\LoginAccount.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\LoginDatabase.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\LWorld.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\net.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PacketHeaders.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Common Source Files"
|
||||
Filter=".cpp"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Character.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\Condition.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\ConfigReader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\CRC16.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\Crypto.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\database.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\dbcore.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\debug.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\emu_opcodes.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\EQEMuError.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\EQPacket.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\EQStream.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\EQStreamFactory.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\misc.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\MiscFunctions.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\Mutex.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\opcodemgr.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\packet_dump.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\packet_functions.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\PacketStruct.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\RC4.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\TCPConnection.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\timer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\xmlParser.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Common Header Files"
|
||||
Filter=".h"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Character.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\Condition.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\ConfigReader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\CRC16.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\Crypto.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\database.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\DataBuffer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\dbcore.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\debug.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\emu_opcodes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\EQ2_Common_Structs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\EQEMuError.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\EQPacket.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\EQStream.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\EQStreamFactory.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\GlobalHeaders.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\linked_list.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\login_oplist.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\misc.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\MiscFunctions.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\Mutex.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\op_codes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\opcodemgr.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\packet_dump.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\packet_functions.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\PacketStruct.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\queue.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\RC4.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\seperator.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\servertalk.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\TCPConnection.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\timer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\types.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\version.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\xmlParser.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="World Files"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\World\MutexHelper.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\World\MutexList.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\World\MutexMap.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -1,154 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="EQ2Login|x64">
|
||||
<Configuration>EQ2Login</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>EQ2Login</ProjectName>
|
||||
<ProjectGuid>{BE2C1914-FCCC-4F65-A7DD-105142B36104}</ProjectGuid>
|
||||
<RootNamespace>EQ2 Login</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='EQ2Login|x64'">
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='EQ2Login|x64'">
|
||||
<IncludePath>$(SolutionDir)..\source\depends\mariadb-10.1.19\include;$(SolutionDir)..\source\depends\zlib\include;$(SolutionDir)..\source\depends\recastnavigation\Detour\Include;$(SolutionDir)..\source\depends\boost_1_72_0\;$(SolutionDir)..\source\depends\glm\;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<LibraryPath>$(SolutionDir)..\source\depends\recastnavigation\RecastDemo\Build\vs2019\lib\Debug;$(SolutionDir)..\source\depends\mariadb-10.1.19\lib\64-debug;$(SolutionDir)..\source\depends\zlib\lib;$(SolutionDir)..\source\depends\boost_1_72_0\lib64-msvc-14.2;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64</LibraryPath>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)loginserver\</OutDir>
|
||||
<IntDir>.\$(ProjectName)__Debug64\</IntDir>
|
||||
<TargetName>$(ProjectName)__Debug64</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='EQ2Login|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0400;WIN32;NDEBUG;_CONSOLE;LOGIN; EQ2; EQN_DEBUG;_CRT_SECURE_NO_DEPRECATE;_HAS_STD_BYTE=0
|
||||
;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeaderFile />
|
||||
<PrecompiledHeaderOutputFile />
|
||||
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
|
||||
<BrowseInformation />
|
||||
<BrowseInformationFile />
|
||||
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;ws2_32.lib;zlib.lib;mysqlclient.lib;DebugUtils.lib;Detour.lib;DetourCrowd.lib;DetourTileCache.lib;Recast.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>LIBCMT;LIBC;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention />
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\common\DatabaseNew.cpp" />
|
||||
<ClCompile Include="..\common\DatabaseResult.cpp" />
|
||||
<ClCompile Include="..\common\Log.cpp" />
|
||||
<ClCompile Include="client.cpp" />
|
||||
<ClCompile Include="LoginAccount.cpp" />
|
||||
<ClCompile Include="LoginDatabase.cpp" />
|
||||
<ClCompile Include="LWorld.cpp" />
|
||||
<ClCompile Include="net.cpp" />
|
||||
<ClCompile Include="PacketHeaders.cpp" />
|
||||
<ClCompile Include="Character.cpp" />
|
||||
<ClCompile Include="..\common\Condition.cpp" />
|
||||
<ClCompile Include="..\common\ConfigReader.cpp" />
|
||||
<ClCompile Include="..\common\CRC16.cpp" />
|
||||
<ClCompile Include="..\common\Crypto.cpp" />
|
||||
<ClCompile Include="..\common\database.cpp" />
|
||||
<ClCompile Include="..\common\dbcore.cpp" />
|
||||
<ClCompile Include="..\common\debug.cpp" />
|
||||
<ClCompile Include="..\common\emu_opcodes.cpp" />
|
||||
<ClCompile Include="..\common\EQEMuError.cpp" />
|
||||
<ClCompile Include="..\common\EQPacket.cpp" />
|
||||
<ClCompile Include="..\common\EQStream.cpp" />
|
||||
<ClCompile Include="..\common\EQStreamFactory.cpp" />
|
||||
<ClCompile Include="..\common\misc.cpp" />
|
||||
<ClCompile Include="..\common\MiscFunctions.cpp" />
|
||||
<ClCompile Include="..\common\Mutex.cpp" />
|
||||
<ClCompile Include="..\common\opcodemgr.cpp" />
|
||||
<ClCompile Include="..\common\packet_dump.cpp" />
|
||||
<ClCompile Include="..\common\packet_functions.cpp" />
|
||||
<ClCompile Include="..\common\PacketStruct.cpp" />
|
||||
<ClCompile Include="..\common\RC4.cpp" />
|
||||
<ClCompile Include="..\common\TCPConnection.cpp" />
|
||||
<ClCompile Include="..\common\timer.cpp" />
|
||||
<ClCompile Include="..\common\xmlParser.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\common\DatabaseNew.h" />
|
||||
<ClInclude Include="..\common\DatabaseResult.h" />
|
||||
<ClInclude Include="..\common\Log.h" />
|
||||
<ClInclude Include="..\common\LogTypes.h" />
|
||||
<ClInclude Include="client.h" />
|
||||
<ClInclude Include="login_opcodes.h" />
|
||||
<ClInclude Include="login_structs.h" />
|
||||
<ClInclude Include="LoginAccount.h" />
|
||||
<ClInclude Include="LoginDatabase.h" />
|
||||
<ClInclude Include="LWorld.h" />
|
||||
<ClInclude Include="net.h" />
|
||||
<ClInclude Include="PacketHeaders.h" />
|
||||
<ClInclude Include="Character.h" />
|
||||
<ClInclude Include="..\common\Condition.h" />
|
||||
<ClInclude Include="..\common\ConfigReader.h" />
|
||||
<ClInclude Include="..\common\CRC16.h" />
|
||||
<ClInclude Include="..\common\Crypto.h" />
|
||||
<ClInclude Include="..\common\database.h" />
|
||||
<ClInclude Include="..\common\DataBuffer.h" />
|
||||
<ClInclude Include="..\common\dbcore.h" />
|
||||
<ClInclude Include="..\common\debug.h" />
|
||||
<ClInclude Include="..\common\emu_opcodes.h" />
|
||||
<ClInclude Include="..\common\EQ2_Common_Structs.h" />
|
||||
<ClInclude Include="..\common\EQEMuError.h" />
|
||||
<ClInclude Include="..\common\EQPacket.h" />
|
||||
<ClInclude Include="..\common\EQStream.h" />
|
||||
<ClInclude Include="..\common\EQStreamFactory.h" />
|
||||
<ClInclude Include="..\common\GlobalHeaders.h" />
|
||||
<ClInclude Include="..\common\linked_list.h" />
|
||||
<ClInclude Include="..\common\login_oplist.h" />
|
||||
<ClInclude Include="..\common\misc.h" />
|
||||
<ClInclude Include="..\common\MiscFunctions.h" />
|
||||
<ClInclude Include="..\common\Mutex.h" />
|
||||
<ClInclude Include="..\common\op_codes.h" />
|
||||
<ClInclude Include="..\common\opcodemgr.h" />
|
||||
<ClInclude Include="..\common\packet_dump.h" />
|
||||
<ClInclude Include="..\common\packet_functions.h" />
|
||||
<ClInclude Include="..\common\PacketStruct.h" />
|
||||
<ClInclude Include="..\common\queue.h" />
|
||||
<ClInclude Include="..\common\RC4.h" />
|
||||
<ClInclude Include="..\common\seperator.h" />
|
||||
<ClInclude Include="..\common\servertalk.h" />
|
||||
<ClInclude Include="..\common\TCPConnection.h" />
|
||||
<ClInclude Include="..\common\timer.h" />
|
||||
<ClInclude Include="..\common\types.h" />
|
||||
<ClInclude Include="..\common\version.h" />
|
||||
<ClInclude Include="..\common\xmlParser.h" />
|
||||
<ClInclude Include="..\World\MutexHelper.h" />
|
||||
<ClInclude Include="..\World\MutexList.h" />
|
||||
<ClInclude Include="..\World\MutexMap.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -1,277 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{bfe8d6b0-594f-4b55-9f95-101bbcf4069c}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{d65b2760-468c-4206-a19a-48323a50ba5a}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Common Source Files">
|
||||
<UniqueIdentifier>{27b769a5-0972-4e9e-b78c-09ad3341579c}</UniqueIdentifier>
|
||||
<Extensions>.cpp</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Common Header Files">
|
||||
<UniqueIdentifier>{11757e5a-691c-49c9-a627-df027ad58326}</UniqueIdentifier>
|
||||
<Extensions>.h</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="World Files">
|
||||
<UniqueIdentifier>{99e7f9f9-abcd-4abf-8200-a4b5a467788c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="client.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LoginAccount.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LoginDatabase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LWorld.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="net.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PacketHeaders.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Character.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\Condition.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\ConfigReader.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\CRC16.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\Crypto.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\database.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\dbcore.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\debug.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\emu_opcodes.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\EQEMuError.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\EQPacket.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\EQStream.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\EQStreamFactory.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\misc.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\MiscFunctions.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\Mutex.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\opcodemgr.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\packet_dump.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\packet_functions.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\PacketStruct.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\RC4.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\TCPConnection.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\timer.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\xmlParser.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\Log.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\DatabaseNew.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\DatabaseResult.cpp">
|
||||
<Filter>Common Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="client.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="login_opcodes.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="login_structs.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="LoginAccount.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="LoginDatabase.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="LWorld.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="net.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PacketHeaders.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Character.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\Condition.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\ConfigReader.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\CRC16.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\Crypto.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\database.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\DataBuffer.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\dbcore.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\debug.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\emu_opcodes.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\EQ2_Common_Structs.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\EQEMuError.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\EQPacket.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\EQStream.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\EQStreamFactory.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\GlobalHeaders.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\linked_list.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\login_oplist.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\misc.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\MiscFunctions.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\Mutex.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\op_codes.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\opcodemgr.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\packet_dump.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\packet_functions.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\PacketStruct.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\queue.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\RC4.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\seperator.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\servertalk.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\TCPConnection.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\timer.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\types.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\version.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\xmlParser.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\World\MutexHelper.h">
|
||||
<Filter>World Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\World\MutexList.h">
|
||||
<Filter>World Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\World\MutexMap.h">
|
||||
<Filter>World Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\Log.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\LogTypes.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\DatabaseNew.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\common\DatabaseResult.h">
|
||||
<Filter>Common Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
Binary file not shown.
@ -41,9 +41,11 @@ extern map<int16,OpcodeManager*>EQOpcodeManager;
|
||||
extern ConfigReader configReader;
|
||||
using namespace std;
|
||||
Client::Client(EQStream* ieqnc) {
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Entering Client::Client() constructor - client.cpp:43");
|
||||
eqnc = ieqnc;
|
||||
ip = eqnc->GetrIP();
|
||||
port = ntohs(eqnc->GetrPort());
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Client created for IP: %s, Port: %d", inet_ntoa(*(struct in_addr*)&ip), port);
|
||||
account_id = 0;
|
||||
lsadmin = 0;
|
||||
worldadmin = 0;
|
||||
@ -54,6 +56,7 @@ Client::Client(EQStream* ieqnc) {
|
||||
memset(bannedreason, 0, sizeof(bannedreason));
|
||||
//worldresponse_timer = new Timer(10000);
|
||||
//worldresponse_timer->Disable();
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Initializing client crypto key buffer (10 bytes)");
|
||||
memset(key,0,10);
|
||||
LoginMode = None;
|
||||
num_updates = 0;
|
||||
@ -163,24 +166,34 @@ bool Client::Process() {
|
||||
|
||||
while(app = eqnc->PopPacket())
|
||||
{
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Processing packet with opcode: %d - Client::Process() -> client.cpp:166", app->GetOpcode());
|
||||
switch(app->GetOpcode())
|
||||
{
|
||||
case OP_LoginRequestMsg:{
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Entering OP_LoginRequestMsg handler - Client::Process() -> client.cpp:168");
|
||||
LogWrite(LOGIN__INFO, 0, "Login", "=== LOGIN PROTOCOL HANDSHAKE START ===");
|
||||
LogWrite(LOGIN__INFO, 0, "Login", "Received OP_LoginRequestMsg from %s:%d", inet_ntoa(*(struct in_addr*)&ip), port);
|
||||
DumpPacket(app);
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Getting packet struct 'LS_LoginRequest' version 1 - OP_LoginRequestMsg -> client.cpp:177");
|
||||
PacketStruct* packet = configReader.getStruct("LS_LoginRequest", 1);
|
||||
if(packet && packet->LoadPacketData(app->pBuffer,app->size)){
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Successfully loaded LS_LoginRequest packet data, size: %d bytes", app->size);
|
||||
version = packet->getType_int16_ByName("version");
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "Classic Client Version Provided: %i", version);
|
||||
|
||||
if (version == 0 || EQOpcodeManager.count(GetOpcodeVersion(version)) == 0)
|
||||
{
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Version %d not found, trying LS_LoginRequest version 1208", version);
|
||||
safe_delete(packet);
|
||||
packet = configReader.getStruct("LS_LoginRequest", 1208);
|
||||
if (packet && packet->LoadPacketData(app->pBuffer, app->size)) {
|
||||
version = packet->getType_int16_ByName("version");
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Successfully loaded LS_LoginRequest v1208 packet data");
|
||||
}
|
||||
else
|
||||
else {
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Failed to load LS_LoginRequest v1208 packet data, breaking");
|
||||
break;
|
||||
}
|
||||
}
|
||||
//[7:19 PM] Kirmmin: Well, I very quickly learned that unknown3 in LS_LoginRequest packet is the same value as cl_eqversion in the eq2_defaults.ini file.
|
||||
|
||||
@ -193,9 +206,15 @@ bool Client::Process() {
|
||||
}
|
||||
|
||||
if(EQOpcodeManager.count(GetOpcodeVersion(version)) > 0 && getConnection()){
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Setting client version %d on EQStream connection", GetVersion());
|
||||
getConnection()->SetClientVersion(GetVersion());
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Extracting username from packet field 'username'");
|
||||
EQ2_16BitString username = packet->getType_EQ2_16BitString_ByName("username");
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Extracting password from packet field 'password'");
|
||||
EQ2_16BitString password = packet->getType_EQ2_16BitString_ByName("password");
|
||||
LogWrite(LOGIN__INFO, 0, "Login", "Login attempt for username: %s", username.data.c_str());
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Password hash length: %d", (int)password.data.length());
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Calling database.LoadAccount() - OP_LoginRequestMsg -> client.cpp:203");
|
||||
LoginAccount* acct = database.LoadAccount(username.data.c_str(),password.data.c_str(), net.IsAllowingAccountCreation());
|
||||
if(acct){
|
||||
Client* otherclient = client_list.FindByLSID(acct->getLoginAccountID());
|
||||
@ -216,11 +235,14 @@ bool Client::Process() {
|
||||
LogWrite(LOGIN__ERROR, 0, "Login", "[UNKNOWN USER] login failed!");
|
||||
}
|
||||
|
||||
if(!acct)
|
||||
if(!acct) {
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Calling SendLoginDenied() - OP_LoginRequestMsg -> client.cpp:224");
|
||||
SendLoginDenied();
|
||||
}
|
||||
else{
|
||||
needs_world_list = true;
|
||||
SetLoginAccount(acct);
|
||||
SetLoginAccount(acct);
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Calling SendLoginAccepted() - OP_LoginRequestMsg -> client.cpp:228");
|
||||
SendLoginAccepted();
|
||||
}
|
||||
}
|
||||
@ -241,7 +263,10 @@ bool Client::Process() {
|
||||
//dunno what this is for
|
||||
break;
|
||||
}
|
||||
case OP_AllWSDescRequestMsg:{
|
||||
case OP_AllWSDescRequestMsg:{
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Entering OP_AllWSDescRequestMsg handler - Client::Process() -> client.cpp:248");
|
||||
LogWrite(LOGIN__INFO, 0, "Login", "Received OP_AllWSDescRequestMsg - sending world list and character list");
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Calling SendWorldList() - OP_AllWSDescRequestMsg -> client.cpp:250");
|
||||
SendWorldList();
|
||||
needs_world_list = false;
|
||||
if(!sent_character_list) {
|
||||
@ -272,9 +297,11 @@ bool Client::Process() {
|
||||
break;
|
||||
}
|
||||
case OP_AllCharactersDescRequestMsg:{
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Entering OP_AllCharactersDescRequestMsg handler - Client::Process() -> client.cpp:290");
|
||||
break;
|
||||
}
|
||||
case OP_CreateCharacterRequestMsg:{
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Entering OP_CreateCharacterRequestMsg handler - Client::Process() -> client.cpp:294");
|
||||
PacketStruct* packet = configReader.getStruct("CreateCharacter", GetVersion());
|
||||
|
||||
DumpPacket(app);
|
||||
@ -323,17 +350,25 @@ bool Client::Process() {
|
||||
break;
|
||||
}
|
||||
case OP_PlayCharacterRequestMsg:{
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Entering OP_PlayCharacterRequestMsg handler - Client::Process() -> client.cpp:343");
|
||||
int32 char_id = 0;
|
||||
int32 server_id = 0;
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Getting packet struct 'LS_PlayRequest' for version %d", GetVersion());
|
||||
PacketStruct* request = configReader.getStruct("LS_PlayRequest",GetVersion());
|
||||
if(request && request->LoadPacketData(app->pBuffer,app->size)){
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Successfully loaded LS_PlayRequest packet data, size: %d bytes", app->size);
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Extracting char_id from packet field 'char_id'");
|
||||
char_id = request->getType_int32_ByName("char_id");
|
||||
if (GetVersion() <= 283) {
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Character ID: %d", char_id);
|
||||
if (GetVersion() <= 283) {
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Version <= 283, getting server from database");
|
||||
server_id = database.GetServer(GetAccountID(), char_id, request->getType_EQ2_16BitString_ByName("name").data);
|
||||
}
|
||||
else {
|
||||
else {
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Version > 283, extracting server_id from packet field 'server_id'");
|
||||
server_id = request->getType_int32_ByName("server_id");
|
||||
}
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Server ID: %d", server_id);
|
||||
LWorld* world = world_list.FindByID(server_id);
|
||||
string name = database.GetCharacterName(char_id,server_id,GetAccountID());
|
||||
if(world && name.length() > 0){
|
||||
@ -544,6 +579,7 @@ void Client::CharacterRejected(int8 reason_number)
|
||||
}
|
||||
|
||||
void Client::SendCharList(){
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Entering Client::SendCharList() method - client.cpp:551");
|
||||
/*PacketStruct* packet = configReader.getStruct("LS_CreateCharacterReply");
|
||||
packet->setDataByName("account_id", GetAccountID());
|
||||
packet->setDataByName("response", reason_number);
|
||||
@ -552,14 +588,20 @@ void Client::SendCharList(){
|
||||
QueuePacket(outapp);
|
||||
safe_delete(packet);*/
|
||||
LogWrite(LOGIN__INFO, 0, "Login", "[%s] sending character list.", GetAccountName());
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Creating LS_CharSelectList for account ID: %d", GetAccountID());
|
||||
LS_CharSelectList list;
|
||||
list.loadData(GetAccountID(), GetLoginAccount()->charlist, GetVersion());
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Loading character data for version: %d", GetVersion());
|
||||
list.loadData(GetAccountID(), GetLoginAccount()->charlist, GetVersion());
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Serializing character list packet");
|
||||
EQ2Packet* outapp = list.serialize(GetVersion());
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Character list packet serialized, size: %d bytes", outapp->size);
|
||||
DumpPacket(outapp->pBuffer, outapp->size);
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Queueing character list packet");
|
||||
QueuePacket(outapp);
|
||||
|
||||
}
|
||||
void Client::SendLoginDeniedBadVersion(){
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Entering Client::SendLoginDeniedBadVersion() method - client.cpp:582");
|
||||
EQ2Packet* app = new EQ2Packet(OP_LoginReplyMsg, 0, sizeof(LS_LoginResponse));
|
||||
LS_LoginResponse* ls_response = (LS_LoginResponse*)app->pBuffer;
|
||||
ls_response->reply_code = 6;
|
||||
@ -569,6 +611,7 @@ void Client::SendLoginDeniedBadVersion(){
|
||||
StartDisconnectTimer();
|
||||
}
|
||||
void Client::SendLoginDenied(){
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Entering Client::SendLoginDenied() method - client.cpp:592");
|
||||
EQ2Packet* app = new EQ2Packet(OP_LoginReplyMsg, 0, sizeof(LS_LoginResponse));
|
||||
LS_LoginResponse* ls_response = (LS_LoginResponse*)app->pBuffer;
|
||||
ls_response->reply_code = 1;
|
||||
@ -591,24 +634,36 @@ void Client::SendLoginDenied(){
|
||||
}
|
||||
|
||||
void Client::SendLoginAccepted(int32 account_id, int8 login_response) {
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Entering Client::SendLoginAccepted() method - client.cpp:615");
|
||||
LogWrite(LOGIN__INFO, 0, "Login", "=== SENDING LOGIN ACCEPTED RESPONSE ===");
|
||||
LogWrite(LOGIN__INFO, 0, "Login", "Account ID: %d, Login Response: %d", account_id, login_response);
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Getting packet struct 'LS_LoginReplyMsg' for version %d", GetVersion());
|
||||
PacketStruct* packet = configReader.getStruct("LS_LoginReplyMsg", GetVersion());
|
||||
int i = 0;
|
||||
if (packet)
|
||||
{
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Setting packet field 'account_id' = %d", account_id);
|
||||
packet->setDataByName("account_id", account_id);
|
||||
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Setting packet field 'login_response' = %d", login_response);
|
||||
packet->setDataByName("login_response", login_response);
|
||||
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Setting packet field 'do_not_force_soga' = 1");
|
||||
packet->setDataByName("do_not_force_soga", 1);
|
||||
|
||||
// sub_level 0xFFFFFFFF = blacks out all portraits for class alignments, considered non membership
|
||||
// sub_level > 0 = class alignments still required, but portraits are viewable and race selectable
|
||||
// sub_level = 2 membership, you can 'create characters on time locked servers' vs standard
|
||||
// sub_level = 0 forces popup on close to web browser
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Setting packet field 'sub_level' = %u", net.GetDefaultSubscriptionLevel());
|
||||
packet->setDataByName("sub_level", net.GetDefaultSubscriptionLevel());
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Setting packet field 'race_flag' = 0x1FFFFF");
|
||||
packet->setDataByName("race_flag", 0x1FFFFF);
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Setting packet field 'class_flag' = 0x7FFFFFE");
|
||||
packet->setDataByName("class_flag", 0x7FFFFFE);
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Setting packet field 'username' = '%s'", GetAccountName());
|
||||
packet->setMediumStringByName("username", GetAccountName());
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Setting packet field 'password' = '%s'", GetAccountName());
|
||||
packet->setMediumStringByName("password", GetAccountName());
|
||||
|
||||
// unknown5
|
||||
@ -640,16 +695,25 @@ void Client::SendLoginAccepted(int32 account_id, int8 login_response) {
|
||||
128 = outpost overlord
|
||||
*/
|
||||
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Serializing LS_LoginReplyMsg packet");
|
||||
EQ2Packet* outapp = packet->serialize();
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] LoginAccepted packet serialized, size: %d bytes", outapp->size);
|
||||
DumpPacket(outapp->pBuffer, outapp->size);
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Queueing LoginAccepted packet for transmission");
|
||||
QueuePacket(outapp);
|
||||
safe_delete(packet);
|
||||
}
|
||||
}
|
||||
|
||||
void Client::SendWorldList(){
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Entering Client::SendWorldList() method - client.cpp:673");
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Calling world_list.MakeServerListPacket() - Client::SendWorldList() -> client.cpp:674");
|
||||
EQ2Packet* pack = world_list.MakeServerListPacket(lsadmin, version);
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Created server list packet, size: %d bytes", pack->size);
|
||||
EQ2Packet* dupe = pack->Copy();
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Copied server list packet for transmission");
|
||||
DumpPacket(dupe->pBuffer,dupe->size);
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Queueing server list packet");
|
||||
QueuePacket(dupe);
|
||||
|
||||
SendLoginAccepted(0, 10); // triggers a different code path in the client to set certain flags
|
||||
@ -657,6 +721,7 @@ void Client::SendWorldList(){
|
||||
}
|
||||
|
||||
void Client::QueuePacket(EQ2Packet* app){
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Client::QueuePacket() - Sending %d byte packet to EQStream (opcode: %d)", app->size, app->GetRawOpcode());
|
||||
eqnc->EQ2QueuePacket(app);
|
||||
}
|
||||
|
||||
|
@ -2,19 +2,19 @@ APP=login
|
||||
SF= ../common/Log.o ../common/timer.o ../common/packet_dump.o ../common/unix.o \
|
||||
../common/Mutex.o ../common/MiscFunctions.o LoginDatabase.o LoginAccount.o \
|
||||
../common/TCPConnection.o ../common/emu_opcodes.o \
|
||||
client.o net.o PacketHeaders.o LWorld.o ../common/md5.o ../common/dbcore.o \
|
||||
client.o net.o PacketHeaders.o LWorld.o ../common/crypto/md5.o ../common/dbcore.o \
|
||||
Web/LoginWeb.o \
|
||||
../common/EQEMuError.o ../common/misc.o ../common/Crypto.o ../common/RC4.o \
|
||||
../common/EQEMuError.o ../common/misc.o ../common/crypto/Crypto.o ../common/RC4.o \
|
||||
.obj/debug.o .obj/database.o .obj/EQStream.o ../common/xmlParser.o \
|
||||
.obj/EQStreamFactory.o .obj/EQPacket.o ../common/CRC16.o ../common/packet_functions.o \
|
||||
../common/Condition.o ../common/opcodemgr.o ../common/PacketStruct.o ../common/ConfigReader.o \
|
||||
../common/opcodemgr.o ../common/PacketStruct.o ../common/ConfigReader.o \
|
||||
../common/DatabaseNew.o ../common/DatabaseResult.o ../common/Web/WebServer.o ../common/JsonParser.o
|
||||
|
||||
CC=g++
|
||||
LINKER=gcc
|
||||
DFLAGS=-DEQ2 -DLOGIN
|
||||
WFLAGS=-Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wcomment -Wcast-align -Wno-deprecated
|
||||
COPTS=$(WFLAGS) -ggdb -march=native -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY $(DFLAGS) -I/usr/include/mariadb -I/usr/local/include/boost -I/usr/include/lua5.4 -std=c++17
|
||||
COPTS=$(WFLAGS) -ggdb -march=native -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY $(DFLAGS) -I/usr/include/mysql -I/usr/local/include/boost -I/usr/include/lua5.4 -std=c++17
|
||||
LINKOPTS=-rdynamic -L. -lstdc++ -lm -lz -L/usr/lib/x86_64-linux-gnu -lmariadb -lboost_system -lboost_thread -lboost_filesystem -lssl -lcrypto -lpthread -ldl
|
||||
all: $(APP)
|
||||
|
||||
|
@ -66,13 +66,15 @@ char version[200], consoletitle[200];
|
||||
#endif
|
||||
#include "../common/timer.h"
|
||||
|
||||
#include "../common/CRC16.h"
|
||||
#include "../common/crypto/crc.h"
|
||||
#include <fstream>
|
||||
|
||||
int main(int argc, char** argv){
|
||||
#ifdef _DEBUG
|
||||
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
|
||||
#endif
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Entering main() method - net.cpp:72");
|
||||
|
||||
if (signal(SIGINT, CatchSignal) == SIG_ERR) {
|
||||
cerr << "Could not set signal handler" << endl;
|
||||
}
|
||||
@ -84,6 +86,7 @@ int main(int argc, char** argv){
|
||||
|
||||
srand(time(NULL));
|
||||
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Calling ReadLoginConfig() - net.cpp:87");
|
||||
if(!net.ReadLoginConfig())
|
||||
return 1;
|
||||
|
||||
@ -134,6 +137,7 @@ int main(int argc, char** argv){
|
||||
in.s_addr = eqs->GetRemoteIP();
|
||||
|
||||
LogWrite(LOGIN__INFO, 0, "Login", "New client from IP: %s on port %i", inet_ntoa(in), ntohs(eqs->GetRemotePort()));
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Creating new Client() - main() -> net.cpp:137");
|
||||
Client* client = new Client(eqs);
|
||||
eqs->SetClientVersion(0);
|
||||
client_list.Add(client);
|
||||
@ -207,6 +211,7 @@ void CatchSignal(int sig_num) {
|
||||
}
|
||||
|
||||
bool NetConnection::ReadLoginConfig() {
|
||||
LogWrite(LOGIN__DEBUG, 0, "Login", "[DEBUG] Entering NetConnection::ReadLoginConfig() method - net.cpp:209");
|
||||
JsonParser parser(MAIN_CONFIG_FILE);
|
||||
if(!parser.IsLoaded()) {
|
||||
LogWrite(INIT__ERROR, 0, "Init", "Failed to find %s in server directory..", MAIN_CONFIG_FILE);
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#include <map>
|
||||
|
||||
using namespace std;
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include "Chat.h"
|
||||
#include "../../common/Log.h"
|
||||
@ -35,8 +18,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "../Web/PeerManager.h"
|
||||
|
||||
extern ConfigReader configReader;
|
||||
extern PeerManager peer_manager;
|
||||
|
||||
|
||||
|
||||
@ -164,19 +149,23 @@ bool Chat::PasswordMatches(const char *channel_name, const char *password) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool Chat::CreateChannel(const char *channel_name) {
|
||||
return CreateChannel(channel_name, NULL);
|
||||
bool Chat::CreateChannel(const char *channel_name, bool fromPeer) {
|
||||
return CreateChannel(channel_name, NULL, fromPeer);
|
||||
}
|
||||
|
||||
bool Chat::CreateChannel(const char *channel_name, const char *password) {
|
||||
bool Chat::CreateChannel(const char *channel_name, const char *password, bool fromPeer) {
|
||||
LogWrite(CHAT__DEBUG, 0, "Chat", "Channel %s being created", channel_name);
|
||||
|
||||
ChatChannel *channel = new ChatChannel();
|
||||
channel->SetName(channel_name);
|
||||
channel->SetType(CHAT_CHANNEL_TYPE_CUSTOM);
|
||||
if (password != NULL)
|
||||
if (password != NULL && strlen(password) > 0)
|
||||
channel->SetPassword(password);
|
||||
|
||||
if(!fromPeer) {
|
||||
peer_manager.sendPeersAddChatChannel(std::string(channel_name), password != nullptr ? std::string(password) : std::string(""));
|
||||
}
|
||||
|
||||
m_channels.writelock(__FUNCTION__, __LINE__);
|
||||
channels.push_back(channel);
|
||||
m_channels.releasewritelock(__FUNCTION__, __LINE__);
|
||||
@ -274,7 +263,7 @@ bool Chat::LeaveAllChannels(Client *client) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Chat::TellChannel(Client *client, const char *channel_name, const char *message, const char* name) {
|
||||
bool Chat::TellChannel(Client *client, std::string charName, int8 charLanguage, const char *channel_name, const char *message, const char* name) {
|
||||
vector<ChatChannel *>::iterator itr;
|
||||
bool ret = false;
|
||||
bool enablediscord = rule_manager.GetGlobalRule(R_Discord, DiscordEnabled)->GetBool();
|
||||
@ -286,7 +275,7 @@ bool Chat::TellChannel(Client *client, const char *channel_name, const char *mes
|
||||
if (client && name)
|
||||
ret = (*itr)->TellChannelClient(client, message, name);
|
||||
else
|
||||
ret = (*itr)->TellChannel(client, message, name);
|
||||
ret = (*itr)->TellChannel(charName, charLanguage, message, name);
|
||||
|
||||
if(enablediscord == true && client){
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef CHAT_CHAT_H_
|
||||
#define CHAT_CHAT_H_
|
||||
|
||||
@ -99,13 +82,13 @@ public:
|
||||
bool ChannelExists(const char *channel_name);
|
||||
bool HasPassword(const char *channel_name);
|
||||
bool PasswordMatches(const char *channel_name, const char *password);
|
||||
bool CreateChannel(const char *channel_name);
|
||||
bool CreateChannel(const char *channel_name, const char *password);
|
||||
bool CreateChannel(const char *channel_name, bool fromPeer = false);
|
||||
bool CreateChannel(const char *channel_name, const char *password, bool fromPeer = false);
|
||||
bool IsInChannel(Client *client, const char *channel_name);
|
||||
bool JoinChannel(Client *client, const char *channel_name);
|
||||
bool LeaveChannel(Client *client, const char *channel_name);
|
||||
bool LeaveAllChannels(Client *client);
|
||||
bool TellChannel(Client *client, const char *channel_name, const char *message, const char* name = 0);
|
||||
bool TellChannel(Client *client, std::string charName, int8 charLanguage, const char *channel_name, const char *message, const char* name = 0);
|
||||
bool SendChannelUserList(Client *client, const char *channel_name);
|
||||
//devn00b
|
||||
int PushDiscordMsg(const char*, const char*);
|
||||
|
@ -120,7 +120,7 @@ bool ChatChannel::LeaveChannel(Client *client) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool ChatChannel::TellChannel(Client *client, const char *message, const char* name2) {
|
||||
bool ChatChannel::TellChannel(std::string charName, int8 charLanguage, const char *message, const char* name2) {
|
||||
vector<int32>::iterator itr;
|
||||
PacketStruct *packet_struct;
|
||||
Client *to_client;
|
||||
@ -135,8 +135,8 @@ bool ChatChannel::TellChannel(Client *client, const char *message, const char* n
|
||||
packet_struct->setDataByName("from_spawn_id", 0xFFFFFFFF);
|
||||
packet_struct->setDataByName("to_spawn_id", 0xFFFFFFFF);
|
||||
|
||||
if (client != NULL){
|
||||
packet_struct->setDataByName("from", client->GetPlayer()->GetName());
|
||||
if (charName.length() > 0){
|
||||
packet_struct->setDataByName("from", charName.c_str());
|
||||
} else {
|
||||
char name3[128];
|
||||
sprintf(name3,"[%s] from discord",name2);
|
||||
@ -146,8 +146,8 @@ bool ChatChannel::TellChannel(Client *client, const char *message, const char* n
|
||||
packet_struct->setDataByName("to", to_client->GetPlayer()->GetName());
|
||||
packet_struct->setDataByName("channel", to_client->GetMessageChannelColor(CHANNEL_CUSTOM_CHANNEL));
|
||||
|
||||
if(client != NULL){
|
||||
packet_struct->setDataByName("language", client->GetPlayer()->GetCurrentLanguage());
|
||||
if(charName.length() > 0){
|
||||
packet_struct->setDataByName("language", charLanguage);
|
||||
}else{
|
||||
packet_struct->setDataByName("language", 0);
|
||||
}
|
||||
@ -155,8 +155,8 @@ bool ChatChannel::TellChannel(Client *client, const char *message, const char* n
|
||||
packet_struct->setDataByName("channel_name", name);
|
||||
packet_struct->setDataByName("show_bubble", 1);
|
||||
|
||||
if(client != NULL){
|
||||
if (client->GetPlayer()->GetCurrentLanguage() == 0 || to_client->GetPlayer()->HasLanguage(client->GetPlayer()->GetCurrentLanguage())) {
|
||||
if(charName.length() > 0){
|
||||
if (charLanguage == 0 || to_client->GetPlayer()->HasLanguage(charLanguage)) {
|
||||
packet_struct->setDataByName("understood", 1);
|
||||
}
|
||||
} else {
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#ifndef CHAT_CHATCHANNEL_H_
|
||||
#define CHAT_CHATCHANNEL_H_
|
||||
@ -61,8 +44,9 @@ public:
|
||||
bool IsInChannel(int32 character_id);
|
||||
bool JoinChannel(Client *client);
|
||||
bool LeaveChannel(Client *client);
|
||||
bool TellChannel(Client *client, const char *message, const char* name2 = 0);
|
||||
bool TellChannel(std::string charName, int8 charLanguage, const char *message, const char* name2 = 0);
|
||||
bool TellChannelClient(Client* to_client, const char* message, const char* name2 = 0);
|
||||
|
||||
bool SendChannelUserList(Client *client);
|
||||
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
|
||||
#include "../../common/Log.h"
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#include "ClientPacketFunctions.h"
|
||||
#include "WorldDatabase.h"
|
||||
#include "../common/ConfigReader.h"
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#pragma once
|
||||
#include "client.h"
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef __EQ2_COMBAT_H__
|
||||
#define __EQ2_COMBAT_H__
|
||||
#include "Player.h"
|
||||
|
@ -3989,8 +3989,10 @@ void Commands::Process(int32 index, EQ2_16BitString* command_parms, Client* clie
|
||||
ph->escrow_coins += outValCoin;
|
||||
ph->escrow_status += outValStatus;
|
||||
database.UpdateHouseEscrow(ph->house_id, ph->instance_id, ph->escrow_coins, ph->escrow_status);
|
||||
peer_manager.sendPeersUpdateHouseDeposit(ph->instance_id, ph->escrow_coins, ph->escrow_status);
|
||||
|
||||
database.LoadDeposits(ph);
|
||||
|
||||
client->PlaySound("coin_cha_ching");
|
||||
HouseZone* hz = world.GetHouseZone(ph->house_id);
|
||||
ClientPacketFunctions::SendBaseHouseWindow(client, hz, ph, client->GetVersion() <= 561 ? spawn_id : client->GetPlayer()->GetID());
|
||||
@ -10237,7 +10239,9 @@ void Commands::Command_TellChannel(Client *client, Seperator *sep) {
|
||||
return;
|
||||
}
|
||||
|
||||
chat.TellChannel(client, sep->arg[0], sep->argplus[1]);
|
||||
chat.TellChannel(client, std::string(client->GetPlayer()->GetName()), client->GetPlayer()->GetCurrentLanguage(), sep->arg[0], sep->argplus[1]);
|
||||
peer_manager.SendPeersChatChannelMessage(std::string(sep->arg[0]), std::string(client->GetPlayer()->GetName()), std::string(sep->argplus[1]),
|
||||
client->GetPlayer()->GetCurrentLanguage(), "");
|
||||
}
|
||||
|
||||
void Commands::Command_Test(Client* client, EQ2_16BitString* command_parms) {
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#ifndef _CONSOLECOMMANDS_H
|
||||
#define _CONSOLECOMMANDS_H
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#include "Factions.h"
|
||||
#include "client.h"
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef EQ2_FACTIONS
|
||||
#define EQ2_FACTIONS
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#include "GroundSpawn.h"
|
||||
#include "World.h"
|
||||
#include "Spells.h"
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef __EQ2_GroundSpawn__
|
||||
#define __EQ2_GroundSpawn__
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#ifndef GUILD_H_
|
||||
#define GUILD_H_
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include "HeroicOp.h"
|
||||
#include "../../common/Log.h"
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#ifndef __HEROICOP_H__
|
||||
#define __HEROICOP_H__
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include "../WorldDatabase.h"
|
||||
#include "../../common/Log.h"
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include "../ClientPacketFunctions.h"
|
||||
#include "../../common/Log.h"
|
||||
|
@ -4405,16 +4405,6 @@ Item* PlayerItemList::GetVaultItemFromUniqueID(int64 id, bool lock) {
|
||||
{
|
||||
for (auto& [containerIdx, slotMap] : vaultIt->second) {
|
||||
for (auto& [slotID, itemPtr] : slotMap) {
|
||||
if(itemPtr) {
|
||||
LogWrite(PLAYER__ERROR, 0, "Vault",
|
||||
"--GetVaultItem: %u (%s - %u) needs to match %u", slotID, itemPtr->name.c_str(), itemPtr->details.unique_id, id
|
||||
);
|
||||
}
|
||||
else {
|
||||
LogWrite(PLAYER__ERROR, 0, "Vault",
|
||||
"--GetVaultItem: %u (??) needs to match %u", slotID, id
|
||||
);
|
||||
}
|
||||
if (itemPtr && itemPtr->details.unique_id == id) {
|
||||
if (lock) MPlayerItems.releasereadlock(__FUNCTION__, __LINE__);
|
||||
return itemPtr;
|
||||
@ -4510,7 +4500,7 @@ void PlayerItemList::PopulateHouseStoragePacket(Client* client, PacketStruct* pa
|
||||
if(broker.IsItemForSale(client->GetPlayer()->GetCharacterID(), item->details.unique_id))
|
||||
storage_flags += HouseStoreItemFlags::HOUSE_STORE_FOR_SALE;
|
||||
|
||||
LogWrite(PLAYER__ERROR, 5, "Broker",
|
||||
LogWrite(PLAYER__DEBUG, 5, "Broker",
|
||||
"--Sell broker item: %u (%s - %u), cost=%u",
|
||||
client->GetPlayer()->GetCharacterID(), item->name.c_str(), item->details.unique_id, cost
|
||||
);
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
//Item Stat defines for ToV Client
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef __EQ2_LOOT__
|
||||
#define __EQ2_LOOT__
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include "../../common/Log.h"
|
||||
#include "../WorldDatabase.h"
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#ifndef LANGUAGES_H_
|
||||
#define LANGUAGES_H_
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#include "../common/debug.h"
|
||||
#include "../common/Log.h"
|
||||
#include <iostream>
|
||||
@ -28,7 +11,7 @@ using namespace std;
|
||||
#include <stdlib.h>
|
||||
#include "../common/version.h"
|
||||
#include "../common/GlobalHeaders.h"
|
||||
#include "../common/sha512.h"
|
||||
#include "../common/crypto/sha512.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <process.h>
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef LOGINSERVER_H
|
||||
#define LOGINSERVER_H
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef MUTEXHELPER_H
|
||||
#define MUTEXHELPER_H
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef MUTEXLIST_H
|
||||
#define MUTEXLIST_H
|
||||
#include <list>
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef MUTEXMAP_H
|
||||
#define MUTEXMAP_H
|
||||
#include <map>
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef MUTEXVECTOR_H
|
||||
#define MUTEXVECTOR_H
|
||||
#include <vector>
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef __EQ2_NPC__
|
||||
#define __EQ2_NPC__
|
||||
#include <atomic>
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef __EQ2_OBJECT__
|
||||
#define __EQ2_OBJECT__
|
||||
|
||||
|
@ -1904,6 +1904,7 @@ bool PlayerGroupManager::IdentifyMemberInGroupOrRaid(ZoneChangeDetails* details,
|
||||
deque<GroupMemberInfo*>* members = group->GetMembers();
|
||||
deque<GroupMemberInfo*>::iterator itr;
|
||||
for (itr = members->begin(); itr != members->end(); itr++) {
|
||||
LogWrite(GROUP__INFO, 0, "Group", "%s check group: isclient: %u, zoneid: %u, instance id: %u, expected instance id: %u, get by zone? %u", client->GetPlayer()->GetName(), (*itr)->is_client, (*itr)->zone_id, (*itr)->instance_id, instanceID, ((*itr)->member && (*itr)->member->GetZone()) ? 1 : 0);
|
||||
// If a group member matches a target
|
||||
if ((*itr)->is_client && (*itr)->member && (*itr)->member->GetZone() && (*itr)->zone_id == zoneID && (instanceID == 0 || (*itr)->instance_id == instanceID)) {
|
||||
// toggle the flag and break the loop
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#include "Quests.h"
|
||||
#include "../common/ConfigReader.h"
|
||||
#include "Player.h"
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef QUESTS_H
|
||||
#define QUESTS_H
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include "RaceTypes.h"
|
||||
#include <string.h>
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#ifndef __RACETYPES_H__
|
||||
#define __RACETYPES_H__
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include "../WorldDatabase.h"
|
||||
#include "../../common/Log.h"
|
||||
|
@ -247,6 +247,8 @@ void RuleManager::Init()
|
||||
** Setting to less than 10 or greater than 50 will disable completely
|
||||
** Range supported is 10 - 50%.
|
||||
**/
|
||||
RULE_INIT(R_Player, ForceCommonerFarJourney, "1");
|
||||
|
||||
/* PVP */
|
||||
RULE_INIT(R_PVP, AllowPVP, "0");
|
||||
RULE_INIT(R_PVP, LevelRange, "4");
|
||||
|
@ -98,6 +98,7 @@ enum RuleType {
|
||||
StartHPLevelMod,
|
||||
StartPowerLevelMod,
|
||||
AllowPlayerEquipCombat,
|
||||
ForceCommonerFarJourney,
|
||||
MaxTargetCommandDistance,
|
||||
MinSkillMultiplierValue,
|
||||
HarvestSkillUpMultiplier,
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#ifndef __EQ2_SIGN__
|
||||
#define __EQ2_SIGN__
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#include "Skills.h"
|
||||
#include "Spawn.h"
|
||||
#include "LuaInterface.h"
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef __EQ2_SKILLS_H__
|
||||
#define __EQ2_SKILLS_H__
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef EQ2_SPAWN_LISTS
|
||||
#define EQ2_SPAWN_LISTS
|
||||
#include "../common/types.h"
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#include "Spells.h"
|
||||
#include "../common/ConfigReader.h"
|
||||
#include "WorldDatabase.h"
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef __EQ2_SPELLS__
|
||||
#define __EQ2_SPELLS__
|
||||
#include <map>
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef TITLES_H_
|
||||
#define TITLES_H_
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef __EQ2_TRADESKILLS__
|
||||
#define __EQ2_TRADESKILLS__
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
|
||||
#include <algorithm>
|
||||
#include "../ClientPacketFunctions.h"
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef EQ2_VARIABLES_H
|
||||
#define EQ2_VARIABLES_H
|
||||
#include <vector>
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#include "../common/Log.h"
|
||||
#include "../common/MiscFunctions.h"
|
||||
#include <map>
|
||||
|
@ -935,4 +935,60 @@ void PeerManager::sendPeersRemoveItemSale(int32 character_id, int64 uniqueID) {
|
||||
continue;
|
||||
peer_https_pool.sendPostRequestToPeerAsync(peer->id, peer->webAddr, std::to_string(peer->webPort), "/removeitemsale", jsonPayload);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PeerManager::sendPeersAddPlayerHouse(int32 charID, int64 uniqueID, int32 houseID, int32 instanceID, int32 upkeepDue, std::string charName) {
|
||||
boost::property_tree::ptree root;
|
||||
root.put("character_id", charID);
|
||||
root.put("unique_id", uniqueID);
|
||||
root.put("instance_id", instanceID);
|
||||
root.put("upkeep_due", upkeepDue);
|
||||
root.put("character_name", charName);
|
||||
|
||||
std::ostringstream jsonStream;
|
||||
boost::property_tree::write_json(jsonStream, root);
|
||||
std::string jsonPayload = jsonStream.str();
|
||||
LogWrite(PEERING__DEBUG, 0, "Peering", "%s: Add Player House, CharID: %u, UniqueID: %u, instanceID: %u", __FUNCTION__, charID, uniqueID, instanceID);
|
||||
|
||||
for (const auto& [id, peer] : peers) {
|
||||
if (peer->healthCheck.status != HealthStatus::OK)
|
||||
continue;
|
||||
peer_https_pool.sendPostRequestToPeerAsync(peer->id, peer->webAddr, std::to_string(peer->webPort), "/addplayerhouse", jsonPayload);
|
||||
}
|
||||
}
|
||||
|
||||
void PeerManager::sendPeersUpdateHouseDeposit(int32 instanceID, int64 escrowDeposit, int32 escrowStatus) {
|
||||
boost::property_tree::ptree root;
|
||||
root.put("instance_id", instanceID);
|
||||
root.put("escrow_deposit", escrowDeposit);
|
||||
root.put("escrow_status", escrowStatus);
|
||||
|
||||
std::ostringstream jsonStream;
|
||||
boost::property_tree::write_json(jsonStream, root);
|
||||
std::string jsonPayload = jsonStream.str();
|
||||
LogWrite(PEERING__DEBUG, 0, "Peering", "%s: Update House Deposit, instanceID: %u, coin total: %llu, status total: %u", __FUNCTION__, instanceID, escrowDeposit, escrowStatus);
|
||||
|
||||
for (const auto& [id, peer] : peers) {
|
||||
if (peer->healthCheck.status != HealthStatus::OK)
|
||||
continue;
|
||||
peer_https_pool.sendPostRequestToPeerAsync(peer->id, peer->webAddr, std::to_string(peer->webPort), "/updatehousedeposit", jsonPayload);
|
||||
}
|
||||
}
|
||||
|
||||
void PeerManager::sendPeersAddChatChannel(std::string channelName, std::string channelPassword) {
|
||||
boost::property_tree::ptree root;
|
||||
root.put("channel_name", channelName);
|
||||
root.put("channel_password", channelPassword);
|
||||
|
||||
std::ostringstream jsonStream;
|
||||
boost::property_tree::write_json(jsonStream, root);
|
||||
std::string jsonPayload = jsonStream.str();
|
||||
LogWrite(PEERING__DEBUG, 0, "Peering", "%s: Add Chat Channel, channel name: %s", __FUNCTION__, channelName.c_str());
|
||||
|
||||
for (const auto& [id, peer] : peers) {
|
||||
if (peer->healthCheck.status != HealthStatus::OK)
|
||||
continue;
|
||||
peer_https_pool.sendPostRequestToPeerAsync(peer->id, peer->webAddr, std::to_string(peer->webPort), "/addchatchannel", jsonPayload);
|
||||
}
|
||||
}
|
@ -179,6 +179,7 @@ public:
|
||||
bool IsClientConnectedPeer(int32 account_id, int32 char_id);
|
||||
std::string GetCharacterPeerId(std::string charName);
|
||||
void SendPeersChannelMessage(int32 group_id, std::string fromName, std::string message, int16 channel, int32 language_id = 0, int8 custom_type = 0);
|
||||
void SendPeersChatChannelMessage(std::string channelName, std::string fromName, std::string message, int32 language_id, std::string toName);
|
||||
void SendPeersGuildChannelMessage(int32 guild_id, std::string fromName, std::string message, int16 channel, int32 language_id = 0, int8 custom_type = 0);
|
||||
void sendZonePeerList(Client* client);
|
||||
std::string getZonePeerId(const std::string& inc_zone_name, int32 inc_zone_id, int32 inc_instance_id, ZoneChangeDetails* opt_details = nullptr, bool only_always_loaded = false, int32 matchDuplicatedId = 0);
|
||||
@ -231,6 +232,10 @@ public:
|
||||
void sendPeersRemoveSeller(int32 character_id);
|
||||
void sendPeersAddItemSale(int32 character_id, int32 house_id, int32 itemID, int64 uniqueID, int64 price, sint32 invSlotID, int16 slotID, int16 count, bool inInventory, bool forSale, std::string itemCreator);
|
||||
void sendPeersRemoveItemSale(int32 character_id, int64 uniqueID);
|
||||
|
||||
void sendPeersAddPlayerHouse(int32 charID, int64 uniqueID, int32 houseID, int32 instanceID, int32 upkeepDue, std::string charName);
|
||||
void sendPeersUpdateHouseDeposit(int32 instanceID, int64 escrowDeposit, int32 escrowStatus);
|
||||
void sendPeersAddChatChannel(std::string channelName, std::string channelPassword);
|
||||
|
||||
};
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "../LuaInterface.h"
|
||||
#include "../Guilds/Guild.h"
|
||||
#include "../Broker/BrokerManager.h"
|
||||
#include "../Chat/Chat.h"
|
||||
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/property_tree/json_parser.hpp>
|
||||
@ -46,6 +47,7 @@ extern MasterFactionList master_faction_list;
|
||||
extern ClientList client_list;
|
||||
extern GuildList guild_list;
|
||||
extern BrokerManager broker;
|
||||
extern Chat chat;
|
||||
|
||||
PeerManager peer_manager;
|
||||
HTTPSClientPool peer_https_pool;
|
||||
@ -739,7 +741,7 @@ void World::Web_worldhandle_sendglobalmessage(const http::request<http::string_b
|
||||
int32 success = 0;
|
||||
int8 language = 0;
|
||||
int16 in_channel = 0;
|
||||
std::string toName(""), fromName(""), msg("");
|
||||
std::string toName(""), fromName(""), msg(""), channelName("");
|
||||
int32 group_id = 0;
|
||||
int32 guild_id = 0;
|
||||
int8 custom_type = 0;
|
||||
@ -752,6 +754,10 @@ void World::Web_worldhandle_sendglobalmessage(const http::request<http::string_b
|
||||
if (auto message = json_tree.get_optional<std::string>("message")) {
|
||||
msg = message.get();
|
||||
}
|
||||
|
||||
if (auto in_channel = json_tree.get_optional<std::string>("channel_name")) {
|
||||
channelName = in_channel.get();
|
||||
}
|
||||
if (auto from_language = json_tree.get_optional<int8>("from_language")) {
|
||||
language = from_language.get();
|
||||
}
|
||||
@ -769,7 +775,7 @@ void World::Web_worldhandle_sendglobalmessage(const http::request<http::string_b
|
||||
}
|
||||
|
||||
Client* find_client = zone_list.GetClientByCharName(toName.c_str());
|
||||
if (find_client && find_client->GetPlayer()->IsIgnored(fromName.c_str()))
|
||||
if (in_channel == CHANNEL_PRIVATE_TELL && find_client && find_client->GetPlayer()->IsIgnored(fromName.c_str()))
|
||||
success = 0;
|
||||
else {
|
||||
switch (in_channel) {
|
||||
@ -854,6 +860,13 @@ void World::Web_worldhandle_sendglobalmessage(const http::request<http::string_b
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CHANNEL_CHAT_CHANNEL_TEXT: {
|
||||
if(fromName.length() > 0)
|
||||
chat.TellChannel(nullptr, fromName, language, channelName.c_str(), msg.c_str());
|
||||
else
|
||||
chat.TellChannel(nullptr, "", 0, channelName.c_str(), msg.c_str(), toName.c_str()); // toName used as an override for chat channels via discord bot
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1582,4 +1595,122 @@ void World::Web_worldhandle_removeitemsale(const http::request<http::string_body
|
||||
std::string json = oss.str();
|
||||
res.body() = json;
|
||||
res.prepare_payload();
|
||||
}
|
||||
}
|
||||
|
||||
void World::Web_worldhandle_addplayerhouse(const http::request<http::string_body>& req, http::response<http::string_body>& res) {
|
||||
res.set(http::field::content_type, "application/json; charset=utf-8");
|
||||
boost::property_tree::ptree pt, json_tree;
|
||||
|
||||
std::istringstream json_stream(req.body());
|
||||
boost::property_tree::read_json(json_stream, json_tree);
|
||||
int32 charID = 0;
|
||||
int64 uniqueID = 0;
|
||||
int32 houseID = 0;
|
||||
int32 instanceID = 0;
|
||||
bool success = false;
|
||||
int32 upkeepDue = 0;
|
||||
std::string charname("");
|
||||
if (auto character_id = json_tree.get_optional<int32>("character_id")) {
|
||||
charID = character_id.get();
|
||||
}
|
||||
if (auto house_id = json_tree.get_optional<int32>("house_id")) {
|
||||
houseID = house_id.get();
|
||||
}
|
||||
if (auto unique_id = json_tree.get_optional<int64>("unique_id")) {
|
||||
uniqueID = unique_id.get();
|
||||
}
|
||||
if (auto instance_id = json_tree.get_optional<int32>("instance_id")) {
|
||||
instanceID = instance_id.get();
|
||||
}
|
||||
if (auto upkeep_due = json_tree.get_optional<int32>("upkeep_due")) {
|
||||
upkeepDue = upkeep_due.get();
|
||||
}
|
||||
if (auto name = json_tree.get_optional<std::string>("character_name")) {
|
||||
charname = name.get();
|
||||
}
|
||||
|
||||
if(charID && houseID && uniqueID && charname.length() > 0) {
|
||||
world.AddPlayerHouse(charID, houseID, uniqueID, instanceID, upkeepDue, 0, 0, charname);
|
||||
success = true;
|
||||
}
|
||||
|
||||
pt.put("success", success);
|
||||
pt.put("character_id", charID);
|
||||
std::ostringstream oss;
|
||||
boost::property_tree::write_json(oss, pt);
|
||||
std::string json = oss.str();
|
||||
res.body() = json;
|
||||
res.prepare_payload();
|
||||
}
|
||||
|
||||
void World::Web_worldhandle_updatehousedeposit(const http::request<http::string_body>& req, http::response<http::string_body>& res) {
|
||||
res.set(http::field::content_type, "application/json; charset=utf-8");
|
||||
boost::property_tree::ptree pt, json_tree;
|
||||
|
||||
std::istringstream json_stream(req.body());
|
||||
boost::property_tree::read_json(json_stream, json_tree);
|
||||
int64 escrowCoin = 0;
|
||||
int64 escrowStatus = 0;
|
||||
int32 instanceID = 0;
|
||||
bool success = false;
|
||||
if (auto escrow_coins = json_tree.get_optional<int64>("escrow_coins")) {
|
||||
escrowCoin = escrow_coins.get();
|
||||
}
|
||||
if (auto escrow_status = json_tree.get_optional<int64>("escrow_status")) {
|
||||
escrowStatus = escrow_status.get();
|
||||
}
|
||||
if (auto instance_id = json_tree.get_optional<int32>("instance_id")) {
|
||||
instanceID = instance_id.get();
|
||||
}
|
||||
|
||||
if(instanceID) {
|
||||
PlayerHouse* ph = world.GetPlayerHouseByInstanceID(instanceID);
|
||||
if(ph) {
|
||||
ph->escrow_coins = escrowCoin;
|
||||
ph->escrow_status = escrowStatus;
|
||||
|
||||
database.LoadDeposits(ph);
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
|
||||
pt.put("success", success);
|
||||
pt.put("instance_id", instanceID);
|
||||
std::ostringstream oss;
|
||||
boost::property_tree::write_json(oss, pt);
|
||||
std::string json = oss.str();
|
||||
res.body() = json;
|
||||
res.prepare_payload();
|
||||
}
|
||||
|
||||
void World::Web_worldhandle_addchatchannel(const http::request<http::string_body>& req, http::response<http::string_body>& res) {
|
||||
res.set(http::field::content_type, "application/json; charset=utf-8");
|
||||
boost::property_tree::ptree pt, json_tree;
|
||||
|
||||
std::istringstream json_stream(req.body());
|
||||
boost::property_tree::read_json(json_stream, json_tree);
|
||||
|
||||
bool success = false;
|
||||
std::string channelname("");
|
||||
std::string channelpasswd("");
|
||||
if (auto name = json_tree.get_optional<std::string>("channel_name")) {
|
||||
channelname = name.get();
|
||||
}
|
||||
if (auto passwd = json_tree.get_optional<std::string>("channel_password")) {
|
||||
channelpasswd = passwd.get();
|
||||
}
|
||||
|
||||
if(channelname.length() > 0) {
|
||||
if (chat.ChannelExists(channelname.c_str()) || chat.CreateChannel(channelname.c_str(), channelpasswd.c_str(), true)) {
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
|
||||
pt.put("success", success);
|
||||
pt.put("channel_name", channelname);
|
||||
std::ostringstream oss;
|
||||
boost::property_tree::write_json(oss, pt);
|
||||
std::string json = oss.str();
|
||||
res.body() = json;
|
||||
res.prepare_payload();
|
||||
}
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef __EQ2_WIDGET__
|
||||
#define __EQ2_WIDGET__
|
||||
#include "Spawn.h"
|
||||
|
@ -288,6 +288,9 @@ void World::init(std::string web_ipaddr, int16 web_port, std::string cert_file,
|
||||
world_webserver->register_route("/removeseller", World::Web_worldhandle_removeseller);
|
||||
world_webserver->register_route("/additemsale", World::Web_worldhandle_additemsale);
|
||||
world_webserver->register_route("/removeitemsale", World::Web_worldhandle_removeitemsale);
|
||||
|
||||
world_webserver->register_route("/addplayerhouse", World::Web_worldhandle_addplayerhouse);
|
||||
world_webserver->register_route("/updatehousedeposit", World::Web_worldhandle_updatehousedeposit);
|
||||
world_webserver->run();
|
||||
LogWrite(INIT__INFO, 0, "Init", "World Web Server is listening on %s:%u..", web_ipaddr.c_str(), web_port);
|
||||
web_success = true;
|
||||
@ -1036,6 +1039,24 @@ void PeerManager::SendPeersGuildChannelMessage(int32 guild_id, std::string fromN
|
||||
}
|
||||
}
|
||||
|
||||
void PeerManager::SendPeersChatChannelMessage(std::string channelName, std::string fromName, std::string message, int32 language_id, std::string toName) {
|
||||
boost::property_tree::ptree root;
|
||||
root.put("message", message);
|
||||
root.put("channel", CHANNEL_CHAT_CHANNEL_TEXT);
|
||||
root.put("channel_name", channelName);
|
||||
root.put("from_language", language_id);
|
||||
root.put("from_name", fromName);
|
||||
root.put("to_name", toName);
|
||||
std::ostringstream jsonStream;
|
||||
boost::property_tree::write_json(jsonStream, root);
|
||||
std::string jsonPayload = jsonStream.str();
|
||||
for (auto& [peerId, peer] : peers) {
|
||||
if(peer->healthCheck.status != HealthStatus::OK)
|
||||
continue;
|
||||
peer_https_pool.sendPostRequestToPeerAsync(peer->id, peer->webAddr, std::to_string(peer->webPort), "/sendglobalmessage", jsonPayload);
|
||||
}
|
||||
}
|
||||
|
||||
void PeerManager::sendZonePeerList(Client* client) {
|
||||
for (auto& [peerId, peer] : peers) {
|
||||
if(peer->healthCheck.status != HealthStatus::OK)
|
||||
|
@ -744,6 +744,9 @@ public:
|
||||
static void Web_worldhandle_removeseller(const http::request<http::string_body>& req, http::response<http::string_body>& res);
|
||||
static void Web_worldhandle_additemsale(const http::request<http::string_body>& req, http::response<http::string_body>& res);
|
||||
static void Web_worldhandle_removeitemsale(const http::request<http::string_body>& req, http::response<http::string_body>& res);
|
||||
static void Web_worldhandle_addplayerhouse(const http::request<http::string_body>& req, http::response<http::string_body>& res);
|
||||
static void Web_worldhandle_updatehousedeposit(const http::request<http::string_body>& req, http::response<http::string_body>& res);
|
||||
static void Web_worldhandle_addchatchannel(const http::request<http::string_body>& req, http::response<http::string_body>& res);
|
||||
|
||||
static void Web_populate_status(boost::property_tree::ptree& pt);
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef WorldTCPCONNECTION_H
|
||||
#define WorldTCPCONNECTION_H
|
||||
class WorldTCPConnection
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#include "../common/debug.h"
|
||||
#include "../common/Log.h"
|
||||
#include "classes.h"
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef CLASSES_CH
|
||||
#define CLASSES_CH
|
||||
#include "../common/types.h"
|
||||
|
@ -2435,6 +2435,8 @@ bool Client::HandlePacket(EQApplicationPacket* app) {
|
||||
GetPlayer()->GetCharacterInstances()->AddInstance(db_id, zone_details.instanceId, 0, 0, zone_details.defaultLockoutTime, zone_details.defaultReenterTime, zoneID, zone_details.instanceType, zone_details.zoneName);
|
||||
|
||||
world.AddPlayerHouse(GetPlayer()->GetCharacterID(), hz->id, unique_id, zone_details.instanceId, upkeep_due, 0, 0, GetPlayer()->GetName());
|
||||
peer_manager.sendPeersAddPlayerHouse(GetPlayer()->GetCharacterID(), unique_id, hz->id, zone_details.instanceId, upkeep_due, GetPlayer()->GetName());
|
||||
|
||||
//ClientPacketFunctions::SendHousingList(this);
|
||||
PlayerHouse* ph = world.GetPlayerHouseByUniqueID(unique_id);
|
||||
ClientPacketFunctions::SendBaseHouseWindow(this, hz, ph, GetVersion() <= 561 ? house_id : this->GetPlayer()->GetID());
|
||||
|
@ -1061,7 +1061,8 @@ ThreadReturnType StartDiscord(void* tmp)
|
||||
if(chanid.compare(listenchan) != 0 || !chanid.size() || !listenchan.size()) {
|
||||
return;
|
||||
}
|
||||
chat.TellChannel(NULL, listenchan.c_str(), event.msg.content.c_str(), event.msg.author.username.c_str());
|
||||
chat.TellChannel(nullptr, "", 0, listenchan.c_str(), event.msg.content.c_str(), event.msg.author.username.c_str());
|
||||
peer_manager.SendPeersChatChannelMessage(listenchan, "", event.msg.content, 0, event.msg.author.username);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef __EQ2_NET__
|
||||
#define __EQ2_NET__
|
||||
#ifndef WIN32
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#include "../common/debug.h"
|
||||
#include "races.h"
|
||||
#include "../common/MiscFunctions.h"
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef RACES_H
|
||||
#define RACES_H
|
||||
#include "../common/types.h"
|
||||
|
@ -1,328 +0,0 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
unsigned long IntArray[]={
|
||||
0x00000000,
|
||||
0x77073096,
|
||||
0xEE0E612C,
|
||||
0x990951BA,
|
||||
0x076DC419,
|
||||
0x706AF48F,
|
||||
0xE963A535,
|
||||
0x9E6495A3,
|
||||
0x0EDB8832,
|
||||
0x79DCB8A4,
|
||||
0xE0D5E91E,
|
||||
0x97D2D988,
|
||||
0x09B64C2B,
|
||||
0x7EB17CBD,
|
||||
0xE7B82D07,
|
||||
0x90BF1D91,
|
||||
0x1DB71064,
|
||||
0x6AB020F2,
|
||||
0xF3B97148,
|
||||
0x84BE41DE,
|
||||
0x1ADAD47D,
|
||||
0x6DDDE4EB,
|
||||
0xF4D4B551,
|
||||
0x83D385C7,
|
||||
0x136C9856,
|
||||
0x646BA8C0,
|
||||
0xFD62F97A,
|
||||
0x8A65C9EC,
|
||||
0x14015C4F,
|
||||
0x63066CD9,
|
||||
0xFA0F3D63,
|
||||
0x8D080DF5,
|
||||
0x3B6E20C8,
|
||||
0x4C69105E,
|
||||
0xD56041E4,
|
||||
0xA2677172,
|
||||
0x3C03E4D1,
|
||||
0x4B04D447,
|
||||
0xD20D85FD,
|
||||
0xA50AB56B,
|
||||
0x35B5A8FA,
|
||||
0x42B2986C,
|
||||
0xDBBBC9D6,
|
||||
0xACBCF940,
|
||||
0x32D86CE3,
|
||||
0x45DF5C75,
|
||||
0xDCD60DCF,
|
||||
0xABD13D59,
|
||||
0x26D930AC,
|
||||
0x51DE003A,
|
||||
0xC8D75180,
|
||||
0xBFD06116,
|
||||
0x21B4F4B5,
|
||||
0x56B3C423,
|
||||
0xCFBA9599,
|
||||
0xB8BDA50F,
|
||||
0x2802B89E,
|
||||
0x5F058808,
|
||||
0xC60CD9B2,
|
||||
0xB10BE924,
|
||||
0x2F6F7C87,
|
||||
0x58684C11,
|
||||
0xC1611DAB,
|
||||
0xB6662D3D,
|
||||
0x76DC4190,
|
||||
0x01DB7106,
|
||||
0x98D220BC,
|
||||
0xEFD5102A,
|
||||
0x71B18589,
|
||||
0x06B6B51F,
|
||||
0x9FBFE4A5,
|
||||
0xE8B8D433,
|
||||
0x7807C9A2,
|
||||
0x0F00F934,
|
||||
0x9609A88E,
|
||||
0xE10E9818,
|
||||
0x7F6A0DBB,
|
||||
0x086D3D2D,
|
||||
0x91646C97,
|
||||
0xE6635C01,
|
||||
0x6B6B51F4,
|
||||
0x1C6C6162,
|
||||
0x856530D8,
|
||||
0xF262004E,
|
||||
0x6C0695ED,
|
||||
0x1B01A57B,
|
||||
0x8208F4C1,
|
||||
0xF50FC457,
|
||||
0x65B0D9C6,
|
||||
0x12B7E950,
|
||||
0x8BBEB8EA,
|
||||
0xFCB9887C,
|
||||
0x62DD1DDF,
|
||||
0x15DA2D49,
|
||||
0x8CD37CF3,
|
||||
0xFBD44C65,
|
||||
0x4DB26158,
|
||||
0x3AB551CE,
|
||||
0xA3BC0074,
|
||||
0xD4BB30E2,
|
||||
0x4ADFA541,
|
||||
0x3DD895D7,
|
||||
0xA4D1C46D,
|
||||
0xD3D6F4FB,
|
||||
0x4369E96A,
|
||||
0x346ED9FC,
|
||||
0xAD678846,
|
||||
0xDA60B8D0,
|
||||
0x44042D73,
|
||||
0x33031DE5,
|
||||
0xAA0A4C5F,
|
||||
0xDD0D7CC9,
|
||||
0x5005713C,
|
||||
0x270241AA,
|
||||
0xBE0B1010,
|
||||
0xC90C2086,
|
||||
0x5768B525,
|
||||
0x206F85B3,
|
||||
0xB966D409,
|
||||
0xCE61E49F,
|
||||
0x5EDEF90E,
|
||||
0x29D9C998,
|
||||
0xB0D09822,
|
||||
0xC7D7A8B4,
|
||||
0x59B33D17,
|
||||
0x2EB40D81,
|
||||
0xB7BD5C3B,
|
||||
0xC0BA6CAD,
|
||||
0xEDB88320,
|
||||
0x9ABFB3B6,
|
||||
0x03B6E20C,
|
||||
0x74B1D29A,
|
||||
0xEAD54739,
|
||||
0x9DD277AF,
|
||||
0x04DB2615,
|
||||
0x73DC1683,
|
||||
0xE3630B12,
|
||||
0x94643B84,
|
||||
0x0D6D6A3E,
|
||||
0x7A6A5AA8,
|
||||
0xE40ECF0B,
|
||||
0x9309FF9D,
|
||||
0x0A00AE27,
|
||||
0x7D079EB1,
|
||||
0xF00F9344,
|
||||
0x8708A3D2,
|
||||
0x1E01F268,
|
||||
0x6906C2FE,
|
||||
0xF762575D,
|
||||
0x806567CB,
|
||||
0x196C3671,
|
||||
0x6E6B06E7,
|
||||
0xFED41B76,
|
||||
0x89D32BE0,
|
||||
0x10DA7A5A,
|
||||
0x67DD4ACC,
|
||||
0xF9B9DF6F,
|
||||
0x8EBEEFF9,
|
||||
0x17B7BE43,
|
||||
0x60B08ED5,
|
||||
0xD6D6A3E8,
|
||||
0xA1D1937E,
|
||||
0x38D8C2C4,
|
||||
0x4FDFF252,
|
||||
0xD1BB67F1,
|
||||
0xA6BC5767,
|
||||
0x3FB506DD,
|
||||
0x48B2364B,
|
||||
0xD80D2BDA,
|
||||
0xAF0A1B4C,
|
||||
0x36034AF6,
|
||||
0x41047A60,
|
||||
0xDF60EFC3,
|
||||
0xA867DF55,
|
||||
0x316E8EEF,
|
||||
0x4669BE79,
|
||||
0xCB61B38C,
|
||||
0xBC66831A,
|
||||
0x256FD2A0,
|
||||
0x5268E236,
|
||||
0xCC0C7795,
|
||||
0xBB0B4703,
|
||||
0x220216B9,
|
||||
0x5505262F,
|
||||
0xC5BA3BBE,
|
||||
0xB2BD0B28,
|
||||
0x2BB45A92,
|
||||
0x5CB36A04,
|
||||
0xC2D7FFA7,
|
||||
0xB5D0CF31,
|
||||
0x2CD99E8B,
|
||||
0x5BDEAE1D,
|
||||
0x9B64C2B0,
|
||||
0xEC63F226,
|
||||
0x756AA39C,
|
||||
0x026D930A,
|
||||
0x9C0906A9,
|
||||
0xEB0E363F,
|
||||
0x72076785,
|
||||
0x05005713,
|
||||
0x95BF4A82,
|
||||
0xE2B87A14,
|
||||
0x7BB12BAE,
|
||||
0x0CB61B38,
|
||||
0x92D28E9B,
|
||||
0xE5D5BE0D,
|
||||
0x7CDCEFB7,
|
||||
0x0BDBDF21,
|
||||
0x86D3D2D4,
|
||||
0xF1D4E242,
|
||||
0x68DDB3F8,
|
||||
0x1FDA836E,
|
||||
0x81BE16CD,
|
||||
0xF6B9265B,
|
||||
0x6FB077E1,
|
||||
0x18B74777,
|
||||
0x88085AE6,
|
||||
0xFF0F6A70,
|
||||
0x66063BCA,
|
||||
0x11010B5C,
|
||||
0x8F659EFF,
|
||||
0xF862AE69,
|
||||
0x616BFFD3,
|
||||
0x166CCF45,
|
||||
0xA00AE278,
|
||||
0xD70DD2EE,
|
||||
0x4E048354,
|
||||
0x3903B3C2,
|
||||
0xA7672661,
|
||||
0xD06016F7,
|
||||
0x4969474D,
|
||||
0x3E6E77DB,
|
||||
0xAED16A4A,
|
||||
0xD9D65ADC,
|
||||
0x40DF0B66,
|
||||
0x37D83BF0,
|
||||
0xA9BCAE53,
|
||||
0xDEBB9EC5,
|
||||
0x47B2CF7F,
|
||||
0x30B5FFE9,
|
||||
0xBDBDF21C,
|
||||
0xCABAC28A,
|
||||
0x53B39330,
|
||||
0x24B4A3A6,
|
||||
0xBAD03605,
|
||||
0xCDD70693,
|
||||
0x54DE5729,
|
||||
0x23D967BF,
|
||||
0xB3667A2E,
|
||||
0xC4614AB8,
|
||||
0x5D681B02,
|
||||
0x2A6F2B94,
|
||||
0xB40BBE37,
|
||||
0xC30C8EA1,
|
||||
0x5A05DF1B,
|
||||
0x2D02EF8D,
|
||||
};
|
||||
|
||||
unsigned long CRC16(const unsigned char *buf, int size, int key)
|
||||
{
|
||||
unsigned long ecx = key; //mov ecx, [esp+arg_8]
|
||||
unsigned long eax = ecx; //mov eax, ecx
|
||||
unsigned long edi;
|
||||
|
||||
eax = ~ eax; //not eax
|
||||
eax&=0xFF; //and eax, 0FFh
|
||||
eax=IntArray[eax]; //mov eax, dword_0_10115D38[eax*4] IntArray
|
||||
eax ^= 0x00FFFFFF; //xor eax, 0FFFFFFh
|
||||
int edx = ecx; //mov edx, ecx
|
||||
edx = edx >> 8; //sar edx, 8
|
||||
edx = edx ^ eax; //xor edx, eax
|
||||
eax = eax >> 8; //sar eax, 8
|
||||
edx &= 0xFF; //and edx, 0FFh
|
||||
eax &= 0x00FFFFFF; //and eax, 0FFFFFFh
|
||||
eax ^= IntArray[edx]; //xor eax, dword_0_10115D38[edx*4]
|
||||
edx = ecx; //mov edx, ecx
|
||||
edx = edx >> 0x10; //sar edx, 10h
|
||||
edx ^= eax; //xor edx, eax
|
||||
eax = eax >> 8; //sar eax, 8
|
||||
edx &= 0xFF; //and edx, 0FFh
|
||||
int esi = IntArray[edx]; //mov esi, dword_0_10115D38[edx*4]
|
||||
edx = size; //mov edx, [esp+4+arg_4]
|
||||
eax &= 0x00FFFFFF; //and eax, 0FFFFFFh
|
||||
eax ^= esi; //xor eax, esi
|
||||
ecx = ecx >> 0x18; //sar ecx, 18h
|
||||
ecx ^= eax; //xor ecx, eax
|
||||
ecx &= 0xFF; //and ecx, 0FFh
|
||||
esi = IntArray[ecx]; //mov esi, dword_0_10115D38[ecx*4]
|
||||
ecx = (int)*buf; //mov ecx, [esp+4+arg_0]
|
||||
eax = eax >> 8; //sar eax, 8
|
||||
eax &= 0x00FFFFFF; //and eax, 0FFFFFFh
|
||||
eax ^= esi; //xor eax, esi
|
||||
for(int x = 0; x < size; x++)
|
||||
{ //eax is the crc, ecx is the current part of the buffer
|
||||
int edx = 0; //xor edx, edx
|
||||
edx = buf[x] & 0x00FF; //mov dl, [ecx]
|
||||
|
||||
edx ^= eax; //xor edx, eax
|
||||
eax = eax >> 8; //sar eax, 8
|
||||
edx &= 0xFF; //and edx, 0FFh
|
||||
edi = IntArray[edx]; //mov edi, dword_0_10115D38[edx*4]
|
||||
eax &= 0x00FFFFFF; //and eax, 0FFFFFFh
|
||||
eax ^= edi; //xor eax, edi
|
||||
}
|
||||
return ~eax;
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef _CRC16_H
|
||||
#define _CRC16_H
|
||||
|
||||
unsigned long CRC16(const unsigned char *buf, int size, int key);
|
||||
|
||||
#endif
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#define BASEDIR "./"
|
||||
|
||||
#ifndef DB_INI_FILE
|
||||
|
@ -1,133 +0,0 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "debug.h"
|
||||
#include "Condition.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#include <sys/time.h>
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
/*
|
||||
|
||||
Windows does not support condition variables by default.
|
||||
So we use a simple hack of sleeping in wait() and doing
|
||||
nothing anywhere else.
|
||||
|
||||
some possible places to look for ways to do this:
|
||||
http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
|
||||
|
||||
http://sources.redhat.com/pthreads-win32/
|
||||
http://sources.redhat.com/cgi-bin/cvsweb.cgi/pthreads/pthread_cond_signal.c?rev=1.7&content-type=text/x-cvsweb-markup&cvsroot=pthreads-win32
|
||||
|
||||
*/
|
||||
|
||||
#define CONDITION_HACK_GRANULARITY 4
|
||||
|
||||
|
||||
Condition::Condition()
|
||||
{
|
||||
}
|
||||
|
||||
void Condition::Signal()
|
||||
{
|
||||
}
|
||||
|
||||
void Condition::SignalAll()
|
||||
{
|
||||
}
|
||||
|
||||
void Condition::Wait()
|
||||
{
|
||||
Sleep(CONDITION_HACK_GRANULARITY);
|
||||
}
|
||||
|
||||
Condition::~Condition()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#else //!WIN32
|
||||
|
||||
Condition::Condition()
|
||||
{
|
||||
pthread_cond_init(&cond,NULL);
|
||||
pthread_mutex_init(&mutex,NULL);
|
||||
}
|
||||
|
||||
void Condition::Signal()
|
||||
{
|
||||
pthread_mutex_lock(&mutex);
|
||||
pthread_cond_signal(&cond);
|
||||
pthread_mutex_unlock(&mutex);
|
||||
}
|
||||
|
||||
void Condition::SignalAll()
|
||||
{
|
||||
pthread_mutex_lock(&mutex);
|
||||
pthread_cond_broadcast(&cond);
|
||||
pthread_mutex_unlock(&mutex);
|
||||
}
|
||||
|
||||
void Condition::Wait()
|
||||
{
|
||||
pthread_mutex_lock(&mutex);
|
||||
pthread_cond_wait(&cond,&mutex);
|
||||
pthread_mutex_unlock(&mutex);
|
||||
}
|
||||
|
||||
/*
|
||||
I commented this specifically because I think it might be very
|
||||
difficult to write a windows counterpart to it, so I would like
|
||||
to discourage its use until we can confirm that it can be reasonably
|
||||
implemented on windows.
|
||||
|
||||
bool Condition::TimedWait(unsigned long usec)
|
||||
{
|
||||
struct timeval now;
|
||||
struct timespec timeout;
|
||||
int retcode=0;
|
||||
pthread_mutex_lock(&mutex);
|
||||
gettimeofday(&now,NULL);
|
||||
now.tv_usec+=usec;
|
||||
timeout.tv_sec = now.tv_sec + (now.tv_usec/1000000);
|
||||
timeout.tv_nsec = (now.tv_usec%1000000) *1000;
|
||||
//cout << "now=" << now.tv_sec << "."<<now.tv_usec << endl;
|
||||
//cout << "timeout=" << timeout.tv_sec << "."<<timeout.tv_nsec << endl;
|
||||
retcode=pthread_cond_timedwait(&cond,&mutex,&timeout);
|
||||
pthread_mutex_unlock(&mutex);
|
||||
|
||||
return retcode!=ETIMEDOUT;
|
||||
}
|
||||
*/
|
||||
|
||||
Condition::~Condition()
|
||||
{
|
||||
pthread_mutex_lock(&mutex);
|
||||
pthread_cond_broadcast(&cond);
|
||||
pthread_cond_destroy(&cond);
|
||||
pthread_mutex_unlock(&mutex);
|
||||
pthread_mutex_destroy(&mutex);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __CONDITION_H
|
||||
#define __CONDITION_H
|
||||
|
||||
#ifndef WIN32
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
//Sombody, someday needs to figure out how to implement a condition
|
||||
//system on windows...
|
||||
|
||||
|
||||
class Condition {
|
||||
private:
|
||||
#ifndef WIN32
|
||||
pthread_cond_t cond;
|
||||
pthread_mutex_t mutex;
|
||||
#endif
|
||||
public:
|
||||
Condition();
|
||||
void Signal();
|
||||
void SignalAll();
|
||||
void Wait();
|
||||
// bool TimedWait(unsigned long usec);
|
||||
~Condition();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#include "ConfigReader.h"
|
||||
#include "Log.h"
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef __CONFIG_READER__
|
||||
#define __CONFIG_READER__
|
||||
#include <stdio.h>
|
||||
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "Crypto.h"
|
||||
#include <iostream>
|
||||
#include "../common/packet_dump.h"
|
||||
|
||||
using namespace std;
|
||||
void test();
|
||||
int64 Crypto::RSADecrypt(uchar* text, int16 size){
|
||||
int64 ret = 0;
|
||||
uchar* buffer = new uchar[8];
|
||||
for(int i=7;i>=0;i--)
|
||||
buffer[7-i] = text[i];
|
||||
memcpy(&ret, buffer, 8);
|
||||
safe_delete_array(buffer);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void Crypto::RC4Decrypt(uchar* text, int32 size){
|
||||
MCrypto.lock();
|
||||
client->Cypher(text, size);
|
||||
MCrypto.unlock();
|
||||
}
|
||||
|
||||
void Crypto::RC4Encrypt(uchar* text, int32 size){
|
||||
MCrypto.lock();
|
||||
server->Cypher(text, size);
|
||||
MCrypto.unlock();
|
||||
}
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef __EQ2_DATABUFFER_
|
||||
#define __EQ2_DATABUFFER_
|
||||
#include <string>
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "Log.h"
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef _EQ2COMMON_STRUCTS_
|
||||
#define _EQ2COMMON_STRUCTS_
|
||||
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifdef WIN32
|
||||
#include <WinSock2.h>
|
||||
#include <windows.h>
|
||||
|
@ -1,22 +1,5 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (C) 2007-2025 EQ2EMulator
|
||||
// Licensed under GPL v3
|
||||
#ifndef EQEMuError_H
|
||||
#define EQEMuError_H
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,28 +1,13 @@
|
||||
/*
|
||||
EQ2Emulator: Everquest II Server Emulator
|
||||
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
|
||||
|
||||
This file is part of EQ2Emulator.
|
||||
|
||||
EQ2Emulator 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, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
EQ2Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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 EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// EQ2Emulator: Everquest II Server Emulator
|
||||
// Copyright (C) 2007 EQ2EMulator Development Team
|
||||
// Licensed under GPL v3 - see <http://www.gnu.org/licenses/>
|
||||
#ifndef _EQPACKET_H
|
||||
#define _EQPACKET_H
|
||||
|
||||
#include "types.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <memory>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <time.h>
|
||||
@ -36,59 +21,103 @@
|
||||
#include "op_codes.h"
|
||||
#include "packet_dump.h"
|
||||
|
||||
// Forward declarations
|
||||
class OpcodeManager;
|
||||
|
||||
class EQStream;
|
||||
|
||||
/**
|
||||
* Base class for all EverQuest packet types.
|
||||
* Provides common functionality for packet management, opcode handling,
|
||||
* and network information tracking.
|
||||
*/
|
||||
class EQPacket {
|
||||
friend class EQStream;
|
||||
|
||||
public:
|
||||
unsigned char *pBuffer;
|
||||
uint32 size;
|
||||
uint32 src_ip,dst_ip;
|
||||
uint16 src_port,dst_port;
|
||||
uint32 priority;
|
||||
timeval timestamp;
|
||||
int16 version;
|
||||
// Packet data
|
||||
unsigned char* pBuffer; // Raw packet data buffer
|
||||
uint32 size; // Size of packet data
|
||||
|
||||
// Network information
|
||||
uint32 src_ip, dst_ip; // Source and destination IP addresses
|
||||
uint16 src_port, dst_port; // Source and destination ports
|
||||
uint32 priority; // Packet priority for processing
|
||||
timeval timestamp; // Packet timestamp
|
||||
int16 version; // Protocol version
|
||||
|
||||
~EQPacket();
|
||||
void DumpRawHeader(uint16 seq=0xffff, FILE *to = stdout) const;
|
||||
void DumpRawHeaderNoTime(uint16 seq=0xffff, FILE *to = stdout) const;
|
||||
void DumpRaw(FILE *to = stdout) const;
|
||||
|
||||
// Debug and display methods
|
||||
void DumpRawHeader(uint16 seq = 0xffff, FILE* to = stdout) const;
|
||||
void DumpRawHeaderNoTime(uint16 seq = 0xffff, FILE* to = stdout) const;
|
||||
void DumpRaw(FILE* to = stdout) const;
|
||||
const char* GetOpcodeName();
|
||||
|
||||
void setVersion(int16 new_version){ version = new_version; }
|
||||
void setSrcInfo(uint32 sip, uint16 sport) { src_ip=sip; src_port=sport; }
|
||||
void setDstInfo(uint32 dip, uint16 dport) { dst_ip=dip; dst_port=dport; }
|
||||
void setTimeInfo(uint32 ts_sec, uint32 ts_usec) { timestamp.tv_sec=ts_sec; timestamp.tv_usec=ts_usec; }
|
||||
void copyInfo(const EQPacket *p) { src_ip=p->src_ip; src_port=p->src_port; dst_ip=p->dst_ip; dst_port=p->dst_port; timestamp.tv_sec=p->timestamp.tv_sec; timestamp.tv_usec=p->timestamp.tv_usec; }
|
||||
uint32 Size() const { return size+2; }
|
||||
|
||||
//no reason to have this method in zone or world
|
||||
|
||||
uint16 GetRawOpcode() const { return(opcode); }
|
||||
|
||||
|
||||
inline bool operator<(const EQPacket &rhs) {
|
||||
return (timestamp.tv_sec < rhs.timestamp.tv_sec || (timestamp.tv_sec==rhs.timestamp.tv_sec && timestamp.tv_usec < rhs.timestamp.tv_usec));
|
||||
// Packet information setters
|
||||
void setVersion(int16 new_version) { version = new_version; }
|
||||
void setSrcInfo(uint32 sip, uint16 sport) { src_ip = sip; src_port = sport; }
|
||||
void setDstInfo(uint32 dip, uint16 dport) { dst_ip = dip; dst_port = dport; }
|
||||
void setTimeInfo(uint32 ts_sec, uint32 ts_usec) {
|
||||
timestamp.tv_sec = ts_sec;
|
||||
timestamp.tv_usec = ts_usec;
|
||||
}
|
||||
void SetProtocolOpcode(int16 new_opcode){
|
||||
|
||||
// Copy network and timing info from another packet
|
||||
void copyInfo(const EQPacket* p) {
|
||||
src_ip = p->src_ip;
|
||||
src_port = p->src_port;
|
||||
dst_ip = p->dst_ip;
|
||||
dst_port = p->dst_port;
|
||||
timestamp.tv_sec = p->timestamp.tv_sec;
|
||||
timestamp.tv_usec = p->timestamp.tv_usec;
|
||||
}
|
||||
|
||||
// Get total packet size including opcode
|
||||
uint32 Size() const { return size + 2; }
|
||||
|
||||
// Get raw opcode value
|
||||
uint16 GetRawOpcode() const { return opcode; }
|
||||
|
||||
// Comparison operator for timestamp-based sorting
|
||||
bool operator<(const EQPacket& rhs) const {
|
||||
return (timestamp.tv_sec < rhs.timestamp.tv_sec ||
|
||||
(timestamp.tv_sec == rhs.timestamp.tv_sec &&
|
||||
timestamp.tv_usec < rhs.timestamp.tv_usec));
|
||||
}
|
||||
|
||||
// Set the protocol opcode
|
||||
void SetProtocolOpcode(int16 new_opcode) {
|
||||
opcode = new_opcode;
|
||||
}
|
||||
|
||||
protected:
|
||||
uint16 opcode;
|
||||
|
||||
EQPacket(const uint16 op, const unsigned char *buf, const uint32 len);
|
||||
EQPacket(const EQPacket &p) { version = 0; }
|
||||
EQPacket() { opcode=0; pBuffer=NULL; size=0; version = 0; setTimeInfo(0, 0); }
|
||||
|
||||
uint16 opcode; // Packet opcode
|
||||
|
||||
// Constructors (protected to enforce proper inheritance)
|
||||
EQPacket(uint16 op, const unsigned char* buf, uint32 len);
|
||||
EQPacket(const EQPacket& p) { version = 0; }
|
||||
EQPacket() {
|
||||
opcode = 0;
|
||||
pBuffer = nullptr;
|
||||
size = 0;
|
||||
version = 0;
|
||||
setTimeInfo(0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
// Forward declaration
|
||||
class EQApplicationPacket;
|
||||
|
||||
/**
|
||||
* Protocol-level packet class for EverQuest network communication.
|
||||
* Handles low-level protocol features like compression, encryption,
|
||||
* sequencing, and packet combining.
|
||||
*/
|
||||
class EQProtocolPacket : public EQPacket {
|
||||
public:
|
||||
EQProtocolPacket(uint16 op, const unsigned char *buf, uint32 len) : EQPacket(op,buf,len) {
|
||||
// Constructor with opcode and buffer
|
||||
EQProtocolPacket(uint16 op, const unsigned char* buf, uint32 len)
|
||||
: EQPacket(op, buf, len) {
|
||||
eq2_compressed = false;
|
||||
packet_prepared = false;
|
||||
packet_encrypted = false;
|
||||
@ -96,110 +125,182 @@ public:
|
||||
sent_time = 0;
|
||||
attempt_count = 0;
|
||||
acked = false;
|
||||
}
|
||||
EQProtocolPacket(const unsigned char *buf, uint32 len, int in_opcode = -1);
|
||||
bool combine(const EQProtocolPacket *rhs);
|
||||
uint32 serialize (unsigned char *dest, int8 offset = 0) const;
|
||||
static bool ValidateCRC(const unsigned char *buffer, int length, uint32 Key);
|
||||
static uint32 Decompress(const unsigned char *buffer, const uint32 length, unsigned char *newbuf, uint32 newbufsize);
|
||||
static uint32 Compress(const unsigned char *buffer, const uint32 length, unsigned char *newbuf, uint32 newbufsize);
|
||||
static void ChatDecode(unsigned char *buffer, int size, int DecodeKey);
|
||||
static void ChatEncode(unsigned char *buffer, int size, int EncodeKey);
|
||||
}
|
||||
|
||||
// Constructor from raw buffer with optional opcode override
|
||||
EQProtocolPacket(const unsigned char* buf, uint32 len, int in_opcode = -1);
|
||||
|
||||
// Packet manipulation methods
|
||||
bool combine(const EQProtocolPacket* rhs);
|
||||
uint32 serialize(unsigned char* dest, int8 offset = 0) const;
|
||||
|
||||
// Static utility methods for packet processing
|
||||
static bool ValidateCRC(const unsigned char* buffer, int length, uint32 Key);
|
||||
static uint32 Decompress(const unsigned char* buffer, uint32 length,
|
||||
unsigned char* newbuf, uint32 newbufsize);
|
||||
static uint32 Compress(const unsigned char* buffer, uint32 length,
|
||||
unsigned char* newbuf, uint32 newbufsize);
|
||||
static void ChatDecode(unsigned char* buffer, int size, int DecodeKey);
|
||||
static void ChatEncode(unsigned char* buffer, int size, int EncodeKey);
|
||||
static bool IsProtocolPacket(const unsigned char* in_buff, uint32_t len, bool bTrimCRC);
|
||||
|
||||
EQProtocolPacket *Copy() {
|
||||
EQProtocolPacket* new_packet = new EQProtocolPacket(opcode,pBuffer,size);
|
||||
|
||||
// Create a copy of this packet
|
||||
EQProtocolPacket* Copy() {
|
||||
auto new_packet = new EQProtocolPacket(opcode, pBuffer, size);
|
||||
new_packet->eq2_compressed = this->eq2_compressed;
|
||||
new_packet->packet_prepared = this->packet_prepared;
|
||||
new_packet->packet_encrypted = this->packet_encrypted;
|
||||
return new_packet;
|
||||
}
|
||||
EQApplicationPacket *MakeApplicationPacket(uint8 opcode_size=0) const;
|
||||
bool eq2_compressed;
|
||||
bool packet_prepared;
|
||||
bool packet_encrypted;
|
||||
bool acked;
|
||||
int32 sent_time;
|
||||
int8 attempt_count;
|
||||
int32 sequence;
|
||||
|
||||
// Convert to application-level packet
|
||||
EQApplicationPacket* MakeApplicationPacket(uint8 opcode_size = 0) const;
|
||||
|
||||
// Protocol packet state flags
|
||||
bool eq2_compressed; // Packet is compressed
|
||||
bool packet_prepared; // Packet has been prepared for sending
|
||||
bool packet_encrypted; // Packet is encrypted
|
||||
bool acked; // Packet has been acknowledged
|
||||
|
||||
// Reliability and sequencing
|
||||
int32 sent_time; // Timestamp when packet was sent
|
||||
int8 attempt_count; // Number of send attempts
|
||||
int32 sequence; // Sequence number for ordering
|
||||
|
||||
private:
|
||||
EQProtocolPacket(const EQProtocolPacket &p) { }
|
||||
//bool dont_combine;
|
||||
// Prevent copy construction
|
||||
EQProtocolPacket(const EQProtocolPacket& p) = delete;
|
||||
EQProtocolPacket& operator=(const EQProtocolPacket& p) = delete;
|
||||
};
|
||||
|
||||
/**
|
||||
* EverQuest 2 specific packet class.
|
||||
* Handles EQ2-specific packet operations like application combining
|
||||
* and login opcode management.
|
||||
*/
|
||||
class EQ2Packet : public EQProtocolPacket {
|
||||
public:
|
||||
EQ2Packet(const EmuOpcode in_login_op, const unsigned char *buf, uint32 len) : EQProtocolPacket(OP_Packet,buf,len){
|
||||
// Constructor with EQ2 login opcode
|
||||
EQ2Packet(EmuOpcode in_login_op, const unsigned char* buf, uint32 len)
|
||||
: EQProtocolPacket(OP_Packet, buf, len) {
|
||||
login_op = in_login_op;
|
||||
eq2_compressed = false;
|
||||
packet_prepared = false;
|
||||
packet_encrypted = false;
|
||||
}
|
||||
|
||||
// EQ2-specific packet operations
|
||||
bool AppCombine(EQ2Packet* rhs);
|
||||
int8 PreparePacket(int16 MaxLen);
|
||||
const char* GetOpcodeName();
|
||||
|
||||
// Create a copy of this EQ2 packet
|
||||
EQ2Packet* Copy() {
|
||||
EQ2Packet* new_packet = new EQ2Packet(login_op,pBuffer,size);
|
||||
auto new_packet = new EQ2Packet(login_op, pBuffer, size);
|
||||
new_packet->eq2_compressed = this->eq2_compressed;
|
||||
new_packet->packet_prepared = this->packet_prepared;
|
||||
new_packet->packet_encrypted = this->packet_encrypted;
|
||||
return new_packet;
|
||||
}
|
||||
int8 PreparePacket(int16 MaxLen);
|
||||
const char* GetOpcodeName();
|
||||
EmuOpcode login_op;
|
||||
|
||||
EmuOpcode login_op; // EQ2 login/application opcode
|
||||
};
|
||||
|
||||
/**
|
||||
* Application-level packet class for EverQuest.
|
||||
* Handles high-level game opcodes and application data.
|
||||
* This is the main packet type used by game logic.
|
||||
*/
|
||||
class EQApplicationPacket : public EQPacket {
|
||||
friend class EQProtocolPacket;
|
||||
friend class EQStream;
|
||||
|
||||
public:
|
||||
EQApplicationPacket() : EQPacket(0,NULL,0) { emu_opcode = OP_Unknown; app_opcode_size=default_opcode_size; }
|
||||
EQApplicationPacket(const EmuOpcode op) : EQPacket(0,NULL,0) { SetOpcode(op); app_opcode_size=default_opcode_size; }
|
||||
EQApplicationPacket(const EmuOpcode op, const uint32 len) : EQPacket(0,NULL,len) { SetOpcode(op); app_opcode_size=default_opcode_size; }
|
||||
EQApplicationPacket(const EmuOpcode op, const unsigned char *buf, const uint32 len) : EQPacket(0,buf,len) { SetOpcode(op); app_opcode_size=default_opcode_size; }
|
||||
bool combine(const EQApplicationPacket *rhs);
|
||||
uint32 serialize (unsigned char *dest) const;
|
||||
uint32 Size() const { return size+app_opcode_size; }
|
||||
EQApplicationPacket *Copy() const {
|
||||
EQApplicationPacket *it = new EQApplicationPacket;
|
||||
// Default constructor
|
||||
EQApplicationPacket() : EQPacket(0, nullptr, 0) {
|
||||
emu_opcode = OP_Unknown;
|
||||
app_opcode_size = default_opcode_size;
|
||||
}
|
||||
|
||||
// Constructor with opcode only
|
||||
EQApplicationPacket(EmuOpcode op) : EQPacket(0, nullptr, 0) {
|
||||
SetOpcode(op);
|
||||
app_opcode_size = default_opcode_size;
|
||||
}
|
||||
|
||||
// Constructor with opcode and size
|
||||
EQApplicationPacket(EmuOpcode op, uint32 len) : EQPacket(0, nullptr, len) {
|
||||
SetOpcode(op);
|
||||
app_opcode_size = default_opcode_size;
|
||||
}
|
||||
|
||||
// Constructor with opcode, buffer, and size
|
||||
EQApplicationPacket(EmuOpcode op, const unsigned char* buf, uint32 len)
|
||||
: EQPacket(0, buf, len) {
|
||||
SetOpcode(op);
|
||||
app_opcode_size = default_opcode_size;
|
||||
}
|
||||
|
||||
// Packet operations
|
||||
bool combine(const EQApplicationPacket* rhs);
|
||||
uint32 serialize(unsigned char* dest) const;
|
||||
uint32 Size() const { return size + app_opcode_size; }
|
||||
|
||||
// Create a deep copy of this packet
|
||||
EQApplicationPacket* Copy() const {
|
||||
auto it = std::make_unique<EQApplicationPacket>();
|
||||
try {
|
||||
it->pBuffer= new unsigned char[size];
|
||||
memcpy(it->pBuffer,pBuffer,size);
|
||||
it->size=size;
|
||||
if (size > 0) {
|
||||
it->pBuffer = new unsigned char[size];
|
||||
memcpy(it->pBuffer, pBuffer, size);
|
||||
}
|
||||
it->size = size;
|
||||
it->opcode = opcode;
|
||||
it->emu_opcode = emu_opcode;
|
||||
it->version = version;
|
||||
return(it);
|
||||
return it.release();
|
||||
}
|
||||
catch( bad_alloc &ba )
|
||||
{
|
||||
cout << ba.what() << endl;
|
||||
if( NULL != it )
|
||||
delete it;
|
||||
catch (const std::bad_alloc& ba) {
|
||||
// Memory allocation failed - return nullptr
|
||||
return nullptr;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void SetOpcodeSize(uint8 s) { app_opcode_size=s; }
|
||||
// Opcode management
|
||||
void SetOpcodeSize(uint8 s) { app_opcode_size = s; }
|
||||
void SetOpcode(EmuOpcode op);
|
||||
const EmuOpcode GetOpcodeConst() const;
|
||||
inline const EmuOpcode GetOpcode() const { return(GetOpcodeConst()); }
|
||||
//caching version of get
|
||||
inline const EmuOpcode GetOpcode() { EmuOpcode r = GetOpcodeConst(); emu_opcode = r; return(r); }
|
||||
|
||||
|
||||
// Get opcode (const version)
|
||||
const EmuOpcode GetOpcode() const { return GetOpcodeConst(); }
|
||||
|
||||
// Get opcode (caching version for performance)
|
||||
EmuOpcode GetOpcode() {
|
||||
EmuOpcode r = GetOpcodeConst();
|
||||
emu_opcode = r;
|
||||
return r;
|
||||
}
|
||||
|
||||
// Default opcode size for all application packets
|
||||
static uint8 default_opcode_size;
|
||||
|
||||
protected:
|
||||
//this is just a cache so we dont look it up several times on Get()
|
||||
// Cached emulator opcode to avoid repeated lookups
|
||||
EmuOpcode emu_opcode;
|
||||
|
||||
private:
|
||||
//this constructor should only be used by EQProtocolPacket, as it
|
||||
//assumes the first two bytes of buf are the opcode.
|
||||
EQApplicationPacket(const unsigned char *buf, uint32 len, uint8 opcode_size=0);
|
||||
EQApplicationPacket(const EQApplicationPacket &p) { emu_opcode = OP_Unknown; app_opcode_size=default_opcode_size; }
|
||||
|
||||
// Constructor used by EQProtocolPacket - assumes first bytes are opcode
|
||||
EQApplicationPacket(const unsigned char* buf, uint32 len, uint8 opcode_size = 0);
|
||||
|
||||
// Prevent copy construction
|
||||
EQApplicationPacket(const EQApplicationPacket& p) = delete;
|
||||
EQApplicationPacket& operator=(const EQApplicationPacket& p) = delete;
|
||||
|
||||
// Size of the opcode in bytes (1 or 2)
|
||||
uint8 app_opcode_size;
|
||||
};
|
||||
|
||||
// Packet debugging and display functions
|
||||
void DumpPacketHex(const EQApplicationPacket* app);
|
||||
void DumpPacket(const EQProtocolPacket* app);
|
||||
void DumpPacketAscii(const EQApplicationPacket* app);
|
||||
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user