Raw l2c_RequestBypassToServer() and l2c_RequestLinkHtml() functions to send raw bypasses to server

This commit is contained in:
alexey.min
2012-05-13 19:39:14 +00:00
parent 75afe64b36
commit 5be9cb1c61
3 changed files with 33 additions and 0 deletions

View File

@@ -138,3 +138,32 @@ int l2c_npcDlgExists( lua_State *L )
return 1;
}
// l2c_RequestBypassToServer( string bypass )
int l2c_RequestBypassToServer( lua_State *L )
{
int nArgs = lua_gettop( L );
if( nArgs < 1 ) return 0;
if( !g_game_client ) return 0;
const char *abypass = lua_tolstring( L, 1, NULL );
if( !abypass ) return 0;
wchar_t wsz[512];
MultiByteToWideChar( CP_ACP, 0, abypass, -1, wsz, 511 );
PGen_RequestBypassToserver( wsz );
return 0;
}
// l2c_RequestLinkHtml( string link )
int l2c_RequestLinkHtml( lua_State *L )
{
int nArgs = lua_gettop( L );
if( nArgs < 1 ) return 0;
if( !g_game_client ) return 0;
const char *abypass = lua_tolstring( L, 1, NULL );
if( !abypass ) return 0;
wchar_t wsz[512];
MultiByteToWideChar( CP_ACP, 0, abypass, -1, wsz, 511 );
PGen_RequestLinkHtml( wsz );
return 0;
}