Closed canerksk closed 1 month ago
Shouldn't there be another function that works when blocked, like all other functions that work in most changes made to the account?
eg;
case AV_BLOCK: if (!s.HasArgs() || s.GetArgVal()) { if (!g_Serv.IsLoading()) { CScriptTriggerArgs Args; Args.Init(GetName()); TRIGRET_TYPE tRet = TRIGRET_RET_FALSE; g_Serv.r_Call("f_onaccount_block", &g_Serv, &Args, nullptr, &tRet); if (tRet == TRIGRET_RET_TRUE) { return false; } } SetPrivFlags(PRIV_BLOCKED); } else { if (!g_Serv.IsLoading()) { CScriptTriggerArgs Args; Args.Init(GetName()); TRIGRET_TYPE tRet = TRIGRET_RET_FALSE; g_Serv.r_Call("f_onaccount_unblock", &g_Serv, &Args, nullptr, &tRet); if (tRet == TRIGRET_RET_TRUE) { return false; } } ClearPrivFlags(PRIV_BLOCKED); } return true;
case AC_BLOCK: if ( ! s.HasArgs() || s.GetArgVal()) { if (!g_Serv.IsLoading()) { CScriptTriggerArgs Args; Args.Init(GetName()); TRIGRET_TYPE tRet = TRIGRET_RET_FALSE; g_Serv.r_Call("f_onaccount_block", &g_Serv, &Args, nullptr, &tRet); if (tRet == TRIGRET_RET_TRUE) { return false; } } SetPrivFlags( PRIV_BLOCKED ); } else { if (!g_Serv.IsLoading()) { CScriptTriggerArgs Args; Args.Init(GetName()); TRIGRET_TYPE tRet = TRIGRET_RET_FALSE; g_Serv.r_Call("f_onaccount_unblock", &g_Serv, &Args, nullptr, &tRet); if (tRet == TRIGRET_RET_TRUE) { return false; } } ClearPrivFlags( PRIV_BLOCKED ); } break;
block
if ( fBlock ) { SetPrivFlags( PRIV_BLOCKED ); if (!g_Serv.IsLoading()) { CScriptTriggerArgs Args; Args.Init(GetName()); TRIGRET_TYPE tRet = TRIGRET_RET_FALSE; g_Serv.r_Call("f_onaccount_block", &g_Serv, &Args, nullptr, &tRet); if (tRet == TRIGRET_RET_TRUE) { return false; } } pSrc->SysMessagef( g_Cfg.GetDefaultMsg(DEFMSG_MSG_ACC_BLOCK), GetName() ); }
The codes here are purely examples. Although many have been tested, some may need to be rewritten.
Shouldn't there be another function that works when blocked, like all other functions that work in most changes made to the account?
eg;
block
The codes here are purely examples. Although many have been tested, some may need to be rewritten.