WoWInterface (
-   MoP Beta archived threads (
-   -   SmartRes2 and LibResComm-1.0 (

myrroddin 08-12-12 02:45 AM

SmartRes2 and LibResComm-1.0
I updated SmartRes2 and LibResComm-1.0 for Mist of Pandaria. No errors as I tested them, but both need more thorough testing, especially if anyone is in a level 25+ guild on the beta.

Neither addon will work on live servers with their current builds.

SR2 gained a new slash command, /smartres test or /sr test which will show the test bars without loading the entire config screen. This is for people who don't have an LDB display, which already offers this option.

Both addons need some Italian loving in the localization department. There are also several untranslated strings for other languages. Please help!

Phanx 08-12-12 08:30 PM

Have you considered using the built-in resurrection API instead of LibResComm-1.0? I don't know about any other addons, but Grid uses the API now, so that's likely cutting down on the install base for LibResComm.

Also, links to the download and localization pages would probably be a good idea. :)

Vlad 08-13-12 02:55 AM

That's true, there is new API to help resurrection so it could be neat to use that instead of using the custom code. ;)

myrroddin 08-13-12 09:48 AM

As to why the library is still useful: I forgot to mention the Lib:IsUnitBeingRessed(unit) returns both boolean and resser, whereas the Blizzard API just returns the boolean, afaik.

Links. You can get to the localization tab of both from them.

tl;dr: The API does not return caster, only boolean for unit being ressed. Nor does it return cast time. Also, if your target is a unit frame or in the world frame, you get "unknown" and with the library, you always get a target, which is especially important if OTHER people want to know whom you are ressing. You need a comm for that information.

Vlad 08-13-12 09:53 AM

Shame because Blizzard went trough the trouble to implement a new API that works fine for showing if someone is being ressed or not, but could have added name, cast start, cast end, e.g. information, like a couple of more parameters returned and it would have been a good addition that saves us a lot of coding. :(

myrroddin 08-13-12 10:08 AM

Vladinator, while it is true that you can get quite a lot of information from UnitHasIncomingResurrection() and UnitCastingInfo() between them, even combined, there are gaps. The two biggest are the lack of caster and especially getting a target from someone else casting. Strangely, you can't even use UnitCastingInfo() to get a target to pass to UnitHasIncomingResurrection() because the former does not return a target. And you can't pass caster to the latter.

Only UNIT_SPELLCAST_SENT has caster and target, and it is a player-only event. Unless MoP changed that, but I doubt it.

So for those of us who want to know who is ressing whom, we still need LibResComm. I have no issues dropping it if and when Blizzard fills the gaps in their API returns.

Vlad 08-13-12 10:15 AM

Hehe, I understood. I was merely pointing out that I feel a bid disappointed of the new API, that it's not as complete as it could have been, it was just a couple of parameters away from being very useful. I have no problems having LibResComm around. ;)

myrroddin 08-13-12 10:28 AM

No worries mate. Although, the two changes Blizzard would need to make in order to depreciate the library is open _SENT to all units, and add caster as a return to UHIR(). Those would make my day. Even if they only added the caster return, Phanx could pass that to UCI(), get the spell name, and put the appropriate icon on Grid's frames. That would be cool. Unless Grid already has that in a way I can't figure out due to tiredness.

As for SmartRes2, I got asked in Cata "with Mass Resurrection, doesn't that make SR2 obsolete?" Not really, because you don't use MR all the time because of overkill, and SR2 offers other things like the tattle-tell on duplicate casts. Among other features. Plus, afaik, it is still the only res monitor to support Engineering devices if you turn on the guessed resses.

p3lim 08-13-12 10:32 AM

Wouldn't CLEU have enough information to replace comms?

myrroddin 08-13-12 10:37 AM

Yes, CLEU does have everything needed, or pretty close. I'd have to check, since I haven't looked at the event since patch 3.x. The downside is that CLEU fires an obscene amount of times just to get what's needed for resurrection, creating and discarding "mini-events" along the way. It was much faster to register the casting events specifically, and now with RegisterUnitEvent, it gets highly efficient.

But yes, in short, I could use the combat log event, but that's hitting a nail with a pile driver.

Vlad 08-13-12 11:03 AM

I wish we could pass some filter criteria to CLEU, so it could only fire on specific spells even, if we wanted. I.e. source must be friendly and dead and his Moonfire must be hitting a pet/minion. I mean, you can probably do it and it would save performance I reckon, oh well, maybe not THAT specific criteria, hehe.

myrroddin 08-20-12 08:21 PM

I tested UnitHasIncomingResurrection() and INCOMING_RESURRECT_CHANGED, and updated both on since they were undocumented. The good news about the event is it is guaranteed to return a target.

Unfortunately, neither returns a caster, and thus we are still limited to the player-only UNIT_SPELLCAST_SENT :mad:

To overcome a long-standing bug in SmartRes2 where if a resser stops their cast, the target becomes non-ressable for a few seconds, I added the complete boolean to LibResComm's _ResEnd callback. This is a non-breaking change. complete is true if the cast successfully finishes, otherwise it is false.

WowAce has the latest MoP alphas, which need testing. I got a few victims to fall to their doom in Stormwind, but that may not be enough. The change log for SmartRes2 r207 is extensive.

All times are GMT -6. The time now is 09:00 AM.

vBulletin © 2018, Jelsoft Enterprises Ltd
© 2004 - 2017 MMOUI