Code Monkey home page Code Monkey logo

Comments (15)

nanjuekaien1 avatar nanjuekaien1 commented on August 24, 2024

@ShiFangJuMie
https://wago.io/io6u6l723

from threatclassic2.

ShiFangJuMie avatar ShiFangJuMie commented on August 24, 2024

@ShiFangJuMie
https://wago.io/io6u6l723

This WA is only a threat value, not my own or teammate's threat ranking.

哈卡、哈霍兰这种boss除了要关注OT,还要关注自己的仇恨排在第几。再一个火法的点燃机制问题,通过WA监控可以实现谁的点燃、现在仇恨第几,如果能高效率的实现排名显示是最佳。现在实现的方法是有的,但是没一个独立的wa都相当于要独立计算一个完整的仇恨列表然后排序,运行效率比较低

from threatclassic2.

dfherr avatar dfherr commented on August 24, 2024

Hi,

check this out https://wowwiki.fandom.com/wiki/API_UnitDetailedThreatSituation

from threatclassic2.

ShiFangJuMie avatar ShiFangJuMie commented on August 24, 2024

Hi,

check this out https://wowwiki.fandom.com/wiki/API_UnitDetailedThreatSituation

Thank you for your reply.
I understand the UnitDetailedThreatSituation API, but it can only get information such as threat percent, value, etc., but can't get the ranking in the complete threat list

This demand is particularly need in Hakkar/Zug, Huhuran/TAQ and other threat ranking sensitive battles.

from threatclassic2.

dfherr avatar dfherr commented on August 24, 2024

Make a list of all group members (for groups that is player, pet, party1, party2, etc.. or for raids raid1 through raidN) then get the info from the API and then sort it. The performance isn't a problem here. That's 40 low-cost commands and a sort on a very small array.

I'm not sure why you want to do that in WA tho. WA is not designed for this. That's why there are addons (like ThreatClassic2) to handle it. You get a threat ranking. What feature are you missing?

from threatclassic2.

nanjuekaien1 avatar nanjuekaien1 commented on August 24, 2024

@ShiFangJuMie 我明白你的意思,现在是API给限制了,我们获取API存在时间误差的。最快1秒,最慢3秒才能刷新一次数据。我们干涉不了暴雪的限制;)

from threatclassic2.

nanjuekaien1 avatar nanjuekaien1 commented on August 24, 2024

现在WA仇恨监控,都是直接调取暴雪的API了。

from threatclassic2.

ShiFangJuMie avatar ShiFangJuMie commented on August 24, 2024

现在WA仇恨监控,都是直接调取暴雪的API了。

嗯,这些我都明白的亲,我在NGA和WAGO上研究了大量的案例,目前我其实是能够实现我的想法的,但是我觉得,效率很低,相比于获得的仇恨百分比,排名的数字有很明显的延迟,这个延迟就来源于WA运行的自定义代码造成的

而且在测试过程中,当猎人假死、盗贼消失,还会造成数据更新的问题,所以我最初的想法也是最偷懒的想法,就是TC2原有的列表,我能读取到,那么我就可以高效率低消耗的完成我的想法,因为我不知道如何得到TC2的仇恨列表,所以我的WA就不得不重新发明轮子。

其实现在问题更加麻烦,因为现在开始还要监控哪个火法得到了点燃,他的排名在第几。

我一直纠结于的问题就在于,我想知道某个人在排名中第几,TAQ中例如哈霍兰,他既需要换T,又不吃嘲讽,所以控制好第几仇恨就比较重要。在常规的击杀开荒中也许不会这么在意这个问题,我们工会是竞速玩法,又是部落,所以仇恨问题尤其纠结

from threatclassic2.

ShiFangJuMie avatar ShiFangJuMie commented on August 24, 2024

Make a list of all group members (for groups that is player, pet, party1, party2, etc.. or for raids raid1 through raidN) then get the info from the API and then sort it. The performance isn't a problem here. That's 40 low-cost commands and a sort on a very small array.

I'm not sure why you want to do that in WA tho. WA is not designed for this. That's why there are addons (like ThreatClassic2) to handle it. You get a threat ranking. What feature are you missing?

For example, in the fight against hakkar in Zug, the 1st threat ranking will be controlled and 2nd will be attacked. Therefore, the limit ranking of DPS class should be 3rd or lower. There is a similar situation in the battle of Taq, such as Huhuran.

Therefore, I need to observe my own threat ranking, need to observe the rank of the ignite mage, and issue a reminder.

If I use two WA to observe the ranking of myself and ignite mage, I need to run the same Lua script in the two WA respectively, and consider the situations such as the same name of the hunter pet and the character, the feign death of the hunter, and the vanish of the rogue.

Therefore, if I can get the threat list of TC2 by WA, I will finish these with higher efficiency and lower resource cost, and even more ideas.

from threatclassic2.

nanjuekaien1 avatar nanjuekaien1 commented on August 24, 2024

你没发现TC2有时候也有延迟吗?

from threatclassic2.

ShiFangJuMie avatar ShiFangJuMie commented on August 24, 2024

你没发现TC2有时候也有延迟吗?

我的感受到的延迟是在TC2的延迟基础上又延迟,虽然按理说我得到的数据延迟不延迟和TC2没关系- -
不过这个延迟问题不是想讨论的问题哈~

from threatclassic2.

ShiFangJuMie avatar ShiFangJuMie commented on August 24, 2024

当我需要同时关注自己和点燃法师的仇恨排名时,我就需要额调用80次API,加上TC2的调用120次,我既担心触碰到接口调用频率,又觉得40次调用可以完成的事情,用3倍的调用是一个很浪费的事情-_-!

When I need to observe the threat ranking of myself and ignite Mage at the same time, I need to call the API 80 times and TC2 call 40 times. I am worried about touching the interface call limit.It is a waste to use 120 calls for things that can be done with 40 calls.

from threatclassic2.

nanjuekaien1 avatar nanjuekaien1 commented on August 24, 2024

wa在1.13.5前是调用的LibThreatClassic2库文件,暴雪开放了仇恨API,TC2放弃LibThreatClassic2文件后,都是全部调用暴雪提供的仇恨API,我感觉你的想法调用TC2列表在返回WA还不是延迟+延迟吗?因为TC2现在也是直接调用的暴雪仇恨API

from threatclassic2.

dfherr avatar dfherr commented on August 24, 2024

There is no public endpoint of the threat list of threatclassic2. Exposing internal features for external use means I have to consider this in changes and keep compatibility. Please understand that I do not intend to do this. ThreatClassic2 currently has 2 modes (raw threat and scaled threat) and I plan major changes for raw threat in the next release, which would impact compatibility.

Please use the API, if you plan to build features around your own threat list.

I also do not see how you need 120 calls. With 40 calls you have the complete list and can store it in a table that can be reused across multiple WA. You will never need 120 calls, if you're doing it right. I'm also not aware of any limit. Also, calling the API should just be a lookup in a local table, which is a very fast operation. Even calling it 10.000 times a second, should not have any noticeable performance impact. And you only need to update it about once per second, when you get a UNIT_THREAT_LIST_UPDATE event.

from threatclassic2.

ShiFangJuMie avatar ShiFangJuMie commented on August 24, 2024

Thank you for your reply. If there is no plan to open TC2 external calls, I will optimize the existing Lua script to improve the current problems

from threatclassic2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.