View Single Post
02-18-13, 12:11 AM   #68
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
After reading the above, I thought perhaps I didn't write with clarity. The API page for callbacks suggests code for ResExpired and ResCastCancelled to be something like this:
Lua Code:
  1. function MyAddon:LibResInfo_ResExpired(targetUnit, targetGUID)
  2.     -- do something
  3. end
  4.  
  5. function MyAddon:LibResInfo_ResCastCancelled(casterUnit, casterGUID, targetUnit, targetGUID)
  6.     -- do something
  7. end
But according to LRI's code, the callbacks are actually
Lua Code:
  1. function MyAddon:LibResInfo_ResExpired(targetGUID, targetUnit)
  2.   -- oops, better make sure we have the right info!
  3. end
  4.  
  5. function MyAddon:LibResInfo_ResCastCancelled(casterGUID, casterUnit, targetGUID, targetUnit)
  6.     -- backwards?
  7. end
All other callbacks follow the API page.

Last edited by myrroddin : 02-18-13 at 12:17 AM. Reason: ResExpired only has target, not caster, duh!
  Reply With Quote