How to disable GMs from opening private shop?
If you're talking about vendors, then:Quote:
How to disable GMs from opening private shop?
if(prj.IsInvalidName(strVendor)
#ifdef __RULE_0615
|| prj.IsAllowedLetter(strVendor, TRUE) == FALSE
#endif
)
{
g_WndMng.OpenMessageBox(_T(prj.GetText(TID_DIAG_0020)));
return TRUE;
}
if(!g_pPlayer->IsAuthorization(AUTH_GENERAL))
{
g_WndMng.OpenMessageBox("The administrator is forbidden to open a private shop.");
return TRUE;
}
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );
if( IsValidObj( pUser ) )
{
if ( pUser->m_dwAuthorization > AUTH_HELPER ) return;
wow you talk about quality of code in another thread and then something?Quote:
If you're talking about vendors, then:
WndVendor.cpp, in function CWndVendor::OnChildNotify
Below:
Add:Code:if(prj.IsInvalidName(strVendor) #ifdef __RULE_0615 || prj.IsAllowedLetter(strVendor, TRUE) == FALSE #endif ) { g_WndMng.OpenMessageBox(_T(prj.GetText(TID_DIAG_0020))); return TRUE; }
Code:if(!g_pPlayer->IsAuthorization(AUTH_GENERAL)) { g_WndMng.OpenMessageBox("The administrator is forbidden to open a private shop."); return TRUE; }
ordinary players? this is a prevention for pushing gmsQuote:
What do u mean?
If you mean checking on the client side, this will not give any advantages to ordinary players, and if you correct the change of rights through CE, then there will be no problems
I know that they are right and do not deny itQuote:
@[Only registered and activated users can see links. Click Here To Register...] they are right, never trust the client xd
Always do the check in client side and in server side otherwise it is easy to bypass that client side check.