KO API UO Dismount - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki
ะฃะบัะฐัะฝััะบะฐ ยท ะ ัััะบะธะน ยท 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)