Quantcast
WoWInterface - View Single Post - Help with using expirationTime
View Single Post
05-05-20, 01:23 PM   #6
save-disk
A Murloc Raider
Join Date: Feb 2020
Posts: 9
Thank you for your explanations and your help, it's very kind of you! I think I may be understanding wrong, because I tried both solutions you posted and I can't seem to get them to work - This was the little test I wrote, am I doing something stupid ive just overlooked here?

Lua Code:
  1. frame:RegisterEvent("UNIT_AURA");
  2. local function eventHandler(self, event, ...)
  3.   print "test1"
  4.  
  5. for i=1,40 do
  6.         local aura.name, aura.icon, aura.count, aura.type, aura.max_time, aura.end_time, aura.caster, aura.is_stealable = UnitAura("player", i);
  7.         if aura.max_time and aura.max_time > 0 then
  8.         aura.start_time = aura.end_time - aura.max_time;
  9.     elseif aura.end_time and aura.end_time > 0 then
  10.         aura.start_time = GetTime();
  11.         aura.max_time   = aura.end_time - aura.start_time;
  12.     else
  13.         aura.max_time   = nil;
  14.         aura.start_time = nil;
  15.         aura.end_time   = nil;
  16.     end
  17.    
  18.   if aura.name == Power Word: Shield then
  19.     print "test2"
  20.     end
  21. end
  22. end
  23. end
  Reply With Quote