@Override
  public void handleResponse(int replyIndex, ConversationContext conversationContext) {
    WorldObject performer = conversationContext.getPerformer();
    WorldObject target = conversationContext.getTarget();
    World world = conversationContext.getWorld();

    if (replyIndex == THANKS || replyIndex == THANKS_AGAIN) {
      int relationshipBonus = calculateRelationshipIncrease(target, intPropertyToGive);
      RelationshipPropertyUtils.changeRelationshipValue(
          performer,
          target,
          relationshipBonus,
          Actions.TALK_ACTION,
          Conversations.createArgs(this),
          world);
      BuySellUtils.performerGivesItemToTarget(performer, target, intPropertyToGive, quantity);

    } else if (replyIndex == GET_LOST) {
      RelationshipPropertyUtils.changeRelationshipValue(
          performer, target, -20, Actions.TALK_ACTION, Conversations.createArgs(this), world);
    }
  }
  @Override
  public void handleResponse(
      int replyIndex, ConversationContext conversationContext, Conversation originalConversation) {

    WorldObject performer = conversationContext.getPerformer();
    WorldObject target = conversationContext.getTarget();
    World world = conversationContext.getWorld();

    if (isConversationAvailable(performer, target, world)) {
      if (replyIndex == SEE_THROUGH) {
        RelationshipPropertyUtils.changeRelationshipValue(
            performer,
            target,
            -50,
            Actions.TALK_ACTION,
            Conversations.createArgs(originalConversation),
            world);
      }
    }
  }
Ejemplo n.º 3
0
 public void run() {
   App.b(this.a.a);
   Conversations.e(this.a.a).post(new fo(this));
 }