v0.9.4: fixed crashes if hero ankhs without a holster in inventory
This commit is contained in:
parent
fa667db0e7
commit
76bd7b8d15
|
@ -2006,7 +2006,7 @@ public class Hero extends Char {
|
||||||
} else if (i instanceof CloakOfShadows && i.keptThoughLostInvent && hasTalent(Talent.LIGHT_CLOAK)){
|
} else if (i instanceof CloakOfShadows && i.keptThoughLostInvent && hasTalent(Talent.LIGHT_CLOAK)){
|
||||||
((CloakOfShadows) i).activate(this);
|
((CloakOfShadows) i).activate(this);
|
||||||
} else if (i instanceof Wand && i.keptThoughLostInvent){
|
} else if (i instanceof Wand && i.keptThoughLostInvent){
|
||||||
if (holster.contains(i)){
|
if (holster != null && holster.contains(i)){
|
||||||
((Wand) i).charge(this, MagicalHolster.HOLSTER_SCALE_FACTOR);
|
((Wand) i).charge(this, MagicalHolster.HOLSTER_SCALE_FACTOR);
|
||||||
} else {
|
} else {
|
||||||
((Wand) i).charge(this);
|
((Wand) i).charge(this);
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class LostBackpack extends Item {
|
||||||
} else if ( i instanceof CloakOfShadows && hero.hasTalent(Talent.LIGHT_CLOAK)){
|
} else if ( i instanceof CloakOfShadows && hero.hasTalent(Talent.LIGHT_CLOAK)){
|
||||||
((CloakOfShadows) i).activate(hero);
|
((CloakOfShadows) i).activate(hero);
|
||||||
} else if (i instanceof Wand){
|
} else if (i instanceof Wand){
|
||||||
if (holster.contains(i)){
|
if (holster != null && holster.contains(i)){
|
||||||
((Wand) i).charge(hero, MagicalHolster.HOLSTER_SCALE_FACTOR);
|
((Wand) i).charge(hero, MagicalHolster.HOLSTER_SCALE_FACTOR);
|
||||||
} else {
|
} else {
|
||||||
((Wand) i).charge(hero);
|
((Wand) i).charge(hero);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user