Rutherther / NosSmooth

Nostale bot library written in C#. May describe the current state of the game/character from packets. Multiple sources available for capturing the packets from running game.
MIT License
6 stars 3 forks source link

Add smart dialog handling #57

Closed Rutherther closed 1 year ago

Rutherther commented 1 year ago

A dialog accept or deny should be called only once. Make DialogHandler temporarily save dialogs and the response that was given first.

In case there are two responses to same dialog, there are two possibilities:

  1. the response is the same
  2. the response is the other one, thus we are in a conflict

In case the responses are the same, just return successful result without sending anything to NosTale. In case the responses are in conflict, return a conflict error.

This way every dialog will be responded to only once. In case of conflict the application will know it cannot continue with its current task. No one is prioritized. That could be a problem sometimes.