in some sources we have the __NO_TRADE this will stop the Staff members for trading and or receiving sending mail.
However an staff member cant read normal mail cause it is preventing by the __NO_TRADE system.
What i have done is made it so that Staff members can recieve and sending normal mail.
Staff members cant send items and or gold and also normal players cant send items and or gold to staff members. Except Admins.
this code will only go inside the function
void CDPSrvr::OnQueryPostMail( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
Under
Code:
if( pItemElem->IsCharged() ) { pUser->AddDiagText( prj.GetText( TID_GAME_CANNOT_POST ) ); return; }
Code:
#ifdef __NO_TRADE if(g_eLocal.GetState(EVE_NO_TRADE)) { if( idReceiver != AUTH_ADMINISTRATOR && idReceiver != AUTH_GENERAL ) { pUser->AddText("You cannot send items to Staff Members."); return; } if(!pUser->IsAuthorization(AUTH_GENERAL) && !pUser->IsAuthorization(AUTH_ADMINISTRATOR) && !pUser->IsAuthorization(AUTH_OPERATOR)) { pUser->AddText("As an Staff member you cant send items to players."); return; } } #endif
Code:
{ pUser->AddDiagText( prj.GetText( TID_GAME_LACKMONEY ) ); return; }
Code:
#ifdef __NO_TRADE if(g_eLocal.GetState(EVE_NO_TRADE)) { if( idReceiver != AUTH_ADMINISTRATOR && idReceiver != AUTH_GENERAL && nGold > 0 ) { pUser->AddText("You cant send Gold to an Staff member."); return; } if(!pUser->IsAuthorization(AUTH_GENERAL) && !pUser->IsAuthorization(AUTH_ADMINISTRATOR) && !pUser->IsAuthorization(AUTH_OPERATOR) && nGold > 0) { pUser->AddText("As an staff member you cant send gold to players."); return; } else { pUser->AddGold( (int)( (int)( nPostGold + nGold ) * (-1) ), TRUE ); // »ç¿ë·á Áö±Þ } } #endif
Remove these codes
Code:
#ifdef __NO_TRADE if(g_eLocal.GetState(EVE_NO_TRADE)) { if(!pUser->IsAuthorization(AUTH_GENERAL) && !pUser->IsAuthorization(AUTH_ADMINISTRATOR) && !pUser->IsAuthorization(AUTH_OPERATOR)) { pUser->AddText("Unauthorized Action."); return; } } #endif
void CDPSrvr::OnQueryRemoveMail( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
And
void CDPSrvr::OnQueryGetMailItem( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
And
void CDPSrvr::OnQueryGetMailGold( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
And
void CDPSrvr::OnQueryReadMail( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
And
void CDPSrvr::OnQueryMailBox( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
If you have done this rebuild the worldserver
@Credits goes to their respective creators
With kind regards,