@@ -390,7 +390,7 @@ ConditionCategory:RegisterCondition(9, "TALENTLEARNED", {
390390 useSUG = " talents" ,
391391 icon = function () return select (3 , GetTalentInfo (1 , 1 , 1 )) end ,
392392 tcoords = CNDT .COMMON .standardtcoords ,
393- funcstr = function (ConditionObject , c )
393+ funcstr = function (c )
394394 -- this is handled externally because TalentMap is so extensive a process,
395395 -- and if it ends up getting processed in an OnUpdate condition, it could be very bad.
396396 CNDT :RegisterEvent (" PLAYER_TALENT_UPDATE" )
@@ -407,64 +407,64 @@ ConditionCategory:RegisterCondition(9, "TALENTLEARNED", {
407407})
408408
409409
410- CNDT .Env .AzeriteEssenceMap = {}
411- CNDT .Env .AzeriteEssenceMap_MAJOR = {}
412- local C_AzeriteEssence = C_AzeriteEssence
413- function CNDT :AZERITE_ESSENCE_UPDATE ()
414- wipe (Env .AzeriteEssenceMap )
415- wipe (Env .AzeriteEssenceMap_MAJOR )
416- local milestones = C_AzeriteEssence .GetMilestones ()
417- if not milestones then return end
410+
411+ ConditionCategory :RegisterCondition (9 , " PTSINTAL" , {
412+ text = L [" UIPANEL_PTSINTAL" ],
413+ funcstr = " DEPRECATED" ,
414+ min = 0 ,
415+ max = 5 ,
416+ })
417+
418+
419+
420+ ConditionCategory :RegisterCondition (10 , " PVPTALENTLEARNED" , {
421+ text = L [" UIPANEL_PVPTALENTLEARNED" ],
422+
423+ bool = true ,
418424
419- for _ , slot in pairs (milestones ) do
420- if slot .unlocked then
421- local equippedEssenceId = C_AzeriteEssence .GetMilestoneEssence (slot .ID )
422- if equippedEssenceId then
423- local essence = C_AzeriteEssence .GetEssenceInfo (equippedEssenceId )
424- local name = essence .name
425- local id = essence .ID
425+ unit = PLAYER ,
426+ name = function (editbox )
427+ editbox :SetTexts (L [" SPELLTOCHECK" ], L [" CNDT_ONLYFIRST" ])
428+ end ,
429+ useSUG = " pvptalents" ,
430+ icon = 1322720 ,
431+ tcoords = CNDT .COMMON .standardtcoords ,
432+ funcstr = function (c )
433+ -- this is handled externally because PvpTalentMap is so extensive a process,
434+ -- and if it ends up getting processed in an OnUpdate condition, it could be very bad.
435+ CNDT :RegisterEvent (" PLAYER_TALENT_UPDATE" )
436+ CNDT :RegisterEvent (" ACTIVE_TALENT_GROUP_CHANGED" , " PLAYER_TALENT_UPDATE" )
437+ CNDT :PLAYER_TALENT_UPDATE ()
438+
439+ return [[ BOOLCHECK( PvpTalentMap[LOWER(c.NameFirst)] )]]
440+ end ,
441+ events = function (ConditionObject , c )
442+ return
443+ ConditionObject :GenerateNormalEventString (" PLAYER_TALENT_UPDATE" ),
444+ ConditionObject :GenerateNormalEventString (" ACTIVE_TALENT_GROUP_CHANGED" )
445+ end ,
446+ })
447+
448+
449+ ConditionCategory :RegisterCondition (11 , " GLYPH" , {
450+ text = L [" UIPANEL_GLYPH" ],
451+ tooltip = L [" UIPANEL_GLYPH_DESC" ],
452+
453+ bool = true ,
454+
455+ unit = PLAYER ,
456+ name = function (editbox )
457+ editbox :SetTexts (L [" GLYPHTOCHECK" ], L [" CNDT_ONLYFIRST" ])
458+ end ,
459+ icon = " Interface\\ Icons\\ inv_inscription_tradeskill01" ,
460+ tcoords = CNDT .COMMON .standardtcoords ,
461+ funcstr = " DEPRECATED" ,
462+ })
463+
464+ ConditionCategory :RegisterSpacer (20 )
426465
427- local lower = name and strlowerCache [name ]
428- if lower then
429- Env .AzeriteEssenceMap [lower ] = true
430- Env .AzeriteEssenceMap [id ] = true
431466
432- -- Slot 0 is the major slot. There doesn't seem to be any other way to identify it.
433- if slot .slot == 0 then
434- Env .AzeriteEssenceMap_MAJOR [lower ] = true
435- Env .AzeriteEssenceMap_MAJOR [id ] = true
436- end
437- end
438- end
439- end
440- end
441- end
442467
443- for i , kind in TMW :Vararg (" " , " _MAJOR" ) do
444- ConditionCategory :RegisterCondition (9.1 + i / 10 , " AZESSLEARNED" .. kind , {
445- text = L [" UIPANEL_AZESSLEARNED" .. kind ],
446- bool = true ,
447- unit = PLAYER ,
448- name = function (editbox )
449- editbox :SetTexts (L [" SPELLTOCHECK" ], L [" CNDT_ONLYFIRST" ])
450- end ,
451- useSUG = " azerite_essence" ,
452- icon = " Interface\\ Icons\\ " .. (kind == " " and " inv_radientazeritematrix" or " spell_azerite_essence_15" ),
453- tcoords = CNDT .COMMON .standardtcoords ,
454- funcstr = function (ConditionObject , c )
455- CNDT :RegisterEvent (" AZERITE_ESSENCE_UPDATE" )
456- CNDT :RegisterEvent (" AZERITE_ESSENCE_ACTIVATED" , " AZERITE_ESSENCE_UPDATE" )
457- CNDT :AZERITE_ESSENCE_UPDATE ()
458-
459- return [[ BOOLCHECK( AzeriteEssenceMap]] .. kind .. [[ [LOWER(c.NameFirst)] )]]
460- end ,
461- events = function (ConditionObject , c )
462- return
463- ConditionObject :GenerateNormalEventString (" AZERITE_ESSENCE_UPDATE" ),
464- ConditionObject :GenerateNormalEventString (" AZERITE_ESSENCE_ACTIVATED" )
465- end ,
466- })
467- end
468468
469469local AnimaPowWatcher = TMW :NewModule (" ANIMAPOW" , " AceEvent-3.0" )
470470local currentAnimaPows = {}
@@ -503,9 +503,8 @@ function AnimaPowWatcher:UNIT_AURA(_, unit)
503503 end
504504end
505505
506-
507- ConditionCategory :RegisterCondition (9.4 , " ANIMAPOW" , {
508- text = L [" UIPANEL_ANIMAPOW" ],
506+ ConditionCategory :RegisterCondition (21 , " ANIMAPOW" , {
507+ text = L [" CONDITIONPANEL_ANIMAPOW" ],
509508 range = 5 ,
510509 unit = PLAYER ,
511510 name = function (editbox )
@@ -514,7 +513,7 @@ ConditionCategory:RegisterCondition(9.4, "ANIMAPOW", {
514513 useSUG = true ,
515514 icon = 3528304 ,
516515 tcoords = CNDT .COMMON .standardtcoords ,
517- funcstr = function (ConditionObject , c )
516+ funcstr = function (c )
518517 AnimaPowWatcher :Init ()
519518 return [[ (CurrentAnimaPows[LOWER(c.NameFirst)] or 0) c.Operator c.Level]]
520519 end ,
@@ -524,59 +523,103 @@ ConditionCategory:RegisterCondition(9.4, "ANIMAPOW", {
524523 end ,
525524})
526525
527-
528-
529-
530-
531- ConditionCategory :RegisterCondition (9 , " PTSINTAL" , {
532- text = L [" UIPANEL_PTSINTAL" ],
533- funcstr = " DEPRECATED" ,
534- min = 0 ,
535- max = 5 ,
536- })
537-
538-
539-
540- ConditionCategory :RegisterCondition (10 , " PVPTALENTLEARNED" , {
541- text = L [" UIPANEL_PVPTALENTLEARNED" ],
542-
526+ ConditionCategory :RegisterCondition (21 , " SOULBIND" , {
527+ text = L [" CONDITIONPANEL_SOULBIND" ],
543528 bool = true ,
544-
545529 unit = PLAYER ,
546530 name = function (editbox )
547531 editbox :SetTexts (L [" SPELLTOCHECK" ], L [" CNDT_ONLYFIRST" ])
548532 end ,
549- useSUG = " pvptalents " ,
550- icon = 1322720 ,
533+ useSUG = " soulbind " ,
534+ icon = 3528291 ,
551535 tcoords = CNDT .COMMON .standardtcoords ,
552- funcstr = function (ConditionObject , c )
553- -- this is handled externally because PvpTalentMap is so extensive a process,
554- -- and if it ends up getting processed in an OnUpdate condition, it could be very bad.
555- CNDT :RegisterEvent (" PLAYER_TALENT_UPDATE" )
556- CNDT :RegisterEvent (" ACTIVE_TALENT_GROUP_CHANGED" , " PLAYER_TALENT_UPDATE" )
557- CNDT :PLAYER_TALENT_UPDATE ()
536+ Env = {
537+ GetActiveSoulbindID = C_Soulbinds .GetActiveSoulbindID ,
538+ },
539+ funcstr = function (c )
540+ local id = c .Name :trim ()
541+ if not tonumber (id ) then
542+ for i = 1 , 30 do
543+ local data = C_Soulbinds .GetSoulbindData (i )
544+ if strlowerCache [data .name ] == strlowerCache [c .Name ] then
545+ id = i
546+ break
547+ end
548+ end
549+ end
550+ if not tonumber (id ) then
551+ return " false"
552+ end
558553
559- return [[ BOOLCHECK( PvpTalentMap[LOWER(c.NameFirst)] ) ]]
554+ return " BOOLCHECK( GetActiveSoulbindID() == " .. id .. " ) "
560555 end ,
561556 events = function (ConditionObject , c )
562557 return
563- ConditionObject :GenerateNormalEventString (" PLAYER_TALENT_UPDATE" ),
564- ConditionObject :GenerateNormalEventString (" ACTIVE_TALENT_GROUP_CHANGED" )
558+ ConditionObject :GenerateNormalEventString (" SOULBIND_ACTIVATED" )
565559 end ,
566560})
567561
568562
569- ConditionCategory :RegisterCondition (11 , " GLYPH" , {
570- text = L [" UIPANEL_GLYPH" ],
571- tooltip = L [" UIPANEL_GLYPH_DESC" ],
572563
573- bool = true ,
564+
565+
566+
567+
568+ CNDT .Env .AzeriteEssenceMap = {}
569+ CNDT .Env .AzeriteEssenceMap_MAJOR = {}
570+ local C_AzeriteEssence = C_AzeriteEssence
571+ function CNDT :AZERITE_ESSENCE_UPDATE ()
572+ wipe (Env .AzeriteEssenceMap )
573+ wipe (Env .AzeriteEssenceMap_MAJOR )
574+ local milestones = C_AzeriteEssence .GetMilestones ()
575+ if not milestones then return end
574576
575- unit = PLAYER ,
576- name = function (editbox )
577- editbox :SetTexts (L [" GLYPHTOCHECK" ], L [" CNDT_ONLYFIRST" ])
578- end ,
579- icon = " Interface\\ Icons\\ inv_inscription_tradeskill01" ,
580- tcoords = CNDT .COMMON .standardtcoords ,
581- funcstr = " DEPRECATED" ,
582- })
577+ for _ , slot in pairs (milestones ) do
578+ if slot .unlocked then
579+ local equippedEssenceId = C_AzeriteEssence .GetMilestoneEssence (slot .ID )
580+ if equippedEssenceId then
581+ local essence = C_AzeriteEssence .GetEssenceInfo (equippedEssenceId )
582+ local name = essence .name
583+ local id = essence .ID
584+
585+ local lower = name and strlowerCache [name ]
586+ if lower then
587+ Env .AzeriteEssenceMap [lower ] = true
588+ Env .AzeriteEssenceMap [id ] = true
589+
590+ -- Slot 0 is the major slot. There doesn't seem to be any other way to identify it.
591+ if slot .slot == 0 then
592+ Env .AzeriteEssenceMap_MAJOR [lower ] = true
593+ Env .AzeriteEssenceMap_MAJOR [id ] = true
594+ end
595+ end
596+ end
597+ end
598+ end
599+ end
600+
601+ for i , kind in TMW :Vararg (" " , " _MAJOR" ) do
602+ ConditionCategory :RegisterCondition (30 + i / 10 , " AZESSLEARNED" .. kind , {
603+ text = L [" UIPANEL_AZESSLEARNED" .. kind ],
604+ bool = true ,
605+ unit = PLAYER ,
606+ name = function (editbox )
607+ editbox :SetTexts (L [" SPELLTOCHECK" ], L [" CNDT_ONLYFIRST" ])
608+ end ,
609+ useSUG = " azerite_essence" ,
610+ icon = " Interface\\ Icons\\ " .. (kind == " " and " inv_radientazeritematrix" or " spell_azerite_essence_15" ),
611+ tcoords = CNDT .COMMON .standardtcoords ,
612+ funcstr = function (c )
613+ CNDT :RegisterEvent (" AZERITE_ESSENCE_UPDATE" )
614+ CNDT :RegisterEvent (" AZERITE_ESSENCE_ACTIVATED" , " AZERITE_ESSENCE_UPDATE" )
615+ CNDT :AZERITE_ESSENCE_UPDATE ()
616+
617+ return [[ BOOLCHECK( AzeriteEssenceMap]] .. kind .. [[ [LOWER(c.NameFirst)] )]]
618+ end ,
619+ events = function (ConditionObject , c )
620+ return
621+ ConditionObject :GenerateNormalEventString (" AZERITE_ESSENCE_UPDATE" ),
622+ ConditionObject :GenerateNormalEventString (" AZERITE_ESSENCE_ACTIVATED" )
623+ end ,
624+ })
625+ end
0 commit comments