mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
Merge branch '1380-selective-adaptation-triggers-excessive-memory-usage' into 'master'
Resolve "'Selective Adaptation' triggers excessive memory usage" Closes #1380 See merge request core-developers/forge!2762
This commit is contained in:
@@ -247,20 +247,7 @@ public final class AbilityFactory {
|
||||
|
||||
if (mapParams.containsKey("SubAbility")) {
|
||||
final String name = mapParams.get("SubAbility");
|
||||
SpellAbility p = parent;
|
||||
AbilitySub sub = null;
|
||||
while (p != null) {
|
||||
sub = p.getAdditionalAbility(name);
|
||||
if (sub != null) {
|
||||
break;
|
||||
}
|
||||
p = p.getParent();
|
||||
}
|
||||
if (sub == null) {
|
||||
sub = getSubAbility(state, name, spellAbility);
|
||||
}
|
||||
spellAbility.setSubAbility(sub);
|
||||
spellAbility.setAdditionalAbility(name, sub);
|
||||
spellAbility.setSubAbility(getSubAbility(state, name, spellAbility));
|
||||
}
|
||||
|
||||
for (final String key : additionalAbilityKeys) {
|
||||
|
||||
Reference in New Issue
Block a user