void CAuthD::SaveUserDataAndLogout(int nAccountID,int nUnk1,int nUnk2)
{
typedef void (CAuthD::*t)(int,int,int);
SET_INSTANCE_METHOD_ADDR(t, 0x45C00CL);
CALL_INSTANCE_METHOD(nAccountID,nUnk1,nUnk2);
}
void CAuthD::RequestLogout(int nAccountID,int nUnk1,int nUnk2)
{
typedef void (CAuthD::*t)(int,int,int);
SET_INSTANCE_METHOD_ADDR(t, 0x45BE50L);
CALL_INSTANCE_METHOD(nAccountID,nUnk1,nUnk2);
}
bool CAuthD::OnRequestLogin(wchar_t * sAccountName,int nAccountID,int nGameSessionID,int nAccountID2,int nAuthSessionID,CUserSocket *pSocket)
{
TLS_TRACE_FUNCTION;
if(nGameSessionID == 0 || nAuthSessionID == 0 || nAccountID != nAccountID2)
{
CLog::Add(CLog::red,L"Wrong account session! account_id(%d) GameSessionID[%d] AccountID2[%d] AuthSessionID[%d]",nAccountID,nGameSessionID,nAccountID2,nAuthSessionID);
pSocket->ForceClose(6);
return false;
}
g_AuthSessionLock->WriteLock(__WFILE__,__LINE__);
bool bSessionError = false;
IntIntMap::iterator iter = g_AuthAccountSessionMap->find(nAccountID);
if(iter != g_AuthAccountSessionMap->end())
{
if (nGameSessionID != iter->second)
{
bSessionError = true;
CLog::Add(CLog::red,L"Wrong account session! account_id(%d) session[%d] != [%d]",nAccountID,nGameSessionID,iter->second);
}
}
else
{
bSessionError = true;
CLog::Add(CLog::red,L"Account session not found! account_id(%d) session[%d]",nAccountID,nGameSessionID);
}
g_AuthSessionLock->WriteUnlock();
if(bSessionError)
{
pSocket->ForceClose(6);
return false;
}
CPremiumService::I()->RequestPremiumState(pSocket->GetSocketUID(), nAccountID);
typedef bool (CAuthD::*t)(wchar_t *,int,int,int,int,CUserSocket *);
SET_INSTANCE_METHOD_ADDR(t, 0x45B648L);
return CALL_INSTANCE_METHOD(sAccountName,nAccountID,nGameSessionID,nAccountID2,nAuthSessionID,pSocket);
}
hfdll.dll have this