UOOutlands / Razor

Razor is a free tool designed to help with simple tasks while playing Ultima Online.
http://www.uor-razor.com
GNU General Public License v3.0
9 stars 6 forks source link

Fixed two rare scenarios where the state for getlabel would be invalid after stopping the script while waiting for label #94

Open Tranq1 opened 2 years ago

Tranq1 commented 2 years ago

This bugfix fixes two scenarios:

The first one occurred when the script was stopped after the first label arrived but while still waiting out the 500ms pause, which would lead to the _onLabelMessage action not being removed and thus blocking all messages from showing for the serial that was last polled by getlabel.

The second, more serious one would occur if the script was stopped before the first label arrived, thus leaving the state at WAITING_FOR_FIRST_LABEL. This would lead to the command returning false and being stuck in a loop until the client is restarted.