Skip to content

Commit

Permalink
- Disabled download of cell.dat data from the server.
Browse files Browse the repository at this point in the history
  • Loading branch information
bDekaru committed Mar 27, 2018
1 parent aaa36b1 commit 4f6af88
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 38 deletions.
10 changes: 5 additions & 5 deletions Classic Dereth.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetName>PhatAC - Classic Dereth - Debug</TargetName>
<TargetName>GDL - Classic Dereth - Debug</TargetName>
<OutDir>$(SolutionDir)\Bin\</OutDir>
<IntDir>Intermediate\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetName>PhatAC - Classic Dereth</TargetName>
<TargetName>GDL - Classic Dereth</TargetName>
<OutDir>$(SolutionDir)\Bin\</OutDir>
<IntDir>Intermediate\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
Expand All @@ -160,7 +160,7 @@
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\Bin\</OutDir>
<IntDir>Intermediate\$(Platform)\$(Configuration)\</IntDir>
<TargetName>PhatAC - Classic Dereth - Debug</TargetName>
<TargetName>GDL - Classic Dereth - Debug</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)\Bin\</OutDir>
Expand All @@ -176,13 +176,13 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>PhatAC - Classic Dereth</TargetName>
<TargetName>GDL - Classic Dereth</TargetName>
<OutDir>$(SolutionDir)\Bin\</OutDir>
<IntDir>Intermediate\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Public|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>PhatAC - Classic Dereth</TargetName>
<TargetName>GDL - Classic Dereth</TargetName>
<OutDir>$(SolutionDir)\Bin\</OutDir>
<IntDir>Intermediate\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions Resource/PhatAC.rc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ END
IDD_MAIN DIALOGEX 0, 0, 431, 292
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_STATICEDGE
CAPTION "PhatAC - Classic Dereth"
CAPTION "GDL - Classic Dereth"
MENU IDR_MENU
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
Expand Down Expand Up @@ -115,7 +115,7 @@ END

IDD_ABOUT DIALOGEX 0, 0, 255, 152
STYLE DS_SETFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION
CAPTION "About PhatAC - Classic Dereth"
CAPTION "About GDL - Classic Dereth"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Close",IDOK,198,130,50,14
Expand Down Expand Up @@ -257,7 +257,7 @@ BEGIN
BLOCK "040004b0"
BEGIN
VALUE "FileVersion", "1.0.0.0"
VALUE "ProductName", "PhatAC - Classic Dereth"
VALUE "ProductName", "GDL - Classic Dereth"
VALUE "ProductVersion", "1.0.0.0"
END
END
Expand Down
42 changes: 23 additions & 19 deletions Source/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1238,25 +1238,29 @@ void CClient::ProcessMessage(BYTE *data, DWORD length, WORD group)
DWORD dwFileID = in.ReadDWORD();
if (in.GetLastError()) break;

switch (dwFileClass)
{
default:
LOG(Client, Warning, "Unknown download request: %08X %d\n", dwFileID, dwFileClass);
break;

case 1:
{
SendLandblock(dwFileID); // 1 is landblock 0xFFFF
break;
}
case 2:
SendLandblockInfo(dwFileID); // 2 is landblock environemnt 0xFFFE
break;

case 3:
SendLandcell(dwFileID); // 0x100+
break;
}
//disabled downloading files.
m_pEvents->SendText("Your client is requesting map data from the server. This feature is disabled to preserve bandwidth", LTT_DEFAULT);
m_pEvents->SendText("If you are stuck in portal mode, type /render radius 5 to escape. Make sure you are using the approppriate cell.dat file!", LTT_DEFAULT);

//switch (dwFileClass)
//{
//default:
// LOG(Client, Warning, "Unknown download request: %08X %d\n", dwFileID, dwFileClass);
// break;

//case 1:
//{
// SendLandblock(dwFileID); // 1 is landblock 0xFFFF
// break;
//}
//case 2:
// SendLandblockInfo(dwFileID); // 2 is landblock environemnt 0xFFFE
// break;

//case 3:
// SendLandcell(dwFileID); // 0x100+
// break;
//}
}

break;
Expand Down
4 changes: 2 additions & 2 deletions Source/ClientEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ void CClientEvents::LoginCharacter(DWORD char_weenie_id, const char *szAccount)
{
BinaryWriter popupString;
popupString.Write<DWORD>(4);
popupString.WriteString(g_pConfig->WelcomePopup()); // "Welcome to PhatAC! Visit our website at: http://PhatAC.com/"
popupString.WriteString(g_pConfig->WelcomePopup()); // "Welcome to GDL - Classic Dereth!"
m_pPlayer->SendNetMessage(&popupString, PRIVATE_MSG, FALSE, FALSE);
}
*/

m_pPlayer->SendText("PhatAC - Classic Dereth " SERVER_VERSION_NUMBER_STRING " " SERVER_VERSION_STRING, LTT_DEFAULT);
m_pPlayer->SendText("GDL - Classic Dereth " SERVER_VERSION_NUMBER_STRING " " SERVER_VERSION_STRING, LTT_DEFAULT);
m_pPlayer->SendText("Powered by GamesDeadLol. Not an official Asheron's Call server.", LTT_DEFAULT);

/*
Expand Down
10 changes: 5 additions & 5 deletions Source/PhatAC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ LRESULT CALLBACK AboutProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
switch (message)
{
case WM_INITDIALOG:
SetWindowText(GetDlgItem(hDlg, IDC_CREDITS), "PhatAC - Classic Dereth " SERVER_VERSION_NUMBER_STRING "\n" SERVER_VERSION_STRING "\n\nClassic Dereth created by Dekaru (dekaru@protonmail.com)\nhttps://github.com/bDekaru/ClassicDereth\n\nBased on the GamesDeadLol Server project.\nhttps://github.com/GamesDeadLol/GDL\n\nPhatAC originally created by Pea and halted in September 2017.\n\nPhatAC was created in C++ and compiled with Visual Studio. Third-party libraries used include zlib, SHA512 and ISAAC algorithms.");
SetWindowText(GetDlgItem(hDlg, IDC_CREDITS), "GDL - Classic Dereth " SERVER_VERSION_NUMBER_STRING "\n" SERVER_VERSION_STRING "\n\nClassic Dereth created by Dekaru (dekaru@protonmail.com)\nhttps://github.com/bDekaru/ClassicDereth\n\nBased on the GamesDeadLol Server project.\nhttps://github.com/GamesDeadLol/GDL\n\nPhatAC originally created by Pea and halted in September 2017.\n\nPhatAC was created in C++ and compiled with Visual Studio. Third-party libraries used include zlib, SHA512 and ISAAC algorithms.");
// SetWindowText(GetDlgItem(hDlg, IDC_PACKETCREDITS), PACKET_CAPTURE_CREDITS);
return TRUE;

Expand Down Expand Up @@ -207,7 +207,7 @@ LRESULT CALLBACK LauncherProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa

if (!FileExists(((std::string)szLaunchDir + "\\acclient.exe").c_str()))
{
MsgBox("Please copy your Asheron's Call client to the Client folder of PhatAC.\r\n");
MsgBox("Please copy your Asheron's Call client to the Client folder.\r\n");
}
else
{
Expand Down Expand Up @@ -306,7 +306,7 @@ INT_PTR CALLBACK MainProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
g_Logger.AddLogCallback(OutputConsole);

HWND hVersion = GetDlgItem(hDlg, IDC_VERSION);
SetWindowText(hVersion, "PhatAC - Classic Dereth " SERVER_VERSION_NUMBER_STRING " " SERVER_VERSION_STRING); // "PhatAC compiled " __TIMESTAMP__);
SetWindowText(hVersion, "GDL - Classic Dereth " SERVER_VERSION_NUMBER_STRING " " SERVER_VERSION_STRING); // "PhatAC compiled " __TIMESTAMP__);

HICON hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_PHATAC));
SendMessage(hDlg, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
Expand Down Expand Up @@ -423,7 +423,7 @@ INT_PTR CALLBACK MainProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)

if (!FileExists(((std::string)szLaunchDir + "\\acclient.exe").c_str()))
{
MsgBox("Please copy your Asheron's Call client to the Client folder of PhatAC.\r\n");
MsgBox("Please copy your Asheron's Call client to the Client folder.\r\n");
}
else
{
Expand Down Expand Up @@ -550,7 +550,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
extern DWORD64 g_RandomAdminPassword;
g_RandomAdminPassword = ((DWORD64)Random::GenUInt(0, 0xFFFFFFF0) << 32) | Random::GenUInt(0, 0xFFFFFFF0) + GetTickCount64();

LOG(UserInterface, Normal, "Welcome to PhatAC - Classic Dereth!\n");
LOG(UserInterface, Normal, "Welcome to GDL - Classic Dereth!\n");

ShowWindow(g_hWndMain, nCmdShow);

Expand Down
2 changes: 1 addition & 1 deletion Source/ServerAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ DWORD WINAPI MainServerThread(LPVOID)
extern DWORD64 g_RandomAdminPassword;
g_RandomAdminPassword = ((DWORD64)Random::GenUInt(0, 0xFFFFFFF0) << 32) | Random::GenUInt(0, 0xFFFFFFF0);

LOG(UserInterface, Normal, "Welcome to PhatAC - Classic Dereth!\n");
LOG(UserInterface, Normal, "Welcome to GDL - Classic Dereth!\n");

unsigned long serverIP = GetLocalIP();
int serverPort = 9050;
Expand Down
6 changes: 3 additions & 3 deletions Source/Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ void MsgBox(UINT type, const char *format, ...)

HWND hWnd = g_pGlobals ? g_pGlobals->GetWindowHandle() : NULL;

MessageBox(hWnd, szWriteBuffer, "PhatAC", MB_OK | type);
MessageBox(hWnd, szWriteBuffer, "GDL", MB_OK | type);
}

void MsgBox(const char *format, ...)
Expand All @@ -423,7 +423,7 @@ void MsgBox(const char *format, ...)
_vsnprintf(szWriteBuffer, 1024, format, args);
va_end(args);

MessageBox(NULL, szWriteBuffer, "PhatAC", MB_OK);
MessageBox(NULL, szWriteBuffer, "GDL", MB_OK);
}

void MsgBoxError(DWORD dwError, const char* event)
Expand All @@ -446,7 +446,7 @@ void MsgBoxError(DWORD dwError, const char* event)
LocalFree(lpMsgBuf);
}

#define REGLOC HKEY_LOCAL_MACHINE, "Software\\PhatAC"
#define REGLOC HKEY_LOCAL_MACHINE, "Software\\GDL"

BOOL SaveConfigKey(const char* Key, DWORD value)
{
Expand Down

0 comments on commit 4f6af88

Please sign in to comment.