Repository navigation
ES API UO GetGlobalShared
Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
string UO.GetGlobalShared(object? name);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.
Cada bloque es un .csx completo. Sustituya serials, tipos y coordenadas de ejemplo. El orden y los argumentos C# con nombre siguen la firma.
#getglobalshared team.delay
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.Print(UO.GetGlobalShared("team.target"));UO.SetGlobal("team.message", "Привіт");
string value = UO.GetGlobalShared("team.message");
UO.Print(value);foreach (string key in new[] { "team.target", "team.delay" })
UO.Print(UO.GetGlobalShared(key));new CommandSample().Execute(UO);
sealed class CommandSample
{
public void Execute(global::ClassicUO.CSharp.CSharpGameApi api)
{
api.Print(api.GetGlobalShared("team.target"));
}
}CSharpGameApi.GetGlobalShared
-> CSharpScriptGlobals
-> InjectionScript.Runtime.State.Globals.GetGlobalShared
Globals -> SharedGlobalStore -> named mutex -> atomic JSON replacement
ClassicUO — Bad Newbie & C# Scripts IDE