Hello guys,
I have a strange problem with the info drop system which is supposed to show every drops a monster can have on a window.
The problem is that when i hit a monster, the servers goes hardly laggy, probably because of the try catch thing i added.
Here is the error :
Error on Line 19871 in .\DPSrvr.cpp
Which is :
Here is the function :
#ifdef __INFO_DROP
void CDPSrvr::OnInfoDrop( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
{
try{
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );
if( IsValidObj( pUser ) )
{
DWORD dwID;
ar >> dwID;
if( dwID == NULL_ID)
return;
MoverProp* pMover = prj.GetMoverProp( dwID );
if( !pMover)
return;
vector<t_info> info;
size_t nSize = 0;
for( vector<t_info>::const_iterator it = CInfoDrop::GetInstance()->GetInfoDrop().begin(); it != CInfoDrop::GetInstance()->GetInfoDrop().end(); ++it )
{
if( dwID == it->dwID )
{
t_info tmp;
memset( &tmp, 0, sizeof( tmp ) );
tmp.dwID = it->dwID;
tmp.dwIndex = it->dwIndex;
tmp.dwProbability = it->dwProbability;
info.push_back( tmp );
nSize++;
}
}
if( info.size() > 0 && info.size() < 80 )
pUser->AddInfoDrop( info, nSize );
info.clear();
}
} // --> Here is the problem located
catch(...)
{
Error("Error on Line %d in %s",__LINE__,__FILE__);
}
}
#endif //__INFO_DROP
Maybe you would know how to fix this, thanks !