Intercept conect on start again
l2c_getUserSkills() done (usage example in sources)
This commit is contained in:
parent
070dc51e92
commit
4c4ea452d7
@ -195,7 +195,7 @@ DWORD WINAPI UserAI::UserAIThread( LPVOID lpParam )
|
||||
}
|
||||
}
|
||||
if( shouldExit ) break;
|
||||
if( !was_message ) Sleep( 250 );
|
||||
if( !was_message ) Sleep( 100 );
|
||||
|
||||
// process all L2Character moves in visible area, also process user move
|
||||
// process buff ticks, skill reuses
|
||||
|
@ -159,6 +159,7 @@ void UserSkills::parse_SkillList( L2GamePacket *p )
|
||||
s.isEnchanted = p->readChar(); // writeC(temp.enchanted ? 1 : 0);
|
||||
addSkill( &s );
|
||||
}
|
||||
log_error( LOG_USERAI, "UserSkills::parse_SkillList(): %d skills parsed\n", nSkills );
|
||||
}
|
||||
|
||||
void UserSkills::parse_SkillCoolTime( L2GamePacket *p )
|
||||
|
@ -124,12 +124,12 @@ DWORD WINAPI DllThread(LPVOID lpParam)
|
||||
log_error( LOG_WARNING, "Maybe we're running in GameGuard protected program?\n" );
|
||||
log_error( LOG_WARNING, "Be careful!\n" );
|
||||
}
|
||||
//Hook_InterceptConnect_my();
|
||||
//if( !Hook_ValidateInterception_my() )
|
||||
//{
|
||||
// log_error( LOG_ERROR, "Seems like my try to intercept ws2_32.dll!connect() failed.\n" );
|
||||
// log_error( LOG_ERROR, "All network connections will not be intercepted!\n" );
|
||||
//}
|
||||
Hook_InterceptConnect_my();
|
||||
if( !Hook_ValidateInterception_my() )
|
||||
{
|
||||
log_error( LOG_ERROR, "Seems like my try to intercept ws2_32.dll!connect() failed.\n" );
|
||||
log_error( LOG_ERROR, "All network connections will not be intercepted!\n" );
|
||||
}
|
||||
//Hook_InterceptConnect_Dis(); // this unused..
|
||||
#ifdef _MSC_VER
|
||||
}
|
||||
|
@ -57,12 +57,21 @@ int l2c_isCastingNow( lua_State *L )
|
||||
|
||||
|
||||
// table l2c_getUserSkills()
|
||||
/*
|
||||
local sk = l2c_getUserSkills();
|
||||
local sks = #sk;
|
||||
l2h_print( sks, " skills found.\n" );
|
||||
local i = 0;
|
||||
for i=1,sks do
|
||||
l2h_print( i, ": ", sk[i].skillId, " - ", sk[i].skillName, "\n" );
|
||||
end
|
||||
*/
|
||||
int l2c_getUserSkills( lua_State *L )
|
||||
{
|
||||
if( !g_game_client ) { lua_pushboolean( L, 0 ); return 1; }
|
||||
UserSkills *sk = &(g_game_client->ai.skills);
|
||||
//
|
||||
int tableIndex = 0;
|
||||
int tableIndex = 1;
|
||||
lua_createtable( L, 0, 0 );
|
||||
int i = 0;
|
||||
char skillName[255] = {0};
|
||||
@ -81,7 +90,16 @@ int l2c_getUserSkills( lua_State *L )
|
||||
lua_pushstring( L, skillName );
|
||||
lua_settable( L, -3 );
|
||||
//
|
||||
lua_pushstring( L, "isActive" );
|
||||
lua_pushinteger( L, sk->skill[i].isPassive ? 0 : 1 );
|
||||
lua_settable( L, -3 );
|
||||
//
|
||||
lua_pushstring( L, "level" );
|
||||
lua_pushinteger( L, sk->skill[i].level );
|
||||
lua_settable( L, -3 );
|
||||
//
|
||||
lua_settable( L, -3 );
|
||||
tableIndex++;
|
||||
}
|
||||
//
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user