aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/base/auth_database.sql14
-rw-r--r--sql/updates/auth/2013_06_02_00_auth_autobroadcast.sql5
-rw-r--r--src/server/game/World/World.cpp2
3 files changed, 19 insertions, 2 deletions
diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql
index 05e680f94eb..bf2d3f9256d 100644
--- a/sql/base/auth_database.sql
+++ b/sql/base/auth_database.sql
@@ -110,6 +110,20 @@ LOCK TABLES `account_banned` WRITE;
UNLOCK TABLES;
--
+-- Dumping data for table `autobroadcast`
+--
+
+DROP TABLE IF EXISTS `autobroadcast`;
+
+CREATE TABLE `autobroadcast` (
+ `realmid` int(11) NOT NULL DEFAULT '-1',
+ `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
+ `weight` tinyint(3) unsigned DEFAULT '1',
+ `text` longtext NOT NULL,
+ PRIMARY KEY (`id`,`realmid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
-- Table structure for table `ip_banned`
--
diff --git a/sql/updates/auth/2013_06_02_00_auth_autobroadcast.sql b/sql/updates/auth/2013_06_02_00_auth_autobroadcast.sql
new file mode 100644
index 00000000000..2e689ffd64d
--- /dev/null
+++ b/sql/updates/auth/2013_06_02_00_auth_autobroadcast.sql
@@ -0,0 +1,5 @@
+ALTER TABLE `autobroadcast`
+ CHANGE `realmid` `realmid` INT(11) NOT NULL DEFAULT '-1',
+ CHANGE `id` `id` TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
+ CHANGE `weight` `weight` TINYINT(3) UNSIGNED DEFAULT '1',
+ ENGINE=INNODB;
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 80577c3462e..9d2ee2eb2ba 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -2675,14 +2675,12 @@ void World::SendAutoBroadcast()
if (abcenter == 0)
sWorld->SendWorldText(LANG_AUTO_BROADCAST, msg.c_str());
-
else if (abcenter == 1)
{
WorldPacket data(SMSG_NOTIFICATION, (msg.size()+1));
data << msg;
sWorld->SendGlobalMessage(&data);
}
-
else if (abcenter == 2)
{
sWorld->SendWorldText(LANG_AUTO_BROADCAST, msg.c_str());