Eg.
#define COMMAND_CASTSPELL 509
2. Create or append a case in the command handler switch/case code (void Commands::Process(..) in WorldServer/Commands/Commands.cpp), in this case:
case COMMAND_CASTSPELL: {
....
break;
}
3. Run the following MySQL query/MariaDB query to reference the new command:
insert into commands set type=0, command='*commandname*', subcommand='', handler=*handleridnumber*, required_status=0;
In the case of COMMAND_CASTSPELL:
insert into commands set type=0, command='castspell', subcommand='', handler=509, required_status=200;