CoronaCore / Issues

This repository is used as a centralized point for all issues regarding CoronaCore.
http://coronacore.org/
3 stars 4 forks source link

Autobroadcaster #231

Closed IvanJeDivan closed 9 years ago

IvanJeDivan commented 9 years ago

Hello, I'd like to share code for those who want an autobroadcaster. Warm suggestions to implement it, it can also be reloaded by a command but I was too lazy to write that.

From dd524511ea67bf2e0ee44ac4fd88598f135b7f6b Mon Sep 17 00:00:00 2001 From: IvanJeDivan Date: Mon, 8 Dec 2014 23:42:18 +0100 Subject: [PATCH] Autobroadcast Implementation


sql/updates/autobroadcast.sql | 11 ++++++++++ src/game/Autobroadcast.cpp | 44 ++++++++++++++++++++++++++++++++++++++++ src/game/Autobroadcast.h | 13 ++++++++++++ src/game/CMakeLists.txt | 2 ++ src/game/Language.h | 2 ++ src/game/World.cpp | 11 ++++++++++ src/game/World.h | 6 ++++++ src/mangosd/mangosd.conf.dist.in | 17 ++++++++++++++++ win/VC120/game.vcxproj | 2 ++ win/VC120/game.vcxproj.filters | 8 +++++++- 10 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 sql/updates/autobroadcast.sql create mode 100644 src/game/Autobroadcast.cpp create mode 100644 src/game/Autobroadcast.h

diff --git a/sql/updates/autobroadcast.sql b/sql/updates/autobroadcast.sql new file mode 100644 index 0000000..f837bc9 --- /dev/null +++ b/sql/updates/autobroadcast.sql @@ -0,0 +1,11 @@ +-- ---------------------------- +-- Table structure for autobroadcast +-- ---------------------------- +DROP TABLE IF EXISTS autobroadcast; +CREATE TABLE autobroadcast (

diff --git a/src/game/World.cpp b/src/game/World.cpp index 10541f4..ed1bdac 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -115,6 +115,8 @@ World::World() m_configBoolValues[i] = false;

 m_configForceLoadMapIds = NULL;

+

@@ -330,6 +332,7 @@ enum eConfigBoolValues CONFIG_BOOL_MMAP_ENABLED, CONFIG_BOOL_ELUNA_ENABLED, CONFIG_BOOL_PLAYER_COMMANDS,

@@ -441,6 +444,9 @@ class World

     void CleanupsBeforeStop();
Salja commented 9 years ago

Thanks for share bute corona have already include a autobroadcaster https://github.com/CoronaCore/OneServer/commit/bce8da2fcf6b3a8eda3f37c7f13a5015f4f33254

IvanJeDivan commented 9 years ago

Aww.. but I prefer modularity.

Salja commented 9 years ago

Well i plan to add a custom file and add all stuff in there broadccaster and some other stuff