Jump to content

Forusim

Members
  • Posts

    190
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Forusim

  1. Try this one, worked for me with 10018: diff --git a/src/game/Language.h b/src/game/Language.h index 38ec346..d968239 100644 --- a/src/game/Language.h +++ b/src/game/Language.h @@ -853,6 +853,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 abf273d..28b3d27 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -61,6 +61,7 @@ #include "GMTicketMgr.h" #include "Util.h" #include "CharacterDatabaseCleaner.h" +#include "Language.h" INSTANTIATE_SINGLETON_1( World ); @@ -95,12 +96,15 @@ 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; for(int i = 0; i < CONFIG_INT32_VALUE_COUNT; ++i) - m_configInt32Values[i] = 0; + /*m_configInt32Values[i] = 0;*/ for(int i = 0; i < CONFIG_FLOAT_VALUE_COUNT; ++i) m_configFloatValues[i] = 0.0f; @@ -858,6 +862,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_BOOL_BROADCAST_ENABLED, "Broadcast.Enabled", true); + setConfig(CONFIG_UINT32_BROADCAST_INTERVAL, "Broadcast.Interval", 150000); + setConfig(CONFIG_UINT32_BROADCAST_POSITION, "Broadcast.Position", 1); } /// Initialize the World @@ -1292,6 +1301,9 @@ void World::SetInitialWorldSettings() // Delete all characters which have been deleted X days before Player::DeleteOldCharacters(); + 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()); @@ -1458,6 +1470,13 @@ void World::Update(uint32 diff) m_timers[WUPDATE_EVENTS].Reset(); } + ///- Process autobroadcaster + if(getConfig(CONFIG_BOOL_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.RemoveAllObjectsInRemoveList(); @@ -2193,3 +2212,42 @@ bool World::configNoReload(bool reload, eConfigBoolValues index, char const* fie return false; } + +/// 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 b289b91..26c937c 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -78,7 +78,8 @@ enum WorldTimers WUPDATE_CORPSES = 5, WUPDATE_EVENTS = 6, WUPDATE_DELETECHARS = 7, - WUPDATE_COUNT = 8 + WUPDATE_BROADCAST = 8, + WUPDATE_COUNT = 9 }; /// Configuration elements @@ -181,6 +182,8 @@ enum eConfigUInt32Values CONFIG_UINT32_CHARDELETE_KEEP_DAYS, CONFIG_UINT32_CHARDELETE_METHOD, CONFIG_UINT32_CHARDELETE_MIN_LEVEL, + CONFIG_UINT32_BROADCAST_INTERVAL, // Broadcaster + CONFIG_UINT32_BROADCAST_POSITION, // Broadcaster CONFIG_UINT32_VALUE_COUNT }; @@ -313,6 +316,7 @@ enum eConfigBoolValues CONFIG_BOOL_KICK_PLAYER_ON_BAD_PACKET, CONFIG_BOOL_STATS_SAVE_ONLY_ON_LOGOUT, CONFIG_BOOL_CLEAN_CHARACTER_DB, + CONFIG_BOOL_BROADCAST_ENABLED, // Broadcaster CONFIG_BOOL_VALUE_COUNT }; @@ -386,6 +390,13 @@ enum RealmZone REALM_ZONE_CN5_8 = 37 // 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 = WorldObject, target = any/none, datalong (see enum ChatType for supported CHAT_TYPE_'s) // datalong2 = creature entry (searching for a buddy, closest to source), datalong3 = creature search radius @@ -685,6 +696,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 673ed2a..31ae633 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -1508,3 +1508,26 @@ SOAP.Port = 7878 CharDelete.Method = 0 CharDelete.MinLevel = 0 CharDelete.KeepDays = 30 + +################################################################################################################### +# Automatic Broadcaster +# +# Broadcast.Enabled +# Enable/Disable the broadcaster +# Default: 0 - off +# 1 - on +# +# Broadcast.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) +# +# Broadcast.Interval +# Interval at which to broadcast messages in milliseconds +# +################################################################################################################### + +Broadcast.Enabled = 1 +Broadcast.Position = 1 +Broadcast.Interval = 3600000
  2. It would be great at least to fix the triggering Shadow Weaving by Mind Sear/Flay.
  3. Then you have to contact your DB provider.
  4. For latest Rev 10018: diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 876526a..f7e5a12 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -7446,6 +7446,16 @@ void Aura::PeriodicTick() DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) power leech of %u (TypeId: %u) for %u dmg inflicted by %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId()); + // Mark of Kaz'rogal + if (m_spellProto->Id == 31447 && m_target->GetPower(power) < pdamage) + { + if (m_target && m_target->GetTypeId() == TYPEID_PLAYER && m_target->getPowerType() == POWER_MANA) + { + m_target->CastSpell(m_target, 31463, true); + } + m_target->RemoveAura(GetId(), GetEffIndex()); + } + int32 drain_amount = m_target->GetPower(power) > pdamage ? pdamage : m_target->GetPower(power); // resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
  5. Allthough the broadcaster intervall would really make sence in minutes. Why should you need spam each millisecond? Xeross are working on ingame commands atm? Thanks!
  6. At the moment it only works with OFFHAND weapons like this one: http://www.wowhead.com/item=34951
  7. Mh no additional column in item_template could be ArenaRequirements. There you would store minimal personal rating to be allowed to wear this item. Then you have to create a feature in mangos which will check this requirement and it should be possible in the config file to set a maximal difference between personal rating and required rating for items.
  8. Hello guys. I have a little problem on my server with Arena Pushing. Teams swap rating till they got highest items and then back. This just sux and is not a idea behind Arena. Since we are not a big server, this is kinda easy to do arranged Arena games. I thought of addition requirement column for items with config options to set the difference between itemreq and personal rating. Would it be easy to implement or have somebody even did something similar? Replies are much appreciated.
  9. I can confirm. I think it´s because the procc can procc itself. Putting cooldown in the DB will reduce the burst, caused by this.
  10. So the solution would be to set ICD to 0 and lower procchance?
  11. Thanks guys! Kicho... it is allways better to have an automated way. What if i had to revert a big commit?
  12. Hello! I want to update to latest rev, however i am wondering is it possible to exclude specified commits from masteR? I would like to keep the BG honor marks, which were removed by this commit. Sure i could paste old code by hand, but is there more comfortable way? Thanks in advance.
  13. Works quiet good on 9605, but however mass dispell should dispell Devineshield, Iceblock etc first, as you can read on wowhead comments. Beside that, sometimes you dispell 1 spell twice, noticed often with mark of the wild. And players resist dispell much often, then before fix, although i have 3% hit with my discipline priest. Hope you can solve the stuff and bring it into master. Thank you!
  14. I found the sourcecode, but i have no idea, if this will work and how to do it without hard coded values. // Cut to the Chase if (dummySpell->SpellIconID == 2909) { // "refresh your Slice and Dice duration to its 5 combo point maximum" // lookup Slice and Dice AuraList const& sd = GetAurasByType(SPELL_AURA_MOD_HASTE); for(AuraList::const_iterator itr = sd.begin(); itr != sd.end(); ++itr) { SpellEntry const *spellProto = (*itr)->GetSpellProto(); if (spellProto->SpellFamilyName == SPELLFAMILY_ROGUE && (spellProto->SpellFamilyFlags & UI64LIT(0x0000000000040000))) { + if (pVictim->HasAura(14165) //imp S&D rank 1 + (*itr)-> 1.25 * SetAuraMaxDuration(GetSpellMaxDuration(spellProto)); + else if (pVictim->HasAura(14166) //imp S&D rank 2 + (*itr)-> 1.50 * SetAuraMaxDuration(GetSpellMaxDuration(spellProto)); + else (*itr)->SetAuraMaxDuration(GetSpellMaxDuration(spellProto)); + (*itr)->RefreshAura(); return true; } } return false; } Any help is much appreciated.
  15. I use a macro, which cast stealth after vanish.
  16. Is it working as intended? Then bring it to master please
  17. Hi, switching to muti spec i have found out a strange bug with envenom finisher. Mangos Version: 9605 Custom Patches: Broadcaster SD2 Version: 1644 Database Name and Version : UDB 389 How it SHOULD work: Following the Envenom attack you have an additional 15% chance to apply Deadly Poison and a 75% increased frequency of applying Instant Poison for 1 sec plus an additional 1 sec per combo point. How it DOES work: You get the buff, but you can avoid it, depend on our avoid rating. In raids you avoid 30+% of the buff -.- Just read recount... I havent found this spell in den sourcecode, maybe some1 can point me there. I don´t think it´s that hard to fix. Thanks in advance!
  18. The dmg on imunity part is just missing. Shouldnt be that hard to fix it, since you can read the imunity flag out target unit.
  19. Laise could you please bring it into master? Works good for me with 9690, had only 1 small merge conflict.
  20. Forusim

    Resilince

    Have the same strange feeling with my discipline Priest after switch from 3.2.3 to 3.3.2. I defently get more dmg, although i have more resilence and defense with new arena set items...
  21. I don´t want it Blizzlike because, we have only 200-300 Players online. Do you mean this part will display more than 50 Players? Code diff: + uint32 count = m.size(); + data.put( 0, clientcount ); // insert right count, listed count + data.put( 4, count > 50 ? count : clientcount ); // insert right count, online count Thanks in advance!
×
×
  • 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