Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Code:
- if not tdump then tdump = function (t, s)
- local s = s or 0
- for i, v in pairs(t) do
- local kstring = string.rep(" ", s)
- if (type(i) == "number") then
- --kstring = kstring.."["..tostring(i).."] = "
- else
- kstring = kstring..tostring(i).." = "
- end
- if (type(v) == "table") then
- print(kstring.."{")
- tdump(v, s+1)
- print (string.rep(" ", s).."}")
- elseif (type(v) == "string") then
- print(kstring..'"'..v..'"')
- else
- print(kstring..tostring(v))
- end
- end
- end -- function tdump
- end
- local watchedunits = {["player"] = true,
- ["player.target"] = true,
- ["player.pet"] = true,
- ["focus"] = true}
- local function DumpBuffs(unit, bufflist)
- local bufftable = Inspect.Buff.Detail(unit, bufflist)
- print("-----------------------")
- print(Inspect.Unit.Lookup(unit))
- tdump(bufftable)
- end
- local function OnBuffAdd(unit, buffs)
- if watchedunits[Inspect.Unit.Lookup(unit)] then
- print("---OnBuffAdd---")
- print("Inspect.System.Time() = "..Inspect.System.Time())
- DumpBuffs(unit, buffs)
- end
- end
- table.insert(Event.Buff.Add, {OnBuffAdd, "TestAddon", "OnBuffAdd"})
- local function OnBuffChange(unit, buffs)
- if watchedunits[Inspect.Unit.Lookup(unit)] then
- print("---OnBuffChange---")
- print("Inspect.System.Time() = "..Inspect.System.Time())
- DumpBuffs(unit, buffs)
- end
- end
- table.insert(Event.Buff.Change, {OnBuffChange, "TestAddon", "OnBuffChange"})
- local function OnBuffRemove(unit, buffs)
- if watchedunits[Inspect.Unit.Lookup(unit)] then
- print("---OnBuffRemove---")
- print("Inspect.System.Time() = "..Inspect.System.Time())
- print(Inspect.Unit.Lookup(unit))
- tdump(buffs)
- end
- end
- table.insert(Event.Buff.Remove, {OnBuffRemove, "TestAddon", "OnBuffRemove"})
- Results:
- 02:49:36: ---OnBuffAdd---
- 02:49:36: Inspect.System.Time() = 1053.4929799619
- 02:49:36: -----------------------
- 02:49:36: player
- 02:49:36: b800000003903765A = {
- 02:49:36: remaining = 2502.1645507813
- 02:49:36: duration = 3599.953125
- 02:49:36: caster = "u0258800010FA3050"
- 02:49:36: icon = "Data/\UI\ability_icons\poisonone2b.dds"
- 02:49:36: name = "Virulent Poison"
- 02:49:36: ability = "a0000000075A0818A"
- 02:49:36: }
- 02:49:46: ---OnBuffAdd---
- 02:49:46: Inspect.System.Time() = 1064.0603348964
- 02:49:46: -----------------------
- 02:49:46: player
- 02:49:46: b800000003903765D = {
- 02:49:46: remaining = 2491.5969238281
- 02:49:46: duration = 3599.953125
- 02:49:46: caster = "u0258800010FA3050"
- 02:49:46: icon = "Data/\UI\ability_icons\poisonone2a.dds"
- 02:49:46: name = "Lethal Poison"
- 02:49:46: ability = "a0000000006A7885E"
- 02:49:46: }
- 02:50:00: ---OnBuffRemove---
- 02:50:00: Inspect.System.Time() = 1078.1209378515
- 02:50:00: player
- 02:50:00: b800000003903765A = true
- 02:50:00: ---OnBuffAdd---
- 02:50:00: Inspect.System.Time() = 1078.1234428397
- 02:50:00: -----------------------
- 02:50:00: player
- 02:50:00: b8000000039037660 = {
- 02:50:00: remaining = 2477.544921875
- 02:50:00: duration = 3599.9611816406
- 02:50:00: caster = "u0258800010FA3050"
- 02:50:00: icon = "Data/\UI\ability_icons\poisonone2b.dds"
- 02:50:00: name = "Virulent Poison"
- 02:50:00: ability = "a0000000075A0818A"
- 02:50:00: }
- Inspect.Buff.Detail() is called when the buff is applied, but [remaining] value is not even close to [duration].
- 03:02:10: ---OnBuffAdd---
- 03:02:10: Inspect.System.Time() = 1807.3810756078
- 03:02:10: -----------------------
- 03:02:10: player.target
- 03:02:10: b80000000367869AA = {
- 03:02:10: expired = 1791.8101806641
- 03:02:10: icon = "Data/\UI\ability_icons\charge_spike.dds"
- 03:02:10: debuff = true
- 03:02:10: poison = true
- 03:02:10: remaining = 0
- 03:02:10: caster = "u0258800010FA3050"
- 03:02:10: duration = 59.8671875
- 03:02:10: name = "Spike Charge"
- 03:02:10: ability = "a00000000373ADFEF"
- 03:02:10: }
- Inspect.Buff.Detail() is called when the buff is applied, but [remaining] is set to 0 and we have [expired] field which does not make sense: [duration] and system time do not add up to it.
- 03:02:11: ---OnBuffRemove---
- 03:02:11: Inspect.System.Time() = 1809.2710877945
- 03:02:11: player.target
- 03:02:11: b80000000367869AA = true
- 03:02:11: ---OnBuffAdd---
- 03:02:11: Inspect.System.Time() = 1809.2738721044
- 03:02:11: -----------------------
- 03:02:11: player.target
- 03:02:11: b8000000036786AE3 = {
- 03:02:11: expired = 1793.7158203125
- 03:02:11: icon = "Data/\UI\ability_icons\charge_spike.dds"
- 03:02:11: debuff = true
- 03:02:11: poison = true
- 03:02:11: remaining = 0
- 03:02:11: caster = "u0258800010FA3050"
- 03:02:11: stack = 2
- 03:02:11: duration = 59.8515625
- 03:02:11: name = "Spike Charge"
- 03:02:12: ability = "a00000000373ADFEF"
- 03:02:12: }
- Second stack of "Spike Charge" was added to the target; it triggered two buff events: Event.Buff.Remove and Event.Buff.Add. [remaining] and [expired] values still do not make sense.
- 03:02:14: ---OnBuffRemove---
- 03:02:14: Inspect.System.Time() = 1811.7583465924
- 03:02:14: player.target
- 03:02:14: b8000000036786AE3 = true
- 03:02:14: ---OnBuffAdd---
- 03:02:14: Inspect.System.Time() = 1811.7609034924
- 03:02:14: -----------------------
- 03:02:14: player.target
- 03:02:14: b8000000036786C7E = {
- 03:02:14: expired = 1796.2043457031
- 03:02:14: icon = "Data/\UI\ability_icons\charge_spike.dds"
- 03:02:14: debuff = true
- 03:02:14: poison = true
- 03:02:14: remaining = 0
- 03:02:14: caster = "u0258800010FA3050"
- 03:02:14: stack = 3
- 03:02:14: duration = 59.8515625
- 03:02:14: name = "Spike Charge"
- 03:02:14: ability = "a00000000373ADFEF"
- 03:02:14: }
- Added third stack of the same debuff; same two events triggered; [expired] and [remaining] do not make sense.
- 03:02:16: ---OnBuffRemove---
- 03:02:16: Inspect.System.Time() = 1813.7155494866
- 03:02:16: player.target
- 03:02:16: b8000000036786C7E = true
- 03:02:16: ---OnBuffAdd---
- 03:02:16: Inspect.System.Time() = 1813.7181246242
- 03:02:16: -----------------------
- 03:02:16: player.target
- 03:02:16: b8000000036786D68 = {
- 03:02:16: expired = 1798.1767578125
- 03:02:16: icon = "Data/\UI\ability_icons\charge_spike.dds"
- 03:02:16: debuff = true
- 03:02:16: poison = true
- 03:02:16: remaining = 0
- 03:02:16: caster = "u0258800010FA3050"
- 03:02:16: stack = 4
- 03:02:16: duration = 59.8359375
- 03:02:16: name = "Spike Charge"
- 03:02:16: ability = "a00000000373ADFEF"
- 03:02:16: }
- Fourth stack. All the same: [expired] and [remaining] do not make sense.
- 03:02:18: ---OnBuffRemove---
- 03:02:18: Inspect.System.Time() = 1815.8600129952
- 03:02:18: player.target
- 03:02:18: b8000000036786D68 = true
- 03:02:18: ---OnBuffAdd---
- 03:02:18: Inspect.System.Time() = 1815.8625209491
- 03:02:18: -----------------------
- 03:02:18: player.target
- 03:02:18: b8000000036786EB4 = {
- 03:02:18: expired = 1800.3052978516
- 03:02:18: icon = "Data/\UI\ability_icons\charge_spike.dds"
- 03:02:18: debuff = true
- 03:02:18: poison = true
- 03:02:18: remaining = 0
- 03:02:18: caster = "u0258800010FA3050"
- 03:02:18: stack = 5
- 03:02:18: duration = 59.8515625
- 03:02:18: name = "Spike Charge"
- 03:02:18: ability = "a00000000373ADFEF"
- 03:02:18: }
- Fifth stack of "Spike Charge". [expired] and [remaining] do not make sense.
- 03:02:21: ---OnBuffAdd---
- 03:02:21: Inspect.System.Time() = 1818.8750783647
- 03:02:21: -----------------------
- 03:02:21: player.target
- 03:02:21: b80000000367870C7 = {
- 03:02:21: expired = 1857.1805419922
- 03:02:21: remaining = 0
- 03:02:21: icon = "Data/\UI\ability_icons\last_stand.dds"
- 03:02:21: caster = "u0258800010FA3050"
- 03:02:21: debuff = true
- 03:02:21: duration = 5.9921875
- 03:02:21: name = "High Explosives"
- 03:02:21: ability = "a00000000714351C4"
- 03:02:21: }
- Detonated the charges, triggered "High Explosives" debuff on the target. [expired] and [remaining] do not make sense.
- 03:02:21: ---OnBuffAdd---
- 03:02:21: Inspect.System.Time() = 1818.9679204679
- 03:02:21: -----------------------
- 03:02:21: player
- 03:02:21: b8000000039037687 = {
- 03:02:21: expired = 1843.2508544922
- 03:02:21: remaining = 0
- 03:02:21: duration = 19.96875
- 03:02:21: caster = "u0258800010FA3050"
- 03:02:21: name = "Thunderous Stormsource"
- 03:02:21: icon = "Data/\UI\item_icons\greater_air_01.dds"
- 03:02:21: }
- Essence proc. [expired] and [remaining] do not make sense.
- 03:02:21: ---OnBuffAdd---
- 03:02:21: Inspect.System.Time() = 1819.1399117807
- 03:02:21: -----------------------
- 03:02:21: player.target
- 03:02:21: b80000000367870E2 = {
- 03:02:21: expired = 1848.4288330078
- 03:02:21: icon = "Data/\UI\ability_icons\charge_spike.dds"
- 03:02:21: debuff = true
- 03:02:21: poison = true
- 03:02:21: remaining = 0
- 03:02:21: caster = "u0258800010FA3050"
- 03:02:21: duration = 14.953125
- 03:02:21: name = "Spike Charge"
- 03:02:21: ability = "a000000006A35F732"
- 03:02:21: }
- Spike Charge detonation DoT. Again [remaining] is 0, and [expired] has some random value...
- 03:02:22: ---OnBuffChange---
- 03:02:22: Inspect.System.Time() = 1819.299650561
- 03:02:22: -----------------------
- 03:02:22: player.target
- 03:02:22: b8000000036786EB4 = {
- 03:02:22: icon = "Data/\UI\ability_icons\charge_spike.dds"
- 03:02:22: stack = 4
- 03:02:22: poison = true
- 03:02:22: remaining = 56.418823242188
- 03:02:22: caster = "u0258800010FA3050"
- 03:02:22: debuff = true
- 03:02:22: duration = 59.8515625
- 03:02:22: name = "Spike Charge"
- 03:02:22: ability = "a00000000373ADFEF"
- 03:02:22: }
- 03:02:22: ---OnBuffChange---
- 03:02:22: Inspect.System.Time() = 1819.311099012
- 03:02:22: -----------------------
- 03:02:22: player.target
- 03:02:22: b8000000036786EB4 = {
- 03:02:22: icon = "Data/\UI\ability_icons\charge_spike.dds"
- 03:02:22: stack = 3
- 03:02:22: poison = true
- 03:02:22: remaining = 56.418823242188
- 03:02:22: caster = "u0258800010FA3050"
- 03:02:22: debuff = true
- 03:02:22: duration = 59.8515625
- 03:02:22: name = "Spike Charge"
- 03:02:22: ability = "a00000000373ADFEF"
- 03:02:22: }
- 03:02:22: ---OnBuffChange---
- 03:02:22: Inspect.System.Time() = 1819.3238924139
- 03:02:22: -----------------------
- 03:02:22: player.target
- 03:02:22: b8000000036786EB4 = {
- 03:02:22: icon = "Data/\UI\ability_icons\charge_spike.dds"
- 03:02:22: stack = 2
- 03:02:22: poison = true
- 03:02:22: remaining = 56.418823242188
- 03:02:22: caster = "u0258800010FA3050"
- 03:02:22: debuff = true
- 03:02:22: duration = 59.8515625
- 03:02:22: name = "Spike Charge"
- 03:02:22: ability = "a00000000373ADFEF"
- 03:02:22: }
- 03:02:22: ---OnBuffChange---
- 03:02:22: Inspect.System.Time() = 1819.3411397705
- 03:02:22: -----------------------
- 03:02:22: player.target
- 03:02:22: b8000000036786EB4 = {
- 03:02:22: poison = true
- 03:02:22: remaining = 56.418823242188
- 03:02:22: icon = "Data/\UI\ability_icons\charge_spike.dds"
- 03:02:22: caster = "u0258800010FA3050"
- 03:02:22: debuff = true
- 03:02:22: duration = 59.8515625
- 03:02:22: name = "Spike Charge"
- 03:02:22: ability = "a00000000373ADFEF"
- 03:02:22: }
- 03:02:22: ---OnBuffRemove---
- 03:02:22: Inspect.System.Time() = 1819.37746591
- 03:02:22: player.target
- 03:02:22: b8000000036786EB4 = true
- Wee, lots of Event.Buff.Changed events. Wait: why weren't they triggered when stacks were _added_?
- 03:02:22: ---OnBuffAdd---
- 03:02:22: Inspect.System.Time() = 1819.7167289711
- 03:02:22: -----------------------
- 03:02:22: player
- 03:02:22: b8000000039037690 = {
- 03:02:22: expired = 1854.0476074219
- 03:02:22: remaining = 0
- 03:02:22: duration = 9.9609375
- 03:02:22: caster = "u0258800010FA3050"
- 03:02:22: icon = "Data/\UI\ability_icons\cruel_vengeance_01.dds"
- 03:02:22: name = "Cruel Vengence"
- 03:02:22: ability = "a000000002D2A3B20"
- 03:02:22: }
- Proc again, and [remaining] and [expired] values do not make sense again. Buff with duration of 10 seconds, 0 seconds remaining, expires in 34 seconds?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement