Skip to content

Runtime Helpers C

Codex edited this page Oct 12, 2026 · 1 revision

uk · ru · en · de · fr · it · es · zh-tw · ja · ko

Допоміжні функції C

Внутрішній код реалізації, не самостійний скрипт.

ClassicUO.CSharp.CSharpCallbacks.TryInvoke

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/src/ClassicUO.CSharp/CSharpCallbacks.cs:416.

Результат: true.

Умови: Exists(called); events is ICSharpScriptHost host && host.HasCSharpScript(called).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "CallSub":
                string called = Convert.ToString(arguments[0]) ?? "";
                if (Exists(called)) Start(called);
                else if (events is ICSharpScriptHost host && host.HasCSharpScript(called)) host.ExecuteCSharpScript("exec \"" + called + "\"");
                else throw new ArgumentException($"Register the C# routine or load a C# script entry named '{called}' before calling it.");
                return true;

ClassicUO.CSharp.CSharpCallbacks.Flag

Повертає значення виразу нижче.

Параметри: value

Джерело: Project_Full/src/ClassicUO.CSharp/CSharpCallbacks.cs:342.

private static bool Flag(object? value)

Результат: bool.

Результат: NumberConversions.ToInt(CSharpScriptGlobals.ToNative(value)) != 0.

Виклики: NumberConversions.ToInt, CSharpScriptGlobals.ToNative.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

private static bool Flag(object? value) => NumberConversions.ToInt(CSharpScriptGlobals.ToNative(value)) != 0;

ClassicUO.CSharp.CSharpScriptGlobals.Checkpoint

Виконує показані виклики та оновлення стану.

Параметри: Немає параметрів.

Джерело: Project_Full/src/ClassicUO.CSharp/CSharpScriptGlobals.cs:82.

public void Checkpoint()

Результат: void.

Виклики: Verify, Callbacks.Process.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void Checkpoint()
    {
        Verify();
        Callbacks.Process();
    }

ClassicUO.Game.GameActions.CastSpell

Виконує показані виклики та оновлення стану.

Параметри: index

Джерело: Project_Full/src/ClassicUO.Client/Game/GameActions.cs:797.

public static void CastSpell(int index)

Результат: void.

Виклики: .BeginLocalCast, Socket.Send_CastSpell.

Умови: index >= 0.

Внутрішній код реалізації, не самостійний скрипт.

public static void CastSpell(int index)
        {
            if (index >= 0)
            {
                LastSpellIndex = index;
                Client.UO.World?.BadNewbieCastBars?.BeginLocalCast(index);
                Socket.Send_CastSpell(index);
            }
        }

ClassicUO.Game.GameActions.RequestWarMode

Виконує показані виклики та оновлення стану.

Параметри: player, war

Джерело: Project_Full/src/ClassicUO.Client/Game/GameActions.cs:30.

public static void RequestWarMode(PlayerMobile player, bool war)

Результат: void.

Виклики: audio.PlayMusic, RandomHelper.GetValue, audio.StopWarMusic, Socket.Send_ChangeWarMode.

Умови: !player.IsDead && Client.Game?.Audio is { } audio; war && ProfileManager.CurrentProfile != null && ProfileManager.CurrentProfile.EnableMusic; !war.

Внутрішній код реалізації, не самостійний скрипт.

public static void RequestWarMode(PlayerMobile player, bool war)
        {
            if (!player.IsDead && Client.Game?.Audio is { } audio)
            {
                if (war && ProfileManager.CurrentProfile != null && ProfileManager.CurrentProfile.EnableMusic)
                {
                    audio.PlayMusic((RandomHelper.GetValue(0, 3) % 3) + 38, true);
                }
                else if (!war)
                {
                    audio.StopWarMusic();
                }
            }

            Socket.Send_ChangeWarMode(war);
        }

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.AddUserStatic

Виконує показані виклики та оновлення стану.

Параметри: id, graphic, x, y, z, hue, map

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3563.

public void AddUserStatic(int id, int graphic, int x, int y, int z, int hue, int map)

Результат: void.

Виклики: Invoke.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void AddUserStatic(int id, int graphic, int x, int y, int z, int hue, int map) =>

            Invoke(() => _manager.AddUserStatic(id, graphic, x, y, z, hue, map));

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.CharPrint

Виконує показані виклики та оновлення стану.

Параметри: id, color, msg

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1844.

public void CharPrint(int id, int color, string msg)

Результат: void.

Виклики: CharPrintEx.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void CharPrint(int id, int color, string msg) => CharPrintEx(id, color, 3, msg);

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.CheckLag

Повертає значення виразу нижче.

Параметри: timeoutMs

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:335.

public int CheckLag(int timeoutMs)

Результат: int.

Результат: TryProbeServerPing(timeoutMs, out _) ? 1 : 0.

Виклики: TryProbeServerPing.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int CheckLag(int timeoutMs)

            => TryProbeServerPing(timeoutMs, out _) ? 1 : 0;

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ClearAutoShopRules

Виконує показані виклики та оновлення стану.

Параметри: Немає параметрів.

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3582.

public void ClearAutoShopRules()

Результат: void.

Виклики: Invoke.

Виклики:

  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { Profile profile = ProfileManager.CurrentProfile; if (profile == null) return; profile.BackNewbieAutoBuyRules.Clear(); profile.BackNewbieAutoSellRules.Clear(); profile.BackNewbieAutoBuyEnabled = false; profile.BackNewbieAutoSellEnabled = false; UIManager.GetGump<OptionsGump>()?.SetBackNewbieAutomationEnabled(BackNewbieAutomationType.AutoBuy, false); UIManager.GetGump<OptionsGump>()?.SetBackNewbieAutomationEnabled(BackNewbieAutomationType.AutoSell, false); ProfileManager.SaveCurrentProfile(); }). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { Profile profile = ProfileManager.CurrentProfile; if (profile == null) return; profile.BackNewbieAutoBuyRules.Clear(); profile.BackNewbieAutoSellRules.Clear(); profile.BackNewbieAutoBuyEnabled = false; profile.BackNewbieAutoSellEnabled = false; UIManager.GetGump<OptionsGump>()?.SetBackNewbieAutomationEnabled(BackNewbieAutomationType.AutoBuy, false); UIManager.GetGump<OptionsGump>()?.SetBackNewbieAutomationEnabled(BackNewbieAutomationType.AutoSell, false); ProfileManager.SaveCurrentProfile(); }). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Configuration.ProfileManager.SaveCurrentProfile: ProfileManager.SaveCurrentProfile().

Внутрішній код реалізації, не самостійний скрипт.

public void ClearAutoShopRules() => Invoke(() =>

        {

            Profile profile = ProfileManager.CurrentProfile;

            if (profile == null) return;

            profile.BackNewbieAutoBuyRules.Clear();

            profile.BackNewbieAutoSellRules.Clear();

            profile.BackNewbieAutoBuyEnabled = false;

            profile.BackNewbieAutoSellEnabled = false;

            UIManager.GetGump<OptionsGump>()?.SetBackNewbieAutomationEnabled(BackNewbieAutomationType.AutoBuy, false);

            UIManager.GetGump<OptionsGump>()?.SetBackNewbieAutomationEnabled(BackNewbieAutomationType.AutoSell, false);

            ProfileManager.SaveCurrentProfile();

        });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Click

Виконує показані виклики та оновлення стану.

Параметри: id

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:771.

public void Click(int id)

Результат: void.

Виклики: Invoke.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void Click(int id) => Invoke(() => GameActions.SingleClick(_world, (uint)id));

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Dead

Повертає значення виразу нижче.

Параметри: Немає параметрів.

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:554.

public int Dead()

Результат: int.

Результат: Invoke(() => _world.Player?.IsDead == true ? 1 : 0).

Виклики: Invoke.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int Dead() => Invoke(() => _world.Player?.IsDead == true ? 1 : 0);

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.DropDraggedItem

Перевіряє умови нижче й повертає показаний результат.

Параметри: targetContainerId, x, y, z

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1215.

public int DropDraggedItem(int targetContainerId, int x, int y, int z)

Результат: int.

Результат: 0; dropped ? 1 : 0.

Виклики: Error, Invoke, Wait.

Умови: item == 0; dropped; dropped && State.GrabDelay > 0.

