Fixed NPE on buying the last item in the stall.

This commit is contained in:
jendave
2011-08-06 15:32:58 +00:00
parent fd580de1d2
commit 05e19beac9
3 changed files with 3 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ public class QuestAlchemistStall extends QuestAbstractBazaarStall {
protected List<QuestAbstractBazaarItem> populateItems() { protected List<QuestAbstractBazaarItem> populateItems() {
if (questData.getLife()>30) if (questData.getLife()>30)
{ {
return null; return new ArrayList<QuestAbstractBazaarItem>();
} }
List<QuestAbstractBazaarItem> itemList = new ArrayList<QuestAbstractBazaarItem>(); List<QuestAbstractBazaarItem> itemList = new ArrayList<QuestAbstractBazaarItem>();

View File

@@ -35,7 +35,7 @@ public class QuestGearStall extends QuestAbstractBazaarStall{
if(questData.getGearLevel() == 1){ if(questData.getGearLevel() == 1){
itemList.add(new QuestAbstractBazaarItem("Zeppelin", itemList.add(new QuestAbstractBazaarItem("Zeppelin",
"This extremely comfortable airship allows for more efficient and safe travel<br>to faraway destinations. <br>"+ "This extremely comfortable airship allows for more efficient and safe travel<br>to faraway destinations. <br>"+
"<u>Quest assignments become available more frequently, adds +3 to max life</u>.", "<u>Quest assignments become available more frequently<br>Adds +3 to max life during quest games</u>.",
5000, 5000,
GuiUtils.getIconFromFile("ZeppelinIcon.png")) { GuiUtils.getIconFromFile("ZeppelinIcon.png")) {
@Override @Override

View File

@@ -16,7 +16,7 @@ public class QuestNurseryStall extends QuestAbstractBazaarStall{
@Override @Override
protected List<QuestAbstractBazaarItem> populateItems() { protected List<QuestAbstractBazaarItem> populateItems() {
if (questData.getPlantLevel()>=6){ if (questData.getPlantLevel()>=6){
return null; return new ArrayList<QuestAbstractBazaarItem>();
} }
List<QuestAbstractBazaarItem> itemList = new ArrayList<QuestAbstractBazaarItem>(); List<QuestAbstractBazaarItem> itemList = new ArrayList<QuestAbstractBazaarItem>();