13 - PvPDuration fix
I use [PvP:Append(PvPDuration:FormatDuration:Paren)] in CowTip. The problem is it shows MY duration on EVERYONE'S tooltip. I guess this will solve the problem:
Categories\Status.lua lines 284-292
*********************
code = function(unit)
if (UnitIsUnit(unit,"player") or UnitIsUnit(unit,"pet")) and IsPVPTimerRunning() then
return GetPVPTimer() / 1000
else
return nil
end
end,
arg = {
'unit', 'string;undef', 'player'
},
ret = 'number;nil',
events = 'PLAYER_FLAGS_CHANGED#$unit;Update',
*********************
| User | When | Change |
|---|---|---|
| TAP3AH | Mar 25, 2009 at 13:12 UTC | Changed description:Categories\Status.lua lines 284-292 ********************* code = function(unit) - if ((unit == "player") or (unit == "pet")) and IsPVPTimerRunning() then + if (UnitIsUnit(unit,"player") or UnitIsUnit(unit,"pet")) and IsPVPTimerRunning() then return GetPVPTimer() / 1000 else return nil |
| TAP3AH | Mar 25, 2009 at 12:40 UTC | Changed description:I use [PvP:Append(PvPDuration:FormatDuration:Paren)] in CowTip. The problem is it shows MY duration on EVERYONE'S tooltip. I guess this will solve the problem: - Categories\Status.lua lines 284-285 + Categories\Status.lua lines 284-292 + ********************* - code = function(unit) + code = function(unit) - if ((unit == "player") or (unit == "pet")) and IsPVPTimerRunning() then + if ((unit == "player") or (unit == "pet")) and IsPVPTimerRunning() then + return GetPVPTimer() / 1000 + else + return nil + end + end, + arg = { + 'unit', 'string;undef', 'player' + }, + ret = 'number;nil', + events = 'PLAYER_FLAGS_CHANGED#$unit;Update', + ********************* |
| TAP3AH | Mar 25, 2009 at 12:08 UTC | Create |