Виклики:

  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Error: Error("UO.DropItem: DragItem must successfully pick up an item first.").
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { var hold = Client.UO?.World?.ItemHold; if (hold == null || !hold.Enabled || hold.Serial != (uint)item || hold.IsFixedPosition || targetContainerId == item || (targetContainerId > 0 && _world.Get((uint)targetContainerId) == null)) return false; GameActions.DropItem((uint)item, x, y, z, (uint)Math.Max(0, targetContainerId)); return hold.Dropped; }). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { var hold = Client.UO?.World?.ItemHold; if (hold == null || !hold.Enabled || hold.Serial != (uint)item || hold.IsFixedPosition || targetContainerId == item || (targetContainerId > 0 && _world.Get((uint)targetContainerId) == null)) return false; GameActions.DropItem((uint)item, x, y, z, (uint)Math.Max(0, targetContainerId)); return hold.Dropped; }). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Game.World.Get: _world.Get((uint)targetContainerId).
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Wait: Wait(State.GrabDelay).

Внутрішній код реалізації, не самостійний скрипт.

public int DropDraggedItem(int targetContainerId, int x, int y, int z)

        {

            int item = _draggedItem;

            if (item == 0)

            {

                Error("UO.DropItem: DragItem must successfully pick up an item first.");

                return 0;

            }

            bool dropped = Invoke(() =>

            {

                var hold = Client.UO?.World?.ItemHold;

                if (hold == null || !hold.Enabled || hold.Serial != (uint)item || hold.IsFixedPosition

                    || targetContainerId == item

                    || (targetContainerId > 0 && _world.Get((uint)targetContainerId) == null))

                    return false;

                GameActions.DropItem((uint)item, x, y, z, (uint)Math.Max(0, targetContainerId));

                return hold.Dropped;

            });

            if (dropped) _draggedItem = 0;

            if (dropped && State.GrabDelay > 0)

                Wait(State.GrabDelay);

            return dropped ? 1 : 0;

        }

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FindList

Повертає значення виразу нижче.

Параметри: types, colors, containerId, range, notorieties, nearest, maxZ, includeIgnored

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2553.

`public int FindList(int[] types, int[] colors, int containerId, int range, int[] notorieties,

        bool nearest, int maxZ, bool includeIgnored)`

Результат: int.

Виклики: Invoke.

