[Scheduler] Event scheduler implementation (#1257)

* Event scheduler implementation

* Create 2021_02_17_server_scheduled_events.sql

* Tweak

* Remove unused event [skip ci]

* Cleanup [skip ci]

* PR adjustments

* Database manifest
This commit is contained in:
Chris Miles
2021-03-29 02:52:57 -05:00
committed by GitHub
parent f51bc4daaf
commit 7aa5308f9c
31 changed files with 2053 additions and 50 deletions
+2 -15
View File
@@ -941,7 +941,6 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name)
spawn2_timer(1000),
hot_reload_timer(1000),
qglobal_purge_timer(30000),
hotzone_timer(120000),
m_SafePoint(0.0f,0.0f,0.0f),
m_Graveyard(0.0f,0.0f,0.0f,0.0f)
{
@@ -1582,8 +1581,6 @@ bool Zone::Process() {
}
}
if(hotzone_timer.Check()) { UpdateHotzone(); }
mMovementManager->Process();
return true;
@@ -2602,19 +2599,9 @@ uint32 Zone::GetSpawnKillCount(uint32 in_spawnid) {
return 0;
}
void Zone::UpdateHotzone()
void Zone::SetIsHotzone(bool is_hotzone)
{
std::string query = StringFormat("SELECT hotzone FROM zone WHERE short_name = '%s'", GetShortName());
auto results = content_db.QueryDatabase(query);
if (!results.Success())
return;
if (results.RowCount() == 0)
return;
auto row = results.begin();
is_hotzone = atoi(row[0]) == 0 ? false: true;
Zone::is_hotzone = is_hotzone;
}
void Zone::RequestUCSServerStatus() {