GM not allowed to trade?

11/15/2014 12:57 randeljohnvalencia#1
How to edit in source the GM not allowed to trade?


sorry for bad english
11/15/2014 13:07 Sedrika#2
Open your source and look for the trade function and add a check if the auth is gm or not.
11/15/2014 13:39 randeljohnvalencia#3
MoverRender.cpp this?
11/15/2014 14:21 Kiseku#4
[Only registered and activated users can see links. Click Here To Register...]

Code:
#define	__NO_TRADE
11/15/2014 14:52 .SnoX#5
CDPSrvr::OnTrade

Quote:
if( pUser->IsAuthorization( AUTH_GAMEMEMASTER )
{
pUser->AddText( "Unauthorized Action." );
return;
}
if( (CUser*)pTrader->IsAuthorization( AUTH_GAMEMEMASTER )
{
((CUser*)pTrader)->AddText("Unauthorized Action.");
return;
}
lawl.
11/15/2014 16:32 randeljohnvalencia#6
where the CDPSrvr::OnTrade ?
11/15/2014 17:31 Lumi#7
In DPSrvr.cpp.
11/16/2014 05:55 randeljohnvalencia#8
how put the code in source?
11/16/2014 14:11 .SnoX#9
Gnar Gnar..
Man cmon wake up. Search for this function CDPSrvr::OnTrade..
Which file is it? CDPSrvr::OnTrade(.cpp)

And add this under..
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
{