- 0
mangos zero Custom chat commands - connect command with function
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use
Question
Zorak
Hi, I am trying to dd a custom command we need on our server.
But I cannot figure out, how to connect proper function to that comand.
I got through the project tree like searching for a name of an existing function of an existing command, but I haven't found anything.
Well, the logic obviously is:
ChatHandler::ParseCommands > ChatHandler::ExecuteCommand(text-from-chat-window);
But in ExecuteCommand I cannot see any connection for an actual precessing of that command. Even if I try to find some function name (like HandleGoXYZCommand) in whole project tree, there is only once (so twice in total, one prototype in chat.h, one in Level1.cpp). I would expect something like huge switch calling the funtions depenting on what chat command was sent...
Like I simply cannot find where in code is something like
switch (command){ case (goxyzCommand){HandleGoXZYCommand(params);} }
So the question is simple.
1) I add a comand into a DB
2) I add sme function doing someting into e.g. Level1.cpp
3) How do I connect my function with my commmand string?
Thank you
10 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.