Repository navigation
ES API UO SetGlobalShared
Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
void UO.SetGlobalShared(object? name, object? value);SetGlobal y GetGlobal comparten valores entre todos los scripts, perfiles y procesos Full Client/Client. Los valores son cadenas; una clave ausente devuelve "N/A". Se distingue mayúsculas; las formas region usan region/name. Manager/Game Manager/CSharp/globals.json persiste y se relee bajo bloqueo entre procesos. Las formas Shared usan el mismo almacén.
-
name— Nombre de clave compartida que distingue mayúsculas. -
value— Valor guardado como texto.
Cada bloque es un .csx completo. Sustituya serials, tipos y coordenadas de ejemplo. El orden y los argumentos C# con nombre siguen la firma.
#setglobalshared team.delay 350
Cada bloque es un .csx completo. Sustituya serials, tipos y coordenadas de ejemplo. El orden y los argumentos C# con nombre siguen la firma.
UO.SetGlobalShared("team.target", 0x40001234);
UO.Print(UO.GetGlobal("team.target"));UO.SetGlobal("team.message", "Привіт");
UO.Print(UO.GetGlobalShared("team.message"));string key = "team.delay";
UO.SetGlobalShared(key, 350);
UO.Print(UO.GetGlobalShared(key));new CommandSample().Execute(UO);
sealed class CommandSample
{
public void Execute(global::ClassicUO.CSharp.CSharpGameApi api)
{
api.SetGlobalShared("team.target", 0x40001234);
api.Print(api.GetGlobal("team.target"));
}
}CSharpGameApi.SetGlobalShared
-> CSharpScriptGlobals
-> InjectionScript.Runtime.State.Globals.SetGlobalShared
Globals -> SharedGlobalStore -> named mutex -> atomic JSON replacement
ClassicUO — Bad Newbie & C# Scripts IDE