Виклики:

  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { ResetFindResults(); IgnoreTypeFilter ignoredTypes = State.IgnoreTypeLists.FilterFor(State.SelectedIgnoreList); int[] requestedTypes = types ?? Array.Empty<int>(); int[] requestedColors = colors ?? Array.Empty<int>(); // The runtime uses this sentinel for an invalid-only mask. // Removing all negatives below would otherwise turn it into a wildcard. if (notorieties != null && Array.IndexOf(notorieties, int.MinValue) >= 0) return 0; int pairCount = Math.Max(requestedTypes.Length, requestedColors.Length); if (pairCount == 0) return 0; int effectiveRange = ResolveFindRange(range); int effectiveMaxZ = maxZ < 0 ? Math.Max(0, State.FindVertical) : Math.Max(0, maxZ); var wantedNotorieties = new HashSet<int>((notorieties ?? Array.Empty<int>()).Where(value => value >= 0)); var candidates = new List<(Entity Entity, int Priority, int Distance)>(); PlayerMobile player = _world.Player; bool IsIgnored(Entity entity) => !includeIgnored && entity != null && (State.IgnoredSerials.Contains(unchecked((int)entity.Serial)) || ignoredTypes.Matches(entity.Graphic, entity.Hue)); bool MatchesPair(Entity entity, out int priority) { priority = int.MaxValue; if (entity == null || entity.IsDestroyed || IsIgnored(entity)) return false; for (int index = 0; index < pairCount; index++) { int wantedType = index < requestedTypes.Length ? requestedTypes[index] : -1; int wantedColor = index < requestedColors.Length ? requestedColors[index] : -1; bool typeOk = wantedType < 0 || wantedType == 0xFFFF || entity.Graphic == (ushort)wantedType; bool colorOk = wantedColor < 0 || wantedColor == 0xFFFF || entity.Hue == (ushort)wantedColor; if (typeOk && colorOk) { priority = index; return true; } } return false; } bool MatchesZ(Entity entity) { if (player == null || effectiveMaxZ < 0) return true; Entity zEntity = entity; if (entity is Item && containerId > 1) zEntity = _world.Get(unchecked((uint)containerId)) ?? entity; return Math.Abs(zEntity.Z - player.Z) <= effectiveMaxZ; } foreach (Item item in _world.Items.Values) { // Notoriety is a Mobile-only property: a notoriety-filtered list // must never silently return an Item. if (wantedNotorieties.Count > 0 || !MatchesPair(item, out int priority) // MatchesZ below applies the explicit maxZ override. Do not // pre-filter ground items using the runtime's default Z. || !MatchesFindContainer(item, containerId, effectiveRange, containerId == -1, checkVertical: false) || !MatchesZ(item)) continue; candidates.Add((item, priority, item.Distance)); } if (IsGroundFindContainer(containerId)) { foreach (Mobile mobile in _world.Mobiles.Values) { if (IsSelfMobile(mobile) || !MatchesPair(mobile, out int priority) || mobile.Distance > effectiveRange || !MatchesZ(mobile) || wantedNotorieties.Count > 0 && !wantedNotorieties.Contains((int)mobile.NotorietyFlag)) continue; candidates.Add((mobile, priority, mobile.Distance)); } } IEnumerable<(Entity Entity, int Priority, int Distance)> ordered = nearest ? candidates.OrderBy(candidate => candidate.Distance).ThenBy(candidate => candidate.Priority) .ThenBy(candidate => candidate.Entity.Serial) : candidates.OrderBy(candidate => candidate.Priority).ThenBy(candidate => candidate.Entity.Serial); foreach (var (entity, _, _) in ordered) { if (entity is Item item) RegisterFound(item); else if (entity is Mobile mobile) RegisterFound(mobile); } return _findItem; }). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { ResetFindResults(); IgnoreTypeFilter ignoredTypes = State.IgnoreTypeLists.FilterFor(State.SelectedIgnoreList); int[] requestedTypes = types ?? Array.Empty<int>(); int[] requestedColors = colors ?? Array.Empty<int>(); // The runtime uses this sentinel for an invalid-only mask. // Removing all negatives below would otherwise turn it into a wildcard. if (notorieties != null && Array.IndexOf(notorieties, int.MinValue) >= 0) return 0; int pairCount = Math.Max(requestedTypes.Length, requestedColors.Length); if (pairCount == 0) return 0; int effectiveRange = ResolveFindRange(range); int effectiveMaxZ = maxZ < 0 ? Math.Max(0, State.FindVertical) : Math.Max(0, maxZ); var wantedNotorieties = new HashSet<int>((notorieties ?? Array.Empty<int>()).Where(value => value >= 0)); var candidates = new List<(Entity Entity, int Priority, int Distance)>(); PlayerMobile player = _world.Player; bool IsIgnored(Entity entity) => !includeIgnored && entity != null && (State.IgnoredSerials.Contains(unchecked((int)entity.Serial)) || ignoredTypes.Matches(entity.Graphic, entity.Hue)); bool MatchesPair(Entity entity, out int priority) { priority = int.MaxValue; if (entity == null || entity.IsDestroyed || IsIgnored(entity)) return false; for (int index = 0; index < pairCount; index++) { int wantedType = index < requestedTypes.Length ? requestedTypes[index] : -1; int wantedColor = index < requestedColors.Length ? requestedColors[index] : -1; bool typeOk = wantedType < 0 || wantedType == 0xFFFF || entity.Graphic == (ushort)wantedType; bool colorOk = wantedColor < 0 || wantedColor == 0xFFFF || entity.Hue == (ushort)wantedColor; if (typeOk && colorOk) { priority = index; return true; } } return false; } bool MatchesZ(Entity entity) { if (player == null || effectiveMaxZ < 0) return true; Entity zEntity = entity; if (entity is Item && containerId > 1) zEntity = _world.Get(unchecked((uint)containerId)) ?? entity; return Math.Abs(zEntity.Z - player.Z) <= effectiveMaxZ; } foreach (Item item in _world.Items.Values) { // Notoriety is a Mobile-only property: a notoriety-filtered list // must never silently return an Item. if (wantedNotorieties.Count > 0 || !MatchesPair(item, out int priority) // MatchesZ below applies the explicit maxZ override. Do not // pre-filter ground items using the runtime's default Z. || !MatchesFindContainer(item, containerId, effectiveRange, containerId == -1, checkVertical: false) || !MatchesZ(item)) continue; candidates.Add((item, priority, item.Distance)); } if (IsGroundFindContainer(containerId)) { foreach (Mobile mobile in _world.Mobiles.Values) { if (IsSelfMobile(mobile) || !MatchesPair(mobile, out int priority) || mobile.Distance > effectiveRange || !MatchesZ(mobile) || wantedNotorieties.Count > 0 && !wantedNotorieties.Contains((int)mobile.NotorietyFlag)) continue; candidates.Add((mobile, priority, mobile.Distance)); } } IEnumerable<(Entity Entity, int Priority, int Distance)> ordered = nearest ? candidates.OrderBy(candidate => candidate.Distance).ThenBy(candidate => candidate.Priority) .ThenBy(candidate => candidate.Entity.Serial) : candidates.OrderBy(candidate => candidate.Priority).ThenBy(candidate => candidate.Entity.Serial); foreach (var (entity, _, _) in ordered) { if (entity is Item item) RegisterFound(item); else if (entity is Mobile mobile) RegisterFound(mobile); } return _findItem; }). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ResetFindResults: ResetFindResults().
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ResolveFindRange: ResolveFindRange(range).
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FindList::IsIgnored: IsIgnored(entity).
  • ClassicUO.Game.World.Get: _world.Get(unchecked((uint)containerId)).
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FindList::MatchesPair: MatchesPair(item, out int priority).
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MatchesFindContainer: MatchesFindContainer(item, containerId, effectiveRange, containerId == -1, checkVertical: false).
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FindList::MatchesZ: MatchesZ(item).
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.IsGroundFindContainer: IsGroundFindContainer(containerId).
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.IsSelfMobile: IsSelfMobile(mobile).
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FindList::MatchesPair: MatchesPair(mobile, out int priority).
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FindList::MatchesZ: MatchesZ(mobile).
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.RegisterFound: RegisterFound(item). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.RegisterFound: RegisterFound(item). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.RegisterFound: RegisterFound(mobile). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.RegisterFound: RegisterFound(mobile). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.

Внутрішній код реалізації, не самостійний скрипт.

public int FindList(int[] types, int[] colors, int containerId, int range, int[] notorieties,
            bool nearest, int maxZ, bool includeIgnored)
        {
            return Invoke(() =>
            {
                ResetFindResults();
                IgnoreTypeFilter ignoredTypes = State.IgnoreTypeLists.FilterFor(State.SelectedIgnoreList);
                int[] requestedTypes = types ?? Array.Empty<int>();
                int[] requestedColors = colors ?? Array.Empty<int>();
                // The runtime uses this sentinel for an invalid-only mask.
// …
                if (notorieties != null && Array.IndexOf(notorieties, int.MinValue) >= 0)
                    return 0;
// …
                if (pairCount == 0)
                    return 0;
// …
                    if (entity == null || entity.IsDestroyed || IsIgnored(entity))
                        return false;
// …
                        if (typeOk && colorOk)
// …
                            return true;
// …
                    return false;
// …
                    if (player == null || effectiveMaxZ < 0)
                        return true;
// …
                    if (entity is Item && containerId > 1)
// …
                    return Math.Abs(zEntity.Z - player.Z) <= effectiveMaxZ;
// …
                    // must never silently return an Item.
                    if (wantedNotorieties.Count > 0 || !MatchesPair(item, out int priority)
// …
                if (IsGroundFindContainer(containerId))
// …
                        if (IsSelfMobile(mobile) || !MatchesPair(mobile, out int priority)
// …
                    if (entity is Item item) RegisterFound(item);
                    else if (entity is Mobile mobile) RegisterFound(mobile);
// …
                return _findItem;
// …

Повний код зберігається у файлі джерела; нижче наведено точні фрагменти.

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FindList::IsIgnored

Повертає значення виразу нижче.

Параметри: entity

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2576.

bool IsIgnored(Entity entity)

Результат: bool.

Виклики: State.IgnoredSerials.Contains, ignoredTypes.Matches.

Внутрішній код реалізації, не самостійний скрипт.

bool IsIgnored(Entity entity) => !includeIgnored

                    && entity != null

                    && (State.IgnoredSerials.Contains(unchecked((int)entity.Serial)) || ignoredTypes.Matches(entity.Graphic, entity.Hue));

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.FormatScriptPrintText

Повертає значення виразу нижче.

Параметри: message

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1824.

internal static string FormatScriptPrintText(string message)

Результат: string.

Результат: message ?? string.Empty.

Внутрішній код реалізації, не самостійний скрипт.

internal static string FormatScriptPrintText(string message) => message ?? string.Empty;

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetGumpShortLines

Повертає значення виразу нижче.

Параметри: index

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2822.

public string[] GetGumpShortLines(int index)

Результат: string[].

Виклики: Invoke.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public string[] GetGumpShortLines(int index) => Invoke(() =>

        {

            Gump gump = ServerGumpsUnsafe().ElementAtOrDefault(index);

            return gump == null ? Array.Empty<string>() : Descendants(gump)

                .Where(control => !string.IsNullOrWhiteSpace(GetControlText(control)) || IsButtonControl(control))

                .Select(DescribeControl).ToArray();

        });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetLandscapeTile

Повертає значення виразу нижче.

Параметри: x, y, map

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3296.

public int[] GetLandscapeTile(int x, int y, int map)

Результат: int[].

Виклики: Invoke.

Виклики:

  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { if (_world.Map == null || map != _world.MapIndex) { Error($"UO.GetLandscapeTile: map {map} is not the currently loaded map {_world.MapIndex}"); return Array.Empty<int>(); } for (GameObject tile = _world.Map.GetTile(x, y); tile != null; tile = tile.TNext) { if (tile is Land land) return new[] { (int)land.Graphic, (int)land.Z, unchecked((int)(ulong)land.TileData.Flags) }; } return Array.Empty<int>(); }). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { if (_world.Map == null || map != _world.MapIndex) { Error($"UO.GetLandscapeTile: map {map} is not the currently loaded map {_world.MapIndex}"); return Array.Empty<int>(); } for (GameObject tile = _world.Map.GetTile(x, y); tile != null; tile = tile.TNext) { if (tile is Land land) return new[] { (int)land.Graphic, (int)land.Z, unchecked((int)(ulong)land.TileData.Flags) }; } return Array.Empty<int>(); }). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Error: Error($"UO.GetLandscapeTile: map {map} is not the currently loaded map {_world.MapIndex}").

Внутрішній код реалізації, не самостійний скрипт.

public int[] GetLandscapeTile(int x, int y, int map) => Invoke(() =>

        {

            if (_world.Map == null || map != _world.MapIndex)

            {

                Error($"UO.GetLandscapeTile: map {map} is not the currently loaded map {_world.MapIndex}");

                return Array.Empty<int>();

            }

            for (GameObject tile = _world.Map.GetTile(x, y); tile != null; tile = tile.TNext)

            {

                if (tile is Land land)

                    return new[] { (int)land.Graphic, (int)land.Z, unchecked((int)(ulong)land.TileData.Flags) };

            }

            return Array.Empty<int>();

        });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetTargetCursorId

Повертає значення виразу нижче.

Параметри: Немає параметрів.

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:838.

public int GetTargetCursorId()

Результат: int.

Результат: Invoke(() => unchecked((int)_world.TargetManager.CurrentCursorId)).

Виклики: Invoke.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int GetTargetCursorId() => Invoke(() => unchecked((int)_world.TargetManager.CurrentCursorId));

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke

Передає роботу в ігровий потік і враховує скасування.

Параметри: callback

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:4014.

private void Invoke(Action callback)

Результат: void.

Виклики: _manager.InvokeOnGameThread.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

private void Invoke(Action callback) => _manager.InvokeOnGameThread(callback, _cancellationToken);

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.IsButtonControl

Повертає значення виразу нижче.

Параметри: control

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3950.

private static bool IsButtonControl(Control control)

Результат: bool.

Результат: control is Button || control is SessionGumpControl { IsButton: true }.

Внутрішній код реалізації, не самостійний скрипт.

private static bool IsButtonControl(Control control) => control is Button || control is SessionGumpControl { IsButton: true };

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.IsDead

Повертає значення виразу нижче.

Параметри: id

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:555.

public int IsDead(int id)

Результат: int.

Результат: Invoke(() => (_world.Get(unchecked((uint)id)) as Mobile)?.IsDead == true ? 1 : 0).

Виклики: Invoke.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int IsDead(int id) => Invoke(() => (_world.Get(unchecked((uint)id)) as Mobile)?.IsDead == true ? 1 : 0);

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.IsOnline

Повертає значення виразу нижче.

Параметри: Немає параметрів.

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:330.

public int IsOnline()

Результат: int.

Виклики: Invoke.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int IsOnline() => Invoke(() =>

            _world.InGame && NetClient.Socket.IsConnected ? 1 : 0

        );

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.IsVisible

Повертає значення виразу нижче.

Параметри: id

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:556.

public int IsVisible(int id)

Результат: int.

Виклики: Invoke.

Виклики:

  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { Entity entity = _world.Get(unchecked((uint)id)); return entity != null && entity.CanDraw && !entity.IsHidden ? 1 : 0; }). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { Entity entity = _world.Get(unchecked((uint)id)); return entity != null && entity.CanDraw && !entity.IsHidden ? 1 : 0; }). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Game.World.Get: _world.Get(unchecked((uint)id)).

Внутрішній код реалізації, не самостійний скрипт.

public int IsVisible(int id) => Invoke(() =>

        {

            Entity entity = _world.Get(unchecked((uint)id));

            return entity != null && entity.CanDraw && !entity.IsHidden ? 1 : 0;

        });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Mount

Виконує показані виклики та оновлення стану.

Параметри: id

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:774.

public void Mount(int id)

Результат: void.

Виклики: Invoke.

Виклики:

  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => _manager.MountRequests.Request( _world, unchecked((uint)id), mount: true, serial => NetClient.Socket.Send_DoubleClick(serial), Environment.TickCount64)). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => _manager.MountRequests.Request( _world, unchecked((uint)id), mount: true, serial => NetClient.Socket.Send_DoubleClick(serial), Environment.TickCount64)). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.

Внутрішній код реалізації, не самостійний скрипт.

public void Mount(int id) => Invoke(() => _manager.MountRequests.Request(

            _world, unchecked((uint)id), mount: true,

            serial => NetClient.Socket.Send_DoubleClick(serial), Environment.TickCount64));

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.MoveContainerItems

Перевіряє умови нижче й повертає показаний результат.

Параметри: sourceContainerId, type, color, targetContainerId, x, y, z, delayMs, allowGround

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1287.

`private (int Selected, int Sent) MoveContainerItems(int sourceContainerId, int type, int color,

        int targetContainerId, int x, int y, int z, int delayMs, bool allowGround = true)`

Результат: (int Selected, int Sent).

Результат: (0, 0); (items.Length, moved).

Виклики: Error, Invoke, Wait, Math.Max.

Умови: `sourceContainerId == 0 || sourceContainerId == targetContainerId

            || (targetContainerId == 0 && (!allowGround || x < 0 || y < 0))`; `sent`.

Внутрішній код реалізації, не самостійний скрипт.

private (int Selected, int Sent) MoveContainerItems(int sourceContainerId, int type, int color,

            int targetContainerId, int x, int y, int z, int delayMs, bool allowGround = true)

        {

            if (sourceContainerId == 0 || sourceContainerId == targetContainerId

                || (targetContainerId == 0 && (!allowGround || x < 0 || y < 0)))

            {

                Error("UO.EmptyContainer/MoveItems: source and destination must be different valid containers.");

                return (0, 0);

            }

            int[] items = Invoke(() => _world.Items.Values

                .Where(item => !item.IsDestroyed && item.Container == (uint)sourceContainerId

                    && (type < 0 || type == 0xFFFF || item.Graphic == type)

                    && (color < 0 || color == 0xFFFF || item.Hue == color))

                .Select(item => (int)item.Serial).ToArray());

            int moved = 0;

            foreach (int item in items)

            {

                bool sent = Invoke(() => _world.Items.Get((uint)item) is Item current

                    && current.Container == (uint)sourceContainerId

                    && TryMoveItemRequest(item, 0, targetContainerId, x, y, z));

                if (sent)

                {

                    moved++;

                    // One pacing interval, including the last request so a caller's

                    // next action cannot overtake it. Do not add GrabDelay twice.

                    Wait(allowGround ? Math.Max(State.GrabDelay, Math.Max(0, delayMs)) : Math.Max(0, delayMs));

                }

            }

            return (items.Length, moved);

        }

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PlayWav

Перевіряє умови нижче й повертає показаний результат.

Параметри: file

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1677.

public int PlayWav(string file)

Результат: int.

Результат: 0; 1.

Виклики: Path.IsPathRooted, Path.Combine, File.Exists, Error, File.OpenRead, SoundEffect.FromStream, _sounds[0].Dispose, _sounds.RemoveAt.

Умови: !File.Exists(path); !sound.Play().

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int PlayWav(string file)

        {

            string path = Path.IsPathRooted(file) ? file : Path.Combine(CUOEnviroment.ExecutablePath, file);

            if (!File.Exists(path))

            {

                Error($"UO.PlayWav: file not found: {file}");

                return 0;

            }

            try

            {

                using FileStream stream = File.OpenRead(path);

                SoundEffect sound = SoundEffect.FromStream(stream);

                while (_sounds.Count >= MaxRetainedSoundEffects)

                {

                    _sounds[0].Dispose();

                    _sounds.RemoveAt(0);

                }

                _sounds.Add(sound);

                if (!sound.Play())

                {

                    sound.Dispose();

                    _sounds.Remove(sound);

                    return 0;

                }

                return 1;

            }

            catch (Exception error)

            {

                Error($"UO.PlayWav: {error.Message}");

                return 0;

            }

        }

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PoisonResistance

Повертає значення виразу нижче.

Параметри: Немає параметрів.

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:163.

public int PoisonResistance

Результат: int.

Результат: Invoke(() => CurrentPlayer?.PoisonResistance ?? 0).

Виклики: Invoke.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int PoisonResistance => Invoke(() => CurrentPlayer?.PoisonResistance ?? 0);

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Print

Виконує показані виклики та оновлення стану.

Параметри: color, msg

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1827.

public void Print(int color, string msg)

Результат: void.

Виклики: PrintClientMessage.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void Print(int color, string msg) => PrintClientMessage((ushort)color, msg);

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.RequestStats

Виконує показані виклики та оновлення стану.

Параметри: id

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2125.

public void RequestStats(int id)

Результат: void.

Виклики: Invoke.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void RequestStats(int id) => Invoke(() => GameActions.RequestMobileStatus(_world, (uint)id, true));

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SendGumpButtonUnsafe

Перевіряє умови нижче й повертає показаний результат.

Параметри: gump, triggerId, missingMessage

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2790.

private int SendGumpButtonUnsafe(Gump gump, int triggerId, string missingMessage)

Результат: int.

Результат: 0; 1.

Виклики: string.IsNullOrWhiteSpace, Error, gump.OnButtonClick, ReferenceEquals.

Умови: gump == null || gump.IsDisposed || gump.ServerSerial == 0; !string.IsNullOrWhiteSpace(missingMessage); ReferenceEquals(_selectedServerGump, gump).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

private int SendGumpButtonUnsafe(Gump gump, int triggerId, string missingMessage)

        {

            if (gump == null || gump.IsDisposed || gump.ServerSerial == 0)

            {

                if (!string.IsNullOrWhiteSpace(missingMessage))

                    Error("UO.SendGumpSelect: " + missingMessage);

                return 0;

            }



            gump.OnButtonClick(triggerId);

            if (ReferenceEquals(_selectedServerGump, gump))

                _selectedServerGump = null;

            return 1;

        }

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetAutoReconnect

Виконує показані виклики та оновлення стану.

Параметри: enabled

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:457.

public void SetAutoReconnect(int enabled)

Результат: void.

Виклики: Invoke.

