Jump to content

[idea] Message Box When A Character Logs In


Guest elegos87

Recommended Posts

Index: CharacterHandler.cpp

===================================================================

--- CharacterHandler.cpp (revision 6254)

+++ CharacterHandler.cpp (working copy)

@@ -466,6 +467,19 @@

                data.put(0, linecount);

                SendPacket( &data );
+    bool PlayerLogonAnnounce = sConfig.GetBoolDefault("Player.Logon.Announce", true);
+                if (PlayerLogonAnnounce)
+                {
+    Player *player = GetPlayer();
+    const char* args;
+    args = player->GetName();
+    std::string PlayerLoginMessage= " Welcome Login Server]");
+    std::string str ="|cffff0000";
+                str += args;
+    str += PlayerLoginMessage;
+    str += "|r";
+                sWorld.SendWorldText(str.c_str(), NULL);
+                }
                DEBUG_LOG( "WORLD: Sent motd (SMSG_MOTD)" );
        }

This will get " playername Welcome Login Server " when login in server! enjoy~~

Link to comment
Share on other sites

×
×
  • 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