Advertisement
Kreiri

RIFT: more tests of buff events and Inspect.Buff.Detail

Jul 9th, 2011
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.98 KB | None | 0 0
  1. Code:
  2. if not tdump then tdump = function (t, s)
  3. local s = s or 0
  4. for i, v in pairs(t) do
  5. local kstring = string.rep(" ", s)
  6. if (type(i) == "number") then
  7. --kstring = kstring.."["..tostring(i).."] = "
  8. else
  9. kstring = kstring..tostring(i).." = "
  10. end
  11. if (type(v) == "table") then
  12. print(kstring.."{")
  13. tdump(v, s+1)
  14. print (string.rep(" ", s).."}")
  15. elseif (type(v) == "string") then
  16. print(kstring..'"'..v..'"')
  17. else
  18. print(kstring..tostring(v))
  19. end
  20. end
  21. end -- function tdump
  22. end
  23.  
  24. local watchedunits = {["player"] = true,
  25. ["player.target"] = true,
  26. ["player.pet"] = true,
  27. ["focus"] = true}
  28.  
  29. local function DumpBuffs(unit, bufflist)
  30. local bufftable = Inspect.Buff.Detail(unit, bufflist)
  31. print("-----------------------")
  32. print(Inspect.Unit.Lookup(unit))
  33. tdump(bufftable)
  34. end
  35.  
  36. local function OnBuffAdd(unit, buffs)
  37. if watchedunits[Inspect.Unit.Lookup(unit)] then
  38. print("---OnBuffAdd---")
  39. print("Inspect.System.Time() = "..Inspect.System.Time())
  40. DumpBuffs(unit, buffs)
  41. end
  42. end
  43. table.insert(Event.Buff.Add, {OnBuffAdd, "TestAddon", "OnBuffAdd"})
  44.  
  45. local function OnBuffChange(unit, buffs)
  46. if watchedunits[Inspect.Unit.Lookup(unit)] then
  47. print("---OnBuffChange---")
  48. print("Inspect.System.Time() = "..Inspect.System.Time())
  49. DumpBuffs(unit, buffs)
  50. end
  51. end
  52. table.insert(Event.Buff.Change, {OnBuffChange, "TestAddon", "OnBuffChange"})
  53.  
  54. local function OnBuffRemove(unit, buffs)
  55. if watchedunits[Inspect.Unit.Lookup(unit)] then
  56. print("---OnBuffRemove---")
  57. print("Inspect.System.Time() = "..Inspect.System.Time())
  58. print(Inspect.Unit.Lookup(unit))
  59. tdump(buffs)
  60. end
  61. end
  62. table.insert(Event.Buff.Remove, {OnBuffRemove, "TestAddon", "OnBuffRemove"})
  63.  
  64.  
  65. Results:
  66.  
  67. 02:49:36: ---OnBuffAdd---
  68. 02:49:36: Inspect.System.Time() = 1053.4929799619
  69. 02:49:36: -----------------------
  70. 02:49:36: player
  71. 02:49:36: b800000003903765A = {
  72. 02:49:36: remaining = 2502.1645507813
  73. 02:49:36: duration = 3599.953125
  74. 02:49:36: caster = "u0258800010FA3050"
  75. 02:49:36: icon = "Data/\UI\ability_icons\poisonone2b.dds"
  76. 02:49:36: name = "Virulent Poison"
  77. 02:49:36: ability = "a0000000075A0818A"
  78. 02:49:36: }
  79. 02:49:46: ---OnBuffAdd---
  80. 02:49:46: Inspect.System.Time() = 1064.0603348964
  81. 02:49:46: -----------------------
  82. 02:49:46: player
  83. 02:49:46: b800000003903765D = {
  84. 02:49:46: remaining = 2491.5969238281
  85. 02:49:46: duration = 3599.953125
  86. 02:49:46: caster = "u0258800010FA3050"
  87. 02:49:46: icon = "Data/\UI\ability_icons\poisonone2a.dds"
  88. 02:49:46: name = "Lethal Poison"
  89. 02:49:46: ability = "a0000000006A7885E"
  90. 02:49:46: }
  91. 02:50:00: ---OnBuffRemove---
  92. 02:50:00: Inspect.System.Time() = 1078.1209378515
  93. 02:50:00: player
  94. 02:50:00: b800000003903765A = true
  95. 02:50:00: ---OnBuffAdd---
  96. 02:50:00: Inspect.System.Time() = 1078.1234428397
  97. 02:50:00: -----------------------
  98. 02:50:00: player
  99. 02:50:00: b8000000039037660 = {
  100. 02:50:00: remaining = 2477.544921875
  101. 02:50:00: duration = 3599.9611816406
  102. 02:50:00: caster = "u0258800010FA3050"
  103. 02:50:00: icon = "Data/\UI\ability_icons\poisonone2b.dds"
  104. 02:50:00: name = "Virulent Poison"
  105. 02:50:00: ability = "a0000000075A0818A"
  106. 02:50:00: }
  107.  
  108. Inspect.Buff.Detail() is called when the buff is applied, but [remaining] value is not even close to [duration].
  109.  
  110. 03:02:10: ---OnBuffAdd---
  111. 03:02:10: Inspect.System.Time() = 1807.3810756078
  112. 03:02:10: -----------------------
  113. 03:02:10: player.target
  114. 03:02:10: b80000000367869AA = {
  115. 03:02:10: expired = 1791.8101806641
  116. 03:02:10: icon = "Data/\UI\ability_icons\charge_spike.dds"
  117. 03:02:10: debuff = true
  118. 03:02:10: poison = true
  119. 03:02:10: remaining = 0
  120. 03:02:10: caster = "u0258800010FA3050"
  121. 03:02:10: duration = 59.8671875
  122. 03:02:10: name = "Spike Charge"
  123. 03:02:10: ability = "a00000000373ADFEF"
  124. 03:02:10: }
  125.  
  126. 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.
  127.  
  128. 03:02:11: ---OnBuffRemove---
  129. 03:02:11: Inspect.System.Time() = 1809.2710877945
  130. 03:02:11: player.target
  131. 03:02:11: b80000000367869AA = true
  132. 03:02:11: ---OnBuffAdd---
  133. 03:02:11: Inspect.System.Time() = 1809.2738721044
  134. 03:02:11: -----------------------
  135. 03:02:11: player.target
  136. 03:02:11: b8000000036786AE3 = {
  137. 03:02:11: expired = 1793.7158203125
  138. 03:02:11: icon = "Data/\UI\ability_icons\charge_spike.dds"
  139. 03:02:11: debuff = true
  140. 03:02:11: poison = true
  141. 03:02:11: remaining = 0
  142. 03:02:11: caster = "u0258800010FA3050"
  143. 03:02:11: stack = 2
  144. 03:02:11: duration = 59.8515625
  145. 03:02:11: name = "Spike Charge"
  146. 03:02:12: ability = "a00000000373ADFEF"
  147. 03:02:12: }
  148.  
  149. 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.
  150.  
  151. 03:02:14: ---OnBuffRemove---
  152. 03:02:14: Inspect.System.Time() = 1811.7583465924
  153. 03:02:14: player.target
  154. 03:02:14: b8000000036786AE3 = true
  155. 03:02:14: ---OnBuffAdd---
  156. 03:02:14: Inspect.System.Time() = 1811.7609034924
  157. 03:02:14: -----------------------
  158. 03:02:14: player.target
  159. 03:02:14: b8000000036786C7E = {
  160. 03:02:14: expired = 1796.2043457031
  161. 03:02:14: icon = "Data/\UI\ability_icons\charge_spike.dds"
  162. 03:02:14: debuff = true
  163. 03:02:14: poison = true
  164. 03:02:14: remaining = 0
  165. 03:02:14: caster = "u0258800010FA3050"
  166. 03:02:14: stack = 3
  167. 03:02:14: duration = 59.8515625
  168. 03:02:14: name = "Spike Charge"
  169. 03:02:14: ability = "a00000000373ADFEF"
  170. 03:02:14: }
  171.  
  172. Added third stack of the same debuff; same two events triggered; [expired] and [remaining] do not make sense.
  173.  
  174. 03:02:16: ---OnBuffRemove---
  175. 03:02:16: Inspect.System.Time() = 1813.7155494866
  176. 03:02:16: player.target
  177. 03:02:16: b8000000036786C7E = true
  178. 03:02:16: ---OnBuffAdd---
  179. 03:02:16: Inspect.System.Time() = 1813.7181246242
  180. 03:02:16: -----------------------
  181. 03:02:16: player.target
  182. 03:02:16: b8000000036786D68 = {
  183. 03:02:16: expired = 1798.1767578125
  184. 03:02:16: icon = "Data/\UI\ability_icons\charge_spike.dds"
  185. 03:02:16: debuff = true
  186. 03:02:16: poison = true
  187. 03:02:16: remaining = 0
  188. 03:02:16: caster = "u0258800010FA3050"
  189. 03:02:16: stack = 4
  190. 03:02:16: duration = 59.8359375
  191. 03:02:16: name = "Spike Charge"
  192. 03:02:16: ability = "a00000000373ADFEF"
  193. 03:02:16: }
  194.  
  195. Fourth stack. All the same: [expired] and [remaining] do not make sense.
  196.  
  197. 03:02:18: ---OnBuffRemove---
  198. 03:02:18: Inspect.System.Time() = 1815.8600129952
  199. 03:02:18: player.target
  200. 03:02:18: b8000000036786D68 = true
  201. 03:02:18: ---OnBuffAdd---
  202. 03:02:18: Inspect.System.Time() = 1815.8625209491
  203. 03:02:18: -----------------------
  204. 03:02:18: player.target
  205. 03:02:18: b8000000036786EB4 = {
  206. 03:02:18: expired = 1800.3052978516
  207. 03:02:18: icon = "Data/\UI\ability_icons\charge_spike.dds"
  208. 03:02:18: debuff = true
  209. 03:02:18: poison = true
  210. 03:02:18: remaining = 0
  211. 03:02:18: caster = "u0258800010FA3050"
  212. 03:02:18: stack = 5
  213. 03:02:18: duration = 59.8515625
  214. 03:02:18: name = "Spike Charge"
  215. 03:02:18: ability = "a00000000373ADFEF"
  216. 03:02:18: }
  217.  
  218. Fifth stack of "Spike Charge". [expired] and [remaining] do not make sense.
  219.  
  220. 03:02:21: ---OnBuffAdd---
  221. 03:02:21: Inspect.System.Time() = 1818.8750783647
  222. 03:02:21: -----------------------
  223. 03:02:21: player.target
  224. 03:02:21: b80000000367870C7 = {
  225. 03:02:21: expired = 1857.1805419922
  226. 03:02:21: remaining = 0
  227. 03:02:21: icon = "Data/\UI\ability_icons\last_stand.dds"
  228. 03:02:21: caster = "u0258800010FA3050"
  229. 03:02:21: debuff = true
  230. 03:02:21: duration = 5.9921875
  231. 03:02:21: name = "High Explosives"
  232. 03:02:21: ability = "a00000000714351C4"
  233. 03:02:21: }
  234.  
  235. Detonated the charges, triggered "High Explosives" debuff on the target. [expired] and [remaining] do not make sense.
  236.  
  237. 03:02:21: ---OnBuffAdd---
  238. 03:02:21: Inspect.System.Time() = 1818.9679204679
  239. 03:02:21: -----------------------
  240. 03:02:21: player
  241. 03:02:21: b8000000039037687 = {
  242. 03:02:21: expired = 1843.2508544922
  243. 03:02:21: remaining = 0
  244. 03:02:21: duration = 19.96875
  245. 03:02:21: caster = "u0258800010FA3050"
  246. 03:02:21: name = "Thunderous Stormsource"
  247. 03:02:21: icon = "Data/\UI\item_icons\greater_air_01.dds"
  248. 03:02:21: }
  249.  
  250. Essence proc. [expired] and [remaining] do not make sense.
  251.  
  252. 03:02:21: ---OnBuffAdd---
  253. 03:02:21: Inspect.System.Time() = 1819.1399117807
  254. 03:02:21: -----------------------
  255. 03:02:21: player.target
  256. 03:02:21: b80000000367870E2 = {
  257. 03:02:21: expired = 1848.4288330078
  258. 03:02:21: icon = "Data/\UI\ability_icons\charge_spike.dds"
  259. 03:02:21: debuff = true
  260. 03:02:21: poison = true
  261. 03:02:21: remaining = 0
  262. 03:02:21: caster = "u0258800010FA3050"
  263. 03:02:21: duration = 14.953125
  264. 03:02:21: name = "Spike Charge"
  265. 03:02:21: ability = "a000000006A35F732"
  266. 03:02:21: }
  267.  
  268. Spike Charge detonation DoT. Again [remaining] is 0, and [expired] has some random value...
  269.  
  270. 03:02:22: ---OnBuffChange---
  271. 03:02:22: Inspect.System.Time() = 1819.299650561
  272. 03:02:22: -----------------------
  273. 03:02:22: player.target
  274. 03:02:22: b8000000036786EB4 = {
  275. 03:02:22: icon = "Data/\UI\ability_icons\charge_spike.dds"
  276. 03:02:22: stack = 4
  277. 03:02:22: poison = true
  278. 03:02:22: remaining = 56.418823242188
  279. 03:02:22: caster = "u0258800010FA3050"
  280. 03:02:22: debuff = true
  281. 03:02:22: duration = 59.8515625
  282. 03:02:22: name = "Spike Charge"
  283. 03:02:22: ability = "a00000000373ADFEF"
  284. 03:02:22: }
  285. 03:02:22: ---OnBuffChange---
  286. 03:02:22: Inspect.System.Time() = 1819.311099012
  287. 03:02:22: -----------------------
  288. 03:02:22: player.target
  289. 03:02:22: b8000000036786EB4 = {
  290. 03:02:22: icon = "Data/\UI\ability_icons\charge_spike.dds"
  291. 03:02:22: stack = 3
  292. 03:02:22: poison = true
  293. 03:02:22: remaining = 56.418823242188
  294. 03:02:22: caster = "u0258800010FA3050"
  295. 03:02:22: debuff = true
  296. 03:02:22: duration = 59.8515625
  297. 03:02:22: name = "Spike Charge"
  298. 03:02:22: ability = "a00000000373ADFEF"
  299. 03:02:22: }
  300. 03:02:22: ---OnBuffChange---
  301. 03:02:22: Inspect.System.Time() = 1819.3238924139
  302. 03:02:22: -----------------------
  303. 03:02:22: player.target
  304. 03:02:22: b8000000036786EB4 = {
  305. 03:02:22: icon = "Data/\UI\ability_icons\charge_spike.dds"
  306. 03:02:22: stack = 2
  307. 03:02:22: poison = true
  308. 03:02:22: remaining = 56.418823242188
  309. 03:02:22: caster = "u0258800010FA3050"
  310. 03:02:22: debuff = true
  311. 03:02:22: duration = 59.8515625
  312. 03:02:22: name = "Spike Charge"
  313. 03:02:22: ability = "a00000000373ADFEF"
  314. 03:02:22: }
  315. 03:02:22: ---OnBuffChange---
  316. 03:02:22: Inspect.System.Time() = 1819.3411397705
  317. 03:02:22: -----------------------
  318. 03:02:22: player.target
  319. 03:02:22: b8000000036786EB4 = {
  320. 03:02:22: poison = true
  321. 03:02:22: remaining = 56.418823242188
  322. 03:02:22: icon = "Data/\UI\ability_icons\charge_spike.dds"
  323. 03:02:22: caster = "u0258800010FA3050"
  324. 03:02:22: debuff = true
  325. 03:02:22: duration = 59.8515625
  326. 03:02:22: name = "Spike Charge"
  327. 03:02:22: ability = "a00000000373ADFEF"
  328. 03:02:22: }
  329. 03:02:22: ---OnBuffRemove---
  330. 03:02:22: Inspect.System.Time() = 1819.37746591
  331. 03:02:22: player.target
  332. 03:02:22: b8000000036786EB4 = true
  333.  
  334. Wee, lots of Event.Buff.Changed events. Wait: why weren't they triggered when stacks were _added_?
  335.  
  336. 03:02:22: ---OnBuffAdd---
  337. 03:02:22: Inspect.System.Time() = 1819.7167289711
  338. 03:02:22: -----------------------
  339. 03:02:22: player
  340. 03:02:22: b8000000039037690 = {
  341. 03:02:22: expired = 1854.0476074219
  342. 03:02:22: remaining = 0
  343. 03:02:22: duration = 9.9609375
  344. 03:02:22: caster = "u0258800010FA3050"
  345. 03:02:22: icon = "Data/\UI\ability_icons\cruel_vengeance_01.dds"
  346. 03:02:22: name = "Cruel Vengence"
  347. 03:02:22: ability = "a000000002D2A3B20"
  348. 03:02:22: }
  349. 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