Skip to content

Commit 7fb91fa

Browse files
LocalIdentityLocalIdentity
andauthored
Fix Gem tooltips missing some mods (#1265)
Meta gems and gems that had a secondary granted effect were not showing mods Meta gems were missing mods too as they weren't using the correct statDescription scope Co-authored-by: LocalIdentity <[email protected]>
1 parent 8ea878c commit 7fb91fa

File tree

7 files changed

+42
-26
lines changed

7 files changed

+42
-26
lines changed

src/Classes/GemSelectControl.lua

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,10 @@ function GemSelectClass:AddGemTooltip(gemInstance)
562562
for _, statSet in ipairs(additional.statSets) do
563563
self:AddStatSetInfo(gemInstance, grantedEffect, statSet)
564564
end
565+
else
566+
for _, statSet in ipairs(additional.statSets) do
567+
self:AddStatSetInfo(gemInstance, grantedEffect, statSet, true)
568+
end
565569
end
566570
end
567571
end
@@ -682,22 +686,22 @@ function GemSelectClass:AddGrantedEffectInfo(gemInstance, grantedEffect, addReq)
682686
end
683687
end
684688
end
685-
function GemSelectClass:AddStatSetInfo(gemInstance, grantedEffect, statSet)
689+
function GemSelectClass:AddStatSetInfo(gemInstance, grantedEffect, statSet, noLabel)
686690
local displayInstance = gemInstance.displayEffect or gemInstance
687691
local statSetLevel = statSet.levels[displayInstance.level] or { }
688-
if statSet.label ~= grantedEffect.name and statSet.label ~= "" then
692+
if statSet.label ~= grantedEffect.name and statSet.label ~= "" and not noLabel then
689693
self.tooltip:AddSeparator(10)
690694
self.tooltip:AddLine(20, colorCodes.GEM .. statSet.label)
695+
self.tooltip:AddSeparator(10)
691696
end
692-
self.tooltip:AddSeparator(10)
693697
if statSetLevel.critChance then
694698
self.tooltip:AddLine(16, string.format("^x7F7F7FCritical Hit Chance: ^7%.2f%%", statSetLevel.critChance))
695699
end
696700
if statSetLevel.baseMultiplier then
697701
self.tooltip:AddLine(16, string.format("^x7F7F7FAttack Damage: ^7%d%%", statSetLevel.baseMultiplier * 100))
698702
end
699703
if self.skillsTab and self.skillsTab.build.data.describeStats then
700-
self.tooltip:AddSeparator(10)
704+
if not noLabel then self.tooltip:AddSeparator(10) end
701705
local stats = calcLib.buildSkillInstanceStats(displayInstance, grantedEffect, statSet)
702706
--if mergeStatsFrom then
703707
-- for stat, val in pairs(calcLib.buildSkillInstanceStats(displayInstance, mergeStatsFrom)) do

src/Data/Skills/act_dex.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5211,7 +5211,7 @@ skills["SupportMirageArcherPlayer"] = {
52115211
[1] = {
52125212
label = "SupportMirageArcherPlayer",
52135213
incrementalEffectiveness = 0.054999999701977,
5214-
statDescriptionScope = "gem_stat_descriptions",
5214+
statDescriptionScope = "meta_gem_stat_descriptions",
52155215
baseFlags = {
52165216
},
52175217
constantStats = {

src/Data/Skills/act_int.lua

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ skills["SupportBarrierInvocationPlayer"] = {
849849
[1] = {
850850
label = "SupportBarrierInvocationPlayer",
851851
incrementalEffectiveness = 0.054999999701977,
852-
statDescriptionScope = "gem_stat_descriptions",
852+
statDescriptionScope = "meta_gem_stat_descriptions",
853853
baseFlags = {
854854
},
855855
constantStats = {
@@ -1076,7 +1076,7 @@ skills["SupportBlasphemyPlayer"] = {
10761076
[1] = {
10771077
label = "Curses",
10781078
incrementalEffectiveness = 0.092720001935959,
1079-
statDescriptionScope = "gem_stat_descriptions",
1079+
statDescriptionScope = "meta_gem_stat_descriptions",
10801080
statMap = {
10811081
["support_blasphemy_curse_effect_+%_final"] = {
10821082
mod("CurseEffect", "MORE", nil),
@@ -2133,7 +2133,7 @@ skills["SupportMetaCastOnCritPlayer"] = {
21332133
[1] = {
21342134
label = "SupportMetaCastOnCritPlayer",
21352135
incrementalEffectiveness = 0.054999999701977,
2136-
statDescriptionScope = "gem_stat_descriptions",
2136+
statDescriptionScope = "meta_gem_stat_descriptions",
21372137
baseFlags = {
21382138
},
21392139
constantStats = {
@@ -2356,7 +2356,7 @@ skills["SupportMetaCastOnDodgePlayer"] = {
23562356
[1] = {
23572357
label = "SupportMetaCastOnDodgePlayer",
23582358
incrementalEffectiveness = 0.054999999701977,
2359-
statDescriptionScope = "gem_stat_descriptions",
2359+
statDescriptionScope = "meta_gem_stat_descriptions",
23602360
baseFlags = {
23612361
},
23622362
constantStats = {
@@ -2580,7 +2580,7 @@ skills["SupportMetaCastOnElementalAilmentPlayer"] = {
25802580
[1] = {
25812581
label = "SupportMetaCastOnElementalAilmentPlayer",
25822582
incrementalEffectiveness = 0.054999999701977,
2583-
statDescriptionScope = "gem_stat_descriptions",
2583+
statDescriptionScope = "meta_gem_stat_descriptions",
25842584
baseFlags = {
25852585
},
25862586
constantStats = {
@@ -2802,7 +2802,7 @@ skills["SupportMetaCastOnMinionDeathPlayer"] = {
28022802
[1] = {
28032803
label = "SupportMetaCastOnMinionDeathPlayer",
28042804
incrementalEffectiveness = 0.054999999701977,
2805-
statDescriptionScope = "gem_stat_descriptions",
2805+
statDescriptionScope = "meta_gem_stat_descriptions",
28062806
baseFlags = {
28072807
},
28082808
constantStats = {
@@ -4385,7 +4385,7 @@ skills["SupportMetaCastCurseOnBlockPlayer"] = {
43854385
[1] = {
43864386
label = "SupportMetaCastCurseOnBlockPlayer",
43874387
incrementalEffectiveness = 0.054999999701977,
4388-
statDescriptionScope = "gem_stat_descriptions",
4388+
statDescriptionScope = "meta_gem_stat_descriptions",
43894389
baseFlags = {
43904390
},
43914391
constantStats = {
@@ -5552,7 +5552,7 @@ skills["SupportElementalInvocationPlayer"] = {
55525552
[1] = {
55535553
label = "SupportElementalInvocationPlayer",
55545554
incrementalEffectiveness = 0.054999999701977,
5555-
statDescriptionScope = "gem_stat_descriptions",
5555+
statDescriptionScope = "meta_gem_stat_descriptions",
55565556
baseFlags = {
55575557
},
55585558
constantStats = {
@@ -11220,7 +11220,7 @@ skills["SupportHandOfChayulaPlayer"] = {
1122011220
[1] = {
1122111221
label = "Support",
1122211222
incrementalEffectiveness = 0.054999999701977,
11223-
statDescriptionScope = "gem_stat_descriptions",
11223+
statDescriptionScope = "meta_gem_stat_descriptions",
1122411224
baseFlags = {
1122511225
},
1122611226
stats = {
@@ -15934,7 +15934,7 @@ skills["SupportReapersInvocationPlayer"] = {
1593415934
[1] = {
1593515935
label = "SupportReapersInvocationPlayer",
1593615936
incrementalEffectiveness = 0.054999999701977,
15937-
statDescriptionScope = "gem_stat_descriptions",
15937+
statDescriptionScope = "meta_gem_stat_descriptions",
1593815938
baseFlags = {
1593915939
},
1594015940
constantStats = {

src/Data/Skills/act_str.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ skills["SupportAncestralWarriorTotemPlayer"] = {
570570
[1] = {
571571
label = "SupportAncestralWarriorTotemPlayer",
572572
incrementalEffectiveness = 0.054999999701977,
573-
statDescriptionScope = "gem_stat_descriptions",
573+
statDescriptionScope = "meta_gem_stat_descriptions",
574574
statMap = {
575575
["support_ancestral_warrior_totem_attack_speed_+%_final"] = {
576576
mod("Speed", "MORE", nil, ModFlag.Attack),
@@ -1856,7 +1856,7 @@ skills["SupportMetaCastOnBlockPlayer"] = {
18561856
[1] = {
18571857
label = "SupportMetaCastOnBlockPlayer",
18581858
incrementalEffectiveness = 0.054999999701977,
1859-
statDescriptionScope = "gem_stat_descriptions",
1859+
statDescriptionScope = "meta_gem_stat_descriptions",
18601860
baseFlags = {
18611861
},
18621862
constantStats = {
@@ -1961,7 +1961,7 @@ skills["SupportMetaCastOnMeleeKillPlayer"] = {
19611961
[1] = {
19621962
label = "SupportMetaCastOnMeleeKillPlayer",
19631963
incrementalEffectiveness = 0.054999999701977,
1964-
statDescriptionScope = "gem_stat_descriptions",
1964+
statDescriptionScope = "meta_gem_stat_descriptions",
19651965
baseFlags = {
19661966
},
19671967
constantStats = {
@@ -2029,7 +2029,7 @@ skills["SupportMetaCastOnMeleeStunPlayer"] = {
20292029
[1] = {
20302030
label = "SupportMetaCastOnMeleeStunPlayer",
20312031
incrementalEffectiveness = 0.054999999701977,
2032-
statDescriptionScope = "gem_stat_descriptions",
2032+
statDescriptionScope = "meta_gem_stat_descriptions",
20332033
baseFlags = {
20342034
},
20352035
constantStats = {
@@ -11244,7 +11244,7 @@ skills["SupportMortarCannonPlayer"] = {
1124411244
[1] = {
1124511245
label = "SupportMortarCannonPlayer",
1124611246
incrementalEffectiveness = 0.054999999701977,
11247-
statDescriptionScope = "gem_stat_descriptions",
11247+
statDescriptionScope = "meta_gem_stat_descriptions",
1124811248
statMap = {
1124911249
["support_grenade_ballista_damage_+%_final"] = {
1125011250
mod("Damage", "MORE", nil),
@@ -14367,7 +14367,7 @@ skills["SupportMetaCastLightningSpellOnHitPlayer"] = {
1436714367
[1] = {
1436814368
label = "SupportMetaCastLightningSpellOnHitPlayer",
1436914369
incrementalEffectiveness = 0.054999999701977,
14370-
statDescriptionScope = "gem_stat_descriptions",
14370+
statDescriptionScope = "meta_gem_stat_descriptions",
1437114371
baseFlags = {
1437214372
},
1437314373
constantStats = {

src/Data/Skills/other.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ skills["SupportMetaDeadeyeMarksPlayer"] = {
10231023
[1] = {
10241024
label = "SupportMetaDeadeyeMarksPlayer",
10251025
incrementalEffectiveness = 0.054999999701977,
1026-
statDescriptionScope = "gem_stat_descriptions",
1026+
statDescriptionScope = "meta_gem_stat_descriptions",
10271027
baseFlags = {
10281028
},
10291029
constantStats = {
@@ -1247,7 +1247,7 @@ skills["SupportMetaCastOnCharmUsePlayer"] = {
12471247
[1] = {
12481248
label = "SupportMetaCastOnCharmUsePlayer",
12491249
incrementalEffectiveness = 0.054999999701977,
1250-
statDescriptionScope = "gem_stat_descriptions",
1250+
statDescriptionScope = "meta_gem_stat_descriptions",
12511251
baseFlags = {
12521252
},
12531253
constantStats = {
@@ -3021,7 +3021,7 @@ skills["SupportMetaCastFireSpellOnHitPlayer"] = {
30213021
[1] = {
30223022
label = "SupportMetaCastFireSpellOnHitPlayer",
30233023
incrementalEffectiveness = 0.054999999701977,
3024-
statDescriptionScope = "gem_stat_descriptions",
3024+
statDescriptionScope = "meta_gem_stat_descriptions",
30253025
baseFlags = {
30263026
},
30273027
constantStats = {

src/Export/Scripts/skills.lua

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,19 @@ directiveTable.set = function(state, args, out)
679679
out:write('\t\t\tdamageIncrementalEffectiveness = ', grantedEffectStatSet.DamageIncrementalEffectiveness, ',\n')
680680
end
681681
if state.granted.IsSupport then
682-
state.statDescriptionScope = "gem_stat_descriptions"
682+
local gemEffect = dat("GemEffects"):GetRowList("AdditionalGrantedEffects", state.granted )
683+
if gemEffect[1] and gemEffect[1].Tags then
684+
for _, tag in ipairs(gemEffect[1].Tags) do
685+
if tag.Id == "meta" then
686+
skill.isMeta = true
687+
end
688+
end
689+
end
690+
if skill.isMeta then
691+
state.statDescriptionScope = "meta_gem_stat_descriptions"
692+
else
693+
state.statDescriptionScope = "gem_stat_descriptions"
694+
end
683695
else
684696
state.statDescriptionScope = state.granted.ActiveSkill.StatDescription:gsub("^Metadata/StatDescriptions/", ""):
685697
-- Need to subtract 1 from setIndex because GGG indexes from 0

src/Export/spec.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7418,7 +7418,7 @@ return {
74187418
},
74197419
[6]={
74207420
list=true,
7421-
name="",
7421+
name="StatSetIndex",
74227422
refTo="",
74237423
type="Int",
74247424
width=150

0 commit comments

Comments
 (0)