Виклики:

  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { if (_world.SessionControl is { } session) { session.AutoReconnect = enabled != 0; return; } Settings.GlobalSettings.Reconnect = enabled != 0; Settings.GlobalSettings.Save(); }). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.
  • ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke: Invoke(() => { if (_world.SessionControl is { } session) { session.AutoReconnect = enabled != 0; return; } Settings.GlobalSettings.Reconnect = enabled != 0; Settings.GlobalSettings.Save(); }). Кандидати перевантаження: джерело не підтверджує вибір конкретного варіанта.

Внутрішній код реалізації, не самостійний скрипт.

public void SetAutoReconnect(int enabled) => Invoke(() =>

        {

            if (_world.SessionControl is { } session)

            {

                session.AutoReconnect = enabled != 0;

                return;

            }

            Settings.GlobalSettings.Reconnect = enabled != 0;

            Settings.GlobalSettings.Save();

        });

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Step

Перевіряє умови нижче й повертає показаний результат.

Параметри: direction, running

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3243.

public int Step(int direction, bool running)

Результат: int.

Результат: 2; 3; 0; 7; 5; 4.

Виклики: QueueStep, Invoke, walker.GetDenyGeneration, walker.GetConfirmGeneration, Wait.

Умови: result == STEP_QUEUE_OVERFLOW; result == STEP_QUEUE_CLIENT_BLOCKED; result < 0; result == STEP_QUEUE_TURN_ONLY.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int Step(int direction, bool running)

        {

            var queued = QueueStep(direction, running, true);

            int result = queued.Result;

            if (result == STEP_QUEUE_OVERFLOW)

                return 2;

            if (result == STEP_QUEUE_CLIENT_BLOCKED)

                return 3;

            if (result < 0)

                return 0;

            if (result == STEP_QUEUE_TURN_ONLY)

                return 7;



            int sequence = result & 0xFF;

            WalkerManager walker = queued.Walker;

            if (walker == null)

                return 0;



            long deadline = Environment.TickCount64 + STEP_ACK_TIMEOUT_MS;

            while (Environment.TickCount64 < deadline)

            {

                if (!NetClient.Socket.IsConnected)

                    return 0;

                if (!Invoke(() => ReferenceEquals(_world.Player?.Walker, walker)))

                    return 0;



                if (walker.GetDenyGeneration((byte)sequence) != queued.DenyGeneration)

                    return 5;



                if (walker.GetConfirmGeneration((byte)sequence) != queued.ConfirmGeneration)

                    return 7;



                Wait(5);

            }



            return 4;

        }

ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.TextClose

Виконує показані виклики та оновлення стану.

Параметри: Немає параметрів.

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1803.

public void TextClose()

Результат: void.

Виклики: Invoke.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void TextClose()

        {

            _textWindowOpen = false;

            Invoke(() =>

            {

                UIManager.GetGump<YokoTextWindowGump>()?.Dispose();

                ReportStatus("UO.TextClose: text window closed");

            });

        }

ClassicUO.Game.Managers.LastCharacterManager.GetKnownCharacters

Повертає значення виразу нижче.

Параметри: account, server

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/LastCharacterManager.cs:127.

public static string[] GetKnownCharacters(string account, string server)

Результат: string[].

Виклики: _knownCharacters.TryGetValue, values.ToArray, Array.Empty<string>.

Внутрішній код реалізації, не самостійний скрипт.

public static string[] GetKnownCharacters(string account, string server)
        {
            string key = (account ?? string.Empty) + "\u001F" + (server ?? string.Empty);
            lock (_knownCharactersSync)
            {
                return _knownCharacters.TryGetValue(key, out string[] values)
                    ? values.ToArray()
                    : Array.Empty<string>();
            }
        }

ClassicUO.Game.Managers.YokoInjectionManager.RemoveUserStatic

Виконує показані виклики та оновлення стану.

Параметри: id

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:792.

internal void RemoveUserStatic(int id)

Результат: void.

Виклики: _userStatics.TryRemove.

Внутрішній код реалізації, не самостійний скрипт.

internal void RemoveUserStatic(int id) => _userStatics.TryRemove(id, out _);

ClassicUO.Game.Managers.YokoInjectionManager.SetJournalLength

Виконує показані виклики та оновлення стану.

Параметри: length

Джерело: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:732.

internal void SetJournalLength(int length)

Результат: void.

Виклики: Math.Clamp, JournalManager.SetYokoHistoryLimit.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

internal void SetJournalLength(int length)
        {
            _journalLength = Math.Clamp(length, 1, Constants.MAX_JOURNAL_HISTORY_COUNT);
            JournalManager.SetYokoHistoryLimit(_journalLength);
        }

InjectionScript.Runtime.InjectionApiUO.AddObject

Виконує показані виклики та оновлення стану.

Параметри: name, objectRawId

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3798.

public void AddObject(InjectionValue name, InjectionValue objectRawId)

Результат: void.

Виклики: ObjectChecked.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void AddObject(InjectionValue name, InjectionValue objectRawId) 

            => ObjectChecked(objectRawId, id => AddObject((string)name, id));

InjectionScript.Runtime.InjectionApiUO.CharPrint

Виконує показані виклики та оновлення стану.

Параметри: id, color, msg

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5339.

public void CharPrint(int id, int color, string msg)

Результат: void.

Виклики: bridge.CharPrint.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void CharPrint(int id, int color, string msg) => bridge.CharPrint(id, color, msg);

InjectionScript.Runtime.InjectionApiUO.ClampMoveTimer

Повертає значення виразу нижче.

Параметри: value, standardMinimum

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2450.

private static int ClampMoveTimer(int value, int standardMinimum)

Результат: int.

Результат: Math.Max(standardMinimum, Math.Min(2000, value)).

Виклики: Math.Max, Math.Min.

Внутрішній код реалізації, не самостійний скрипт.

private static int ClampMoveTimer(int value, int standardMinimum) => Math.Max(standardMinimum, Math.Min(2000, value));

InjectionScript.Runtime.InjectionApiUO.Click

Виконує показані виклики та оновлення стану.

Параметри: id

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3917.

public void Click(int id)

Результат: void.

Виклики: bridge.Click.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void Click(int id) => bridge.Click(id);

InjectionScript.Runtime.InjectionApiUO.ClientMarkChar

Виконує показані виклики та оновлення стану.

Параметри: actionIndex, id

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3932.

public void ClientMarkChar(InjectionValue actionIndex, InjectionValue id)

Результат: void.

Виклики: bridge.ClientMarkChar, NumberConversions.ToInt, GetObject.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void ClientMarkChar(InjectionValue actionIndex, InjectionValue id)

            => bridge.ClientMarkChar(NumberConversions.ToInt(actionIndex), GetObject(id));

InjectionScript.Runtime.InjectionApiUO.CloseHandle

Виконує показані виклики та оновлення стану.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5272.

public void CloseHandle()

Результат: void.

Виклики: bridge.CloseHandle.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void CloseHandle() => bridge.CloseHandle();

InjectionScript.Runtime.InjectionApiUO.DispatchLegacyEvents

Виконує показані виклики та оновлення стану.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6101.

private void DispatchLegacyEvents()

Результат: void.

Виклики: legacyEvents.Values.ToArray, subscription.Name.ToLowerInvariant, bridge.Dead, bridge.GetHP, `(bridge.GetMobiles() ?? Array.Empty())

                            .Where`, `bridge.GetMobiles`, `Array.Empty<int>`, `current.Any`.

Умови: dispatchingLegacyEvents || legacyEvents.Count == 0; !triggered; !string.IsNullOrWhiteSpace(subscription.Handler) && bridge.SubExists(subscription.Handler); !subscription.Repeat.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

