@@ -257,7 +257,10 @@ spec:RegisterAuras( {
257
257
crackling_surge = {
258
258
id = 224127 ,
259
259
duration = 15 ,
260
- max_stack = 1
260
+ max_stack = 20 ,
261
+ meta = {
262
+ active = function ( t ) return active_crackling_surges end ,
263
+ },
261
264
},
262
265
crash_lightning = {
263
266
id = 187878 ,
@@ -337,7 +340,10 @@ spec:RegisterAuras( {
337
340
id = 392375 ,
338
341
duration = 15 ,
339
342
type = " Magic" ,
340
- max_stack = 1
343
+ max_stack = 20 ,
344
+ meta = {
345
+ active = function ( t ) return active_earthen_weapons end ,
346
+ },
341
347
},
342
348
-- Rooted.
343
349
-- https://wowhead.com/ptr-2/spell=64695
@@ -398,7 +404,7 @@ spec:RegisterAuras( {
398
404
id = 333957 ,
399
405
duration = 15 ,
400
406
tick_time = 3 ,
401
- max_stack = 1 ,
407
+ max_stack = 20 ,
402
408
meta = {
403
409
active = function ( t ) return active_feral_spirits end ,
404
410
},
@@ -514,7 +520,10 @@ spec:RegisterAuras( {
514
520
icy_edge = {
515
521
id = 224126 ,
516
522
duration = 15 ,
517
- max_stack = 1
523
+ max_stack = 20 ,
524
+ meta = {
525
+ active = function ( t ) return active_icy_edges end ,
526
+ },
518
527
},
519
528
-- Fire damage inflicted every $t2 sec.
520
529
-- https://wowhead.com/ptr-2/spell=118297
@@ -581,7 +590,10 @@ spec:RegisterAuras( {
581
590
id = 224125 ,
582
591
duration = 15 ,
583
592
type = " Magic" ,
584
- max_stack = 1
593
+ max_stack = 20 ,
594
+ meta = {
595
+ active = function ( t ) return active_molten_weapons end ,
596
+ },
585
597
},
586
598
-- Talent: Your next healing or damaging Nature spell is instant cast and costs no mana.
587
599
-- https://wowhead.com/ptr-2/spell=378081
@@ -876,6 +888,10 @@ local recallTotem1
876
888
local recallTotem2
877
889
878
890
local actual_spirits = {}
891
+ local molten_weapons = {}
892
+ local icy_edges = {}
893
+ local crackling_surges = {}
894
+ local earthen_weapons = {}
879
895
880
896
spec :RegisterCombatLogEvent ( function ( _ , subtype , _ , sourceGUID , sourceName , _ , _ , destGUID , destName , destFlags , _ , spellID , spellName )
881
897
-- Deaths/despawns.
@@ -962,6 +978,30 @@ spec:RegisterCombatLogEvent( function( _, subtype, _, sourceGUID, sourceName, _
962
978
end
963
979
end
964
980
end
981
+
982
+ if destGUID == state .GUID and ( subtype == " SPELL_AURA_APPLIED" or subtype == " SPELL_AURA_REFRESH" ) then
983
+ if spellID == 224125 then
984
+ insert ( molten_weapons , {
985
+ expires = GetTime () + state .talent .flowing_spirits .enabled and 8 or 15
986
+ } )
987
+
988
+ elseif spellID == 224126 then
989
+ insert ( icy_edges , {
990
+ expires = GetTime () + ( state .talent .flowing_spirits .enabled and 8 or 15 )
991
+ } )
992
+
993
+ elseif spellID == 224127 then
994
+ insert ( crackling_surges , {
995
+ expires = GetTime () + ( state .talent .flowing_spirits .enabled and 8 or 15 )
996
+ } )
997
+
998
+ elseif spellID == 392375 then
999
+ insert ( earthen_weapons , {
1000
+ expires = GetTime () + ( state .talent .flowing_spirits .enabled and 8 or 15 )
1001
+ } )
1002
+
1003
+ end
1004
+ end
965
1005
end )
966
1006
967
1007
spec :RegisterStateExpr ( " vesper_totem_heal_charges" , function ()
@@ -1019,6 +1059,56 @@ spec:RegisterStateExpr( "alpha_wolf_min_remains", function()
1019
1059
end )
1020
1060
1021
1061
1062
+ local virtual_molten_weapons = {}
1063
+
1064
+ spec :RegisterStateExpr ( " active_molten_weapons" , function ()
1065
+ local count = 0
1066
+
1067
+ for _ , v in pairs ( virtual_molten_weapons ) do
1068
+ if v > query_time then count = count + 1 end
1069
+ end
1070
+
1071
+ return count
1072
+ end )
1073
+
1074
+ local virtual_icy_edges = {}
1075
+
1076
+ spec :RegisterStateExpr ( " active_icy_edges" , function ()
1077
+ local count = 0
1078
+
1079
+ for _ , v in pairs ( virtual_icy_edges ) do
1080
+ if v > query_time then count = count + 1 end
1081
+ end
1082
+
1083
+ return count
1084
+ end )
1085
+
1086
+ local virtual_crackling_surges = {}
1087
+
1088
+ spec :RegisterStateExpr ( " active_crackling_surges" , function ()
1089
+ local count = 0
1090
+
1091
+ for _ , v in pairs ( virtual_crackling_surges ) do
1092
+ if v > query_time then count = count + 1 end
1093
+ end
1094
+
1095
+ return count
1096
+ end )
1097
+
1098
+ local virtual_earthen_weapons = {}
1099
+
1100
+ spec :RegisterStateExpr ( " active_earthen_weapons" , function ()
1101
+ local count = 0
1102
+
1103
+ for _ , v in pairs ( virtual_earthen_weapons ) do
1104
+ if v > query_time then count = count + 1 end
1105
+ end
1106
+
1107
+ return count
1108
+ end )
1109
+
1110
+
1111
+
1022
1112
local TriggerFeralMaelstrom = setfenv ( function ()
1023
1113
gain_maelstrom ( 1 )
1024
1114
end , state )
@@ -1109,9 +1199,55 @@ spec:RegisterHook( "reset_precast", function ()
1109
1199
expires = v .expires ,
1110
1200
alpha_expires = v .alpha_expires
1111
1201
}
1202
+ else
1203
+ virtual_spirits [ k ] = nil
1112
1204
end
1113
1205
end
1114
1206
1207
+ wipe ( virtual_molten_weapons )
1208
+ for k , v in pairs ( molten_weapons ) do
1209
+ if v .expires > now then
1210
+ virtual_molten_weapons [ k ] = v .expires
1211
+ else
1212
+ molten_weapons [ k ] = nil
1213
+ end
1214
+ end
1215
+
1216
+ wipe ( virtual_icy_edges )
1217
+ for k , v in pairs ( icy_edges ) do
1218
+ if v .expires > now then
1219
+ virtual_icy_edges [ k ] = v .expires
1220
+ else
1221
+ icy_edges [ k ] = nil
1222
+ end
1223
+ end
1224
+
1225
+ wipe ( virtual_crackling_surges )
1226
+ for k , v in pairs ( crackling_surges ) do
1227
+ if v .expires > now then
1228
+ virtual_crackling_surges [ k ] = v .expires
1229
+ else
1230
+ crackling_surges [ k ] = nil
1231
+ end
1232
+ end
1233
+
1234
+ wipe ( virtual_earthen_weapons )
1235
+ for k , v in pairs ( earthen_weapons ) do
1236
+ if v .expires > now then
1237
+ virtual_earthen_weapons [ k ] = v .expires
1238
+ else
1239
+ earthen_weapons [ k ] = nil
1240
+ end
1241
+ end
1242
+
1243
+ if Hekili .ActiveDebug then
1244
+ if active_feral_spirits > 0 then Hekili :Debug ( " Feral Spirits: " .. active_feral_spirits ) end
1245
+ if active_molten_weapons > 0 then Hekili :Debug ( " Molten Weapons: " .. active_molten_weapons ) end
1246
+ if active_icy_edges > 0 then Hekili :Debug ( " Icy Edges: " .. active_icy_edges ) end
1247
+ if active_crackling_surges > 0 then Hekili :Debug ( " Crackling Surges: " .. active_crackling_surges ) end
1248
+ if active_earthen_weapons > 0 then Hekili :Debug ( " Earthen Weapons: " .. active_earthen_weapons ) end
1249
+ end
1250
+
1115
1251
if buff .ascendance .up and talent .static_accumulation .enabled then
1116
1252
local next_mw = query_time + 1 - ( ( query_time - buff .ascendance .applied ) % 1 )
1117
1253
@@ -1692,11 +1828,19 @@ spec:RegisterAbilities( {
1692
1828
alpha_expires = 0
1693
1829
} )
1694
1830
1831
+ if not talent .elemental_spirits .enabled then
1832
+ insert ( virtual_earthen_weapons , query_time + 15 )
1833
+ insert ( virtual_earthen_weapons , query_time + 15 )
1834
+ end
1835
+
1695
1836
if set_bonus .tww1_4pc > 0 then
1696
1837
insert ( virtual_spirits , {
1697
1838
expires = query_time + 15 ,
1698
1839
alpha_expires = 0
1699
1840
} )
1841
+ if not talent .elemental_spirits .enabled then
1842
+ insert ( virtual_earthen_weapons , query_time + 15 )
1843
+ end
1700
1844
end
1701
1845
1702
1846
if set_bonus .tier31_4pc > 0 then
@@ -2290,7 +2434,9 @@ spec:RegisterAbilities( {
2290
2434
expires = query_time + 15 ,
2291
2435
alpha_expires = 0
2292
2436
} )
2293
- applyBuff ( " crackling_surge" )
2437
+ if not talent .elemental_spirits .enabled then
2438
+ insert ( virtual_earthen_weapons , query_time + 15 )
2439
+ end
2294
2440
end
2295
2441
end ,
2296
2442
0 commit comments