Jump to content

Diantonix

Members
  • Posts

    4
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Diantonix's Achievements

Newbie

Newbie (1/3)

0

Reputation

  1. The title says it all, mangos will support cataclysm? and when it is estimated to support? Thanks for your attention.
  2. Patch over. Just enter and go. New Link: http://pastebin.com/JnQz6BAG
  3. This patch is for the Announcement in the chat. 1º Command: Send an announcement to online Gamemasters. 2º Command: Send an announcement to all online GM''s, displaying the name of the sender. 3º Command: Send an announcement to all online players, displaying the name of the sender. New Link: http://pastebin.com/JnQz6BAG 2c973d37315bab9fe1690c37671b422865ac48f3 src/game/Chat.cpp | 3 +++ src/game/Chat.h | 3 +++ src/game/Level1.cpp | 29 +++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 0 deletions(-) diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index d526d26..8b9c8db 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -688,6 +688,9 @@ ChatCommand * ChatHandler::getCommandTable() { "aura", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAuraCommand, "", NULL }, { "unaura", SEC_ADMINISTRATOR, false, &ChatHandler::HandleUnAuraCommand, "", NULL }, + { "nameannounce", SEC_MODERATOR, false, &ChatHandler::HandleNameAnnounceCommand, "", NULL }, + { "gmnameannounce", SEC_MODERATOR, false, &ChatHandler::HandleGMNameAnnounceCommand, "", NULL }, + { "gmannounce", SEC_MODERATOR, true, &ChatHandler::HandleGMAnnounceCommand, "", NULL }, { "announce", SEC_MODERATOR, true, &ChatHandler::HandleAnnounceCommand, "", NULL }, { "notify", SEC_MODERATOR, true, &ChatHandler::HandleNotifyCommand, "", NULL }, { "goname", SEC_MODERATOR, false, &ChatHandler::HandleGonameCommand, "", NULL }, diff --git a/src/game/Chat.h b/src/game/Chat.h index d85c3e7..5511ef3 100644 --- a/src/game/Chat.h +++ b/src/game/Chat.h @@ -510,6 +510,9 @@ class ChatHandler bool HandleGonameCommand(char* args); bool HandleGroupgoCommand(char* args); bool HandleRecallCommand(char* args); + bool HandleNameAnnounceCommand(char* args); + bool HandleGMNameAnnounceCommand(char* args); + bool HandleGMAnnounceCommand(char* args); bool HandleAnnounceCommand(char* args); bool HandleNotifyCommand(char* args); bool HandleGPSCommand(char* args); diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp index 2831ac0..68dcf3e 100644 --- a/src/game/Level1.cpp +++ b/src/game/Level1.cpp @@ -120,6 +120,26 @@ bool ChatHandler::HandleNpcWhisperCommand(char* args) } //---------------------------------------------------------- +bool ChatHandler::HandleNameAnnounceCommand(const char* args) +{ + WorldPacket data; + if (!*args) + return false; + + sWorld.SendWorldText(LANG_ANNOUNCE_COLOR, m_session->GetPlayer()->GetName(), args); + return true; +} + +bool ChatHandler::HandleGMNameAnnounceCommand(const char* args) +{ + WorldPacket data; + if (!*args) + return false; + + sWorld.SendGMText(LANG_GM_ANNOUNCE_COLOR, m_session->GetPlayer()->GetName(), args); + return true; +} + // global announce bool ChatHandler::HandleAnnounceCommand(char* args) { @@ -130,6 +150,15 @@ bool ChatHandler::HandleAnnounceCommand(char* args) return true; } +// announce to logged in GMs +bool ChatHandler::HandleGMAnnounceCommand(const char* args) +{ + if (!*args) + return false; + + sWorld.SendGMText(LANG_GM_BROADCAST,args); + return true; +} diff --git a/sql/updates/xxxxx_01_mangos_command.sql b/sql/updates/xxxxx_01_mangos_command.sql new file mode 100644 index 0000000..b23c2ff --- /dev/null +++ b/sql/updates/xxxxx_01_mangos_command.sql @@ -0,0 +1,4 @@ +INSERT INTO `command` VALUES +('gmannounce',1,'Syntax: .gmannounce $announcement\\r\\nSend an announcement to online Gamemasters.'), +('gmnameannounce',1,'Syntax: .gmnameannounce $announcement.\\r\\nSend an announcement to all online GM''s, displaying the name of the sender.'), +('nameannounce',1,'Syntax: .nameannounce $announcement.\\nSend an announcement to all online players, displaying the name of the sender.'); \\ No newline at end of file
  4. Hello. Why mangos and scriptdev2 do not use the same repository? That would greatly facilitate the build time. Do not you think? Message ScriptDev2: http://www.scriptdev2.com/why-not-use-t5527.html?p=37155#post37155
×
×
  • Create New...

Important Information

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