Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

魔法书释放问题 #6

Closed
codeofyu opened this issue Dec 9, 2018 · 7 comments
Closed

魔法书释放问题 #6

codeofyu opened this issue Dec 9, 2018 · 7 comments

Comments

@codeofyu
Copy link

codeofyu commented Dec 9, 2018

目的:可以使用message释放魔法书里的技能,让魔法书里的通魔技能瞬态模拟释放
遇到了释放魔法书里的技能时,message函数无效

@actboy168
Copy link
Owner

自己实现魔法书就行了,没必要用魔兽的

@codeofyu
Copy link
Author

codeofyu commented Dec 9, 2018

自己实现魔法书是什么原理,用选择其他单位来模拟?这样有缺陷

@actboy168
Copy link
Owner

惠惠的天赋升级就是这样做

@codeofyu
Copy link
Author

codeofyu commented Dec 9, 2018

惠惠的天赋升级使用后会打断当前指令,我希望是瞬态的,我就是模仿你的惠惠写的(= ̄ω ̄=)

@codeofyu
Copy link
Author

codeofyu commented Dec 9, 2018

message能有解决方案吗
我尝试去看了下message.order_immediate的参数第二个参数默认为0
static int limmediate(lua_State* L)
{
if (!get_select_unit()){
lua_pushboolean(L, 0);
return 1;
}
search();
uint32_t order = lua_tointeger(L, 1);
uint32_t flags = lua_tointeger(L, 2);
base::fast_call(real::immediate_order, order, 0, flags); --就是这里
lua_pushboolean(L, 1);
return 1;
}
而我用鼠标或键盘释放魔法书里的技能,发现第二个参数(unk)是有输出值的
namespace fake {
int __fastcall immediate_order(uint32_t order, uint32_t unk, uint32_t flags)
{
if (order >= 'A000')
{
printf("immediate_order, %c%c%c%c, %X, %X\n", ((char*)&order)[3], ((char*)&order)[2], ((char*)&order)[1], ((char*)&order)[0], unk, flags);
}
else
{
printf("immediate_order, %X, %X, %X\n", order, unk, flags);--就是这里
}
return base::fast_call(real::immediate_order, order, unk, flags);
}

@actboy168
Copy link
Owner

打断或者不打断只是一个技能的属性

@codeofyu
Copy link
Author

message.order_immediate只提供了两个参数,客户端发送信息的时候无法对魔法书里的通魔技能生效,我测试出来的现象发现与unk参数有关,因为我在英雄单位本身的3X4技能窗口里释放技能,immediate_order输出unk为0,但是在不同的魔法书的3X4技能窗口里释放技能,immediate_order输出unk为12CCB6D4(不同的魔法书拥有不同的输出),但是我无法修改。
我的目的是实现释放魔法书里的通魔技能而且不打断当前命令,是不是无法实现

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants