Skip to content

Scripting sendtext and requesttext + onReceiveText#118

Open
xx-shitai-xx wants to merge 3 commits intodevfrom
feature/scripting-sendtext-and-receivetext
Open

Scripting sendtext and requesttext + onReceiveText#118
xx-shitai-xx wants to merge 3 commits intodevfrom
feature/scripting-sendtext-and-receivetext

Conversation

@xx-shitai-xx
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread server/src/ServerList.cpp
Comment on lines +915 to +922
for (const auto& [npcName, npcPtr]: m_server->getNPCNameList())
{
// TODO(joey): check if they have the event before queueing for them
if (const auto npcObject = npcPtr.lock(); npcObject && npcName == params[0])
{
npcObject->queueNpcEvent("npc.receivetext", true, data.toString());
}
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, this is a map on the npc name itself - why the traversal, and why do I need to check if they have the event before queueing for them?!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll clean this up :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants