/* * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 */ #include "ScriptMgr.h" #include "Player.h" #include "Config.h" #include "Chat.h" enum MyPlayerAcoreString { HELLO_WORLD = 35410 }; // Add player scripts class MyPlayer : public PlayerScript { public: MyPlayer() : PlayerScript("MyPlayer") { } void OnLogin(Player* player) override { if (sConfigMgr->GetOption("MyModule.Enable", false)) { ChatHandler(player->GetSession()).PSendSysMessage(HELLO_WORLD); } } }; // Add all scripts in one void AddMyPlayerScripts() { new MyPlayer(); }