fix(talknpc): bind server-started dialogs to the packet NPC
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 1/100
Research direction
Start with autoNpcTalk and Task::TalkNPC's NOT_STARTED stage, then trace how the 00B4/00B5/00B7 packet handlers supply the NPC ID and how talk cont and talk resp find the queued action. Reproduce the listed cases by replaying packets through Network::Receive. Done means server-started dialogs stay bound to the packet NPC ID despite movement or absence from the actor list, and both commands send their responses; issue #4384 already has an open linked pull request.
Written by the indexing model from the issue text.
Description
Openkore version git
3125ca761 (master), Windows, Perl 5.12.
XKore Mode
Not tied to a mode. Reproduced by replaying the packets through the real Network::Receive handlers, without a client.
RO Server Name
ROla
Result
When the server opens a dialog by itself (for example an event NPC triggered by walking into an area), OpenKore prints the dialog and the menu, but talk cont and talk resp do nothing.
autoNpcTalk creates a Task::TalkNPC with type => 'autotalk'. In the NOT_STARTED stage the task first waits for the character to stop moving, then checks timeOut($self->{time}, ...), and only then looks at %talk. If the character keeps walking for more than 5 seconds after the dialog opened, the task ends with NPC_NOT_FOUND while the dialog is still open. Later talk commands then find no NPC action in the AI queue. This happens with or without the NPC in the actor list.
If the NPC is not in the actor list and the task does start, it also reports Talking to wrong npc., because the placeholder target has no nameID. That clears the steps a plugin added in npc_autotalk.
Relevant Log Output
Could not find an NPC with id (3031).
Error in function 'talk' (Talk to NPC)
You are not talking to an npc
Expected Result
A conversation started by the server is bound to the NPC ID in the dialog packet. The task does not wait for movement or for the actor list, and talk cont and talk resp are answered.
How to Reproduce
- Let the server open a dialog (
00B4, then00B5or00B7) with an NPC ID that is not in$npcsList, while the character is still walking a path longer than 5 seconds. - Wait until the walk ends, then enter
talk contortalk resp 0. - Replay result on
master, per scenario:
NPC listed, character stopped talk cont -> TalkContinue sent
NPC not listed, character stopped err "Talking to wrong npc.", still sends
NPC listed, walk ended after 6 s task DONE "Could not find an NPC with id (3031)", nothing sent
NPC not listed, walk ended after 6 s task DONE "Could not find an NPC with id (3031)", nothing sent
- Dominant language
- Perl
- Stars
- 1.5k
- Forks
- 1.2k
- Avg merge
- 11h
- Merged PRs (30d)
- 110
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenKore/openkore
-
fix(char-create): show the real reason a character is refusedPossibly taken @baphomello claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
fix(manner): show the real result of manner and mute packetsPossibly taken @baphomello claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
Intermittent undefined hook removal assertion during cleanupPossibly taken @baphomello claimed this today. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
fix(utils): skip repeated delimiters in parseArgsPossibly taken @baphomello claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
Maintainers usually reply within 1 day
-
Will WX's interface get a dark mode?Possibly taken @baphomello claimed this 7 days ago. Openfeature request
Difficulty 5/5 Over a week Newbie friendliness 15/100
OpenKore/openkore#4316 · 4 comments ·
Maintainers usually reply within 1 day
All issues in OpenKore/openkore
Similar issues
-
area:runtime bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
fglock/PerlOnJava#2164 ·
Maintainers usually reply within 1 day
-
Dev-output directory preparation accepts file-valued lib/include paths and fails on dangling linksOpenteam-cli
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
Difficulty 1/5 Under an hour Newbie friendliness 93/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
inverse-inc/packetfence#9728 ·
Maintainers usually reply within 1 day