WOW 插件开发/活动

发布于 2024-08-13 09:43:25 字数 211 浏览 10 评论 0原文

不确定这是否是一个合适的编程问题;但这里......

我写了一个非常简单的附加组件,当某些咒语变得可用时(压制/复仇)显示文本/播放声音。

但我一直无法找到合适的事件来监听来检查这一点。我的黑客方法是每当任何事件传递给我时简单地检查我关心的咒语的状态。

有我可以使用的特定事件吗?我浏览了 WoWWiki 上的文档,似乎没有找到任何相关内容。

Not sure if this is an appropriate programming question or not; but here goes....

I've written a very simple add-on that displays text/plays a sound when certain spells become usable (Overpower / Revenge).

But I've been unable to find the appropriate event to listen for to check this. My hack-ish approach is to simply check the state of the spells I care about whenever any event is passed to me.

Is there a specific event that I can be using? I went through the docs on WoWWiki and didn't seem to find anything relevant.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

天涯离梦残月幽梦 2024-08-20 09:43:25

曾经有一个插件可以让你保持拼写,我忘记了它的名字......它太棒了!有一段时间,我的愤怒超出了我的承受范围。但暴雪认为这会让玩家失去太多的行动,所以他们停止为这种事情生成事件。具体来说,从大约两年前开始,他们的政策是游戏事件不能发起任何玩家操作(移动、投射等)。

如今,插件会连接到诸如移动键之类的东西,并在玩家移动时检查拼写的状态。这很笨拙,但相当接近做你想做的事。

不过,您并不打算启动玩家操作,而只是玩弄 GUI。那应该还是可以的。让我看一下...

WOW 插件编程的最佳资源之一是 WoW Wiki ,我刚刚引用了 buff 事件列表的链接。看来 UNIT_AURA 活动可能就是您正在寻找的活动,不过您还是亲自去看看吧!

There used to be an addon that kept you spelled up, I forgot its name... it was GREAT! For a while I had more rage than I knew what to do with. But Blizzard decided that that was taking too much action out of player hands, so they stopped generating events for this kinda thing. Specifically, since about 2 years ago their policy is that no player actions (moving, casting, etc.) can be initiated by game events.

Nowadays, addons hook into things like the movement keys and check the status of spellups whenever the player moves around. It's klutzy, but comes reasonably close to doing what you want.

Still, you're not looking to initiate player action, just diddle with the GUI. That should still be possible. Lemme take a look...

One of the best resources for WOW addon programming is the WoW Wiki, from which I've just quoted a link to the buff event list. It looks like the UNIT_AURA event might be the one you're looking for, but go see for yourself!

染墨丶若流云 2024-08-20 09:43:25

我建议使用COMBAT_LOG_EVENT_UNFILTERED。我在我编写的一个插件中使用它来通知我某些咒语效果,效果很好。

我通常使用 wowprogramming.com 来获取 API 文档,但在本例中 wowwiki 确实对事件有更好的描述以及如何使用它。

在最近的 3.3 补丁中,此事件对于某些法术效果无法正确触发,因此如果它似乎不适合您,请记住这一点。

I'd recommend using COMBAT_LOG_EVENT_UNFILTERED.I use it in an addon I wrote to notify me of certain spell procs and it works great.

I usually use wowprogramming.com for API documentation but in this case wowwiki does have a better description of the event and how to use it.

With the recent 3.3 patch this event isn't firing correctly for certain spell procs so just keep that in mind if it doesn't seem to be working for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文