Skip to content

Prevent irrelant tags on secondaryEffect gems and support gems being saved to xml #5700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/Classes/SkillsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,20 @@ function SkillsTabClass:ProcessSocketGroup(socketGroup)
gemInstance.reqInt = calcLib.getGemStatRequirement(gemInstance.reqLevel, grantedEffect.support, gemInstance.gemData.reqInt)
end
end
if gemInstance.gemData and gemInstance.gemData.tags.support then -- delete active skill stats as they get left behind on supports.
gemInstance.skillMinionCalcs = nil
gemInstance.skillMinion = nil
gemInstance.skillMinionItemSetCalcs = nil
gemInstance.skillMinionItemSet = nil
gemInstance.skillMinionSkill = nil
gemInstance.skillMinionSkillCalcs = nil
gemInstance.skillStageCountCalcs = nil
gemInstance.skillStageCount = nil
gemInstance.skillMineCountCalcs = nil
gemInstance.skillMineCount = nil
gemInstance.skillPart = nil
gemInstance.skillPartCalcs = nil
end
end
end

Expand Down
8 changes: 4 additions & 4 deletions src/Modules/CalcActiveSkill.lua
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ function calcs.buildActiveSkillModList(env, activeSkill)
end
activeSkill.skillPartName = part.name
skillFlags.multiPart = #activeGemParts > 1
elseif activeEffect.srcInstance and not (activeEffect.gemData and activeEffect.gemData.secondaryGrantedEffect) then
elseif activeEffect.srcInstance and not (activeEffect.gemData and activeEffect.gemData.secondaryGrantedEffect and activeEffect.gemData.secondaryGrantedEffect.parts and #activeEffect.gemData.secondaryGrantedEffect.parts > 1) then
activeEffect.srcInstance.skillPart = nil
activeEffect.srcInstance.skillPartCalcs = nil
end
Expand Down Expand Up @@ -537,7 +537,7 @@ function calcs.buildActiveSkillModList(env, activeSkill)
skillModList:NewMod("Multiplier:ActiveMineCount", "BASE", activeSkill.activeMineCount, "Base")
env.enemy.modDB.multipliers["ActiveMineCount"] = m_max(activeSkill.activeMineCount or 0, env.enemy.modDB.multipliers["ActiveMineCount"] or 0)
end
elseif activeEffect.srcInstance and not (activeEffect.gemData and activeEffect.gemData.secondaryGrantedEffect) then
elseif activeEffect.srcInstance and not (activeEffect.gemData and activeEffect.gemData.secondaryGrantedEffect and activeEffect.gemData.secondaryGrantedEffect.tags and activeEffect.gemData.secondaryGrantedEffect.tags.mine) then
activeEffect.srcInstance.skillMineCountCalcs = nil
activeEffect.srcInstance.skillMineCount = nil
end
Expand Down Expand Up @@ -639,7 +639,7 @@ function calcs.buildActiveSkillModList(env, activeSkill)
end
minion.itemSet = env.build.itemsTab.itemSets[activeEffect.srcInstance.skillMinionItemSet]
end
elseif activeEffect.srcInstance and not (activeEffect.gemData and activeEffect.gemData.secondaryGrantedEffect) then
elseif activeEffect.srcInstance and not (activeEffect.gemData and activeEffect.gemData.secondaryGrantedEffect and activeEffect.gemData.secondaryGrantedEffect.minionHasItemSet) then
activeEffect.srcInstance.skillMinionItemSetCalcs = nil
activeEffect.srcInstance.skillMinionItemSet = nil
end
Expand Down Expand Up @@ -681,7 +681,7 @@ function calcs.buildActiveSkillModList(env, activeSkill)
end
end
end
elseif activeEffect.srcInstance and not (activeEffect.gemData and activeEffect.gemData.secondaryGrantedEffect) then
elseif activeEffect.srcInstance and not (activeEffect.gemData and activeEffect.gemData.secondaryGrantedEffect and activeEffect.gemData.secondaryGrantedEffect.skillTypes and activeEffect.gemData.secondaryGrantedEffect.skillTypes[SkillType.Minion]) then
activeEffect.srcInstance.skillMinionCalcs = nil
activeEffect.srcInstance.skillMinion = nil
activeEffect.srcInstance.skillMinionItemSetCalcs = nil
Expand Down