private RadioGroup replyGroup;
private OnCheckedChangeListener radioButtonListener;
private boolean displayActors = true;
+ private boolean applyPhraseRewards = true;
private final ConversationCollection conversationCollection = new ConversationCollection();
phraseID = uri.getLastPathSegment().toString();
if (savedInstanceState != null) {
+ applyPhraseRewards = false;
phraseID = savedInstanceState.getString("phraseID");
conversationHistory = savedInstanceState.getParcelableArrayList("conversationHistory");
if (conversationHistory == null) conversationHistory = new ArrayList<ConversationStatement>();
super.onResume();
setPhrase(phraseID);
+ applyPhraseRewards = true;
nextButton.requestFocus();
}
if (AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES) {
if (phrase == null) phrase = new Phrase("(phrase \"" + phraseID + "\" not implemented yet)", null, null);
}
- Loot loot = ConversationController.applyPhraseRewards(player, phrase, world);
+
+ Loot loot = null;
+ if (applyPhraseRewards) {
+ loot = ConversationController.applyPhraseRewards(player, phrase, world);
+ }
if (phrase.message == null) {
for (Reply r : phrase.replies) {
String message = ConversationController.getDisplayMessage(phrase, player);
- if (loot != null && loot.hasItemsOrExp()) {
- message += "\n";
- if (loot.exp > 0) {
- message += "\n" + getResources().getString(R.string.conversation_rewardexp, loot.exp);
- }
- if (loot.gold > 0) {
- message += "\n" + getResources().getString(R.string.conversation_rewardgold, loot.gold);
- } else if (loot.gold < 0) {
- message += "\n" + getResources().getString(R.string.conversation_lostgold, -loot.gold);
- }
- if (!loot.items.isEmpty()) {
- final int len = loot.items.countItems();
- if (len == 1) {
- message += "\n" + getResources().getString(R.string.conversation_rewarditem);
- } else {
- message += "\n" + getResources().getString(R.string.conversation_rewarditems, len);
- }
+ if (applyPhraseRewards && loot != null) {
+ if (loot.hasItemsOrExp()) {
+ message += "\n";
+ if (loot.exp > 0) {
+ message += "\n" + getResources().getString(R.string.conversation_rewardexp, loot.exp);
+ }
+ if (loot.gold > 0) {
+ message += "\n" + getResources().getString(R.string.conversation_rewardgold, loot.gold);
+ } else if (loot.gold < 0) {
+ message += "\n" + getResources().getString(R.string.conversation_lostgold, -loot.gold);
+ }
+ if (!loot.items.isEmpty()) {
+ final int len = loot.items.countItems();
+ if (len == 1) {
+ message += "\n" + getResources().getString(R.string.conversation_rewarditem);
+ } else {
+ message += "\n" + getResources().getString(R.string.conversation_rewarditems, len);
+ }
+ }
}
}