How to edit in source the GM not allowed to trade?
sorry for bad english
sorry for bad english
#define __NO_TRADE
lawl.Quote:
if( pUser->IsAuthorization( AUTH_GAMEMEMASTER )
{
pUser->AddText( "Unauthorized Action." );
return;
}
if( (CUser*)pTrader->IsAuthorization( AUTH_GAMEMEMASTER )
{
((CUser*)pTrader)->AddText("Unauthorized Action.");
return;
}
Quote:
void CDPSrvr::OnTrade( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
{
OBJID objidTrader;
ar >> objidTrader;
CWorld* pWorld;
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );
if( IsValidObj( pUser ) && ( pWorld = pUser->GetWorld() ) && pUser->m_vtInfo.GetOther() == NULL )
{
CMover* pTrader = prj.GetMover( objidTrader );
if( IsValidObj( pTrader ) && pTrader->GetWorld() && pTrader->m_vtInfo.GetOther() == NULL )
{
if( pTrader->IsPlayer() ) // pc
{