|
Post by marukale on Dec 19, 2008 8:16:35 GMT -5
Hi,
I play a resto shammy and after finally getting round to replacing totemus I stumbled across this. So far it seems great and I have been messing around with it a fair bit.
I was wondering if it is possible to get the middle sphere and guages to work with my shields?
Basically what I'm hoping for is: Outer Gauge: Charges of Earth Shield left Inner Gauge: Charges of Water Shield left Left Click: Cast water shield Right Click: Refresh Earth Shield Middle Click: Cast Earth Shield on target Alt+Right Click: Cast Earth Shield on Self
So far I can get Left Click, Middle Click and Alt+right Click working, I can kind of get right click working if I use my focus target as the earth shielded person (middle click casts earth shield and sets them as focus (via a macro), right click casts earth shield on focus). But is it possible to do it without using focus through this mod?
Also how would I go about changing the gauges I didn't spot any options for doing things like this? Would the water shield glyph mess everything up as the max for water shield is increased to 4 with it.
Maru
|
|
|
Post by Moongaze on Dec 19, 2008 16:26:16 GMT -5
Welcome to LunarSphere Right now, the gauges don't have support for anything other than the 7-9 gauge events I provide in the Gauges tab of the LunarSphere Settings window. I do plan to add two more gauge events, one being item count, another being cooldown, so that you can assign a spell or item to a gauge and it will fill based upon the item count you have (up to a specified amount you set) or fill (or shrink) as a cooldown goes down. People have mentioned that they want the ability to track charges on a buff with the gauges or the sphere text events, and I do want to add this, as long as it is something simple as tracking charges on your character. I don't have a high enough level shaman to test these things, but I'm hoping that if you place a shield on someone, you see the charges as normal as a buff. If not, and you only see the charges when you target someone, it will be a little odd for LS to do and I might not provide that feature... but we'll see. If I do add this feature, I am not sure if the WOW UI lets me grab the "max charges" a buff can have. If so, then there will be no issue with obtaining the max and filling the gauge properly. If I can't grab this information properly, I might have to let the user set a "max charges" field for the gauge so the user can specify this feature. As for refreshing the Earth Shield, it can be done the way you want, while out of combat, but I can't assign targets once combat starts and the button will be locked to whatever target it had. I'll be honest and say that this functionality that you want probably won't appear within LS, mainly due to the fact that I would need to make a button type or two to handle this feature (one to cast on a target and save that target as a "custom focus" or something, and the other to cast onto the "custom focus" if it exists). Custom focus is just a fancy way of saying "saved target" ... and I can do that with the buttons, but I don't have a good idea on how to implement it properly. Maybe something like: "Spell/Item/Macro (Set saved target)" "Spell/Item/Macro (Cast on saved target)" Where if you use the "Set saved target" feature, it cast the spell on the target and save that target inside the button for all "Cast on saved target" button types. Then, when you click the "Cast on saved target" button, it will cast it on the last saved target. That's the only thing I can think of, and ... urgh, we'll see =) I think I might add this in the future, after the public release. Sorry if my response might not have been 100% what you wanted to hear, but that's the best I can offer and say at this time. I will put this stuff on my list of things to do once the public release of LS is out =)
|
|
|
Post by marukale on Dec 21, 2008 6:18:57 GMT -5
That's ok, I figured I would have a go at working on it, its been a while since I looked at mods so it took a while but I think I have the gauges working. For water shield it is rather simple it is mainly: elseif (checkType == LS_EVENT_WS) then local water_shield = select(4,UnitBuff(UnitName("player"),"Water Shield")); if(water_shield == nil) then water_shield = 0; end spherePercent = (tonumber(water_shield) / 4) * 100; So this would work for any self buff that has charges (you would want to change "Water Shield" and 4 to variables (and I guess do something for localization). It requires the COMBAT_LOG_EVENT_UNFILTERED events to trigger.
Earth Shield is much harder. I currently have it so that it works out what the maximum number of charges are when it is cast (different specs have different number of charges so that seems the simplist way), it should work when someone else puts earth shield on my target (the gauge should change colour) I've not found another helpful resto shaman to test this with yet. It only works on party/raid members. The target for the gauge is set when you cast Earth Shield and it doesn't matter if that target is no longer your target or focus.
I've not got the full list of spell IDs for earth shield which is required for identifying the spell in all cases (there are 5 ranks with each rank having 2 talent points increasing the number of charges so I assume there are 15 IDs in total) I might mess around on the PTR to find them all out.
If you want to see the mess that I wrote I'm sure I can find somewhere to upload it.
|
|
|
Post by Moongaze on Dec 21, 2008 16:47:46 GMT -5
If I do this, it will probably be like the item count and cooldowns feature, but you can not only drag the spell to the assignment box (which is "easy mode" setup for buff that have the same name as the spell), but also allow you to type the name in, in case you want to track a buff that you don't cast, or a proc buff or anything like that. Then, whenever the buff is found, LS will store the max amount of charges it found as a record for the "max" charges part. This would be created during the gameplay, never stored for later use in another play session. That way, if you cast Water Shield without a Glyph, LS will see that 3 charges is the max. Then, if you grab the Glyph 20 minutes later and recast the spell, LS will see that 4 is the new max and adjust accordingly. Or, I might just set the max charges when the buff appears and use it until the buff fades. Once it fades, the max charges is set to 0 (indicating that it needs to be refreshed, and when you cast it again, the max count is set to the amount given. This will allow for your shields, which might have 4 as the max charges, once they run out, to reset in case someone else casts a 3 charge version on you, setting the percentage properly. COMBAT_LOG_EVENT_UNFILTERED is an expensive event to mess with. It fires a lot I have to do some good filtering to make sure I don't constantly have LS running up the CPU cycles every time anybody does anything in the game Thoughts?
|
|
|
Post by marukale on Dec 21, 2008 18:15:41 GMT -5
Or, I might just set the max charges when the buff appears and use it until the buff fades. Once it fades, the max charges is set to 0 (indicating that it needs to be refreshed, and when you cast it again, the max count is set to the amount given. This will allow for your shields, which might have 4 as the max charges, once they run out, to reset in case someone else casts a 3 charge version on you, setting the percentage properly. This is essentially what I did with Earth Shield, it works out when Earth Shield has been cast and sets the max at that point (it needs to locate the spell cast to work out who cast it as it is rather important for the shaman to know if it is their earth shield). I can't see much of a problem with the idea of setting max to 0 when buff fades and everytime you find the number of charges to be higher than the current max set the max to it. It wouldn't work properly if the mod reloads when you have half the buff on but I can't see any way round that. COMBAT_LOG_EVENT_UNFILTERED is an expensive event to mess with. It fires a lot I have to do some good filtering to make sure I don't constantly have LS running up the CPU cycles every time anybody does anything in the game Thoughts? I've still got to mess around with performance in raids, it might be a case of moving the filter around to increase performance even if it kind of makes the code a bit disjointed. Instantly returning if the event isn't about party/raid members and other fun filters should reduce the number a fair bit in cities etc. One problem might be that using buff names might not be very effective, from what I have been reading some of the names aren't consistant with the spells, but using the IDs is a pain as there can be so many for each spell.
|
|
|
Post by marukale on Dec 24, 2008 3:23:08 GMT -5
I was having a look at what other buffs I might want to monitor in such a way and figured inner fire on my priest would be nice. However, so far I have three buffs that I might want to track: Earth Shield Water Shield Inner Fire
The problem is that each require different events to identify procs: SPELL_HEAL SPELL_ENERGIZE damage taking event
There is no SPELL_AURA_MODIFIED event which would be nice. There is a SPELL_AURA_REMOVED_DOSE but this only seems to apply to buffs that proc on spell cast (such as tidal waves). Also SPELL_AURA_REFRESH seems rather bugged, it only procs if the buff being refreshed is identical to the buff refreshing it so as soon as you loose a charge when you refresh it the event wont fire.
It would be nice if there were 4 events to monitor: SPELL_AURA_APPLIED SPELL_AURA_REFRESH SPELL_AURA_MODIFIED SPELL_AURA_REMOVED
But unfortunalty Blizzard aint that thoughtful. With SPELL_AURA_REFRESH not working properly refreshes really have to be monitored by SPELL_CAST_SUCCESS and then with the huge amount of ways that a buff may proc it doesn't seem possible to filter out that many events. If it is limitted to only self buffs then you can very easily cut out all the ones that aren't being applied to (a proc on being hit should show as targetting the player) or from the player (a proc that happens on spell cast should show as coming from the player)
|
|
|
Post by Moongaze on Dec 24, 2008 16:57:20 GMT -5
In theory, if the buff counts are being checked, a simple refresh every .5 seconds should work. If all you are doing is grabbing the current count on a buff, it's one line of code, one query, and it's just grabbing data from the client and typically not the server, and since most of this data, if not all, is already calculated and stored in the client before you call the "Info" function, it's just pulling data from an existing table and it has little to no effect on the CPU use of the addon. Much like the "range checking" that buttons do, it might just need to be constantly checked and if there is a change in the number, a graphic update would be needed. I do that for some of the gauge events already for the ones that fire updates a LOT ... so I imagine the same process could be used.
|
|