mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
AutoBroadcast system.
-This commit is paired with 1 database update
This commit is contained in:
parent
a7f938e7e6
commit
2888858616
9 changed files with 618 additions and 461 deletions
|
|
@ -237,6 +237,7 @@ bool ChatHandler::HandleReloadAllCommand(char* /*args*/)
|
||||||
|
|
||||||
HandleReloadAllAchievementCommand((char*)"");
|
HandleReloadAllAchievementCommand((char*)"");
|
||||||
HandleReloadAllAreaCommand((char*)"");
|
HandleReloadAllAreaCommand((char*)"");
|
||||||
|
HandleReloadAutoBroadcastCommand((char*)"");
|
||||||
HandleReloadAllEventAICommand((char*)"");
|
HandleReloadAllEventAICommand((char*)"");
|
||||||
HandleReloadAllLootCommand((char*)"");
|
HandleReloadAllLootCommand((char*)"");
|
||||||
HandleReloadAllNpcCommand((char*)"");
|
HandleReloadAllNpcCommand((char*)"");
|
||||||
|
|
@ -423,6 +424,14 @@ bool ChatHandler::HandleReloadAreaTriggerTeleportCommand(char* /*args*/)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ChatHandler::HandleReloadAutoBroadcastCommand(char* /*args*/)
|
||||||
|
{
|
||||||
|
sLog.outString("Re-Loading broadcast strings...");
|
||||||
|
sWorld.LoadBroadcastStrings();
|
||||||
|
SendGlobalSysMessage("Broadcast strings reloaded.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool ChatHandler::HandleReloadCommandCommand(char* /*args*/)
|
bool ChatHandler::HandleReloadCommandCommand(char* /*args*/)
|
||||||
{
|
{
|
||||||
load_command_table = true;
|
load_command_table = true;
|
||||||
|
|
|
||||||
|
|
@ -1021,11 +1021,12 @@ enum MangosStrings
|
||||||
LANG_OPVP_SI_CAPTURE_H = 1635,
|
LANG_OPVP_SI_CAPTURE_H = 1635,
|
||||||
LANG_OPVP_SI_CAPTURE_A = 1636,
|
LANG_OPVP_SI_CAPTURE_A = 1636,
|
||||||
|
|
||||||
// Room for 4.x clients only 1700-1799
|
// Room for 4.x clients only 1702-1799
|
||||||
LANG_VENDOR_WRONG_ITEM_TYPE = 1700,
|
LANG_VENDOR_WRONG_ITEM_TYPE = 1700,
|
||||||
LANG_VENDOR_WRONG_CURRENCY_MAXCOUNT = 1701,
|
LANG_VENDOR_WRONG_CURRENCY_MAXCOUNT = 1701,
|
||||||
|
|
||||||
// FREE IDS 1800-9999
|
// FREE IDS 1801-9999
|
||||||
|
LANG_AUTOBROADCAST = 1800
|
||||||
|
|
||||||
// Use for not-in-official-sources patches
|
// Use for not-in-official-sources patches
|
||||||
// 10000-10999
|
// 10000-10999
|
||||||
|
|
|
||||||
|
|
@ -533,6 +533,7 @@ ChatCommand* ChatHandler::getCommandTable()
|
||||||
{ "areatrigger_involvedrelation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadQuestAreaTriggersCommand, "", NULL },
|
{ "areatrigger_involvedrelation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadQuestAreaTriggersCommand, "", NULL },
|
||||||
{ "areatrigger_tavern", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAreaTriggerTavernCommand, "", NULL },
|
{ "areatrigger_tavern", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAreaTriggerTavernCommand, "", NULL },
|
||||||
{ "areatrigger_teleport", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAreaTriggerTeleportCommand, "", NULL },
|
{ "areatrigger_teleport", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAreaTriggerTeleportCommand, "", NULL },
|
||||||
|
{ "autobroadcast", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAutoBroadcastCommand, "", NULL },
|
||||||
{ "command", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCommandCommand, "", NULL },
|
{ "command", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCommandCommand, "", NULL },
|
||||||
{ "conditions", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadConditionsCommand, "", NULL },
|
{ "conditions", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadConditionsCommand, "", NULL },
|
||||||
{ "creature_ai_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadEventAIScriptsCommand, "", NULL },
|
{ "creature_ai_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadEventAIScriptsCommand, "", NULL },
|
||||||
|
|
|
||||||
|
|
@ -432,6 +432,7 @@ class ChatHandler
|
||||||
bool HandleReloadAchievementRewardCommand(char* args);
|
bool HandleReloadAchievementRewardCommand(char* args);
|
||||||
bool HandleReloadAreaTriggerTavernCommand(char* args);
|
bool HandleReloadAreaTriggerTavernCommand(char* args);
|
||||||
bool HandleReloadAreaTriggerTeleportCommand(char* args);
|
bool HandleReloadAreaTriggerTeleportCommand(char* args);
|
||||||
|
bool HandleReloadAutoBroadcastCommand(char* args);
|
||||||
bool HandleReloadBattleEventCommand(char* args);
|
bool HandleReloadBattleEventCommand(char* args);
|
||||||
bool HandleReloadCreaturesStatsCommand(char* args);
|
bool HandleReloadCreaturesStatsCommand(char* args);
|
||||||
bool HandleReloadCommandCommand(char* args);
|
bool HandleReloadCommandCommand(char* args);
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@
|
||||||
#include "Weather.h"
|
#include "Weather.h"
|
||||||
#include "LFGMgr.h"
|
#include "LFGMgr.h"
|
||||||
#include "revision.h"
|
#include "revision.h"
|
||||||
|
#include "Language.h"
|
||||||
|
|
||||||
#ifdef ENABLE_ELUNA
|
#ifdef ENABLE_ELUNA
|
||||||
#include "LuaEngine.h"
|
#include "LuaEngine.h"
|
||||||
|
|
@ -124,6 +125,9 @@ World::World(): mail_timer(0), mail_timer_expires(0), m_NextMonthlyQuestReset(0)
|
||||||
m_NextCurrencyReset = 0;
|
m_NextCurrencyReset = 0;
|
||||||
m_NextDailyQuestReset = 0;
|
m_NextDailyQuestReset = 0;
|
||||||
m_NextWeeklyQuestReset = 0;
|
m_NextWeeklyQuestReset = 0;
|
||||||
|
m_broadcastEnable = false;
|
||||||
|
m_broadcastList.clear();
|
||||||
|
m_broadcastWeight = 0;
|
||||||
|
|
||||||
m_defaultDbcLocale = LOCALE_enUS;
|
m_defaultDbcLocale = LOCALE_enUS;
|
||||||
m_availableDbcLocaleMask = 0;
|
m_availableDbcLocaleMask = 0;
|
||||||
|
|
@ -570,6 +574,21 @@ void World::LoadConfigSettings(bool reload)
|
||||||
VMAP::VMapFactory::chompAndTrim(forceLoadGridOnMaps);
|
VMAP::VMapFactory::chompAndTrim(forceLoadGridOnMaps);
|
||||||
while (VMAP::VMapFactory::getNextId(forceLoadGridOnMaps, pos, id))
|
while (VMAP::VMapFactory::getNextId(forceLoadGridOnMaps, pos, id))
|
||||||
m_configForceLoadMapIds.insert(id);
|
m_configForceLoadMapIds.insert(id);
|
||||||
|
|
||||||
|
setConfig(CONFIG_UINT32_AUTOBROADCAST_INTERVAL, "AutoBroadcast", 600);
|
||||||
|
|
||||||
|
if (getConfig(CONFIG_UINT32_AUTOBROADCAST_INTERVAL) > 0)
|
||||||
|
{
|
||||||
|
m_broadcastEnable = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_broadcastEnable = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reload && m_broadcastEnable)
|
||||||
|
{
|
||||||
|
m_broadcastTimer.SetInterval(getConfig(CONFIG_UINT32_AUTOBROADCAST_INTERVAL) * IN_MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
setConfig(CONFIG_UINT32_INTERVAL_SAVE, "PlayerSave.Interval", 15 * MINUTE * IN_MILLISECONDS);
|
setConfig(CONFIG_UINT32_INTERVAL_SAVE, "PlayerSave.Interval", 15 * MINUTE * IN_MILLISECONDS);
|
||||||
|
|
@ -612,7 +631,7 @@ void World::LoadConfigSettings(bool reload)
|
||||||
setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GUILD, "AllowTwoSide.Interaction.Guild", false);
|
setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GUILD, "AllowTwoSide.Interaction.Guild", false);
|
||||||
setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_AUCTION, "AllowTwoSide.Interaction.Auction", false);
|
setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_AUCTION, "AllowTwoSide.Interaction.Auction", false);
|
||||||
setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_MAIL, "AllowTwoSide.Interaction.Mail", false);
|
setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_MAIL, "AllowTwoSide.Interaction.Mail", false);
|
||||||
setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_CALENDAR,"AllowTwoSide.Interaction.Calendar", false);
|
setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_CALENDAR, "AllowTwoSide.Interaction.Calendar", false);
|
||||||
setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_WHO_LIST, "AllowTwoSide.WhoList", false);
|
setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_WHO_LIST, "AllowTwoSide.WhoList", false);
|
||||||
setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_ADD_FRIEND, "AllowTwoSide.AddFriend", false);
|
setConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_ADD_FRIEND, "AllowTwoSide.AddFriend", false);
|
||||||
|
|
||||||
|
|
@ -751,7 +770,7 @@ void World::LoadConfigSettings(bool reload)
|
||||||
|
|
||||||
setConfigMinMax(CONFIG_UINT32_QUEST_DAILY_RESET_HOUR, "Quests.Daily.ResetHour", 6, 0, 23);
|
setConfigMinMax(CONFIG_UINT32_QUEST_DAILY_RESET_HOUR, "Quests.Daily.ResetHour", 6, 0, 23);
|
||||||
setConfigMinMax(CONFIG_UINT32_QUEST_WEEKLY_RESET_WEEK_DAY, "Quests.Weekly.ResetWeekDay", 3, 0, 6);
|
setConfigMinMax(CONFIG_UINT32_QUEST_WEEKLY_RESET_WEEK_DAY, "Quests.Weekly.ResetWeekDay", 3, 0, 6);
|
||||||
setConfigMinMax(CONFIG_UINT32_QUEST_WEEKLY_RESET_HOUR, "Quests.Weekly.ResetHour", 6, 0 , 23);
|
setConfigMinMax(CONFIG_UINT32_QUEST_WEEKLY_RESET_HOUR, "Quests.Weekly.ResetHour", 6, 0, 23);
|
||||||
|
|
||||||
setConfig(CONFIG_BOOL_QUEST_IGNORE_RAID, "Quests.IgnoreRaid", false);
|
setConfig(CONFIG_BOOL_QUEST_IGNORE_RAID, "Quests.IgnoreRaid", false);
|
||||||
|
|
||||||
|
|
@ -849,7 +868,7 @@ void World::LoadConfigSettings(bool reload)
|
||||||
setConfig(CONFIG_BOOL_PET_UNSUMMON_AT_MOUNT, "PetUnsummonAtMount", false);
|
setConfig(CONFIG_BOOL_PET_UNSUMMON_AT_MOUNT, "PetUnsummonAtMount", false);
|
||||||
|
|
||||||
// Warden
|
// Warden
|
||||||
/* badly broken on m3 :( - this causes all these defaults to be set to 0
|
/* badly broken on m3 :( - this causes all these defaults to be set to 0
|
||||||
setConfig(CONFIG_BOOL_WARDEN_WIN_ENABLED, "Warden.WinEnabled", true);
|
setConfig(CONFIG_BOOL_WARDEN_WIN_ENABLED, "Warden.WinEnabled", true);
|
||||||
setConfig(CONFIG_BOOL_WARDEN_OSX_ENABLED, "Warden.OSXEnabled", false);
|
setConfig(CONFIG_BOOL_WARDEN_OSX_ENABLED, "Warden.OSXEnabled", false);
|
||||||
setConfig(CONFIG_UINT32_WARDEN_NUM_MEM_CHECKS, "Warden.NumMemChecks", 3);
|
setConfig(CONFIG_UINT32_WARDEN_NUM_MEM_CHECKS, "Warden.NumMemChecks", 3);
|
||||||
|
|
@ -994,6 +1013,7 @@ void World::LoadConfigSettings(bool reload)
|
||||||
sEluna->OnConfigLoad(reload);
|
sEluna->OnConfigLoad(reload);
|
||||||
#endif /* ENABLE_ELUNA */
|
#endif /* ENABLE_ELUNA */
|
||||||
sLog.outString();
|
sLog.outString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Initialize the World
|
/// Initialize the World
|
||||||
|
|
@ -1476,7 +1496,7 @@ void World::SetInitialWorldSettings()
|
||||||
realmID, uint64(m_startTime), isoDate);
|
realmID, uint64(m_startTime), isoDate);
|
||||||
|
|
||||||
m_timers[WUPDATE_AUCTIONS].SetInterval(MINUTE * IN_MILLISECONDS);
|
m_timers[WUPDATE_AUCTIONS].SetInterval(MINUTE * IN_MILLISECONDS);
|
||||||
m_timers[WUPDATE_UPTIME].SetInterval(getConfig(CONFIG_UINT32_UPTIME_UPDATE)*MINUTE * IN_MILLISECONDS);
|
m_timers[WUPDATE_UPTIME].SetInterval(getConfig(CONFIG_UINT32_UPTIME_UPDATE) * MINUTE * IN_MILLISECONDS);
|
||||||
// Update "uptime" table based on configuration entry in minutes.
|
// Update "uptime" table based on configuration entry in minutes.
|
||||||
m_timers[WUPDATE_CORPSES].SetInterval(20 * MINUTE * IN_MILLISECONDS);
|
m_timers[WUPDATE_CORPSES].SetInterval(20 * MINUTE * IN_MILLISECONDS);
|
||||||
m_timers[WUPDATE_DELETECHARS].SetInterval(DAY * IN_MILLISECONDS); // check for chars to delete every day
|
m_timers[WUPDATE_DELETECHARS].SetInterval(DAY * IN_MILLISECONDS); // check for chars to delete every day
|
||||||
|
|
@ -1487,6 +1507,23 @@ void World::SetInitialWorldSettings()
|
||||||
// for Dungeon Finder
|
// for Dungeon Finder
|
||||||
m_timers[WUPDATE_LFGMGR].SetInterval(30 * IN_MILLISECONDS); // every 30 sec
|
m_timers[WUPDATE_LFGMGR].SetInterval(30 * IN_MILLISECONDS); // every 30 sec
|
||||||
|
|
||||||
|
// for AutoBroadcast
|
||||||
|
sLog.outString("Starting AutoBroadcast System");
|
||||||
|
if (m_broadcastEnable)
|
||||||
|
{
|
||||||
|
LoadBroadcastStrings();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sLog.outString("AutoBroadcast is disabled");
|
||||||
|
}
|
||||||
|
sLog.outString();
|
||||||
|
|
||||||
|
if (m_broadcastEnable)
|
||||||
|
{
|
||||||
|
m_broadcastTimer.SetInterval(getConfig(CONFIG_UINT32_AUTOBROADCAST_INTERVAL) * IN_MILLISECONDS);
|
||||||
|
}
|
||||||
|
|
||||||
// to set mailtimer to return mails every day between 4 and 5 am
|
// to set mailtimer to return mails every day between 4 and 5 am
|
||||||
// mailtimer is increased when updating auctions
|
// mailtimer is increased when updating auctions
|
||||||
// one second is 1000 -(tested on win system)
|
// one second is 1000 -(tested on win system)
|
||||||
|
|
@ -1743,6 +1780,24 @@ void World::Update(uint32 diff)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_broadcastEnable)
|
||||||
|
{
|
||||||
|
if (m_broadcastTimer.GetCurrent() >= 0)
|
||||||
|
{
|
||||||
|
m_broadcastTimer.Update(diff);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_broadcastTimer.SetCurrent(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_broadcastTimer.Passed())
|
||||||
|
{
|
||||||
|
m_broadcastTimer.Reset();
|
||||||
|
AutoBroadcast();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///- Update the game time and check for shutdown time
|
///- Update the game time and check for shutdown time
|
||||||
_UpdateGameTime();
|
_UpdateGameTime();
|
||||||
|
|
||||||
|
|
@ -2856,3 +2911,73 @@ void World::InvalidatePlayerDataToAllClient(ObjectGuid guid)
|
||||||
data << guid;
|
data << guid;
|
||||||
SendGlobalMessage(&data);
|
SendGlobalMessage(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void World::LoadBroadcastStrings()
|
||||||
|
{
|
||||||
|
if (!m_broadcastEnable)
|
||||||
|
return;
|
||||||
|
|
||||||
|
std::string queryStr = "SELECT `autobroadcast`.`id`, `autobroadcast`.`content`,`autobroadcast`.`ratio` FROM `autobroadcast`";
|
||||||
|
|
||||||
|
QueryResult* result = WorldDatabase.Query(queryStr.c_str());
|
||||||
|
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
m_broadcastEnable = false;
|
||||||
|
sLog.outErrorDb("DB table `autobroadcast` is empty.");
|
||||||
|
sLog.outString();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_broadcastList.clear();
|
||||||
|
|
||||||
|
BarGoLink bar(result->GetRowCount());
|
||||||
|
m_broadcastWeight = 0;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
Field* fields = result->Fetch();
|
||||||
|
bar.step();
|
||||||
|
|
||||||
|
uint32 ratio = fields[2].GetUInt32();
|
||||||
|
if (ratio == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
m_broadcastWeight += ratio;
|
||||||
|
|
||||||
|
BroadcastString bs;
|
||||||
|
bs.text = fields[1].GetString();
|
||||||
|
bs.freq = m_broadcastWeight;
|
||||||
|
m_broadcastList.push_back(bs);
|
||||||
|
} while (result->NextRow());
|
||||||
|
|
||||||
|
delete result;
|
||||||
|
if (m_broadcastWeight == 0)
|
||||||
|
{
|
||||||
|
sLog.outString(">> Loaded 0 broadcast strings.");
|
||||||
|
m_broadcastEnable = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sLog.outString(">> Loaded " SIZEFMTD " broadcast strings.", m_broadcastList.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void World::AutoBroadcast()
|
||||||
|
{
|
||||||
|
if (m_broadcastList.size() == 1)
|
||||||
|
{
|
||||||
|
SendWorldText(LANG_AUTOBROADCAST, m_broadcastList[0].text.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uint32 rn = urand(1, m_broadcastWeight);
|
||||||
|
std::vector<BroadcastString>::const_iterator it;
|
||||||
|
for (it = m_broadcastList.begin(); it != m_broadcastList.end(); ++it)
|
||||||
|
{
|
||||||
|
if (rn <= it->freq)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
SendWorldText(LANG_AUTOBROADCAST, it->text.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,8 @@
|
||||||
/// @{
|
/// @{
|
||||||
/// \file
|
/// \file
|
||||||
|
|
||||||
#ifndef __WORLD_H
|
#ifndef MANGOS_H_WORLD
|
||||||
#define __WORLD_H
|
#define MANGOS_H_WORLD
|
||||||
|
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
|
|
@ -229,7 +229,8 @@ enum eConfigUInt32Values
|
||||||
CONFIG_UINT32_WARDEN_CLIENT_BAN_DURATION,
|
CONFIG_UINT32_WARDEN_CLIENT_BAN_DURATION,
|
||||||
CONFIG_UINT32_WARDEN_NUM_MEM_CHECKS,
|
CONFIG_UINT32_WARDEN_NUM_MEM_CHECKS,
|
||||||
CONFIG_UINT32_WARDEN_NUM_OTHER_CHECKS,
|
CONFIG_UINT32_WARDEN_NUM_OTHER_CHECKS,
|
||||||
CONFIG_UINT32_WARDEN_DB_LOGLEVEL
|
CONFIG_UINT32_WARDEN_DB_LOGLEVEL,
|
||||||
|
CONFIG_UINT32_AUTOBROADCAST_INTERVAL,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Configuration elements
|
/// Configuration elements
|
||||||
|
|
@ -654,6 +655,7 @@ class World
|
||||||
char const* GetDBVersion() { return m_DBVersion.c_str(); }
|
char const* GetDBVersion() { return m_DBVersion.c_str(); }
|
||||||
|
|
||||||
void UpdatePhaseDefinitions();
|
void UpdatePhaseDefinitions();
|
||||||
|
void LoadBroadcastStrings();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief: force all client to request player data
|
* \brief: force all client to request player data
|
||||||
|
|
@ -704,6 +706,18 @@ class World
|
||||||
bool configNoReload(bool reload, eConfigFloatValues index, char const* fieldname, float defvalue);
|
bool configNoReload(bool reload, eConfigFloatValues index, char const* fieldname, float defvalue);
|
||||||
bool configNoReload(bool reload, eConfigBoolValues index, char const* fieldname, bool defvalue);
|
bool configNoReload(bool reload, eConfigBoolValues index, char const* fieldname, bool defvalue);
|
||||||
|
|
||||||
|
// AutoBroadcast system
|
||||||
|
void AutoBroadcast();
|
||||||
|
struct BroadcastString
|
||||||
|
{
|
||||||
|
uint32 freq;
|
||||||
|
std::string text;
|
||||||
|
};
|
||||||
|
std::vector<BroadcastString> m_broadcastList;
|
||||||
|
uint32 m_broadcastWeight;
|
||||||
|
bool m_broadcastEnable;
|
||||||
|
IntervalTimer m_broadcastTimer;
|
||||||
|
|
||||||
static volatile bool m_stopEvent;
|
static volatile bool m_stopEvent;
|
||||||
static uint8 m_ExitCode;
|
static uint8 m_ExitCode;
|
||||||
uint32 m_ShutdownTimer;
|
uint32 m_ShutdownTimer;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
[MangosdConf]
|
[MangosdConf]
|
||||||
ConfVersion=2017021100
|
ConfVersion=2017021400
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# CONNECTIONS AND DIRECTORIES
|
# CONNECTIONS AND DIRECTORIES
|
||||||
|
|
@ -796,6 +796,11 @@ SD3ErrorLogFile = "scriptdev3-errors.log"
|
||||||
# Motd
|
# Motd
|
||||||
# Message of the Day. Displayed at worldlogin for every user ('@' for a newline).
|
# Message of the Day. Displayed at worldlogin for every user ('@' for a newline).
|
||||||
#
|
#
|
||||||
|
# AutoBroadcast
|
||||||
|
# Timer interval (in seconds) for automatic server announcements (autobroadcasts). Zero value means AB is disabled
|
||||||
|
# 0 (AB is disabled)
|
||||||
|
# Default: 600 (AB every 10 minutes)
|
||||||
|
# N (>0, AB every N seconds)
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
GameType = 1
|
GameType = 1
|
||||||
|
|
@ -867,6 +872,7 @@ WaitAtStartupError = 10
|
||||||
Raid.MinLevel = 10
|
Raid.MinLevel = 10
|
||||||
PlayerCommands = 0
|
PlayerCommands = 0
|
||||||
Motd = "Welcome to Mangos Three"
|
Motd = "Welcome to Mangos Three"
|
||||||
|
AutoBroadcast = 0
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# PLAYER INTERACTION
|
# PLAYER INTERACTION
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
// Format is YYYYMMDDRR where RR is the change in the conf file
|
// Format is YYYYMMDDRR where RR is the change in the conf file
|
||||||
// for that day.
|
// for that day.
|
||||||
#ifndef MANGOSD_CONFIG_VERSION
|
#ifndef MANGOSD_CONFIG_VERSION
|
||||||
# define MANGOSD_CONFIG_VERSION 2016031901
|
# define MANGOSD_CONFIG_VERSION 2017021400
|
||||||
#endif
|
#endif
|
||||||
#ifndef REALMD_CONFIG_VERSION
|
#ifndef REALMD_CONFIG_VERSION
|
||||||
# define REALMD_CONFIG_VERSION 2010062001
|
# define REALMD_CONFIG_VERSION 2010062001
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#ifndef MANGOS_H_REVISION
|
#ifndef MANGOS_H_REVISION
|
||||||
#define MANGOS_H_REVISION
|
#define MANGOS_H_REVISION
|
||||||
#define REVISION_NR "21000"
|
#define REVISION_NR "21007"
|
||||||
|
|
||||||
#define REALMD_DB_VERSION_NR 21
|
#define REALMD_DB_VERSION_NR 21
|
||||||
#define REALMD_DB_STRUCTURE_NR 1
|
#define REALMD_DB_STRUCTURE_NR 1
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
#define CHAR_DB_UPDATE_DESCRIPTION "characters_pvpstats"
|
#define CHAR_DB_UPDATE_DESCRIPTION "characters_pvpstats"
|
||||||
|
|
||||||
#define WORLD_DB_VERSION_NR 21
|
#define WORLD_DB_VERSION_NR 21
|
||||||
#define WORLD_DB_STRUCTURE_NR 5
|
#define WORLD_DB_STRUCTURE_NR 7
|
||||||
#define WORLD_DB_CONTENT_NR 1
|
#define WORLD_DB_CONTENT_NR 1
|
||||||
#define WORLD_DB_UPDATE_DESCRIPTION "dbscripts_refactor"
|
#define WORLD_DB_UPDATE_DESCRIPTION "AutoBroadcast"
|
||||||
#endif // __REVISION_H__
|
#endif // __REVISION_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue