Skip to content

JA API UO Dismount

Bad Newbie edited this page Oct 16, 2026 · 3 revisions

Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어

UO.Dismount

C# シグネチャ

int UO.Dismount();

動作と戻り値

Mount と Dismount は手動ダブルクリックや戦闘モードの攻撃処理を使わず、使用要求を送ります。int は Mount レイヤー上の現在のアイテム serial であり、成功フラグではありません。応答は非同期なので Mount はまだ 0、Dismount は取り外し前の serial を返す場合があります。応答後に ObjAtLayer("Mount") を確認してください。

引数

引数はありません。

各コードブロックは独立した完全な .csx です。例の serial、type、座標を置き換えてください。引数順序と C# の名前付き引数はシグネチャに従います。

チャットコマンド

#dismount

完全な C# の例

各コードブロックは独立した完全な .csx です。例の serial、type、座標を置き換えてください。引数順序と C# の名前付き引数はシグネチャに従います。

1

int mountLayerSerial = UO.Dismount();
UO.Print(UO.Int2Hex(mountLayerSerial));

2

var before = UO.ObjAtLayer("Mount");
int currentSerial = UO.Dismount();
UO.Print($"{before} -> {UO.Int2Hex(currentSerial)}");

3

UO.Dismount();
await WaitAsync(250);
UO.Print(Convert.ToString(UO.ObjAtLayer("Mount")));

4

new CommandSample().Execute(UO);

sealed class CommandSample
{
    public void Execute(global::ClassicUO.CSharp.CSharpGameApi api)
    {
        int mountLayerSerial = api.Dismount();
        api.Print(api.Int2Hex(mountLayerSerial));
    }
}

内部呼び出し

CSharpGameApi.Dismount
  -> CSharpScriptGlobals
  -> InjectionScript.Runtime.InjectionApiUO.Dismount
ClassicUOInjectionApiBridge -> NativeMountController.Request
  -> OutgoingPackets.Send_UseObjectRequest (0x06)
  -> MountedLayerSerialUnsafe -> Player.FindItemByLayer(Layer.Mount)

参照元

ClassicUO · ServUO BaseMount

ClassicUO.Game.Managers.NativeMountController.Request

Clone this wiki locally