fix(Core/World): Remove artificially high minimal update intervals an… (#15422)

fix(Core/World): Remove artificially high minimal update intervals and Allow specifying minimum world updates diff in config

* Allow specifying minimum world updates diff in config
* Remove artificially high minimal update intervals

* cherry-pick commit (29a4153f00)
* cherry-pick commit (de4920de81)
* cherry-pick commit (32cef906b0)

Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
This commit is contained in:
Kitzunu
2023-04-02 20:31:50 +02:00
committed by GitHub
parent 40cce659e9
commit f80fb9b482
6 changed files with 78 additions and 22 deletions

View File

@@ -39,7 +39,7 @@ class ObjectGuid;
#define CENTER_GRID_OFFSET (SIZE_OF_GRIDS/2)
#define MIN_GRID_DELAY (MINUTE*IN_MILLISECONDS)
#define MIN_MAP_UPDATE_DELAY 10
#define MIN_MAP_UPDATE_DELAY 1
#define SIZE_OF_GRID_CELL (SIZE_OF_GRIDS/MAX_NUMBER_OF_CELLS)

View File

@@ -666,7 +666,7 @@ void World::LoadConfigSettings(bool reload)
_int_configs[CONFIG_MIN_LEVEL_STAT_SAVE] = 0;
}
_int_configs[CONFIG_INTERVAL_MAPUPDATE] = sConfigMgr->GetOption<int32>("MapUpdateInterval", 100);
_int_configs[CONFIG_INTERVAL_MAPUPDATE] = sConfigMgr->GetOption<int32>("MapUpdateInterval", 10);
if (_int_configs[CONFIG_INTERVAL_MAPUPDATE] < MIN_MAP_UPDATE_DELAY)
{
LOG_ERROR("server.loading", "MapUpdateInterval ({}) must be greater {}. Use this minimal value.", _int_configs[CONFIG_INTERVAL_MAPUPDATE], MIN_MAP_UPDATE_DELAY);

View File

@@ -141,8 +141,6 @@ enum WorldStates
WS_DAILY_CALENDAR_DELETION_OLD_EVENTS_TIME = 20008 // Next daily calendar deletions of old events time
};
#define WORLD_SLEEP_CONST 10
// xinef: petitions storage
struct PetitionData
{