mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-22 23:26:15 +00:00
Add command to eternally trap players ingame
This commit is contained in:
parent
9edd54c446
commit
7af85d6f2f
5 changed files with 28 additions and 2 deletions
|
@ -69,6 +69,8 @@ bool PermanentlyBanned = false;
|
|||
bool IgnoreEntityDbUpdates = false;
|
||||
bool FreeTrial = false;
|
||||
|
||||
bool NoLogout = false;
|
||||
|
||||
std::vector<std::pair<
|
||||
std::string, std::string> > VRDeviceCache;
|
||||
|
||||
|
|
|
@ -130,6 +130,8 @@ extern std::string Cookie, FSAddr;
|
|||
extern std::string RingMainURL;
|
||||
extern bool FreeTrial;
|
||||
|
||||
extern bool NoLogout;
|
||||
|
||||
void resetTextContext (const char *font, bool resetInterfaceManager);
|
||||
|
||||
#endif // CL_GLOBAL_H
|
||||
|
|
|
@ -1089,6 +1089,7 @@ void CInterfaceManager::configureQuitDialogBox()
|
|||
// Show Launch Editor if not in editor mode
|
||||
CInterfaceElement *eltCancel = quitDlg->getElement(quitDialogStr+":cancel");
|
||||
CInterfaceElement *eltEdit = quitDlg->getElement(quitDialogStr+":launch_editor");
|
||||
|
||||
if (eltEdit)
|
||||
{
|
||||
if (UserRoleInSession != R2::TUserRole::ur_editor && !sessionOwner)
|
||||
|
@ -1159,6 +1160,18 @@ void CInterfaceManager::configureQuitDialogBox()
|
|||
eltQuitNow->setActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (NoLogout)
|
||||
{
|
||||
eltEdit->setY(0);
|
||||
eltEdit->setActive(false);
|
||||
eltQuit->setY(0);
|
||||
eltQuit->setActive(false);
|
||||
eltQuitNow->setY(0);
|
||||
eltQuitNow->setActive(false);
|
||||
eltRet->setY(0);
|
||||
eltRet->setActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Make all controls have the same size
|
||||
|
|
|
@ -3555,6 +3555,13 @@ void impulseSetNpcIconTimer(NLMISC::CBitMemStream &impulse)
|
|||
CNPCIconCache::getInstance().setMissionGiverTimer(delay);
|
||||
}
|
||||
|
||||
void impulseEventDisableLogoutButton(NLMISC::CBitMemStream &impulse)
|
||||
{
|
||||
NoLogout = true;
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
im->configureQuitDialogBox();
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
// initializeNetwork :
|
||||
//-----------------------------------------------
|
||||
|
@ -3704,6 +3711,8 @@ void initializeNetwork()
|
|||
GenericMsgHeaderMngr.setCallback( "NPC_ICON:SET_DESC", impulseSetNpcIconDesc );
|
||||
GenericMsgHeaderMngr.setCallback( "NPC_ICON:SVR_EVENT_MIS_AVL", impulseServerEventForMissionAvailability );
|
||||
GenericMsgHeaderMngr.setCallback( "NPC_ICON:SET_TIMER", impulseSetNpcIconTimer );
|
||||
|
||||
GenericMsgHeaderMngr.setCallback( "EVENT:DISABLE_LOGOUT_BUTTON", impulseEventDisableLogoutButton );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1111,8 +1111,8 @@
|
|||
sendto="EGS"
|
||||
format="u32 u32 uc"
|
||||
description="set the cursom of the item in inventory $inventory in slot $slot to $text" />
|
||||
<leaf name="DUMMY"
|
||||
description="stupid server....." />
|
||||
<leaf name="DISABLE_LOGOUT_BUTTON"
|
||||
description="disables the logout button on the client" />
|
||||
</branch>
|
||||
<branch name="TOTEM">
|
||||
<leaf name="BUILD"
|
||||
|
|
Loading…
Reference in a new issue