ZH TW Runtime Helpers 8 - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki
Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
內部實作程式碼,不能作為獨立腳本執行。
執行所示呼叫及狀態更新。
參數: string name
來源: Project_Full/src/ClassicUO.CSharp/CSharpCallbacks.cs:136.
public bool Exists(string name)
結果: bool.
呼叫:
Verifyroutines.ContainsKey(name ?? "").Trim
內部實作程式碼,不能作為獨立腳本執行。
public bool Exists(string name) { Verify(); lock (sync) return routines.ContainsKey((name ?? "").Trim()); }執行所示呼叫及狀態更新。
參數: World world, string message, ushort hue = 946, MessageType type = MessageType.Regular, byte font = 3, bool unicode = true
來源: Project_Full/src/ClassicUO.Client/Game/GameActions.cs:481.
public static void Print(World world, string message, ushort hue = 946, MessageType type = MessageType.Regular, byte font = 3, bool unicode = true)
結果: void.
條件:
systemChat != null && !systemChat.IsDisposed && SystemChatControl.NeedsDirectViewportFallback(messageSequence, systemChat.MessageSequence)
呼叫:
NormalizeLocalDisplayFontShouldTrackLocalViewportLinePrintSystemChatControl.NeedsDirectViewportFallbacksystemChat.AddLineIfSequenceUnchanged
內部實作程式碼,不能作為獨立腳本執行。
public static void Print(World world, string message, ushort hue = 946, MessageType type = MessageType.Regular, byte font = 3, bool unicode = true)
{
NormalizeLocalDisplayFont(message, ref font, ref unicode);
SystemChatControl systemChat = ShouldTrackLocalViewportLine(type) ? UIManager.SystemChat : null;
long messageSequence = systemChat?.MessageSequence ?? -1;
Print
(
world,
null,
message,
hue,
type,
font,
unicode
);
// MessageManager normally delivers local Regular/System lines
// synchronously to SystemChatControl. If a profile/filter combination did not add the
// line, put it directly into the same in-world viewport control.
// The sequence check prevents duplicate lines on the normal route.
if (systemChat != null && !systemChat.IsDisposed
&& SystemChatControl.NeedsDirectViewportFallback(messageSequence, systemChat.MessageSequence))
{
systemChat.AddLineIfSequenceUnchanged(messageSequence, message, font, hue, unicode);
}
}執行所示呼叫及狀態更新。
參數: uint serial, string name
來源: Project_Full/src/ClassicUO.Client/Game/GameActions.cs:817.
public static void Rename(uint serial, string name)
結果: void.
呼叫:
Socket.Send_RenameRequest
內部實作程式碼,不能作為獨立腳本執行。
public static void Rename(uint serial, string name)
{
Socket.Send_RenameRequest(serial, name);
}執行所示呼叫及狀態更新。
參數: uint serial
來源: Project_Full/src/ClassicUO.Client/Game/GameActions.cs:542.
public static void RequestPartyAccept(uint serial)
結果: void.
呼叫:
Socket.Send_PartyAcceptUIManager.GetGump<PartyInviteGump>.Dispose
內部實作程式碼,不能作為獨立腳本執行。
public static void RequestPartyAccept(uint serial)
{
Socket.Send_PartyAccept(serial);
UIManager.GetGump<PartyInviteGump>()?.Dispose();
}執行所示呼叫及狀態更新。
參數: MessageType type
來源: Project_Full/src/ClassicUO.Client/Game/GameActions.cs:388.
internal static bool ShouldTrackLocalViewportLine(MessageType type)
結果: bool.
呼叫:
—
內部實作程式碼,不能作為獨立腳本執行。
internal static bool ShouldTrackLocalViewportLine(MessageType type) =>
type == MessageType.Regular || type == MessageType.System;執行所示呼叫及狀態更新。
參數: PlayerMobile player
來源: Project_Full/src/ClassicUO.Client/Game/GameActions.cs:25.
public static void ToggleWarMode(PlayerMobile player)
結果: void.
呼叫:
RequestWarMode
內部實作程式碼,不能作為獨立腳本執行。
public static void ToggleWarMode(PlayerMobile player)
{
RequestWarMode(player, !player.InWarMode);
}執行所示呼叫及狀態更新。
參數: 沒有參數。
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:154.
public int Backpack
結果: int.
呼叫:
Invokeplayer.FindItemByLayer
內部實作程式碼,不能作為獨立腳本執行。
public int Backpack => Invoke(() => _world.Player is { IsDestroyed: false } player
? unchecked((int)(player.FindItemByLayer(Layer.Backpack)?.Serial ?? 0)) : 0);執行所示呼叫及狀態更新。
參數: string profileName, string shardName, string characterName
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:521.
public int ChangeProfileSelection(string profileName, string shardName, string characterName)
結果: int.
條件:
_world.SessionControl != nullNetClient.Socket.IsConnected || NetClient.Socket.IsConnecting || _world.InGame_manager.RunningScriptCount > 1string.IsNullOrWhiteSpace(profileName)
呼叫:
InvokeReportStatusstring.IsNullOrWhiteSpaceshardName.TrimProfileManager.TryResolveProfileCharacterprofileName.TrimcharacterName.TrimProfileManager.SaveCurrentProfileProfileManager.UnLoadProfileSettings.GlobalSettings.SaveLastCharacterManager.OverrideLastCharacter
內部實作程式碼,不能作為獨立腳本執行。
public int ChangeProfileSelection(string profileName, string shardName, string characterName) => Invoke(() =>
{
if (_world.SessionControl != null)
{
ReportStatus("Choose another profile in ClassicUO Manager. A running session keeps its own profile.");
return -2;
}
if (NetClient.Socket.IsConnected || NetClient.Socket.IsConnecting || _world.InGame)
return -2;
if (_manager.RunningScriptCount > 1)
return -3;
if (string.IsNullOrWhiteSpace(profileName))
return -4;
string targetShard = !string.IsNullOrWhiteSpace(shardName)
? shardName.Trim()
: !string.IsNullOrWhiteSpace(ProfileManager.CurrentProfile?.ServerName)
? ProfileManager.CurrentProfile.ServerName
: !string.IsNullOrWhiteSpace(_world.ServerName) && _world.ServerName != "_"
? _world.ServerName
: Settings.GlobalSettings.LastServerName;
if (string.IsNullOrWhiteSpace(targetShard))
return -4;
if (!ProfileManager.TryResolveProfileCharacter(targetShard, profileName.Trim(), out string storedCharacter))
return -4;
string targetCharacter = !string.IsNullOrWhiteSpace(characterName)
? characterName.Trim()
: storedCharacter;
ProfileManager.SaveCurrentProfile();
ProfileManager.UnLoadProfile();
Settings.GlobalSettings.LastServerName = targetShard;
Settings.GlobalSettings.Save();
if (!string.IsNullOrWhiteSpace(targetCharacter))
LastCharacterManager.OverrideLastCharacter(targetCharacter, false);
return 0;
});執行所示呼叫及狀態更新。
參數: 沒有參數。
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:931.
public int ClientTargetResponsePresent()
結果: int.
呼叫:
—
內部實作程式碼,不能作為獨立腳本執行。
public int ClientTargetResponsePresent() => _clientTargetResponsePresent ? 1 : 0;執行所示呼叫及狀態更新。
參數: Gump gump
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3123.
private void CloseGumpUnsafe(Gump gump)
結果: void.
條件:
gump?.CanCloseWithRightClick == trueReferenceEquals(_selectedServerGump, gump)
呼叫:
gump.DisposeReferenceEquals
內部實作程式碼,不能作為獨立腳本執行。
private void CloseGumpUnsafe(Gump gump)
{
if (gump?.CanCloseWithRightClick == true)
{
gump.Dispose();
if (ReferenceEquals(_selectedServerGump, gump))
_selectedServerGump = null;
}
}執行所示呼叫及狀態更新。
參數: int layer, int id
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2213.
public int Equip(int layer, int id)
結果: int.
呼叫:
InvokeTryEquipItem
內部實作程式碼,不能作為獨立腳本執行。
public int Equip(int layer, int id) => Invoke(() => TryEquipItem(layer, id));執行所示呼叫及狀態更新。
參數: int number
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3380.
public string GetEasyUO(int number)
結果: string.
條件:
!OperatingSystem.IsWindows()
呼叫:
OperatingSystem.IsWindowsRegistry.CurrentUser.OpenSubKey.GetValuenumber.ToString.ToString
內部實作程式碼,不能作為獨立腳本執行。
public string GetEasyUO(int number)
{
if (!OperatingSystem.IsWindows())
{
return string.Empty;
}
using RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\EasyUO", false);
return key?.GetValue(number.ToString(CultureInfo.InvariantCulture))?.ToString()
?? key?.GetValue("*" + number.ToString(CultureInfo.InvariantCulture))?.ToString()
?? string.Empty;
}執行所示呼叫及狀態更新。
參數: 沒有參數。
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:273.
public int GetLastContainer()
結果: int.
呼叫:
Invoke
內部實作程式碼,不能作為獨立腳本執行。
public int GetLastContainer() => Invoke(() => (int)_world.LastContainer);執行所示呼叫及狀態更新。
參數: int id
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:329.
public string GetName(int id)
結果: string.
呼叫:
Invoke_world.Get
內部實作程式碼,不能作為獨立腳本執行。
public string GetName(int id) => Invoke(() => _world.Get((uint)id)?.Name ?? string.Empty);執行所示呼叫及狀態更新。
參數: 沒有參數。
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:319.
public int[] GetScriptsList()
結果: int[].
呼叫:
_manager.GetScriptsList
內部實作程式碼,不能作為獨立腳本執行。
public int[] GetScriptsList() => _manager.GetScriptsList();執行所示呼叫及狀態更新。
參數: string channel
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1735.
public void GlobalChatJoin(string channel)
結果: void.
呼叫:
InvokeNetClient.Socket.Send_ChatJoinCommand
內部實作程式碼,不能作為獨立腳本執行。
public void GlobalChatJoin(string channel) => Invoke(() => NetClient.Socket.Send_ChatJoinCommand(channel ?? string.Empty));執行所示呼叫及狀態更新。
參數: string pattern, int limit, bool ignoreCase
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2116.
public int InJournalEx(string pattern, int limit, bool ignoreCase)
結果: int.
呼叫:
FindJournal
內部實作程式碼,不能作為獨立腳本執行。
public int InJournalEx(string pattern, int limit, bool ignoreCase)
=> FindJournal(pattern, null, null, limit, false, ignoreCase);執行所示呼叫及狀態更新。
參數: int id
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:246.
public int IsContainer(int id)
結果: int.
呼叫:
Invoke_world.Get
內部實作程式碼,不能作為獨立腳本執行。
public int IsContainer(int id) => Invoke(() => (_world.Get(unchecked((uint)id)) as Item)?.ItemData.IsContainer == true ? 1 : 0);執行所示呼叫及狀態更新。
參數: int id
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:251.
public int IsHouse(int id)
結果: int.
呼叫:
Invoke_world.Get
內部實作程式碼,不能作為獨立腳本執行。
public int IsHouse(int id) => Invoke(() => (_world.Get(unchecked((uint)id)) as Item)?.IsMulti == true ? 1 : 0);執行所示呼叫及狀態更新。
參數: int x, int y
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:674.
public int IsTreeTile(int x, int y)
結果: int.
呼叫:
InvokeAnyTileAtStaticFilters.IsTree
內部實作程式碼,不能作為獨立腳本執行。
public int IsTreeTile(int x, int y) => Invoke(() => AnyTileAt(x, y, tile =>
tile is Static or Multi && StaticFilters.IsTree(tile.Graphic, out _)) ? 1 : 0);執行所示呼叫及狀態更新。
參數: int id
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2291.
public int IsWarMode(int id)
結果: int.
呼叫:
Invoke_world.Get
內部實作程式碼,不能作為獨立腳本執行。
public int IsWarMode(int id) => Invoke(() => (_world.Get(unchecked((uint)id)) as Mobile)?.InWarMode == true ? 1 : 0);執行所示呼叫及狀態更新。
參數: Mobile mobile, HashSet<ushort> wantedTypes, HashSet<ushort> wantedColors, int range, IgnoreTypeFilter ignoredTypes
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:4135.
private bool MatchesFindMobile(Mobile mobile, HashSet<ushort> wantedTypes, HashSet<ushort> wantedColors, int range, IgnoreTypeFilter ignoredTypes)
結果: bool.
呼叫:
IsSelfMobileMatchesFindIdentityMatchesFindMobileRange
內部實作程式碼,不能作為獨立腳本執行。
private bool MatchesFindMobile(Mobile mobile, HashSet<ushort> wantedTypes, HashSet<ushort> wantedColors, int range, IgnoreTypeFilter ignoredTypes)
{
return !IsSelfMobile(mobile)
&& MatchesFindIdentity(mobile, wantedTypes, wantedColors, ignoredTypes)
&& MatchesFindMobileRange(mobile, range);
}執行所示呼叫及狀態更新。
參數: int id, int delay
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1495.
public void OpenContainer(int id, int delay)
結果: void.
條件:
delay > 0
呼叫:
UseObjectWait
內部實作程式碼,不能作為獨立腳本執行。
public void OpenContainer(int id, int delay)
{
UseObject(id);
if (delay > 0)
{
Wait(delay);
}
}執行所示呼叫及狀態更新。
參數: text, textColorRgb, backgroundColorRgb, fontSize, fontName
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1862.
`public void PrintFormattedJournal(string text, int textColorRgb, int backgroundColorRgb,
int fontSize, string fontName)`
結果: void.
呼叫: Invoke.
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { using var journalContext = new JournalMessageContext("script"); text ??= string.Empty; int effectivePointSize = Math.Clamp(fontSize <= 0 ? 10 : fontSize, 4, 72); string effectiveFontName = string.IsNullOrWhiteSpace(fontName) ? "Consolas" : fontName.Trim(); uint textArgb = 0xFF000000u | (unchecked((uint)textColorRgb) & 0x00FFFFFFu); ushort hue = ClientFontManager.FindNearestUoHue(textArgb); // ClassicUO's in-world system chat uses UO font IDs rather than arbitrary // desktop point sizes. Map the requested point size to a stable UO font // index while retaining the exact Stealth formatting request in IDE output. byte uoFont = (byte)Math.Clamp((effectivePointSize + 1) / 3, 0, byte.MaxValue); GameActions.Print(_world, text, hue, SCRIPT_PRINT_MESSAGE_TYPE, uoFont, true); string background = backgroundColorRgb < 0 ? "default" : $"#{(unchecked((uint)backgroundColorRgb) & 0x00FFFFFFu):X6}"; _manager.AppendIdeOutput(_scriptKey, $"UO.AddToSystemJournalEx [text=#{(textArgb & 0x00FFFFFFu):X6}; bg={background}; " + $"font='{effectiveFontName}' {effectivePointSize}pt; uoFont={uoFont}; hue=0x{hue:X4}] {text}"); ReportStatus($"UO.AddToSystemJournalEx formatted journal line: {effectiveFontName} " + $"{effectivePointSize}pt, background {background}"); }). 多載候選:來源未確認實際選用哪個候選。 -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Invoke:Invoke(() => { using var journalContext = new JournalMessageContext("script"); text ??= string.Empty; int effectivePointSize = Math.Clamp(fontSize <= 0 ? 10 : fontSize, 4, 72); string effectiveFontName = string.IsNullOrWhiteSpace(fontName) ? "Consolas" : fontName.Trim(); uint textArgb = 0xFF000000u | (unchecked((uint)textColorRgb) & 0x00FFFFFFu); ushort hue = ClientFontManager.FindNearestUoHue(textArgb); // ClassicUO's in-world system chat uses UO font IDs rather than arbitrary // desktop point sizes. Map the requested point size to a stable UO font // index while retaining the exact Stealth formatting request in IDE output. byte uoFont = (byte)Math.Clamp((effectivePointSize + 1) / 3, 0, byte.MaxValue); GameActions.Print(_world, text, hue, SCRIPT_PRINT_MESSAGE_TYPE, uoFont, true); string background = backgroundColorRgb < 0 ? "default" : $"#{(unchecked((uint)backgroundColorRgb) & 0x00FFFFFFu):X6}"; _manager.AppendIdeOutput(_scriptKey, $"UO.AddToSystemJournalEx [text=#{(textArgb & 0x00FFFFFFu):X6}; bg={background}; " + $"font='{effectiveFontName}' {effectivePointSize}pt; uoFont={uoFont}; hue=0x{hue:X4}] {text}"); ReportStatus($"UO.AddToSystemJournalEx formatted journal line: {effectiveFontName} " + $"{effectivePointSize}pt, background {background}"); }). 多載候選:來源未確認實際選用哪個候選。 -
ClassicUO.Game.GameActions.Print:GameActions.Print(_world, text, hue, SCRIPT_PRINT_MESSAGE_TYPE, uoFont, true). -
ClassicUO.Game.Managers.YokoInjectionManager.AppendIdeOutput:_manager.AppendIdeOutput(_scriptKey, $"UO.AddToSystemJournalEx [text=#{(textArgb & 0x00FFFFFFu):X6}; bg={background}; " + $"font='{effectiveFontName}' {effectivePointSize}pt; uoFont={uoFont}; hue=0x{hue:X4}] {text}"). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ReportStatus:ReportStatus($"UO.AddToSystemJournalEx formatted journal line: {effectiveFontName} " + $"{effectivePointSize}pt, background {background}").
內部實作程式碼,不能作為獨立腳本執行。
public void PrintFormattedJournal(string text, int textColorRgb, int backgroundColorRgb,
int fontSize, string fontName) => Invoke(() =>
{
using var journalContext = new JournalMessageContext("script");
text ??= string.Empty;
int effectivePointSize = Math.Clamp(fontSize <= 0 ? 10 : fontSize, 4, 72);
string effectiveFontName = string.IsNullOrWhiteSpace(fontName) ? "Consolas" : fontName.Trim();
uint textArgb = 0xFF000000u | (unchecked((uint)textColorRgb) & 0x00FFFFFFu);
ushort hue = ClientFontManager.FindNearestUoHue(textArgb);
// ClassicUO's in-world system chat uses UO font IDs rather than arbitrary
// desktop point sizes. Map the requested point size to a stable UO font
// index while retaining the exact Stealth formatting request in IDE output.
byte uoFont = (byte)Math.Clamp((effectivePointSize + 1) / 3, 0, byte.MaxValue);
GameActions.Print(_world, text, hue, SCRIPT_PRINT_MESSAGE_TYPE, uoFont, true);
string background = backgroundColorRgb < 0
? "default"
: $"#{(unchecked((uint)backgroundColorRgb) & 0x00FFFFFFu):X6}";
_manager.AppendIdeOutput(_scriptKey,
$"UO.AddToSystemJournalEx [text=#{(textArgb & 0x00FFFFFFu):X6}; bg={background}; "
+ $"font='{effectiveFontName}' {effectivePointSize}pt; uoFont={uoFont}; hue=0x{hue:X4}] {text}");
ReportStatus($"UO.AddToSystemJournalEx formatted journal line: {effectiveFontName} "
+ $"{effectivePointSize}pt, background {background}");
});執行所示呼叫及狀態更新。
參數: int mobileId, string name
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:297.
public void RenameMobile(int mobileId, string name)
結果: void.
呼叫:
InvokeGameActions.Rename
內部實作程式碼,不能作為獨立腳本執行。
public void RenameMobile(int mobileId, string name) => Invoke(() => GameActions.Rename((uint)mobileId, name ?? string.Empty));執行所示呼叫及狀態更新。
參數: 沒有參數。
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1582.
public void Salute()
結果: void.
呼叫:
InvokeGameActions.EmoteAction
內部實作程式碼,不能作為獨立腳本執行。
public void Salute() => Invoke(() => GameActions.EmoteAction("salute"));執行所示呼叫及狀態更新。
參數: string message
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:1567.
public void Say(string message)
結果: void.
呼叫:
SendServerSpeech
內部實作程式碼,不能作為獨立腳本執行。
public void Say(string message) => SendServerSpeech("UO.Say", message);執行所示呼叫及狀態更新。
參數: int triggerId
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2993.
public int SendGumpSelect(int triggerId)
結果: int.
呼叫:
InvokeServerGumpsUnsafe().LastOrDefaultServerGumpsUnsafeSendGumpButtonUnsafe
內部實作程式碼,不能作為獨立腳本執行。
public int SendGumpSelect(int triggerId) => Invoke(() =>
{
Gump gump = _selectedServerGump != null && !_selectedServerGump.IsDisposed
? _selectedServerGump : ServerGumpsUnsafe().LastOrDefault();
return SendGumpButtonUnsafe(gump, triggerId, "no active server gump");
});執行所示呼叫及狀態更新。
參數: int distance
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:206.
public void SetFindVertical(int distance)
結果: void.
呼叫:
Math.Clamp
內部實作程式碼,不能作為獨立腳本執行。
public void SetFindVertical(int distance) => State.FindVertical = Math.Clamp(distance, 0, 120);執行所示呼叫及狀態更新。
參數: int index, string text
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:2204.
public void SetJournalLine(int index, string text)
結果: void.
條件:
entry != null
呼叫:
InvokeGetJournalEntryUnsafe
內部實作程式碼,不能作為獨立腳本執行。
public void SetJournalLine(int index, string text) => Invoke(() =>
{
JournalEntry entry = GetJournalEntryUnsafe(index);
if (entry != null)
{
entry.Text = text ?? string.Empty;
}
});執行所示呼叫及狀態更新。
參數: int enabled
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:3979.
public void SetSpeechFilter(int enabled)
結果: void.
呼叫:
Invoke_manager.SetSpeechFilter
內部實作程式碼,不能作為獨立腳本執行。
public void SetSpeechFilter(int enabled) => Invoke(() => _manager.SetSpeechFilter(enabled != 0));執行所示呼叫及狀態更新。
參數: int id
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:847.
public void WaitTargetObject(int id)
結果: void.
呼叫:
_manager.QueueTarget
內部實作程式碼,不能作為獨立腳本執行。
public void WaitTargetObject(int id) => _manager.QueueTarget((uint)id, _cancellationToken);執行所示呼叫及狀態更新。
參數: 沒有參數。
來源: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:3305.
internal void ClearPendingTargets()
結果: void.
呼叫:
_pendingTargets.TryDequeue
內部實作程式碼,不能作為獨立腳本執行。
internal void ClearPendingTargets()
{
lock (_pendingTargetLock)
while (_pendingTargets.TryDequeue(out _)) { }
}執行所示呼叫及狀態更新。
參數: int index
來源: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:2811.
internal string GetScriptName(int index)
結果: string.
呼叫:
ElementAtRunningScripts
內部實作程式碼,不能作為獨立腳本執行。
internal string GetScriptName(int index) => ElementAt(RunningScripts(), index)?.Name ?? string.Empty;執行所示呼叫及狀態更新。
參數: 沒有參數。
來源: Project_Full/src/ClassicUO.Client/Game/Managers/YokoInjectionManager.cs:3547.
private string RequestedAutoloadPath()
結果: string.
呼叫:
string.IsNullOrWhiteSpacePath.GetFullPathPath.CombinePath.GetFileNamerequested.Trim
內部實作程式碼,不能作為獨立腳本執行。
private string RequestedAutoloadPath()
{
string requested = ProfileManager.CurrentProfile?.YokoAutoloadFile;
return string.IsNullOrWhiteSpace(requested) ? SelectedAutoloadPath
: Path.GetFullPath(Path.Combine(AutoloadPath, Path.GetFileName(requested.Trim())));
}執行所示呼叫及狀態更新。
參數: 沒有參數。
來源: Project_Full/src/ClassicUO.Client/Game/Map/Map.cs:251.
public IEnumerable<Chunk> GetUsedChunks()
結果: IEnumerable<Chunk>.
呼叫:
GetChunk
內部實作程式碼,不能作為獨立腳本執行。
public IEnumerable<Chunk> GetUsedChunks()
{
foreach (int i in _usedIndices)
{
yield return GetChunk(i);
}
}執行所示呼叫及狀態更新。
參數: long before, long after
來源: Project_Full/src/ClassicUO.Client/Game/UI/Gumps/SystemChatControl.cs:458.
internal static bool NeedsDirectViewportFallback(long before, long after)
結果: bool.
呼叫:
—
內部實作程式碼,不能作為獨立腳本執行。
internal static bool NeedsDirectViewportFallback(long before, long after) => before == after;執行所示呼叫及狀態更新。
參數: InjectionValue value, bool coordinateGoal = false
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/FollowStopCondition.cs:64.
public static FollowStopCondition[] Parse(InjectionValue value, bool coordinateGoal = false)
結果: FollowStopCondition[].
條件:
value.Kind != InjectionValueKind.Arrayrow.Kind != InjectionValueKind.Array || row.Array.Length != 3 || row.Array[0].Kind != InjectionValueKind.String || row.Array[1].Kind != InjectionValueKind.String || !Fields.TryGetValue((row.Array[0].String ?? string.Empty).Trim(), out FollowStopField field)threshold.Kind != InjectionValueKind.Integer && threshold.Kind != InjectionValueKind.Decimaldouble.IsNaN(number) || double.IsInfinity(number)
呼叫:
Fields.TryGetValue(row.Array[0].String ?? string.Empty).Trimrow.Array[1].String.Trimdouble.IsNaNdouble.IsInfinity
內部實作程式碼,不能作為獨立腳本執行。
public static FollowStopCondition[] Parse(InjectionValue value, bool coordinateGoal = false)
{
if (value.Kind != InjectionValueKind.Array)
throw new StatementFailedException("Follow: conditions must be an array of [field, comparison, number] rows.");
var result = new FollowStopCondition[value.Array.Length];
for (int i = 0; i < result.Length; i++)
{
InjectionValue row = value.Array[i];
if (row.Kind != InjectionValueKind.Array || row.Array.Length != 3
|| row.Array[0].Kind != InjectionValueKind.String || row.Array[1].Kind != InjectionValueKind.String
|| !Fields.TryGetValue((row.Array[0].String ?? string.Empty).Trim(), out FollowStopField field))
throw new StatementFailedException("Follow: each condition needs a supported field, comparison and numeric threshold.");
FollowComparison comparison;
switch (row.Array[1].String.Trim())
{
case "=": comparison = FollowComparison.Equal; break;
case "<>": comparison = FollowComparison.NotEqual; break;
case "<": comparison = FollowComparison.Less; break;
case "<=": comparison = FollowComparison.LessOrEqual; break;
case ">": comparison = FollowComparison.Greater; break;
case ">=": comparison = FollowComparison.GreaterOrEqual; break;
default: throw new StatementFailedException("Follow: comparison must be =, <>, <, <=, > or >=.");
}
InjectionValue threshold = row.Array[2];
if (threshold.Kind != InjectionValueKind.Integer && threshold.Kind != InjectionValueKind.Decimal)
throw new StatementFailedException("Follow: threshold must be a number (use 1/0 or true/false for flags).");
double number = threshold.Kind == InjectionValueKind.Integer ? threshold.Integer : threshold.Decimal;
if (double.IsNaN(number) || double.IsInfinity(number))
throw new StatementFailedException("Follow: threshold must be finite.");
result[i] = new FollowStopCondition(field, comparison, number);
if (coordinateGoal && result[i].RequiresMobile)
throw new StatementFailedException("Follow: target.* conditions require a character target; use distance, height, elapsed or self.* for coordinates.");
}
return result;
}執行所示呼叫及狀態更新。
參數: string value
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApi.cs:46.
private static int GetWordCount(string value)
結果: int.
呼叫:
GetWordCount
內部實作程式碼,不能作為獨立腳本執行。
private static int GetWordCount(string value) => GetWordCount(value," ");執行所示呼叫及狀態更新。
參數: string name
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3921.
public void AddObject(string name)
結果: void.
呼叫:
SystemMessagebridge.AddObject
內部實作程式碼,不能作為獨立腳本執行。
public void AddObject(string name)
{
SystemMessage($"What is {name}");
bridge.AddObject(name);
}執行所示呼叫及狀態更新。
參數: InjectionValue color
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6089.
public void ConColor(InjectionValue color)
結果: void.
呼叫:
NumberConversions.ToInt
內部實作程式碼,不能作為獨立腳本執行。
public void ConColor(InjectionValue color)
{
systemMessageColor = NumberConversions.ToInt(color);
}執行所示呼叫及狀態更新。
參數: InjectionValue type, InjectionValue color
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5328.
public int Count(InjectionValue type, InjectionValue color)
結果: int.
呼叫:
CountResolveTypeNumberConversions.ToInt
內部實作程式碼,不能作為獨立腳本執行。
public int Count(InjectionValue type, InjectionValue color)
=> Count(ResolveType(type), NumberConversions.ToInt(color), 0);執行所示呼叫及狀態更新。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5613.
private int CurrentJournalTime()
結果: int.
條件:
milliseconds <= 0d
呼叫:
—
內部實作程式碼,不能作為獨立腳本執行。
private int CurrentJournalTime()
{
double milliseconds = timeSource.SinceStart.TotalMilliseconds;
if (milliseconds <= 0d)
return 0;
return milliseconds >= int.MaxValue ? int.MaxValue : (int)milliseconds;
}回傳下列表達式的值。
參數: fields, figureText
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1219.
string SerializeMapFigure(int[] fields, string figureText)
結果: string.
結果: string.Join("|", fields.Select(value => value.ToString(CultureInfo.InvariantCulture))) + "|" + (figureText ?? string.Empty).
呼叫: string.Join, fields.Select.
內部實作程式碼,不能作為獨立腳本執行。
string SerializeMapFigure(int[] fields, string figureText)
=> string.Join("|", fields.Select(value => value.ToString(CultureInfo.InvariantCulture))) + "|" + (figureText ?? string.Empty);此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1638.
結果: InjectionValue.Unit.
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.CancelWaitTarget:bridge.CancelWaitTarget().
內部實作程式碼,不能作為獨立腳本執行。
case "cancelwaittarget": bridge.CancelWaitTarget(); return InjectionValue.Unit;此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1817.
結果: new InjectionValue(bridge.CheckLag(Arg(0, 10_000))).
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.CheckLag:bridge.CheckLag(Arg(0, 10_000)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0, 10_000).
內部實作程式碼,不能作為獨立腳本執行。
case "checklag": return new InjectionValue(bridge.CheckLag(Arg(0, 10_000)));此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1820.
結果: InjectionValue.Unit.
內部實作程式碼,不能作為獨立腳本執行。
case "clearbadobjectlist": state.BadObjects.Clear(); return InjectionValue.Unit;此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1290.
結果: InjectionValue.Unit.
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.ClearAutoShopRules:bridge.ClearAutoShopRules().
內部實作程式碼,不能作為獨立腳本執行。
case "clearshoplist":
bridge.ClearAutoShopRules(); return InjectionValue.Unit;此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1643.
結果: InjectionValue.Unit.
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.RequestClientTarget:bridge.RequestClientTarget(false).
內部實作程式碼,不能作為獨立腳本執行。
case "clientrequestobjecttarget": bridge.RequestClientTarget(false); return InjectionValue.Unit;此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1607.
結果: InjectionValue.Unit.
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.CloseClientGump:bridge.CloseClientGump(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
內部實作程式碼,不能作為獨立腳本執行。
case "closeclientgump": bridge.CloseClientGump(Arg(0)); return InjectionValue.Unit;此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1235.
結果: InjectionValue.Unit.
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.TextPrint:bridge.TextPrint(Text(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.TextOpen:bridge.TextOpen().
內部實作程式碼,不能作為獨立腳本執行。
case "fillinfowindow":
bridge.TextPrint(Text(0));
bridge.TextOpen();
return InjectionValue.Unit;此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1371.
結果: new InjectionValue(arguments.Length > 0 ? bridge.GetDexterity(Arg(0)) : bridge.Dexterity).
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetDexterity:bridge.GetDexterity(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Dexterity:bridge.Dexterity.
內部實作程式碼,不能作為獨立腳本執行。
case "getdex": return new InjectionValue(arguments.Length > 0 ? bridge.GetDexterity(Arg(0)) : bridge.Dexterity);此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1883.
結果: new InjectionValue(Array.Empty<InjectionValue>()).
條件: bridge is IApiGumpAccess reader; snapshot == null || state.IgnoredGumpIds.Contains(snapshot.Id) || state.IgnoredGumpSerials.Contains(snapshot.Serial).
呼叫:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetGumpId:bridge.GetGumpId(index). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetGumpSerial:bridge.GetGumpSerial(index). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetGumpTextLines:bridge.GetGumpTextLines(index). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetGumpButtonsDescription:bridge.GetGumpButtonsDescription(index). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetGumpFullLines:bridge.GetGumpFullLines(index). -
InjectionScript.Runtime.InjectionApiUO.StringArray:StringArray(snapshot.Text). -
InjectionScript.Runtime.InjectionApiUO.StringArray:StringArray(snapshot.Buttons). -
InjectionScript.Runtime.InjectionApiUO.StringArray:StringArray(snapshot.Controls).
內部實作程式碼,不能作為獨立腳本執行。
case "getgumpinfo":
{
int index = Arg(0);
GumpSnapshot snapshot;
if (bridge is IApiGumpAccess reader)
snapshot = reader.ReadGump(index);
else
{
int id = bridge.GetGumpId(index);
snapshot = id == 0 ? null : new GumpSnapshot(bridge.GetGumpSerial(index), id,
bridge.GetGumpTextLines(index), bridge.GetGumpButtonsDescription(index), bridge.GetGumpFullLines(index));
}
if (snapshot == null || state.IgnoredGumpIds.Contains(snapshot.Id)
|| state.IgnoredGumpSerials.Contains(snapshot.Serial))
return new InjectionValue(Array.Empty<InjectionValue>());
return new InjectionValue(new[]
{
new InjectionValue(snapshot.Serial), new InjectionValue(snapshot.Id), StringArray(snapshot.Text),
StringArray(snapshot.Buttons), StringArray(snapshot.Controls)
});
}此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1374.
結果: new InjectionValue(arguments.Length > 0 ? bridge.GetMana(Arg(0)) : bridge.Mana).
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.GetMana:bridge.GetMana(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Mana:bridge.Mana.
內部實作程式碼,不能作為獨立腳本執行。
case "getmana": return new InjectionValue(arguments.Length > 0 ? bridge.GetMana(Arg(0)) : bridge.Mana);此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1352.
結果: new InjectionValue(state.WalkUnmountTimer).
內部實作程式碼,不能作為獨立腳本執行。
case "getwalkunmounttimer": return new InjectionValue(state.WalkUnmountTimer);此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2041.
結果: new InjectionValue(selectedJournalEntry?.Font ?? 0).
內部實作程式碼,不能作為獨立腳本執行。
case "linetextfont": return new InjectionValue(selectedJournalEntry?.Font ?? 0);此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1710.
結果: InjectionValue.Unit.
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PartyCanLoot:bridge.PartyCanLoot(Arg(0) != 0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
內部實作程式碼,不能作為獨立腳本執行。
case "partycanlootme": bridge.PartyCanLoot(Arg(0) != 0); return InjectionValue.Unit;此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1704.
結果: InjectionValue.Unit.
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PartySay:bridge.PartySay(Text(1), Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(1). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
內部實作程式碼,不能作為獨立腳本執行。
case "partyprivatemessageto": bridge.PartySay(Text(1), Arg(0)); return InjectionValue.Unit;此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1270.
結果: new InjectionValue(bridge.PlayWav(Text(0))).
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.PlayWav:bridge.PlayWav(Text(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Text:Text(0).
內部實作程式碼,不能作為獨立腳本執行。
case "playwav": return new InjectionValue(bridge.PlayWav(Text(0)));此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1689.
結果: new InjectionValue(0); new InjectionValue(bridge.Step(Arg(0) & 7, Arg(1) != 0)).
條件: state.MoveExitOnDisconnect != 0 && bridge.IsOnline() == 0; state.MoveCheckStamina > 0 && bridge.Stamina < state.MoveCheckStamina; state.MoveOpenDoor != 0.
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.IsOnline:bridge.IsOnline(). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.OpenDoor:bridge.OpenDoor(). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Step:bridge.Step(Arg(0) & 7, Arg(1) != 0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(1). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Stamina:bridge.Stamina.
內部實作程式碼,不能作為獨立腳本執行。
case "step":
if (state.MoveExitOnDisconnect != 0 && bridge.IsOnline() == 0)
return new InjectionValue(0);
if (state.MoveCheckStamina > 0 && bridge.Stamina < state.MoveCheckStamina)
return new InjectionValue(0);
if (state.MoveOpenDoor != 0)
bridge.OpenDoor();
return new InjectionValue(bridge.Step(Arg(0) & 7, Arg(1) != 0));此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1528.
結果: InjectionValue.Unit.
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.StopAllScripts:bridge.StopAllScripts().
內部實作程式碼,不能作為獨立腳本執行。
case "stopallscripts": bridge.StopAllScripts(); return InjectionValue.Unit;此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1652.
結果: InjectionValue.Unit.
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.TargetToTile:bridge.TargetToTile(0, Arg(0), Arg(1), Arg(2)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(1). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(2).
內部實作程式碼,不能作為獨立腳本執行。
case "targettoxyz":
bridge.TargetToTile(0, Arg(0), Arg(1), Arg(2)); return InjectionValue.Unit;此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1721.
結果: InjectionValue.False; InjectionValue.True.
條件: !state.MapFigures.ContainsKey(id) || !TryMapFigureArg(1, out int[] figure, out string figureText); bridge.SetMapFigure(id, figure[0], figure[1], figure[2], figure[3], figure[4], figure[5], figure[6], figure[7], figure[8], figure[9], figureText) == 0.
呼叫:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::TryMapFigureArg:TryMapFigureArg(1, out int[] figure, out string figureText). -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.SetMapFigure:bridge.SetMapFigure(id, figure[0], figure[1], figure[2], figure[3], figure[4], figure[5], figure[6], figure[7], figure[8], figure[9], figureText). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::SerializeMapFigure:SerializeMapFigure(figure, figureText).
內部實作程式碼,不能作為獨立腳本執行。
case "updatefigure":
{
int id = Arg(0);
if (!state.MapFigures.ContainsKey(id) || !TryMapFigureArg(1, out int[] figure, out string figureText))
return InjectionValue.False;
if (bridge.SetMapFigure(id, figure[0], figure[1], figure[2], figure[3], figure[4], figure[5], figure[6], figure[7], figure[8], figure[9], figureText) == 0)
return InjectionValue.False;
state.MapFigures[id] = SerializeMapFigure(figure, figureText);
return InjectionValue.True;
}此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1251.
結果: new InjectionValue(bridge.UseType(ResolveType(arguments[0]), arguments.Length > 1 ? Arg(1) : -1)).
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.UseType:bridge.UseType(ResolveType(arguments[0]), arguments.Length > 1 ? Arg(1) : -1). -
InjectionScript.Runtime.InjectionApiUO.ResolveType:ResolveType(arguments[0]). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(1).
內部實作程式碼,不能作為獨立腳本執行。
case "usetype": return new InjectionValue(bridge.UseType(ResolveType(arguments[0]), arguments.Length > 1 ? Arg(1) : -1));此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1258.
結果: InjectionValue.Unit.
呼叫:
-
InjectionScript.Runtime.InjectionApiUO.CompactWaitGump:CompactWaitGump(arguments).
內部實作程式碼,不能作為獨立腳本執行。
case "waitgump": CompactWaitGump(arguments); return InjectionValue.Unit;此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1272.
結果: InjectionValue.Unit.
呼叫:
-
InjectionScript.Runtime.InjectionApiUO.WaitTargetObject:WaitTargetObject(Arg(0)). -
InjectionScript.Runtime.InjectionApiUO.ExecuteClientApiCompatibility::Arg:Arg(0).
內部實作程式碼,不能作為獨立腳本執行。
case "waittargetobject": WaitTargetObject(Arg(0)); return InjectionValue.Unit;此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2851.
呼叫:
-
InjectionScript.Runtime.InjectionApiUO.AddType:AddType(arguments).
內部實作程式碼,不能作為獨立腳本執行。
case "addtype":
AddType(arguments);
break;此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:2961.
呼叫:
-
InjectionScript.Runtime.InjectionApiUO.ExecuteLegacyManualAlias::Arg:Arg(0, state.FontColor).
內部實作程式碼,不能作為獨立腳本執行。
case "fontcolor": state.FontColor = Arg(0, state.FontColor); break;此分支僅處理指定的命令名稱。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3024.
呼叫:
-
InjectionScript.Runtime.InjectionApiUO.Unequip:Unequip("Neck").
內部實作程式碼,不能作為獨立腳本執行。
case "removeneckless": Unequip("Neck"); break;執行所示呼叫及狀態更新。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3773.
public int FindMobile()
結果: int.
呼叫:
FindMobile
內部實作程式碼,不能作為獨立腳本執行。
public int FindMobile() => FindMobile(new InjectionValue("all"), new InjectionValue("all"),
new InjectionValue("all"), new InjectionValue("all"));執行所示呼叫及狀態更新。
參數: InjectionValue type, InjectionValue color, InjectionValue container
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4718.
public string FindType(InjectionValue type, InjectionValue color, InjectionValue container)
結果: string.
呼叫:
FindType
內部實作程式碼,不能作為獨立腳本執行。
public string FindType(InjectionValue type, InjectionValue color, InjectionValue container)
=> FindType(type, color, container, new InjectionValue(-1));執行所示呼叫及狀態更新。
參數: int type
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4704.
public string FindType(int type)
結果: string.
呼叫:
FindType
內部實作程式碼,不能作為獨立腳本執行。
public string FindType(int type)
=> FindType(type, -1, -1);執行所示呼叫及狀態更新。
參數: int x1, int y1, int x2, int y2
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3692.
public int GetDistance(int x1, int y1, int x2, int y2)
結果: int.
呼叫:
Math.AbsMath.Max
內部實作程式碼,不能作為獨立腳本執行。
public int GetDistance(int x1, int y1, int x2, int y2)
{
int dx = Math.Abs(x1 - x2);
int dy = Math.Abs(y1 - y2);
return Math.Max(dx, dy);
}執行所示呼叫及狀態更新。
參數: string identifier
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3363.
public InjectionValue GetGump(string identifier)
結果: InjectionValue.
呼叫:
LastGump
內部實作程式碼,不能作為獨立腳本執行。
public InjectionValue GetGump(string identifier) => LastGump(identifier, -1);執行所示呼叫及狀態更新。
參數: string id
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4044.
public void GetStatus(string id)
結果: void.
呼叫:
GetStatusGetObject
內部實作程式碼,不能作為獨立腳本執行。
public void GetStatus(string id) => GetStatus(GetObject(id));執行所示呼叫及狀態更新。
參數: int index
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5530.
public string JournalColor(int index)
結果: string.
呼叫:
bridge.JournalColor
內部實作程式碼,不能作為獨立腳本執行。
public string JournalColor(int index) => bridge.JournalColor(index);執行所示呼叫及狀態更新。
參數: InjectionValue id
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4590.
public int MoveItem(InjectionValue id)
結果: int.
呼叫:
CompactMoveItem
內部實作程式碼,不能作為獨立腳本執行。
public int MoveItem(InjectionValue id)
=> CompactMoveItem(new[] { id });執行所示呼叫及狀態更新。
參數: InjectionValue id, InjectionValue amount, InjectionValue targetContainer
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4594.
public int MoveItem(InjectionValue id, InjectionValue amount, InjectionValue targetContainer)
結果: int.
呼叫:
CompactMoveItem
內部實作程式碼,不能作為獨立腳本執行。
public int MoveItem(InjectionValue id, InjectionValue amount, InjectionValue targetContainer)
=> CompactMoveItem(new[] { id, amount, targetContainer });依照程式碼所示的規則解析或查找參數值。
參數: entry
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5060.
InjectionValue ResolveEntry(InjectionValue entry)
結果: InjectionValue.
結果: entry; new InjectionValue(string.Join("|", parts)).
呼叫: (entry.String ?? string.Empty).Split, state.Types.TryGet, graphic.ToString, string.Join.
條件: entry.Kind != InjectionValueKind.String; state.Types.TryGet(parts[i], out int graphic).
內部實作程式碼,不能作為獨立腳本執行。
InjectionValue ResolveEntry(InjectionValue entry)
{
if (entry.Kind != InjectionValueKind.String) return entry;
string[] parts = (entry.String ?? string.Empty).Split('|');
for (int i = 0; i < parts.Length; i++)
if (state.Types.TryGet(parts[i], out int graphic))
parts[i] = graphic.ToString(CultureInfo.InvariantCulture);
return new InjectionValue(string.Join("|", parts));
}執行所示呼叫及狀態更新。
參數: int key
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:5391.
public void Press(int key)
結果: void.
呼叫:
KeyPress
內部實作程式碼,不能作為獨立腳本執行。
public void Press(int key) => KeyPress(key);執行所示呼叫及狀態更新。
參數: InjectionValue gumpIndex, InjectionValue triggerId
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3349.
public int SendGumpSelect(InjectionValue gumpIndex, InjectionValue triggerId)
結果: int.
呼叫:
bridge.SendGumpSelectNumberConversions.ToInt
內部實作程式碼,不能作為獨立腳本執行。
public int SendGumpSelect(InjectionValue gumpIndex, InjectionValue triggerId)
=> bridge.SendGumpSelect(NumberConversions.ToInt(gumpIndex), NumberConversions.ToInt(triggerId));執行所示呼叫及狀態更新。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4467.
public void SetReceivingContainer()
結果: void.
呼叫:
UnsetReceivingContainer
內部實作程式碼,不能作為獨立腳本執行。
public void SetReceivingContainer() => UnsetReceivingContainer();執行所示呼叫及狀態更新。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3488.
public int TicksSkill()
結果: int.
呼叫:
—
內部實作程式碼,不能作為獨立腳本執行。
public int TicksSkill() => ticksSkill;執行所示呼叫及狀態更新。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:3487.
public int TicksUse()
結果: int.
呼叫:
—
內部實作程式碼,不能作為獨立腳本執行。
public int TicksUse() => ticksUse;執行所示呼叫及狀態更新。
參數: InjectionValue flagRaw, InjectionValue x, InjectionValue y
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:6108.
public void Track(InjectionValue flagRaw, InjectionValue x, InjectionValue y)
結果: void.
呼叫:
TrackNumberConversions.ToInt
內部實作程式碼,不能作為獨立腳本執行。
public void Track(InjectionValue flagRaw, InjectionValue x, InjectionValue y)
=> Track(NumberConversions.ToInt(flagRaw), NumberConversions.ToInt(x), NumberConversions.ToInt(y));執行所示呼叫及狀態更新。
參數: string type, string color
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4089.
public int UseType(string type, string color)
結果: int.
呼叫:
UseTypeResolveTypeNumberConversions.ToInt
內部實作程式碼,不能作為獨立腳本執行。
public int UseType(string type, string color) => UseType(ResolveType(type), NumberConversions.ToInt(color));執行所示呼叫及狀態更新。
參數: InjectionValue id, InjectionValue type, InjectionValue color
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4361.
public void WaitTargetObjectType(InjectionValue id, InjectionValue type, InjectionValue color)
結果: void.
條件:
first <= 0 || second <= 0
呼叫:
GetObjectbridge.FindTypeResolveTypeNumberConversions.ToIntSystemMessagebridge.CancelNextTargetbridge.WaitTargetObject
內部實作程式碼,不能作為獨立腳本執行。
public void WaitTargetObjectType(InjectionValue id, InjectionValue type, InjectionValue color)
{
int first = GetObject(id);
int second = bridge.FindType(ResolveType(type), NumberConversions.ToInt(color), 1, -1, false);
if (first <= 0 || second <= 0)
{
SystemMessage("UO.WaitTargetObjectType: object or ground item not found");
bridge.CancelNextTarget();
return;
}
bridge.WaitTargetObject(first, second);
}執行所示呼叫及狀態更新。
參數: InjectionValue selector
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4301.
public void WaitTargetTile(InjectionValue selector)
結果: void.
條件:
!name.Equals("lasttile", StringComparison.OrdinalIgnoreCase)tile.Length < 4
呼叫:
(selector.String ?? string.Empty).Trimname.Equalsbridge.LastTileArray.Empty<int>SystemMessagebridge.CancelNextTargetbridge.WaitTargetTileTimer
內部實作程式碼,不能作為獨立腳本執行。
public void WaitTargetTile(InjectionValue selector)
{
string name = selector.Kind == InjectionValueKind.String
? (selector.String ?? string.Empty).Trim()
: string.Empty;
if (!name.Equals("lasttile", StringComparison.OrdinalIgnoreCase))
throw new NativeSubrutineException("UO.WaitTargetTile(one argument) accepts only 'lasttile'.");
int[] tile = bridge.LastTile() ?? Array.Empty<int>();
if (tile.Length < 4)
{
SystemMessage("UO.WaitTargetTile: lasttile is unavailable; next target request canceled.");
bridge.CancelNextTarget();
return;
}
bridge.WaitTargetTile(tile[0], tile[1], tile[2], tile[3]);
ticksTarget = Timer();
}呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:4712.
values
結果: values.
結果: new InjectionValue(FindAnyType(values[0], CombineMask(values, 1))).
呼叫: FindAnyType, CombineMask.
呼叫:
-
InjectionScript.Runtime.InjectionApiUO.FindAnyType:FindAnyType(values[0], CombineMask(values, 1)). -
InjectionScript.Runtime.InjectionApiUO.CombineMask:CombineMask(values, 1).
內部實作程式碼,不能作為獨立腳本執行。
values => new InjectionValue(FindAnyType(values[0], CombineMask(values, 1)))呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1032.
結果: bridge.Dexterity.
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Dexterity:bridge.Dexterity.
內部實作程式碼,不能作為獨立腳本執行。
() => bridge.Dexterity呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1048.
結果: bridge.Followers.
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Followers:bridge.Followers.
內部實作程式碼,不能作為獨立腳本執行。
() => bridge.Followers呼叫時執行已儲存的處理函式 delegate。註冊方法在建立 API 時建立此 delegate。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1042.
結果: bridge.Armor.
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Armor:bridge.Armor.
內部實作程式碼,不能作為獨立腳本執行。
() => bridge.Armor回傳下列表達式的值。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1007.
結果: getter(bridge.Self).
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Self:bridge.Self.
內部實作程式碼,不能作為獨立腳本執行。
() => getter(bridge.Self)回傳下列表達式的值。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1013.
value
結果: value.
結果: getter(GetObject(value)).
呼叫: getter, GetObject.
呼叫:
-
InjectionScript.Runtime.InjectionApiUO.GetObject:GetObject(value).
內部實作程式碼,不能作為獨立腳本執行。
value => getter(GetObject(value))回傳下列表達式的值。
參數: 沒有參數。
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs:1007.
結果: getter(bridge.Self).
呼叫:
-
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.Self:bridge.Self.
內部實作程式碼,不能作為獨立腳本執行。
() => getter(bridge.Self)執行所示呼叫及狀態更新。
參數: string name, int value
來源: Project_Full/external/InjectionScript/src/InjectionScript/Runtime/State/Globals.cs:43.
public void SetGlobal(string name, int value)
結果: void.
呼叫:
SetGlobalvalue.ToString
內部實作程式碼,不能作為獨立腳本執行。
public void SetGlobal(string name, int value) => SetGlobal(name, value.ToString(CultureInfo.InvariantCulture));執行所示呼叫及狀態更新。
參數: 沒有參數。
來源: Project_Full/src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs:4252.
private List<Gump> InspectableGumpsUnsafe()
結果: List<Gump>.
呼叫:
-
`UIManager.Gumps.Where(g => ReferenceEquals(g.World, _world)
&& !g.IsDisposed && g.IsVisible && g is not YokoInfoGump) .Reverse().Select(g => (Gump)g.SessionState ?? g).Distinct().ToList` -
`UIManager.Gumps.Where(g => ReferenceEquals(g.World, _world)
&& !g.IsDisposed && g.IsVisible && g is not YokoInfoGump) .Reverse().Select(g => (Gump)g.SessionState ?? g).Distinct` -
`UIManager.Gumps.Where(g => ReferenceEquals(g.World, _world)
&& !g.IsDisposed && g.IsVisible && g is not YokoInfoGump) .Reverse().Select` -
`UIManager.Gumps.Where(g => ReferenceEquals(g.World, _world)
&& !g.IsDisposed && g.IsVisible && g is not YokoInfoGump) .Reverse` -
UIManager.Gumps.Where -
ReferenceEquals -
ServerGumpsUnsafe().Where(g => !visible.Contains(g)).Concat(visible).ToList -
ServerGumpsUnsafe().Where(g => !visible.Contains(g)).Concat -
ServerGumpsUnsafe().Where -
ServerGumpsUnsafe -
visible.Contains
內部實作程式碼,不能作為獨立腳本執行。
private List<Gump> InspectableGumpsUnsafe()
{
// Inspector windows must not inspect themselves. Use session-owned
// records for server dialogs and the actual controls for local UI.
List<Gump> visible = UIManager.Gumps.Where(g => ReferenceEquals(g.World, _world)
&& !g.IsDisposed && g.IsVisible && g is not YokoInfoGump)
.Reverse().Select(g => (Gump)g.SessionState ?? g).Distinct().ToList();
return ServerGumpsUnsafe().Where(g => !visible.Contains(g)).Concat(visible).ToList();
}