Jump to content

Forusim

Members
  • Posts

    190
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Forusim

  1. What is rev 9606 actually good for? Can´t figure out... But reverting it, solved freezes at casting Arcane Blast.
  2. The last time (month ago) i was skilled Frost, these Spells worked quiet well...
  3. Same with http://www.wowhead.com/?spell=28730. It´s so annoying to use it with priest, because you have no hitchance and miss very often = no mana -.-
  4. I have a feature request. I would love it, if you could implement ingame commands, such as: .bc list 'List all messages in the database' .bc add 'Text ' 'Next Id' .bc change 'Id' 'Text ' 'Next Id' .bc remove 'Id' .bc settime 'Set Interval in miliseconds' .bc on/off .bc say 'Id' - Immediantly say this message, not depend on timerinterval This a lot i know, but you could pick the most important and add them one by one. Thanks in advance.
  5. Ok there seems something wrong in 2nd part with basepoints[0]. I have no clue what.. maybe someone could help. Thanks
  6. I am 100% OK with this "hack" till mangos will solve this VERY annoying BUG!
  7. Just tested with 9609 and worked flawlessfully. Try with the file, maybe forum have other formating... http://filebeam.com/f3b5134ebe8800f5d394b9a482150b78
  8. Ok f**cking edit funktion takes ages for loading. Someone should really fix it -.- I have solved the merge conflicts, some stupic whitespaces... Tested on 9591. Enjoy! diff --git a/sql/broadcast/mangos_mangos_string.sql b/sql/broadcast/mangos_mangos_string.sql new file mode 100644 index 0000000..ff5dc4e --- /dev/null +++ b/sql/broadcast/mangos_mangos_string.sql @@ -0,0 +1 @@ +INSERT INTO `mangos_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES (11000, '|cffffcc00[server]: |cff00ff00%s|r', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); \\ No newline at end of file diff --git a/sql/broadcast/realmd_broadcast_strings.sql b/sql/broadcast/realmd_broadcast_strings.sql new file mode 100644 index 0000000..37b1813 --- /dev/null +++ b/sql/broadcast/realmd_broadcast_strings.sql @@ -0,0 +1,6 @@ +CREATE TABLE IF NOT EXISTS `broadcast_strings` ( + `id` int(11) unsigned NOT NULL auto_increment, + `text` text NOT NULL, + `next` int(11) unsigned NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; \\ No newline at end of file diff --git a/src/game/Language.h b/src/game/Language.h index 9f9f7af..857d6b9 100644 --- a/src/game/Language.h +++ b/src/game/Language.h @@ -832,6 +832,8 @@ enum MangosStrings // 10000-10999 // Use for custom patches 11000-11999 + // Broadcaster + LANG_AUTO_BROADCAST = 11000, // NOT RESERVED IDS 12000-1999999999 // `db_script_string` table index 2000000000-2000009999 (MIN_DB_SCRIPT_STRING_ID-MAX_DB_SCRIPT_STRING_ID) diff --git a/src/game/World.cpp b/src/game/World.cpp index ca23473..ab5edf4 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -61,6 +61,7 @@ #include "WaypointManager.h" #include "GMTicketMgr.h" #include "Util.h" +#include "Language.h" INSTANTIATE_SINGLETON_1( World ); @@ -94,6 +95,9 @@ World::World() m_defaultDbcLocale = LOCALE_enUS; m_availableDbcLocaleMask = 0; + + // Initialize broadcaster nextId + m_nextId = 0; for(int i = 0; i < CONFIG_UINT32_VALUE_COUNT; ++i) m_configUint32Values[i] = 0; @@ -848,6 +852,11 @@ void World::LoadConfigSettings(bool reload) sLog.outString( "WORLD: VMap support included. LineOfSight:%i, getHeight:%i",enableLOS, enableHeight); sLog.outString( "WORLD: VMap data directory is: %svmaps",m_dataPath.c_str()); sLog.outString( "WORLD: VMap config keys are: vmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds"); + + // Broadcaster + setConfig(CONFIG_UINT32_BROADCAST_ENABLED, "Broadcast.Enabled", true); + setConfig(CONFIG_UINT32_BROADCAST_INTERVAL, "Broadcast.Interval", 150000); + setConfig(CONFIG_UINT32_BROADCAST_POSITION, "Broadcast.Position", 1); } /// Initialize the World @@ -1274,6 +1283,9 @@ void World::SetInitialWorldSettings() uint32 nextGameEvent = sGameEventMgr.Initialize(); m_timers[WUPDATE_EVENTS].SetInterval(nextGameEvent); //depend on next event + sLog.outString("Starting Autobroadcast system..." ); + m_timers[WUPDATE_BROADCAST].SetInterval(m_configUint32Values[CONFIG_UINT32_BROADCAST_INTERVAL]); + sLog.outString( "WORLD: World initialized" ); uint32 uStartInterval = getMSTimeDiff(uStartTime, getMSTime()); @@ -1429,6 +1441,13 @@ void World::Update(uint32 diff) m_timers[WUPDATE_EVENTS].Reset(); } + ///- Process autobroadcaster + if(getConfig(CONFIG_UINT32_BROADCAST_ENABLED) && m_timers[WUPDATE_BROADCAST].Passed()) + { + m_timers[WUPDATE_BROADCAST].Reset(); + SendBroadcast(); + } + /// [/list] ///- Move all creatures with "delayed move" and remove and delete all objects with "delayed remove" sMapMgr.DoDelayedMovesAndRemoves(); @@ -1960,3 +1979,42 @@ void World::LoadDBVersion() if(m_CreatureEventAIVersion.empty()) m_CreatureEventAIVersion = "Unknown creature EventAI."; } + +/// Broadcast a message +void World::SendBroadcast() +{ + std::string message; + + QueryResult *result; + if(m_nextId > 0) + result = loginDatabase.PQuery("SELECT `text`, `next` FROM `broadcast_strings` WHERE `id` = %u;", m_nextId); + else + result = loginDatabase.PQuery("SELECT `text`, `next` FROM `broadcast_strings` ORDER BY RAND();", m_nextId); + + if(!result) + return; + + Field *fields = result->Fetch(); + m_nextId = fields[1].GetUInt32(); + message = fields[0].GetString(); + + delete result, fields; + + if((getConfig(CONFIG_UINT32_BROADCAST_POSITION) & BROADCAST_LOCATION_CHAT) == BROADCAST_LOCATION_CHAT) + sWorld.SendWorldText(LANG_AUTO_BROADCAST, message.c_str()); + if((getConfig(CONFIG_UINT32_BROADCAST_POSITION) & BROADCAST_LOCATION_TOP) == BROADCAST_LOCATION_TOP) + { + WorldPacket data(SMSG_NOTIFICATION, (message.size()+1)); + data << message; + sWorld.SendGlobalMessage(&data); + } + + if((getConfig(CONFIG_UINT32_BROADCAST_POSITION) & BROADCAST_LOCATION_IRC) == BROADCAST_LOCATION_IRC) +#ifdef MANGCHAT_INSTALLED + sIRC.Send_IRC_Channel(sIRC._irc_chan[sIRC.anchn].c_str(), "\\00311[server]: " + message); +#else + sLog.outError("AutoBroadcaster: You have IRC broadcasting enabled but we couldn't detect mangchat"); +#endif + + sLog.outString("AutoBroadcast: '%s'",message.c_str()); +} \\ No newline at end of file diff --git a/src/game/World.h b/src/game/World.h index 170fc2a..12e20bd 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -77,7 +77,8 @@ enum WorldTimers WUPDATE_UPTIME = 4, WUPDATE_CORPSES = 5, WUPDATE_EVENTS = 6, - WUPDATE_COUNT = 7 + WUPDATE_BROADCAST = 7, + WUPDATE_COUNT = 8 }; /// Configuration elements @@ -173,6 +174,12 @@ enum eConfigUint32Values CONFIG_UINT32_TIMERBAR_BREATH_MAX, CONFIG_UINT32_TIMERBAR_FIRE_GMLEVEL, CONFIG_UINT32_TIMERBAR_FIRE_MAX, + + // Broadcaster + CONFIG_UINT32_BROADCAST_ENABLED, + CONFIG_UINT32_BROADCAST_INTERVAL, + CONFIG_UINT32_BROADCAST_POSITION, + CONFIG_UINT32_VALUE_COUNT }; @@ -351,6 +358,13 @@ enum RealmZone REALM_ZONE_CN9 = 29 // basic-Latin at create, any at login }; +enum BroadcastLocation +{ + BROADCAST_LOCATION_CHAT = 1, + BROADCAST_LOCATION_TOP = 2, + BROADCAST_LOCATION_IRC = 4, +}; + // DB scripting commands #define SCRIPT_COMMAND_TALK 0 // source = unit, target=any, datalong ( 0=say, 1=whisper, 2=yell, 3=emote text) #define SCRIPT_COMMAND_EMOTE 1 // source = unit, datalong = anim_id @@ -642,6 +656,10 @@ class World std::string m_DBVersion; std::string m_CreatureEventAIVersion; std::string m_ScriptsVersion; + + //Broadcaster + uint32 m_nextId; + void SendBroadcast(); }; extern uint32 realmID; diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index f4abaa1..78470ae 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -1423,3 +1423,25 @@ SOAP.Enabled = 0 SOAP.IP = 127.0.0.1 SOAP.Port = 7878 +################################################################################################################### +# Automatic Broadcaster +# +# AutoBroadcast.Enabled +# Enable/Disable the broadcaster +# Default: 0 - off +# 1 - on +# +# AutoBroadcast.Position +# Where to display the message (Just add the values for multiple) +# Default: 1 - In the in-game chat window +# 2 - In the top-middle of the screen +# 4 - In the announcements IRC channel (if mangchat is installed) +# +# AutoBroadcast.Interval +# Interval at which to broadcast messages in miliseconds +# +################################################################################################################### + +Broadcast.Enabled = 1 +Broadcast.Position = 1 +Broadcast.Interval = 1800000
  9. Update to 9582 and added the PW:Shield + Divine Shield stacking from linked thread. diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index d8773cd..33a4341 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1581,6 +1581,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons if ((spellInfo_1->Id == 47585 && spellInfo_2->Id == 60069) || (spellInfo_2->Id == 47585 && spellInfo_1->Id == 60069)) return false; + // Power Word: Shield and Divine Aegis + if ((spellInfo_1->SpellIconID == 566 && spellInfo_2->SpellIconID == 2820) || + (spellInfo_2->SpellIconID == 566 && spellInfo_1->SpellIconID == 2820)) + return false; } break; case SPELLFAMILY_DRUID: diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a214e47..52e98d9 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5825,7 +5825,19 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu // Divine Aegis case 2820: { - basepoints[0] = damage * triggerAmount/100; + if(!pVictim || !pVictim->isAlive()) + return false; + + // find Divine Aegis on the target and get absorb amount + Aura* DivineAegis = pVictim->GetAura(47753,0); + if (DivineAegis) + basepoints[0] = DivineAegis->GetModifier()->m_amount; + basepoints[0] += damage * triggerAmount/100; + + // limit absorb amount + if (basepoints[0] > pVictim->getLevel()*125) + basepoints[0] = pVictim->getLevel()*125; + triggered_spell_id = 47753; break; }
  10. If you mean the release window, which counts to 0 and then stay infront of your ui... this was before this fix, also.
  11. Same Rev, but Flametounge still does no dmg O_o Do you use any patches?
  12. Tryed to update for 9582: diff --git a/sql/broadcast/mangos_mangos_string.sql b/sql/broadcast/mangos_mangos_string.sql new file mode 100644 index 0000000..ff5dc4e --- /dev/null +++ b/sql/broadcast/mangos_mangos_string.sql @@ -0,0 +1 @@ +INSERT INTO `mangos_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES (11000, '|cffffcc00[server]: |cff00ff00%s|r', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); \\ No newline at end of file diff --git a/sql/broadcast/realmd_broadcast_strings.sql b/sql/broadcast/realmd_broadcast_strings.sql new file mode 100644 index 0000000..37b1813 --- /dev/null +++ b/sql/broadcast/realmd_broadcast_strings.sql @@ -0,0 +1,6 @@ +CREATE TABLE IF NOT EXISTS `broadcast_strings` ( + `id` int(11) unsigned NOT NULL auto_increment, + `text` text NOT NULL, + `next` int(11) unsigned NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; \\ No newline at end of file diff --git a/src/game/Language.h b/src/game/Language.h index 9f9f7af..857d6b9 100644 --- a/src/game/Language.h +++ b/src/game/Language.h @@ -832,6 +832,8 @@ enum MangosStrings // 10000-10999 // Use for custom patches 11000-11999 + // Broadcaster + LANG_AUTO_BROADCAST = 11000, // NOT RESERVED IDS 12000-1999999999 // `db_script_string` table index 2000000000-2000009999 (MIN_DB_SCRIPT_STRING_ID-MAX_DB_SCRIPT_STRING_ID) diff --git a/src/game/World.cpp b/src/game/World.cpp index ca23473..ab5edf4 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -61,6 +61,7 @@ #include "WaypointManager.h" #include "GMTicketMgr.h" #include "Util.h" +#include "Language.h" INSTANTIATE_SINGLETON_1( World ); @@ -94,6 +95,9 @@ World::World() m_defaultDbcLocale = LOCALE_enUS; m_availableDbcLocaleMask = 0; + + // Initialize broadcaster nextId + m_nextId = 0; for(int i = 0; i < CONFIG_UINT32_VALUE_COUNT; ++i) m_configUint32Values[i] = 0; @@ -848,6 +852,11 @@ void World::LoadConfigSettings(bool reload) sLog.outString( "WORLD: VMap support included. LineOfSight:%i, getHeight:%i",enableLOS, enableHeight); sLog.outString( "WORLD: VMap data directory is: %svmaps",m_dataPath.c_str()); sLog.outString( "WORLD: VMap config keys are: vmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds"); + + // Broadcaster + setConfig(CONFIG_UINT32_BROADCAST_ENABLED, "Broadcast.Enabled", true); + setConfig(CONFIG_UINT32_BROADCAST_INTERVAL, "Broadcast.Interval", 150000); + setConfig(CONFIG_UINT32_BROADCAST_POSITION, "Broadcast.Position", 1); } /// Initialize the World @@ -1274,6 +1283,9 @@ void World::SetInitialWorldSettings() uint32 nextGameEvent = sGameEventMgr.Initialize(); m_timers[WUPDATE_EVENTS].SetInterval(nextGameEvent); //depend on next event + sLog.outString("Starting Autobroadcast system..." ); + m_timers[WUPDATE_BROADCAST].SetInterval(m_configUint32Values[CONFIG_UINT32_BROADCAST_INTERVAL]); + sLog.outString( "WORLD: World initialized" ); uint32 uStartInterval = getMSTimeDiff(uStartTime, getMSTime()); @@ -1429,6 +1441,13 @@ void World::Update(uint32 diff) m_timers[WUPDATE_EVENTS].Reset(); } + ///- Process autobroadcaster + if(getConfig(CONFIG_UINT32_BROADCAST_ENABLED) && m_timers[WUPDATE_BROADCAST].Passed()) + { + m_timers[WUPDATE_BROADCAST].Reset(); + SendBroadcast(); + } + /// [/list] ///- Move all creatures with "delayed move" and remove and delete all objects with "delayed remove" sMapMgr.DoDelayedMovesAndRemoves(); @@ -1960,3 +1979,42 @@ void World::LoadDBVersion() if(m_CreatureEventAIVersion.empty()) m_CreatureEventAIVersion = "Unknown creature EventAI."; } + +/// Broadcast a message +void World::SendBroadcast() +{ + std::string message; + + QueryResult *result; + if(m_nextId > 0) + result = loginDatabase.PQuery("SELECT `text`, `next` FROM `broadcast_strings` WHERE `id` = %u;", m_nextId); + else + result = loginDatabase.PQuery("SELECT `text`, `next` FROM `broadcast_strings` ORDER BY RAND();", m_nextId); + + if(!result) + return; + + Field *fields = result->Fetch(); + m_nextId = fields[1].GetUInt32(); + message = fields[0].GetString(); + + delete result, fields; + + if((getConfig(CONFIG_UINT32_BROADCAST_POSITION) & BROADCAST_LOCATION_CHAT) == BROADCAST_LOCATION_CHAT) + sWorld.SendWorldText(LANG_AUTO_BROADCAST, message.c_str()); + if((getConfig(CONFIG_UINT32_BROADCAST_POSITION) & BROADCAST_LOCATION_TOP) == BROADCAST_LOCATION_TOP) + { + WorldPacket data(SMSG_NOTIFICATION, (message.size()+1)); + data << message; + sWorld.SendGlobalMessage(&data); + } + + if((getConfig(CONFIG_UINT32_BROADCAST_POSITION) & BROADCAST_LOCATION_IRC) == BROADCAST_LOCATION_IRC) +#ifdef MANGCHAT_INSTALLED + sIRC.Send_IRC_Channel(sIRC._irc_chan[sIRC.anchn].c_str(), "\\00311[server]: " + message); +#else + sLog.outError("AutoBroadcaster: You have IRC broadcasting enabled but we couldn't detect mangchat"); +#endif + + sLog.outString("AutoBroadcast: '%s'",message.c_str()); +} \\ No newline at end of file diff --git a/src/game/World.h b/src/game/World.h index 170fc2a..12e20bd 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -77,7 +77,8 @@ enum WorldTimers WUPDATE_UPTIME = 4, WUPDATE_CORPSES = 5, WUPDATE_EVENTS = 6, - WUPDATE_COUNT = 7 + WUPDATE_BROADCAST = 7, + WUPDATE_COUNT = 8 }; /// Configuration elements @@ -173,6 +174,12 @@ enum WorldConfigs CONFIG_UINT32_TIMERBAR_BREATH_MAX, CONFIG_UINT32_TIMERBAR_FIRE_GMLEVEL, CONFIG_UINT32_TIMERBAR_FIRE_MAX, + + // Broadcaster + CONFIG_UINT32_BROADCAST_ENABLED, + CONFIG_UINT32_BROADCAST_INTERVAL, + CONFIG_UINT32_BROADCAST_POSITION, + CONFIG_UINT32_VALUE_COUNT }; @@ -351,6 +358,13 @@ enum RealmZone REALM_ZONE_CN9 = 29 // basic-Latin at create, any at login }; +enum BroadcastLocation +{ + BROADCAST_LOCATION_CHAT = 1, + BROADCAST_LOCATION_TOP = 2, + BROADCAST_LOCATION_IRC = 4, +}; + // DB scripting commands #define SCRIPT_COMMAND_TALK 0 // source = unit, target=any, datalong ( 0=say, 1=whisper, 2=yell, 3=emote text) #define SCRIPT_COMMAND_EMOTE 1 // source = unit, datalong = anim_id @@ -642,6 +656,10 @@ class World std::string m_DBVersion; std::string m_CreatureEventAIVersion; std::string m_ScriptsVersion; + + //Broadcaster + uint32 m_nextId; + void SendBroadcast(); }; extern uint32 realmID; This worked so far, but the last part giving merge conflicts, althought i just copied it out of Git gui *confused* diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index f4abaa1..78470ae 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -1423,3 +1423,25 @@ SOAP.Enabled = 0 SOAP.IP = 127.0.0.1 SOAP.Port = 7878 +################################################################################################################### +# Automatic Broadcaster +# +# AutoBroadcast.Enabled +# Enable/Disable the broadcaster +# Default: 0 - off +# 1 - on +# +# AutoBroadcast.Position +# Where to display the message (Just add the values for multiple) +# Default: 1 - In the in-game chat window +# 2 - In the top-middle of the screen +# 4 - In the announcements IRC channel (if mangchat is installed) +# +# AutoBroadcast.Interval +# Interval at which to broadcast messages in miliseconds +# +################################################################################################################### + +Broadcast.Enabled = 1 +Broadcast.Position = 1 +Broadcast.Interval = 1800000 Maybe you guys can help out.
  13. Good patch, should be in master.
  14. Well then its a Mangosbug, if ZoneOrSort have nothing to do with Questrequirements. Fact is, this quest should be open for every class and fact is, that setting the flag to 0 will allow it.
  15. I think you can look into the code of living bomb, because they work similar.
  16. It´s 100% DB issue. This Fix worked for me update `quest_template` set `ZoneOrSort` = '0' where `entry` = '8249';
  17. Related to http://github.com/mangos/mangos/commit/835a7d0aefa5be936310c0178193f3ef50fed629
  18. Lol make a screenshot, no1 will download 150 mb video O_o
  19. Is there no honor reducing after killing the same person all the time?
  20. We had such issue couple of times. I think its database related. Try to set the character save intervall higher.
  21. The funny thing, this worked fine long ago. But unlike Penance, Arcane Missiles can be interrupted.
  22. Lol this wont save rogue dps, this class just need some love...
×
×
  • 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