private void DispatchLegacyEvents()
        {
            if (dispatchingLegacyEvents || legacyEvents.Count == 0)
                return;

            dispatchingLegacyEvents = true;
            try
            {
                foreach (LegacyEventSubscription subscription in legacyEvents.Values.ToArray())
                {
// …
                    if (!triggered)
// …
                    if (!string.IsNullOrWhiteSpace(subscription.Handler) && bridge.SubExists(subscription.Handler))
// …
                    if (!subscription.Repeat)
// …

Повний код зберігається у файлі джерела; нижче наведено точні фрагменти.

InjectionScript.Runtime.InjectionApiUO.EnumerateUseTypeItems

Перевіряє умови нижче й повертає показаний результат.

Параметри: container

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4050.

private IEnumerable<int> EnumerateUseTypeItems(int container)

Результат: IEnumerable<int>.

Результат: bridge.GetWorldItems() ?? Array.Empty<int>(); Array.Empty<int>(); result.

Виклики: bridge.GetWorldItems, Array.Empty<int>, pending.Push, visited.Add, pending.Pop, bridge.GetContent, result.Add.

Умови: container == 1; root <= 0; id <= 0 || !visited.Add(id).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

private IEnumerable<int> EnumerateUseTypeItems(int container)

        {

            if (container == 1)

                return bridge.GetWorldItems() ?? Array.Empty<int>();



            int root = container <= 0 ? bridge.Backpack : container;

            if (root <= 0)

                return Array.Empty<int>();



            var result = new List<int>();

            var visited = new HashSet<int>();

            var pending = new Stack<int>();

            pending.Push(root);

            visited.Add(root);



            while (pending.Count > 0)

            {

                int current = pending.Pop();

                int[] direct = bridge.GetContent(current) ?? Array.Empty<int>();

                foreach (int id in direct)

                {

                    if (id <= 0 || !visited.Add(id))

                        continue;

                    result.Add(id);

                    // Calling GetContent on a non-container safely returns an empty array; on a

                    // container it gives us recursive legacy-UseType semantics without a second selector.

                    pending.Push(id);

                }

            }

            return result;

        }

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1239.

Результат: InjectionValue.Unit.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "addtosystemjournalex":

                    bridge.PrintFormattedJournal(Text(0), Arg(1), Arg(2), Arg(3), Text(4)); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1738.

Результат: InjectionValue.Unit.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "clearfigures":

                    bridge.ClearMapFigures();

                    state.MapFigures.Clear();

                    return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1778.

Результат: InjectionValue.Unit.

Внутрішній код реалізації, не самостійний скрипт.

case "cleargumpsignore":

                    state.IgnoredGumpIds.Clear(); state.IgnoredGumpSerials.Clear(); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1314.

Результат: new InjectionValue(bridge.ClientPath).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "clientpath": return new InjectionValue(bridge.ClientPath);

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1913.

Результат: InjectionValue.Unit.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "consoleentryreply":

                case "consoleentryunicodereply": bridge.ReplyServerPrompt(Text(0)); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2016.

Результат: new InjectionValue(DecodeEasyUoId(Text(0))).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "euo2id":

                case "euo2type": return new InjectionValue(DecodeEasyUoId(Text(0)));

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1382.

Результат: InjectionValue.Unit; new InjectionValue(bridge.GetFindVertical()).

Умови: arguments.Length > 0.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "findvertical":

                    if (arguments.Length > 0) { bridge.SetFindVertical(Arg(0)); return InjectionValue.Unit; }

                    return new InjectionValue(bridge.GetFindVertical());

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1425.

Результат: new InjectionValue(bridge.GetTooltip(Arg(0))).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "getcliloc":

                case "gettooltip":

                    return new InjectionValue(bridge.GetTooltip(Arg(0)));

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1495.

Результат: new InjectionValue(bridge.GetMaxMana(Arg(0, bridge.Self))).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "getmaxmana": return new InjectionValue(bridge.GetMaxMana(Arg(0, bridge.Self)));

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1576.

Результат: new InjectionValue(bridge.ContainerOf(Arg(0))).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "getparent": return new InjectionValue(bridge.ContainerOf(Arg(0)));

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1920.

Результат: InjectionValue.Unit.

Умови: hasStream && !(arguments[1].Object is MemoryStreamObject); !hasStream; arguments[1].Object is MemoryStreamObject memoryStream.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "http_get":

                {

                    bool hasStream = arguments.Length > 1

                        && !(arguments[1].Kind == InjectionValueKind.Integer && arguments[1].Integer == 0)

                        && arguments[1].Kind != InjectionValueKind.Unit;

                    // Validate before network side effects and before changing the last response.

                    if (hasStream && !(arguments[1].Object is MemoryStreamObject))

                        throw new NativeSubrutineException("UO.HTTP_Get: LStream must be a writable System.IO.Stream, 0, or omitted.");



                    string[] response = bridge.HttpRequest("GET", Text(0), string.Empty);

                    httpHeader = response.Length > 1 ? response[1] : string.Empty;

                    httpBody = hasStream ? string.Empty : response.Length > 0 ? response[0] : string.Empty;

                    if (!hasStream)

                    {

                        return InjectionValue.Unit;

                    }



                    byte[] raw = response.Length > 3 && !string.IsNullOrEmpty(response[3])

                        ? Convert.FromBase64String(response[3])

                        : Array.Empty<byte>();

                    if (arguments[1].Object is MemoryStreamObject memoryStream)

                        memoryStream.ReplaceBytes(raw);

                    else

                        throw new NativeSubrutineException("UO.HTTP_Get: LStream must be a writable System.IO.Stream.");



                    // Stream overloads keep the response as bytes, not cached text.

                    return InjectionValue.Unit;

                }

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1501.

Результат: new InjectionValue(bridge.Luck).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "luck": return new InjectionValue(bridge.Luck);

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1699.

Результат: InjectionValue.Unit.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "moverstop": bridge.StopMoving(); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1533.

Результат: new InjectionValue(ReadPredictedCoordinate(0)).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "predictedx": return new InjectionValue(ReadPredictedCoordinate(0));

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1316.

Результат: InjectionValue.Unit.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "setarstatus": bridge.SetAutoReconnect(Arg(0)); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1829.

Результат: InjectionValue.Unit.

Умови: type < -1 || type > ushort.MaxValue || hue < -1 || hue > ushort.MaxValue || radius < 0 || radius > byte.MaxValue.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "setbadobject":

                {

                    int type = ResolveType(arguments[0]), hue = Arg(1), radius = Arg(2);

                    if (type < -1 || type > ushort.MaxValue || hue < -1 || hue > ushort.MaxValue || radius < 0 || radius > byte.MaxValue)

                        throw new NativeSubrutineException("UO.SetBadObject requires type/color 0..65535 (or -1) and radius 0..255.");

                    state.BadObjects.Add(type + "," + hue + "," + radius);

                    return InjectionValue.Unit;

                }

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1312.

Результат: new InjectionValue(bridge.CurrentProfilePath).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "shardpath":

                case "clientprofilepath": return new InjectionValue(bridge.CurrentProfilePath);

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1373.

Результат: new InjectionValue(bridge.Stamina).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "stam": return new InjectionValue(bridge.Stamina);

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1636.

Результат: InjectionValue.Unit.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "useitemonmobile": bridge.WaitTargetObject(Arg(1)); bridge.UseObject(Arg(0)); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1271.

Результат: InjectionValue.Unit.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "waitmenu": bridge.WaitMenu(arguments.Select(value => value.ToString()).ToArray()); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1654.

Результат: InjectionValue.Unit.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "waittargetxyz": WaitTargetTile(new InjectionValue(0), arguments[0], arguments[1], arguments[2]); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2024.

Результат: InjectionValue.Unit.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "wait": WaitWithEvents(Arg(0)); return InjectionValue.Unit;

InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2924.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "infofindlist": SystemMessage(string.Join(" | ", LegacyList("AddFindList"))); break;

InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3018.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "opendoor": bridge.OpenDoor(); break;

InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias

Гілка обробляє лише вказане ім’я команди.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3021.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

case "resetprofile": bridge.ResetProfile(); break;

InjectionScript.Runtime.InjectionApiUO.FindMobile

Повертає значення виразу нижче.

Параметри: stateFilter, rangeFilter

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3659.

public int FindMobile(InjectionValue stateFilter, InjectionValue rangeFilter)

Результат: int.

Виклики: FindMobile.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int FindMobile(InjectionValue stateFilter, InjectionValue rangeFilter) => FindMobile(stateFilter,

            rangeFilter, new InjectionValue("all"), new InjectionValue("all"));

InjectionScript.Runtime.InjectionApiUO.FindPortableTiles::ScanSlice

Виконує показані виклики та оновлення стану.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2414.

void ScanSlice()

Результат: void.

Виклики: Stopwatch.GetTimestamp, bridge.GetLandscapeTile, wanted.Contains, result.Add, bridge.GetStaticTiles.

Умови: map != bridge.WorldNumber; cells > 0 && Stopwatch.GetTimestamp() - started >= Stopwatch.Frequency / 1000; !statics; tile.Length >= 2 && (wanted.Count == 0 || wanted.Contains(tile[0])).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

void ScanSlice()

            {

                // Read each cell on the game thread, but rendezvous once per

                // bounded group. A map change must never mix facets in one result.

                if (map != bridge.WorldNumber) { mapChanged = true; return; }

                long started = Stopwatch.GetTimestamp();

                for (int cells = 0; x <= lastX && cells < 32; cells++)

                {

                    if (cells > 0 && Stopwatch.GetTimestamp() - started >= Stopwatch.Frequency / 1000) break;

                    if (!statics)

                    {

                        int[] tile = bridge.GetLandscapeTile(x, y, map);

                        if (tile.Length >= 2 && (wanted.Count == 0 || wanted.Contains(tile[0])))

                            result.Add(new InjectionValue(new[] { new InjectionValue(tile[0]), new InjectionValue(x), new InjectionValue(y), new InjectionValue(tile[1]) }));

                    }

                    else

                    {

                        int[] records = bridge.GetStaticTiles(x, y, map);

                        for (int i = 0; i + 2 < records.Length; i += 3)

                            if (wanted.Count == 0 || wanted.Contains(records[i]))

                                result.Add(new InjectionValue(new[] { new InjectionValue(records[i]), new InjectionValue(x), new InjectionValue(y), new InjectionValue(records[i + 1]), new InjectionValue(records[i + 2]) }));

                    }

                    if (++y > lastY) { y = firstY; x++; }

                }

            }

InjectionScript.Runtime.InjectionApiUO.GListSet

Виконує показані виклики та оновлення стану.

Параметри: nameValue, value

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3266.

public void GListSet(InjectionValue nameValue, InjectionValue value)

Результат: void.

Виклики: nameValue.ToString, globalList.FindIndex, globalList.Add.

Умови: index >= 0.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void GListSet(InjectionValue nameValue, InjectionValue value)

        {

            string name = nameValue.ToString();

            int index = globalList.FindIndex(pair => pair.Key.Equals(name, StringComparison.OrdinalIgnoreCase));

            var entry = new KeyValuePair<string, InjectionValue>(name, value);

            if (index >= 0)

                globalList[index] = entry;

            else

                globalList.Add(entry);

        }

InjectionScript.Runtime.InjectionApiUO.GetName

Повертає значення виразу нижче.

Параметри: id

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3612.

public string GetName(int id)

Результат: string.

Результат: bridge.GetName(id).

Виклики: bridge.GetName.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public string GetName(int id) => bridge.GetName(id);

InjectionScript.Runtime.InjectionApiUO.Grab

Повертає значення виразу нижче.

Параметри: amount, id

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4372.

public int Grab(string amount, string id)

Результат: int.

Результат: CompactGrab(new[] { new InjectionValue(amount), new InjectionValue(id) }).

Виклики: CompactGrab.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int Grab(string amount, string id) => CompactGrab(new[] { new InjectionValue(amount), new InjectionValue(id) });

InjectionScript.Runtime.InjectionApiUO.Ignore

Виконує показані виклики та оновлення стану.

Параметри: id, stateValue

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5223.

public void Ignore(InjectionValue id, InjectionValue stateValue)

Результат: void.

Виклики: GetObject, NumberConversions.ToInt, stateValue.String.Equals, bridge.Ignore, bridge.Unignore.

Умови: enabled.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void Ignore(InjectionValue id, InjectionValue stateValue)

        {

            int serial = GetObject(id);

            bool enabled = stateValue.Kind != InjectionValueKind.String

                ? NumberConversions.ToInt(stateValue) != 0

                : !stateValue.String.Equals("off", StringComparison.OrdinalIgnoreCase)

                    && !stateValue.String.Equals("false", StringComparison.OrdinalIgnoreCase)

                    && stateValue.String != "0";



            if (enabled)

                bridge.Ignore(serial);

            else

                bridge.Unignore(serial);

        }

InjectionScript.Runtime.InjectionApiUO.IsNpc

Повертає значення виразу нижче.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3641.

public int IsNpc()

Результат: int.

Результат: IsNpc(bridge.Self).

Виклики: IsNpc.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int IsNpc() => IsNpc(bridge.Self);

InjectionScript.Runtime.InjectionApiUO.MoveItem

Повертає значення виразу нижче.

Параметри: id, amount, targetContainer, x, y, z

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4478.

public int MoveItem(InjectionValue id, InjectionValue amount, InjectionValue targetContainer, InjectionValue x, InjectionValue y, InjectionValue z)

Результат: int.

Результат: CompactMoveItem(new[] { id, amount, targetContainer, x, y, z }).

Виклики: CompactMoveItem.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int MoveItem(InjectionValue id, InjectionValue amount, InjectionValue targetContainer, InjectionValue x, InjectionValue y, InjectionValue z)

            => CompactMoveItem(new[] { id, amount, targetContainer, x, y, z });

InjectionScript.Runtime.InjectionApiUO.ReceiveObjectName

Виконує показані виклики та оновлення стану.

Параметри: id

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3928.

public void ReceiveObjectName(InjectionValue id)

Результат: void.

Виклики: bridge.ReceiveObjectName, GetObject.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void ReceiveObjectName(InjectionValue id) => bridge.ReceiveObjectName(GetObject(id), 0);

InjectionScript.Runtime.InjectionApiUO.SetDress

Виконує показані виклики та оновлення стану.

Параметри: name

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5599.

public void SetDress(string name)

Результат: void.

Виклики: SetEquip.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void SetDress(string name)

            => SetEquip(name, dressSets, dressLayers, "Clothing set.");

InjectionScript.Runtime.InjectionApiUO.SetDressSpeed

Виконує показані виклики та оновлення стану.

Параметри: delayms

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5585.

public void SetDressSpeed(int delayms)

Результат: void.

Виклики: Math.Max, Math.Min.

Внутрішній код реалізації, не самостійний скрипт.

public void SetDressSpeed(int delayms) => state.DressSpeed = Math.Max(10, Math.Min(10_000, delayms));

InjectionScript.Runtime.InjectionApiUO.SkillVal

Повертає значення виразу нижче.

Параметри: skillName

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5801.

public int SkillVal(string skillName)

Результат: int.

Результат: SkillVal(skillName, 0).

Виклики: SkillVal.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int SkillVal(string skillName) => SkillVal(skillName, 0);

InjectionScript.Runtime.InjectionApiUO.TextPrint

Виконує показані виклики та оновлення стану.

Параметри: text

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5318.

public void TextPrint(string text)

Результат: void.

Виклики: bridge.TextPrint.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void TextPrint(string text) => bridge.TextPrint(text);

InjectionScript.Runtime.InjectionApiUO.ToArray

Повертає значення виразу нижче.

Параметри: values

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6342.

private static InjectionValue ToArray(IEnumerable<int> values)

Результат: InjectionValue.

Результат: new InjectionValue((values ?? Array.Empty<int>()).Select(value => new InjectionValue(value)).ToArray()).

Виклики: (values ?? Array.Empty<int>()).Select(value => new InjectionValue(value)).ToArray, (values ?? Array.Empty<int>()).Select, Array.Empty<int>.

Внутрішній код реалізації, не самостійний скрипт.

private static InjectionValue ToArray(IEnumerable<int> values)

            => new InjectionValue((values ?? Array.Empty<int>()).Select(value => new InjectionValue(value)).ToArray());

InjectionScript.Runtime.InjectionApiUO.Track

Виконує показані виклики та оновлення стану.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5988.

public void Track()

Результат: void.

Виклики: Track, GetX, GetY.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void Track() => Track(1, GetX(), GetY());

InjectionScript.Runtime.InjectionApiUO.UseType

Повертає значення виразу нижче.

Параметри: type

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3970.

public int UseType(string type)

Результат: int.

Результат: UseType(ResolveType(type)).

Виклики: UseType, ResolveType.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int UseType(string type) => UseType(ResolveType(type));

InjectionScript.Runtime.InjectionApiUO.WaitTargetGround

Виконує показані виклики та оновлення стану.

Параметри: type, color

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4229.

public void WaitTargetGround(InjectionValue type, InjectionValue color)

Результат: void.

Виклики: bridge.FindType, ResolveType, NumberConversions.ToInt, SystemMessage, bridge.CancelNextTarget, bridge.WaitTargetObject.

Умови: item <= 0.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void WaitTargetGround(InjectionValue type, InjectionValue color)

        {

            int item = bridge.FindType(ResolveType(type), NumberConversions.ToInt(color), 1, -1, false);

            if (item <= 0)

            {

                SystemMessage("No ground item found. Next target request will be canceled");

                bridge.CancelNextTarget();

            }

            else

                bridge.WaitTargetObject(item);

        }

InjectionScript.Runtime.InjectionApiUO.WaitTargetTile

Виконує показані виклики та оновлення стану.

Параметри: x, y, z

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4202.

public void WaitTargetTile(InjectionValue x, InjectionValue y, InjectionValue z)

Результат: void.

Виклики: WaitTargetTile.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void WaitTargetTile(InjectionValue x, InjectionValue y, InjectionValue z)

            => WaitTargetTile(new InjectionValue(0), x, y, z);

InjectionScript.Runtime.InjectionApiUO.WaitingForJournalText

Виконує показані виклики та оновлення стану.

Параметри: startTime, maxDelay, text, equals, ignoreCase

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5421.

public void WaitingForJournalText(int startTime, int maxDelay, string text, int equals, int ignoreCase)

Результат: void.

Виклики: WaitingForJournalText.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public void WaitingForJournalText(int startTime, int maxDelay, string text, int equals, int ignoreCase)

            => WaitingForJournalText(startTime, maxDelay, text, equals, ignoreCase, InjectionValue.Zero);

InjectionScript.Runtime.InjectionApiUO.WaitingForMenu

Повертає значення виразу нижче.

Параметри: delay

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3309.

public int WaitingForMenu(InjectionValue delay)

Результат: int.

Результат: WaitingForMenu(delay, InjectionValue.Zero, InjectionValue.Zero, new InjectionValue(string.Empty), InjectionValue.Zero).

Виклики: WaitingForMenu.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int WaitingForMenu(InjectionValue delay) => WaitingForMenu(delay, InjectionValue.Zero, InjectionValue.Zero, new InjectionValue(string.Empty), InjectionValue.Zero);

InjectionScript.Runtime.InjectionApiUO.Weight

Повертає значення виразу нижче.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3901.

public int Weight()

Результат: int.

Результат: bridge.Weight.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

public int Weight() => bridge.Weight;

InjectionScript.Runtime.InjectionApiUO.Register [FindMobile]

Виклик виконує збережений delegate обробника. Метод реєстрації створює цей delegate під час побудови API.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:364.

values

Результат: values.

Виклики: FindMobile.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

values => new InjectionValue(

                    FindMobile(values[0], values[1], values[2], values[3]))

InjectionScript.Runtime.InjectionApiUO.RegisterCharacterGetterAliases [GetArmor]

Виклик виконує збережений delegate обробника. Метод реєстрації створює цей delegate під час побудови API.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1042.

Результат: bridge.Armor.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

() => bridge.Armor

InjectionScript.Runtime.InjectionApiUO.RegisterCharacterGetterAliases [GetResistEnergy]

Виклик виконує збережений delegate обробника. Метод реєстрації створює цей delegate під час побудови API.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1046.

Результат: bridge.EnergyResistance.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

() => bridge.EnergyResistance

InjectionScript.Runtime.InjectionApiUO.RegisterCharacterGetterAliases [HP]

Виклик виконує збережений delegate обробника. Метод реєстрації створює цей delegate під час побудови API.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1024.

Результат: bridge.GetHP(bridge.Self).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

() => bridge.GetHP(bridge.Self)

InjectionScript.Runtime.InjectionApiUO.Register [InJournal]

Виклик виконує збережений delegate обробника. Метод реєстрації створює цей delegate під час побудови API.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:635.

values

Результат: values.

Результат: new InjectionValue(CompactInJournal(values)).

Виклики: CompactInJournal.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

values => new InjectionValue(CompactInJournal(values))

InjectionScript.Runtime.InjectionApiUO.RegisterCharacterGetterAliases [MaxHP]

Виклик виконує збережений delegate обробника. Метод реєстрації створює цей delegate під час побудови API.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1025.

Результат: bridge.GetMaxHP(bridge.Self).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

() => bridge.GetMaxHP(bridge.Self)

InjectionScript.Runtime.InjectionApiUO.RegisterCharacterGetterAliases [Online]

Виклик виконує збережений delegate обробника. Метод реєстрації створює цей delegate під час побудови API.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1069.

Результат: bridge.IsOnline().

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

() => bridge.IsOnline()

InjectionScript.Runtime.InjectionApiUO.RegisterCharacterGetterAliases

Повертає значення виразу нижче.

Параметри: Немає параметрів.

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1013.

value

Результат: value.

Результат: getter(GetObject(value)).

Виклики: getter, GetObject.

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

value => getter(GetObject(value))

InjectionScript.Runtime.InjectionRuntime.NormalizeConsoleAlias

Перевіряє умови нижче й повертає показаний результат.

Параметри: command

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/NativeConsoleDispatch.cs:269.

private static string NormalizeConsoleAlias(string command)

Результат: string.

Результат: "Say"; "CloseHandle"; "CountGround"; "IgnoreReset"; "CancelTarget"; "MoveOff".

Виклики: command.Equals.

Умови: command.Equals("sayu", StringComparison.OrdinalIgnoreCase); command.Equals("closeuo", StringComparison.OrdinalIgnoreCase); command.Equals("CountOnGround", StringComparison.OrdinalIgnoreCase); command.Equals("clearignorelist", StringComparison.OrdinalIgnoreCase).

Внутрішній код реалізації, не самостійний скрипт.

private static string NormalizeConsoleAlias(string command)
        {
            if (command.Equals("sayu", StringComparison.OrdinalIgnoreCase)) return "Say";
            if (command.Equals("closeuo", StringComparison.OrdinalIgnoreCase)) return "CloseHandle";
            if (command.Equals("CountOnGround", StringComparison.OrdinalIgnoreCase)) return "CountGround";
            if (command.Equals("clearignorelist", StringComparison.OrdinalIgnoreCase)) return "IgnoreReset";
            if (command.Equals("canceltarget", StringComparison.OrdinalIgnoreCase)) return "CancelTarget";
            if (command.Equals("cancelmove", StringComparison.OrdinalIgnoreCase)) return "MoveOff";
            return command;
        }

InjectionScript.Runtime.InjectionRuntime.ToConsoleValue

Перевіряє умови нижче й повертає показаний результат.

Параметри: value

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/NativeConsoleDispatch.cs:253.

private static InjectionValue ToConsoleValue(string value)

Результат: InjectionValue.

Результат: new InjectionValue(number); new InjectionValue(decimalNumber); new InjectionValue(value).

Виклики: NumberConversions.TryStr2Int, double.TryParse.

Умови: NumberConversions.TryStr2Int(value, out int number); double.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out double decimalNumber).

Виклики:

Внутрішній код реалізації, не самостійний скрипт.

private static InjectionValue ToConsoleValue(string value)
        {
            if (NumberConversions.TryStr2Int(value, out int number))
                return new InjectionValue(number);
            if (double.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out double decimalNumber))
                return new InjectionValue(decimalNumber);
            return new InjectionValue(value);
        }

InjectionScript.Runtime.NumberConversions.ToHex

Повертає значення виразу нижче.

Параметри: id

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/NumberConversions.cs:79.

public static string ToHex(int id)

Результат: string.

Результат: $"0x{id:X8}".

Внутрішній код реалізації, не самостійний скрипт.

public static string ToHex(int id) => $"0x{id:X8}";

InjectionScript.Runtime.State.RuntimeDictionary.Remove

Виконує показані виклики та оновлення стану.

Параметри: name

Джерело: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/State/RuntimeDictionary.cs:88.

public void Remove(string name)

Результат: void.

Виклики: items.ContainsKey, items.Remove, .Invoke.

Умови: items.ContainsKey(name); notify.

Внутрішній код реалізації, не самостійний скрипт.

public void Remove(string name)

        {

            bool notify = false;

            lock (itemsLock)

            {

                if (items.ContainsKey(name))

                {

                    notify = true;

                    items.Remove(name);

                }

            }



            if (notify)

                KeyRemoved?.Invoke(name);

        }

Clone this wiki locally