GnosisFixCastBarAnchoring
This WA allows you to keep a cast bar from the addon Gnosis anchored to its correspondent Blizzard party unit frame.
Gnosis is an addon that allows you to create custom cast bars for the unit you want and place them where you want. The problem occurs if you want to create cast bars for party frames with this addon, because although the addon allows you to anchor your cast bars to a certain frame, Blizzard party unit frames are not assigned to fixed units and can vary according to different parameters such as the selected ordering or other factors. The Blizzard unit frames for the party are named CompactPartyFrameMember1, CompactPartyFrameMember2, CompactPartyFrameMember3, CompactPartyFrameMember4, and CompactPartyFrameMember5. As mentioned, each of these frames does not have a specific unit assigned.
This WA allows us to solve this inconvenience, and will be in charge of monitoring the Gnosis casting bars indicated by the user and anchoring them to their corresponding unit frame when its needed.
For this WA to work, certain configuration by the user is necessary:
* The first thing is to create in Gnosis the desired cast bars for the party units, creating one for each unit ("party1", "party2", "party3", "party4", and one for "player" if desired), remember to assign it its corresponding unit in the "unit" configuration section of Gnosis. Each one is given a different name and in the "Anchoring" configuration section select "Anchor to frame" and write any anchor for all of them (the WA will reanchor them to they correct party frame anchors), so you can anchor all of them to "CompactPartyFrameMember1" for example .
* The second configuration step needed is to go to the configuration section of this WA -> Actions -> On Init and modify the values of the table aura_env.listCastBarsName, establishing as key (left part) the name given to the Gnosis cast bar and as value (right part) its associated unit. With this, the WA will be able to reposition the bar.
Finally, after finishing the configuration, you must do a /reload for everything to work correctly.
*********************************************************
A practical example to understand it better:
We want to create five simple castbars for the party frames, four for party1..4 and one for the player, like the next image:
First, we create a new castbar in the Gnosis addon for the "party1" unit, which we can name whatever we want, in this case we will name it "RaidAdvParty1". We configure it visually to our liking, but the important modified options are those shown in the following image:
It is important to select the corresponding unit and anchor it to a frame with the desired offset. We can anchor them all to the same frame CompactPartyFrameMember1 and the WA will take care of reanchoring each one where it corresponds.
We proceed to create the rest of the castbars for the other units in the same way: "party2", "party3", "party4" and "player", establishing for each one its corresponding unit in the options, and a different name for each one. In our case its name will be respectively "RaidAdvParty2", "RaidAdvParty3", "RaidAdvParty4" and "RaidAdvPlayer".
Then it only remains to modify this WA to indicate these created castbars. Let's go to the configuration of this WA -> Actions -> On Init and modify the table aura_env.listCastBarsName to indicate the name of these castbars that we create in Gnosis and their respective unit associated, leaving us with the following code for our example:
aura_env.listCastBarsName = {
["RaidAdvParty1"] = "party1",
["RaidAdvParty2"] = "party2",
["RaidAdvParty3"] = "party3",
["RaidAdvParty4"] = "party4",
["RaidAdvPlayer"] = "player",
}
After finishing the configuration we do a /reload and everything is ready. |
1、在门户里发表的文章仅代表作者本人的观点,与本网站立场无关。
2、门户的所有内容都不保证其准确性,有效性,时间性。阅读本站内容因误导等因素而造成的损失本站不承担连带责任。
3、当政府机关依照法定程序要求披露信息时,论坛均得免责。
4、若因线路及非本站所能控制范围的故障导致暂停服务期间造成的一切不便与损失,论坛不负任何责任。
5、注册会员通过任何手段和方法针对论坛进行破坏,我们有权对其行为作出处理。并保留进步追究其责任的权利。
|