Files
Leviathan/Client/Game/game/Interface/SUIIPBlockWnd.cpp
T
2026-06-01 12:46:52 +02:00

69 lines
1.7 KiB
C++

#include "stdafx.h"
#include "SGameManager.h"
#include "SUIIPBlockWnd.h"
//#include "SGameMessageUI.h"
#include "SMessage.h"
#include "SStringDB.h"
#include <toolkit/XEnv.h>
#include <shellapi.h>
#include "SDebug_Util.h"
void SUIIPBlockWnd::OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd/* = true*/ )
{
SUIWnd::OnNotifyUIWindowOpen( bOpen, bLimitWnd );
}
bool SUIIPBlockWnd::InitControls( KPoint kPos )
{
return SUIWnd::InitControls( kPos );
}
void SUIIPBlockWnd::PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam )
{
switch( nMessage )
{
case KUI_MESSAGE::KBUTTON_CLICK:
{
if( 0 == ::_stricmp( "button_ok", lpszControlID ) )
{
m_pGameManager->InterfaceMsg( &SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_IP_BLOCK, false, true ) );
}
else if( 0 == ::_stricmp( "button_cancel", lpszControlID ) )
{
//std::string strUrl = ENV().GetString( "ipblock_info_url", "http://www.rappelz.com" );
std::string strUrl = ENV().GetString( "ipblock_info_url", "http://127.0.0.1/nothing" ); // Fraun nullifying gala spyware asscans 7/12/2025
ShellExecute( NULL, NULL, "iexplore.exe", strUrl.c_str(), NULL, SW_SHOWMAXIMIZED );
}
}
break;
}
SUIWnd::PumpUpMessage( lpszControlID, nMessage, lparam, wparam );
}
void* SUIIPBlockWnd::Perform( KID id, KArg& msg )
{
_CID( updateIPBlockWnd );
if( id == id_updateIPBlockWnd )
{
int nError = msg.by<int> ( KID( "error_code" ) );
switch ( nError )
{
case 1 : SetChildCaption( "static_msg", S( 2901 ) ); break;
case 2 : SetChildCaption( "static_msg", S( 2902 ) ); break;
default : SetChildCaption( "static_msg", S( 2903 ) ); break;
}
return NULL;
}
return SUIWnd::Perform( id, msg );
}