more stealing cause I know nothing

This commit is contained in:
Flerp 2025-10-25 00:51:38 -07:00
parent 6014ef5d46
commit 56a76bf9c2
2 changed files with 8 additions and 20 deletions

View File

@ -1,10 +1,6 @@
/*
* AzerothCore module loader for mod-teleport-to-node
*/
// src/loader.cpp
void AddSC_telenode_commandscript();
// Called by the module system; name can be anything, just referenced in CMake
void Addmod_teleport_to_nodeScripts()
{
AddSC_telenode_commandscript();

View File

@ -1,19 +1,16 @@
/*
* MIT-style module command following AzerothCore boilerplate
* MIT-style module command following AzerothCore boilerplate (std::vector<ChatCommand>)
*/
#include "ScriptMgr.h"
#include "CommandScript.h"
#include "Chat.h"
#include "ChatCommand.h"
#include "Player.h"
#include "GameObject.h"
#include <vector>
#include <limits>
using namespace Acore::ChatCommands;
namespace
{
// === CONFIG ===
@ -84,22 +81,17 @@ class telenode_commandscript : public CommandScript
public:
telenode_commandscript() : CommandScript("telenode_commandscript") { }
// EXACTLY like the AzerothCore boilerplate: a ChatCommandTable + static handler fn
ChatCommandTable GetCommands() const override
// EXACTLY like the AzerothCore boilerplate: std::vector<ChatCommand>
std::vector<ChatCommand> GetCommands() const override
{
static ChatCommandTable commandTable =
static std::vector<ChatCommand> commandTable =
{
// .telenode
{ "telenode",
SEC_PLAYER, // security (adjust via DB if you want)
Console::No, // no console by default
&HandleTeleNode, // function pointer (NOT a lambda)
"" } // help text (optional)
// { name, security, allowConsole, handler, help }
{ "telenode", SEC_PLAYER, false, &HandleTeleNode, "" },
};
return commandTable;
}
// Boilerplate-compatible handler signature
static bool HandleTeleNode(ChatHandler* handler, char const* /*args*/)
{
if (!handler)
@ -120,7 +112,7 @@ public:
}
};
// Boilerplate-style exported symbol that your loader will call
// Export symbol called by your loader.cpp
void AddSC_telenode_commandscript()
{
new telenode_commandscript();