Skip to content

Commit

Permalink
feat: add support to progress bar while talking to NPC (#3850)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexhexD committed Feb 4, 2024
1 parent 6050291 commit d075208
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Task/TalkNPC.pm
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ sub iterate {

#We must always wait for the last sent step to be answered, if it hasn't then cancel this task.
if ($self->{wait_for_answer}) {
if (${self}->{progress_bar}) {
$ai_v{'npc_talk'}{'time'} = time;
return;
}
if (timeOut($ai_v{'npc_talk'}{'time'}, $timeResponse)) {
$self->{error_code} = NPC_TIMEOUT_AFTER_ASWER;
$self->{error_message} = "We have waited for too long after we sent a response to the npc.";
Expand Down

0 comments on commit d075208

Please sign in to comment.