Program: 164061
Project: 164061
Buggy source:
@Override public void interact(){
  sprite.turnTo(pos,Dungeon.hero.pos);
  if (Quest.given) {
    Item item;
switch (Quest.type) {
case 1:
default :
      item=Dungeon.hero.belongings.getItem(CorpseDust.class);
    break;
case 2:
  item=Dungeon.hero.belongings.getItem(Embers.class);
break;
case 3:
item=Dungeon.hero.belongings.getItem(Rotberry.Seed.class);
break;
}
if (item != null) {
GameScene.show(new WndWandmaker(this,item));
}
 else {
String msg="String_Node_Str";
switch (Quest.type) {
case 1:
msg=Messages.get(this,"String_Node_Str",Dungeon.hero.givenName());
break;
case 2:
msg=Messages.get(this,"String_Node_Str",Dungeon.hero.givenName());
break;
case 3:
msg=Messages.get(this,"String_Node_Str",Dungeon.hero.givenName());
break;
}
GameScene.show(new WndQuest(this,msg));
}
}
 else {
String msg1="String_Node_Str";
String msg2="String_Node_Str";
switch (Dungeon.hero.heroClass) {
case WARRIOR:
msg1+=Messages.get(this,"String_Node_Str");
break;
case ROGUE:
msg1+=Messages.get(this,"String_Node_Str");
break;
case MAGE:
msg1+=Messages.get(this,"String_Node_Str",Dungeon.hero.givenName());
break;
case HUNTRESS:
msg1+=Messages.get(this,"String_Node_Str");
break;
}
msg1+=Messages.get(this,"String_Node_Str");
switch (Quest.type) {
case 1:
msg2+=Messages.get(this,"String_Node_Str");
break;
case 2:
msg2+=Messages.get(this,"String_Node_Str");
break;
case 3:
msg2+=Messages.get(this,"String_Node_Str");
break;
}
msg2+=Messages.get(this,"String_Node_Str");
final String msg2final=msg2;
final NPC wandmaker=this;
GameScene.show(new WndQuest(wandmaker,msg1){
@Override public void hide(){
super.hide();
GameScene.show(new WndQuest(wandmaker,msg2final));
}
}
);
Journal.add(Journal.Feature.WANDMAKER);
Quest.given=true;
}
}

Fixed version (ground truth):
@Override public boolean interact(){
  sprite.turnTo(pos,Dungeon.hero.pos);
  if (Quest.given) {
    Item item;
switch (Quest.type) {
case 1:
default :
      item=Dungeon.hero.belongings.getItem(CorpseDust.class);
    break;
case 2:
  item=Dungeon.hero.belongings.getItem(Embers.class);
break;
case 3:
item=Dungeon.hero.belongings.getItem(Rotberry.Seed.class);
break;
}
if (item != null) {
GameScene.show(new WndWandmaker(this,item));
}
 else {
String msg="String_Node_Str";
switch (Quest.type) {
case 1:
msg=Messages.get(this,"String_Node_Str",Dungeon.hero.givenName());
break;
case 2:
msg=Messages.get(this,"String_Node_Str",Dungeon.hero.givenName());
break;
case 3:
msg=Messages.get(this,"String_Node_Str",Dungeon.hero.givenName());
break;
}
GameScene.show(new WndQuest(this,msg));
}
}
 else {
String msg1="String_Node_Str";
String msg2="String_Node_Str";
switch (Dungeon.hero.heroClass) {
case WARRIOR:
msg1+=Messages.get(this,"String_Node_Str");
break;
case ROGUE:
msg1+=Messages.get(this,"String_Node_Str");
break;
case MAGE:
msg1+=Messages.get(this,"String_Node_Str",Dungeon.hero.givenName());
break;
case HUNTRESS:
msg1+=Messages.get(this,"String_Node_Str");
break;
}
msg1+=Messages.get(this,"String_Node_Str");
switch (Quest.type) {
case 1:
msg2+=Messages.get(this,"String_Node_Str");
break;
case 2:
msg2+=Messages.get(this,"String_Node_Str");
break;
case 3:
msg2+=Messages.get(this,"String_Node_Str");
break;
}
msg2+=Messages.get(this,"String_Node_Str");
final String msg2final=msg2;
final NPC wandmaker=this;
GameScene.show(new WndQuest(wandmaker,msg1){
@Override public void hide(){
super.hide();
GameScene.show(new WndQuest(wandmaker,msg2final));
}
}
);
Journal.add(Journal.Feature.WANDMAKER);
Quest.given=true;
}
return false;
}