v0.9.1d: fixed errors with runic transference caused by v0.9.1c
This commit is contained in:
@@ -170,26 +170,28 @@ public class Armor extends EquipableItem {
|
|||||||
BrokenSeal.WarriorShield sealBuff = hero.buff(BrokenSeal.WarriorShield.class);
|
BrokenSeal.WarriorShield sealBuff = hero.buff(BrokenSeal.WarriorShield.class);
|
||||||
if (sealBuff != null) sealBuff.setArmor(null);
|
if (sealBuff != null) sealBuff.setArmor(null);
|
||||||
|
|
||||||
if (seal.level() > 0){
|
BrokenSeal detaching = seal;
|
||||||
|
seal = null;
|
||||||
|
|
||||||
|
if (detaching.level() > 0){
|
||||||
degrade();
|
degrade();
|
||||||
}
|
}
|
||||||
if (seal.getGlyph() != null){
|
if (detaching.getGlyph() != null){
|
||||||
if (hero.hasTalent(Talent.RUNIC_TRANSFERENCE)
|
if (hero.hasTalent(Talent.RUNIC_TRANSFERENCE)
|
||||||
&& (Arrays.asList(Glyph.common).contains(seal.getGlyph().getClass())
|
&& (Arrays.asList(Glyph.common).contains(detaching.getGlyph().getClass())
|
||||||
|| Arrays.asList(Glyph.uncommon).contains(seal.getGlyph().getClass()))){
|
|| Arrays.asList(Glyph.uncommon).contains(detaching.getGlyph().getClass()))){
|
||||||
inscribe(null);
|
inscribe(null);
|
||||||
} else if (hero.pointsInTalent(Talent.RUNIC_TRANSFERENCE) == 2){
|
} else if (hero.pointsInTalent(Talent.RUNIC_TRANSFERENCE) == 2){
|
||||||
inscribe(null);
|
inscribe(null);
|
||||||
} else {
|
} else {
|
||||||
seal.setGlyph(null);
|
detaching.setGlyph(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GLog.i( Messages.get(Armor.class, "detach_seal") );
|
GLog.i( Messages.get(Armor.class, "detach_seal") );
|
||||||
hero.sprite.operate(hero.pos);
|
hero.sprite.operate(hero.pos);
|
||||||
if (!seal.collect()){
|
if (!detaching.collect()){
|
||||||
Dungeon.level.drop(seal, hero.pos);
|
Dungeon.level.drop(detaching, hero.pos);
|
||||||
}
|
}
|
||||||
seal = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user