mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[8630] More fatigue/breath/fire times control in config.
DisableWaterBreath replaced by TimerBar.Breath.GMLevel so update configs if use.
This commit is contained in:
parent
01318dbc8c
commit
7c3f35c408
5 changed files with 55 additions and 13 deletions
|
|
@ -859,12 +859,15 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
|
|||
switch (timer)
|
||||
{
|
||||
case FATIGUE_TIMER:
|
||||
return MINUTE*IN_MILISECONDS;
|
||||
if (GetSession()->GetSecurity() >= sWorld.getConfig(CONFIG_TIMERBAR_FATIGUE_GMLEVEL))
|
||||
return DISABLED_MIRROR_TIMER;
|
||||
return sWorld.getConfig(CONFIG_TIMERBAR_FATIGUE_MAX)*IN_MILISECONDS;
|
||||
case BREATH_TIMER:
|
||||
{
|
||||
if (!isAlive() || HasAuraType(SPELL_AURA_WATER_BREATHING) || GetSession()->GetSecurity() >= sWorld.getConfig(CONFIG_DISABLE_BREATHING))
|
||||
if (!isAlive() || HasAuraType(SPELL_AURA_WATER_BREATHING) ||
|
||||
GetSession()->GetSecurity() >= sWorld.getConfig(CONFIG_TIMERBAR_BREATH_GMLEVEL))
|
||||
return DISABLED_MIRROR_TIMER;
|
||||
int32 UnderWaterTime = 3*MINUTE*IN_MILISECONDS;
|
||||
int32 UnderWaterTime = sWorld.getConfig(CONFIG_TIMERBAR_BREATH_MAX)*IN_MILISECONDS;
|
||||
AuraList const& mModWaterBreathing = GetAurasByType(SPELL_AURA_MOD_WATER_BREATHING);
|
||||
for(AuraList::const_iterator i = mModWaterBreathing.begin(); i != mModWaterBreathing.end(); ++i)
|
||||
UnderWaterTime = uint32(UnderWaterTime * (100.0f + (*i)->GetModifier()->m_amount) / 100.0f);
|
||||
|
|
@ -872,9 +875,9 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
|
|||
}
|
||||
case FIRE_TIMER:
|
||||
{
|
||||
if (!isAlive())
|
||||
if (!isAlive() || GetSession()->GetSecurity() >= sWorld.getConfig(CONFIG_TIMERBAR_FIRE_GMLEVEL))
|
||||
return DISABLED_MIRROR_TIMER;
|
||||
return 1*IN_MILISECONDS;
|
||||
return sWorld.getConfig(CONFIG_TIMERBAR_FIRE_MAX)*IN_MILISECONDS;
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -893,8 +893,6 @@ void World::LoadConfigSettings(bool reload)
|
|||
m_configs[CONFIG_SAVE_RESPAWN_TIME_IMMEDIATLY] = sConfig.GetBoolDefault("SaveRespawnTimeImmediately",true);
|
||||
m_configs[CONFIG_WEATHER] = sConfig.GetBoolDefault("ActivateWeather",true);
|
||||
|
||||
m_configs[CONFIG_DISABLE_BREATHING] = sConfig.GetIntDefault("DisableWaterBreath", SEC_CONSOLE);
|
||||
|
||||
m_configs[CONFIG_ALWAYS_MAX_SKILL_FOR_LEVEL] = sConfig.GetBoolDefault("AlwaysMaxSkillForLevel", false);
|
||||
|
||||
if(reload)
|
||||
|
|
@ -996,6 +994,13 @@ void World::LoadConfigSettings(bool reload)
|
|||
if (m_configs[CONFIG_GUILD_BANK_EVENT_LOG_COUNT] < GUILD_BANK_MAX_LOGS)
|
||||
m_configs[CONFIG_GUILD_BANK_EVENT_LOG_COUNT] = GUILD_BANK_MAX_LOGS;
|
||||
|
||||
m_configs[CONFIG_TIMERBAR_FATIGUE_GMLEVEL] = sConfig.GetIntDefault("TimerBar.Fatigue.GMLevel", SEC_CONSOLE);
|
||||
m_configs[CONFIG_TIMERBAR_FATIGUE_MAX] = sConfig.GetIntDefault("TimerBar.Fatigue.Max", 60);
|
||||
m_configs[CONFIG_TIMERBAR_BREATH_GMLEVEL] = sConfig.GetIntDefault("TimerBar.Breath.GMLevel", SEC_CONSOLE);
|
||||
m_configs[CONFIG_TIMERBAR_BREATH_MAX] = sConfig.GetIntDefault("TimerBar.Breath.Max", 180);
|
||||
m_configs[CONFIG_TIMERBAR_FIRE_GMLEVEL] = sConfig.GetIntDefault("TimerBar.Fire.GMLevel", SEC_CONSOLE);
|
||||
m_configs[CONFIG_TIMERBAR_FIRE_MAX] = sConfig.GetIntDefault("TimerBar.Fire.Max", 1);
|
||||
|
||||
m_VisibleUnitGreyDistance = sConfig.GetFloatDefault("Visibility.Distance.Grey.Unit", 1);
|
||||
if(m_VisibleUnitGreyDistance > MAX_VISIBILITY_DISTANCE)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -193,7 +193,6 @@ enum WorldConfigs
|
|||
CONFIG_DEATH_BONES_BG_OR_ARENA,
|
||||
CONFIG_THREAT_RADIUS,
|
||||
CONFIG_INSTANT_LOGOUT,
|
||||
CONFIG_DISABLE_BREATHING,
|
||||
CONFIG_ALL_TAXI_PATHS,
|
||||
CONFIG_DECLINED_NAMES_USED,
|
||||
CONFIG_LISTEN_RANGE_SAY,
|
||||
|
|
@ -217,6 +216,12 @@ enum WorldConfigs
|
|||
CONFIG_CLIENTCACHE_VERSION,
|
||||
CONFIG_GUILD_EVENT_LOG_COUNT,
|
||||
CONFIG_GUILD_BANK_EVENT_LOG_COUNT,
|
||||
CONFIG_TIMERBAR_FATIGUE_GMLEVEL,
|
||||
CONFIG_TIMERBAR_FATIGUE_MAX,
|
||||
CONFIG_TIMERBAR_BREATH_GMLEVEL,
|
||||
CONFIG_TIMERBAR_BREATH_MAX,
|
||||
CONFIG_TIMERBAR_FIRE_GMLEVEL,
|
||||
CONFIG_TIMERBAR_FIRE_MAX,
|
||||
CONFIG_VALUE_COUNT
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -482,10 +482,6 @@ LogColors = ""
|
|||
# Enable or disable instant logout for security level (0..4) or high (NOT in combat/while dueling/while falling)
|
||||
# Default: 1 (Mods/GMs/Admins)
|
||||
#
|
||||
# DisableWaterBreath
|
||||
# Disable/enable waterbreathing for security level (0..4) or high
|
||||
# Default: 4 (None)
|
||||
#
|
||||
# AllFlightPaths
|
||||
# Players will start with all flight paths (Note: ALL flight paths, not only player's team)
|
||||
# Default: 0 (false)
|
||||
|
|
@ -549,6 +545,33 @@ LogColors = ""
|
|||
# Useful when you don't want old log events to be overwritten by new, but increasing can slow down performance
|
||||
# Default: 25
|
||||
#
|
||||
# TimerBar.Fatigue.GMLevel
|
||||
# Disable/enable fatigue for security level (0..4) or high
|
||||
# Default: 4 (None)
|
||||
#
|
||||
# TimerBar.Fatigue.Max
|
||||
# Fatigue max timer value (in secs)
|
||||
# Default: 60 (1 minute)
|
||||
# 0 (instant death)
|
||||
#
|
||||
# TimerBar.Breath.GMLevel
|
||||
# Disable/enable waterbreathing for security level (0..4) or high
|
||||
# Default: 4 (None)
|
||||
#
|
||||
# TimerBar.Breath.Max
|
||||
# Waterbreathing max timer value (in secs)
|
||||
# Default: 180
|
||||
# 0 (instant underwater breathing damage start)
|
||||
#
|
||||
# TimerBar.Fire.GMLevel
|
||||
# Disable/enable lava fire damage for security level (0..4) or high
|
||||
# Default: 4 (None)
|
||||
#
|
||||
# TimerBar.Fire.Max
|
||||
# Lava damage delay max timer value (in secs)
|
||||
# Default: 1
|
||||
# 0 (instant in lava damage start)
|
||||
#
|
||||
# MaxPrimaryTradeSkill
|
||||
# Max count that player can learn the primary trade skill.
|
||||
# Default: 2
|
||||
|
|
@ -638,6 +661,12 @@ Quests.LowLevelHideDiff = 4
|
|||
Quests.HighLevelHideDiff = 7
|
||||
Guild.EventLogRecordsCount = 100
|
||||
Guild.BankEventLogRecordsCount = 25
|
||||
TimerBar.Fatigue.GMLevel = 4
|
||||
TimerBar.Fatigue.Max = 60
|
||||
TimerBar.Breath.GMLevel = 4
|
||||
TimerBar.Breath.Max = 180
|
||||
TimerBar.Fire.GMLevel = 4
|
||||
TimerBar.Fire.Max = 1
|
||||
MaxPrimaryTradeSkill = 2
|
||||
MinPetitionSigns = 9
|
||||
MaxGroupXPDistance = 74
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8629"
|
||||
#define REVISION_NR "8630"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue