[9388] Implement max cast chain length for triggered spells.

* New config option MaxSpellCastsInChain ( 0 is disabled old way work )
* Check added for prevent stack overflow crashes in case infinity triggered casts sequences
  with more useful error output instead crash.
* Default config steeing in 10 casts expected to allow all possible in game proper cast chains.
This commit is contained in:
VladimirMangos 2010-02-15 12:10:08 +03:00
parent 574f396b0d
commit 58d188f21a
7 changed files with 45 additions and 1 deletions

View file

@ -795,6 +795,8 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_INSTANCE_IGNORE_RAID] = sConfig.GetBoolDefault("Instance.IgnoreRaid", false);
m_configs[CONFIG_CAST_UNSTUCK] = sConfig.GetBoolDefault("CastUnstuck", true);
m_configs[CONFIG_MAX_SPELL_CASTS_IN_CHAIN] = sConfig.GetIntDefault("MaxSpellCastsInChain", 10);
m_configs[CONFIG_INSTANCE_RESET_TIME_HOUR] = sConfig.GetIntDefault("Instance.ResetTimeHour", 4);
m_configs[CONFIG_INSTANCE_UNLOAD_DELAY] = sConfig.GetIntDefault("Instance.UnloadDelay", 30 * MINUTE * IN_MILISECONDS);