xeross
Members-
Posts
36 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Profiles
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Everything posted by xeross
-
These should be logged in db that makes it much easier to see if someone is reported multiple times.
-
well it's very hard but possible, no one will help you i think you'll need to do it all yourself. You could also try aspire heartstone thats less conversion but still stable afaik
-
we need to re-extract maps now ?
-
Hmm i think your translator program sucks ass. But i think you mean that some items have a duration like for example holiday items, Right?
-
You used this code or other?
-
Happy new year y'all
-
autoreconf -fi ../Configure --parameters make make install that's all on linux
-
Check how it works with normal spells in the database
-
Git patching, does it revert to the rev in the patch.
xeross replied to a topic in OldSource code management
ill try that thanks for the help -
Git patching, does it revert to the rev in the patch.
xeross replied to a topic in OldSource code management
hmm so if i do git commit it will update normally ? -
Git patching, does it revert to the rev in the patch.
xeross replied to a topic in OldSource code management
You indeed don't get my question. Ok i've made my own patch file with the changes i want in mangos, however whenever i do a git pull origin master when the patch is applied i get File X needs update for all the files the patch changes instead of merging them so i was wondering if the patch takes an older version of the file and patches that instead of patching the newest version. -
[patch][7544] uptime-table moved to characters-database
xeross replied to a topic in ... acceptedOld
this is kewl, if i switch world db i don't have to backup my uptime table. -
Vote for addin or something similiar
-
you should only have the effect of 1 rank on you.
-
[Patch] Auto Announcer(With Next ID)
xeross replied to Auntie Mangos's topic in OldCore modifications
Hmm no problems here. I'll try it with newest compile soon. -
[Patch] Auto Announcer(With Next ID)
xeross replied to Auntie Mangos's topic in OldCore modifications
DO search and replace: replace --- a/ with --- replcace +++ b/ with +++ -
lol you still don't get the question for example npc has flags for if he is quest giver etc. I was wondering if some flags changed for example that the flag for quest giver changed etc.
-
lol everyone doesn't get my questions. I'm talking about quest flags etc in the database because i want to modify udb to work with 3.0.3 and if any flags changed then i need to change them too.
-
Hmm, maybe so that people could use it till there's a non hacked fix for this. So what would be the correct fix ? Regards, Xeross
-
Hey, I was wondering if there are flags that've changed like for example a flag that was first 1 is now 2 etc. This is because i am trying to get udb to be usable on 3.0.3. So are there ? Regards, xeross
-
Testing now, as long as it works im satisfied.
-
Thank you for this fix
-
[Patch] Auto Announcer(With Next ID)
xeross replied to Auntie Mangos's topic in OldCore modifications
Hey, i've modified the announcer script i've found for mangos to allow a next id to be specified this will be the id of the next message that will be announced. Here's the patch(It's cut from my own source patch that had some other stuff in it so might not work): diff --git a/src/game/Language.h b/src/game/Language.h index 0c20968..6b27f6e 100644 --- a/src/game/Language.h +++ b/src/game/Language.h @@ -723,6 +723,8 @@ enum MangosStrings // FREE IDS 1200-9999 + // Broadcaster + LANG_AUTO_BROADCAST = 1200, // Use for not-in-offcial-sources patches // 10000-10999 diff --git a/src/game/World.cpp b/src/game/World.cpp index 6fa9a30..5547766 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -58,6 +58,7 @@ #include "WaypointManager.h" #include "GMTicketMgr.h" #include "Util.h" +#include "Language.h" INSTANTIATE_SINGLETON_1( World ); @@ -1304,8 +1305,10 @@ void World::SetInitialWorldSettings() sprintf( isoDate, "%04d-%02d-%02d %02d:%02d:%02d", local.tm_year+1900, local.tm_mon+1, local.tm_mday, local.tm_hour, local.tm_min, local.tm_sec); - WorldDatabase.PExecute("INSERT INTO uptime (startstring, starttime, uptime) VALUES('%s', " I64FMTD ", 0)", - isoDate, uint64(m_startTime)); + WorldDatabase.PExecute("INSERT INTO uptime (startstring, starttime, uptime) VALUES('%s', " I64FMTD ", 0)", isoDate, uint64(m_startTime)); + + static uint32 abtimer = 0; + abtimer = sConfig.GetIntDefault("AutoBroadcast.Timer", 60000); m_timers[WUPDATE_OBJECTS].SetInterval(0); m_timers[WUPDATE_SESSIONS].SetInterval(0); @@ -1314,6 +1317,7 @@ void World::SetInitialWorldSettings() m_timers[WUPDATE_UPTIME].SetInterval(m_configs[CONFIG_UPTIME_UPDATE]*MINUTE*1000); //Update "uptime" table based on configuration entry in minutes. m_timers[WUPDATE_CORPSES].SetInterval(20*MINUTE*1000); //erase corpses every 20 minutes + m_timers[WUPDATE_AUTOBROADCAST].SetInterval(abtimer); //to set mailtimer to return mails every day between 4 and 5 am //mailtimer is increased when updating auctions @@ -1552,6 +1556,17 @@ void World::Update(time_t diff) m_timers[WUPDATE_EVENTS].Reset(); } + static uint32 autobroadcaston = 0; + autobroadcaston = sConfig.GetIntDefault("AutoBroadcast.On", 0); + if(autobroadcaston == 1) + { + if (m_timers[WUPDATE_AUTOBROADCAST].Passed()) + { + m_timers[WUPDATE_AUTOBROADCAST].Reset(); + SendBroadcast(); + } + } + /// [/list] ///- Move all creatures with "delayed move" and remove and delete all objects with "delayed remove" MapManager::Instance().DoDelayedMovesAndRemoves(); @@ -2629,6 +2644,56 @@ void World::ProcessCliCommands() zprint("mangos>"); } +void World::SendBroadcast() +{ + std::string msg; + static int nextid; + + QueryResult *result; + if(nextid != 0) + { + result = WorldDatabase.PQuery("SELECT `text`, `next` FROM `autobroadcast` WHERE `id` = %u", nextid); + } + else + { + result = WorldDatabase.PQuery("SELECT `text`, `next` FROM `autobroadcast` ORDER BY RAND() LIMIT 1"); + } + + if(!result) + return; + + nextid = result->Fetch()[1].GetUInt8(); + msg = result->Fetch()[0].GetString(); + delete result; + + static uint32 abcenter = 0; + abcenter = sConfig.GetIntDefault("AutoBroadcast.Center", 0); + if(abcenter == 0) + { + sWorld.SendWorldText(LANG_AUTO_BROADCAST, msg.c_str()); + + sLog.outString("AutoBroadcast: '%s'",msg.c_str()); + } + if(abcenter == 1) + { + WorldPacket data(SMSG_NOTIFICATION, (msg.size()+1)); + data << msg; + sWorld.SendGlobalMessage(&data); + + sLog.outString("AutoBroadcast: '%s'",msg.c_str()); + } + if(abcenter == 2) + { + sWorld.SendWorldText(LANG_AUTO_BROADCAST, msg.c_str()); + + WorldPacket data(SMSG_NOTIFICATION, (msg.size()+1)); + data << msg; + sWorld.SendGlobalMessage(&data); + + sLog.outString("AutoBroadcast: '%s'",msg.c_str()); + } +} + void World::InitResultQueue() { m_resultQueue = new SqlResultQueue; diff --git a/src/game/World.h b/src/game/World.h index 57167bf..5f70d80 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -66,7 +66,8 @@ enum WorldTimers WUPDATE_UPTIME = 4, WUPDATE_CORPSES = 5, WUPDATE_EVENTS = 6, - WUPDATE_COUNT = 7 + WUPDATE_AUTOBROADCAST = 7, + WUPDATE_COUNT = 8 }; /// Configuration elements @@ -342,6 +343,7 @@ class World WorldSession* FindSession(uint32 id) const; void AddSession(WorldSession *s); + void SendBroadcast(); bool RemoveSession(uint32 id); /// Get the number of current active sessions void UpdateMaxSessionCounters(); The SQL: CREATE TABLE IF NOT EXISTS `autobroadcast` ( `id` int(11) NOT NULL auto_increment, `text` longtext NOT NULL, `next` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; INSERT INTO `mangos_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES (1200, '|cffffcc00[server]: |cff00ff00%s|r', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); Add the following to your config: ################################################################################################################### # AUTO BROADCAST # # AutoBroadcast.On # Enable auto broadcast # Default: 0 - off # 1 - on # # AutoBroadcast.Center # Display method # Default: 0 - announce # 1 - notify # 2 - both # # AutoBroadcast.Timer # Timer for auto broadcast # ################################################################################################################### AutoBroadcast.On = 1 AutoBroadcast.Center = 2 AutoBroadcast.Timer = 30000 Enjoy, Xeross -
If you guys want it i can post a patch for it. It's the default announcer but with something added to let it announce in a certain order
Contact Us
To contact us
click here
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
Copyright © getMaNGOS. All rights Reserved.
This website is in no way associated with or endorsed by Blizzard Entertainment®
This website is in no way associated with or endorsed by Blizzard Entertainment®