diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/ConversationController.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/ConversationController.java index 608074d0a..7c666c6fc 100644 --- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/ConversationController.java +++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/ConversationController.java @@ -40,7 +40,15 @@ public final class ConversationController { public final ArrayList actorConditions = new ArrayList(); public final ArrayList skillIncrease = new ArrayList(); public final ArrayList questProgress = new ArrayList(); - } + + public boolean isEmpty() { + if (loot.hasItemsOrExp()) return false; + if (!actorConditions.isEmpty()) return false; + if (!skillIncrease.isEmpty()) return false; + if (!questProgress.isEmpty()) return false; + return true; + } + } private PhraseRewards applyPhraseRewards(final Player player, final Phrase phrase) { if (phrase.rewards == null || phrase.rewards.length == 0) return null; @@ -65,9 +73,12 @@ public final class ConversationController { break; } } - + + if (result.isEmpty()) return null; + player.inventory.add(result.loot); controllers.actorStatsController.addExperience(result.loot.exp); + return result; }