• 0

    posted a message on Half Finished Unifying Spell Tracking library.
    Here is an attachment of the library:
    Posted in: Libraries
  • 0

    posted a message on Half Finished Unifying Spell Tracking library.
    There are many different philosophies to sharing spell information.

    Some believe in only sending information on spells they are interested in(Healcomm).
    Some believe in sending all starts/stops/sucesses/interrupts (Comcastlib).
    Some just send the start and stop for a single spell (CTraid Rez).
    Some believe in only sending target information (Healsync).
    Some believe guessing at cast targets is a necessary feature, others feel otherwise (Dorjae's/Nissesync).
    ... the list goes on (Healbot, etc)

    I started writing a library to attempt to unite all of these different philosophies. However, I have since had my guild of over a year dissolve on me, and my interest in Warcraft has disappeared. So I am left with a grandiose vision to unite spell communication and tracking under one banner, and a half finished piece of code full of ideas.

    However, I was hoping to spark a glimmer of interest in someone here. It is in that hope I link my unfinished code. If nothing else it will server as a proof of concept or an example of spell tracking to future addons:

    http://losmuertos.houseofbob.net/?q=node/22385

    The idea behind it is to have it scale to the addon's needs.
    It should allow:
    1) Spell Registration - this information needs to be shared
    2) Optional Long Distance Tracking - START/STOP/DELAY/INTERUPT need to be communicated.
    3) Optional Target scanning - Guess at someone's spell target by assuming their target. (half implimented.. tracks scanned targets, but currently doesn't distinguish between accurate/inaccurate)
    4) CastingInfo function - Returns what someone is casting (not implimented)
    5) CastingOn function - returns a list of people casting on a target (not implimented)
    6) Event Callbacks for key events/all events pertaining to the spelllist(currently UNIT_SPELLCAST_* is non-key, where START/STOP/etc is KEY)
    7) Remote Callbacks - A way to append information to the event (the structure is there, but it is not finished)
    8) Incompatible Version Tracking - Major changes should make the libraries ignore each other.

    Anyway, if you are intrested in this, yay, if not, I hope it serves as an example of what to do/not to do ;)
    Posted in: Libraries
  • 0

    posted a message on CallbackHandler-1.0.lua - Fire() Bug or not?
    CallbackHandler-1.0.lua creates a new table for undefined Fire() events.

    For instance, AceComm-3.0 lets CallbackHandler decide if the prefix from CHAT_MSG_ADDON(event,prefix,message,distribution,sender) is registered or not. In doing so, ANY addon sending a message has a table created under callbacks.events.

    Is this the way Fire() is supposed to work? I did not expect it to create tables in such a fashion.
    Posted in: Ace3
  • 0

    posted a message on AceSerializer-3.0 Suggestion
    Screw it.. I'll just internalize the code and hack it into what I need it to be :p
    Posted in: Ace3
  • 0

    posted a message on AceSerializer-3.0 Suggestion
    Functionally, yes.

    Is there some way to do what I need to do with AceSerializer-3.0 in its current form simpler (more efficient) than making a new array?
    Posted in: Ace3
  • 0

    posted a message on AceSerializer-3.0 Suggestion
    Currently trying to serialize an array with a function in it results in AceSerializer-3.0 throwing an error, about being unable to serialize functions, and it fails to serialize anything. I was wondering if it would be possible to ignore the function key/value pair completely.

    I currently have a table that has data that needs to be shared with other clients.. but it also passes callback functions which don't need to be passed. With the current form of AceSerializer-3.0, I'd have to make a copy of the array without the callbacks.


    Am I missing something obvious?

    Edit: peanut gallery
    Posted in: Ace3
  • 0

    posted a message on How to Detect a MouseLeave of a 3D model?
    OK.. here is MouseOverUnitLib-1.0 (with test example) in its very nearly final form.

    I removed all of the hooks except one: GameTooltip:HookScript("OnTooltipCleared",...
    This hook is necessary to detect a transition between 2 models of the same name.

    Everything is triggered through OnUpdate now. If nothing can get triggered, OnUpdate gets disabled.
    It can be set to be triggered off of 3D models, unitframes, or both.
    Tested to work with viewports (see test.lua)

    I don't know how useful this lib will be... but there it is.

    Edit: Add Beta2. I just added some convenience functions
    Edit: Add Beta3. I made it work with LibStub.lua. I also noticed that mouseovers on Blizard frame mana/health bars wern't returning unitIDs, so I forced it in.
    Edit: Add Beta4. Taking into account some patch 2.2 changes and found a better way to tie into Blizard mana/health bars/raidtab frames. Frame is still a callback parameter because it is still possible to have a frame with a unit identifier that doesn't work with mouseover. I choose to return party/raid/target unitID's over the mouseover unitID.
    Posted in: Lua Code Discussion
  • 0

    posted a message on How to Detect a MouseLeave of a 3D model?
    Oh.. duh... That is because the OnUpdate handler is called right before each frame is painted. Hmm.. that will work, even if it gets triggered as many times a second as your FPS.
    self:SetScript("OnUpdate", etc...). Ok.. I'll add it back in.
    Posted in: Lua Code Discussion
  • 0

    posted a message on How to Detect a MouseLeave of a 3D model?
    "OnUpdate" off of what though. It doesn't seem to fire at all on GameTooltip

    Edit: Oh.. I see... I didn't comprehend what OnUpdate was
    Posted in: Lua Code Discussion
  • 0

    posted a message on How to Detect a MouseLeave of a 3D model?
    That is essentially what I've done. I'm thinking I'll just strip the 3d mouseover functionality out for now. Another fun side effect of UPDATE_MOUSEOVER_UNIT is that is doesn't fire when you mouseover an invalid spelltarget while in a spell target choosing state.

    My conclusion is that it is not possible to detect a MouseLeave from a 3D model, nor maybe even consistently detect a mouseEnter on a 3D model.
    Posted in: Lua Code Discussion
  • 0

    posted a message on How to Detect a MouseLeave of a 3D model?
    This is essentially so clickcasters can see Healsync-like spell bars when they mouseover someone. The other example above has it implemented for mousoverframes, but not 3Dmouseovers. You have to type '/ns mouseover on' to turn it on though.

    I am still left with the problem of detecting a mouseleave on 3d models
    Posted in: Lua Code Discussion
  • 0

    posted a message on How to Detect a MouseLeave of a 3D model?
    I don't do this because it is possible to have a frame with a unitID that doesn't fire OnTooltipSetUnit.

    Healbot is an example of this, and there are several in my guild that use it.
    Posted in: Lua Code Discussion
  • 0

    posted a message on How to Detect a MouseLeave of a 3D model?
    That doesn't start a trigger or event. There is no other way to trigger a mouseover of a unitframe other than to hook every frame with a unit ID or potential unit ID. That is how Clique works.

    Only difference is clique has an array of valid unitframes, and I scan for frames with keywords. And I was thinking of adding a frame array anyway.

    Look at the other example to see why this is necessary.
    Posted in: Lua Code Discussion
  • 0

    posted a message on How to Detect a MouseLeave of a 3D model?
    I am looking for a trigger to leaving a 3D model with a unitID.

    I'm writing a little library to detect a OnEnter/OnLeave of any unit (including mouseover and UnitFrames).

    Below: MouseOverUnitLibExample.zip has a simple example of the library.
    Below: NisseSyncBeta3.zip (Distributed internally to my guild only) is an example of why such a library would be useful (While I haven't integrated the library, this is where I originally wrote the mouseoverunitframe functionality).

    Figuring out how to detect a mouseLeave on a 3D player model is the last thing I have to do.

    Edit: Fixed a bug in MouseOverUnitLibExample.zip
    Edit: Fixed a Tainting issue
    Edit: oops.. I left an unused/non-existent library referenced
    Edit: SEE IN POST WAY BELOW for a more recent lib (MouseOverUnitLib-1.0Beta1(withexample).zip)
    Edit: Removed NisseSync example.. a better way way found IN THE POST WAY BELOW.
    Posted in: Lua Code Discussion
  • 0

    posted a message on How to Detect a MouseLeave of a 3D model?
    I know you can use UPDATE_MOUSEOVER_UNIT to detect a OnEnter on a 3D model, and I know you can use CURSOR_UPDATE to detect the OnLeave on a 3D model that changes the cursor.

    How do you detect a OnLeave on a 3D model that doesn't change the cursor?

    I noticed that tooltips have no problem detecting when you OnLeave a 3D model, so my next inclination is to hook some function in the tooltips. Any idea which one that should be? A quick "FadeOut" test didn't seem to work. While this:

    GameTooltip:HookScript("OnTooltipCleared", GameTooltip_OnTooltipSetUnit)

    ...gets close, it does not trigger after leaving. There is a delay while the tooltip fades.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.