mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +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")) {
|
if (mapParams.containsKey("SubAbility")) {
|
||||||
final String name = mapParams.get("SubAbility");
|
final String name = mapParams.get("SubAbility");
|
||||||
SpellAbility p = parent;
|
spellAbility.setSubAbility(getSubAbility(state, name, spellAbility));
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (final String key : additionalAbilityKeys) {
|
for (final String key : additionalAbilityKeys) {
|
||||||
|
|||||||
Reference in New Issue
Block a user