[MIRROR] Fixes a runtime when the MC invokes a varedited callback synchronously [MDB IGNORE] (#16536)

* Fixes a runtime when the MC invokes a varedited callback synchronously (#70172)

* Fixes a runtime when the MC invokes a varedited callback synchronously

Co-authored-by: Y0SH1M4S73R <legoboyo@earthlink.net>
This commit is contained in:
SkyratBot
2022-09-29 22:43:48 -07:00
committed by GitHub
co-authored by Y0SH1M4S73R
parent 53b7dd2a58
commit 19848eeb3a
+2 -2
View File
@@ -124,7 +124,7 @@
else
calling_arguments = args
if(datum_flags & DF_VAR_EDITED)
if(usr && usr != GLOB.AdminProcCallHandler && !usr.client?.ckey) //This ONLY happens when usr's client switches mobs just before the callback gets invoked.
if(usr != GLOB.AdminProcCallHandler && !usr?.client?.ckey) //This happens when a timer or the MC invokes a callback
return HandleUserlessProcCall(usr, object, delegate, calling_arguments)
return WrapAdminProcCall(object, delegate, calling_arguments)
if (object == GLOBAL_PROC)
@@ -161,7 +161,7 @@
else
calling_arguments = args
if(datum_flags & DF_VAR_EDITED)
if(usr != GLOB.AdminProcCallHandler && !usr?.client?.ckey) //This happens when a timer invokes a callback
if(usr != GLOB.AdminProcCallHandler && !usr?.client?.ckey) //This happens when a timer or the MC invokes a callback
return HandleUserlessProcCall(usr, object, delegate, calling_arguments)
return WrapAdminProcCall(object, delegate, calling_arguments)
if (object == GLOBAL_PROC)