mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +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)
|
switch (timer)
|
||||||
{
|
{
|
||||||
case FATIGUE_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:
|
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;
|
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);
|
AuraList const& mModWaterBreathing = GetAurasByType(SPELL_AURA_MOD_WATER_BREATHING);
|
||||||
for(AuraList::const_iterator i = mModWaterBreathing.begin(); i != mModWaterBreathing.end(); ++i)
|
for(AuraList::const_iterator i = mModWaterBreathing.begin(); i != mModWaterBreathing.end(); ++i)
|
||||||
UnderWaterTime = uint32(UnderWaterTime * (100.0f + (*i)->GetModifier()->m_amount) / 100.0f);
|
UnderWaterTime = uint32(UnderWaterTime * (100.0f + (*i)->GetModifier()->m_amount) / 100.0f);
|
||||||
|
|
@ -872,9 +875,9 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
|
||||||
}
|
}
|
||||||
case FIRE_TIMER:
|
case FIRE_TIMER:
|
||||||
{
|
{
|
||||||
if (!isAlive())
|
if (!isAlive() || GetSession()->GetSecurity() >= sWorld.getConfig(CONFIG_TIMERBAR_FIRE_GMLEVEL))
|
||||||
return DISABLED_MIRROR_TIMER;
|
return DISABLED_MIRROR_TIMER;
|
||||||
return 1*IN_MILISECONDS;
|
return sWorld.getConfig(CONFIG_TIMERBAR_FIRE_MAX)*IN_MILISECONDS;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return 0;
|
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_SAVE_RESPAWN_TIME_IMMEDIATLY] = sConfig.GetBoolDefault("SaveRespawnTimeImmediately",true);
|
||||||
m_configs[CONFIG_WEATHER] = sConfig.GetBoolDefault("ActivateWeather",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);
|
m_configs[CONFIG_ALWAYS_MAX_SKILL_FOR_LEVEL] = sConfig.GetBoolDefault("AlwaysMaxSkillForLevel", false);
|
||||||
|
|
||||||
if(reload)
|
if(reload)
|
||||||
|
|
@ -996,6 +994,13 @@ void World::LoadConfigSettings(bool reload)
|
||||||
if (m_configs[CONFIG_GUILD_BANK_EVENT_LOG_COUNT] < GUILD_BANK_MAX_LOGS)
|
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_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);
|
m_VisibleUnitGreyDistance = sConfig.GetFloatDefault("Visibility.Distance.Grey.Unit", 1);
|
||||||
if(m_VisibleUnitGreyDistance > MAX_VISIBILITY_DISTANCE)
|
if(m_VisibleUnitGreyDistance > MAX_VISIBILITY_DISTANCE)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,6 @@ enum WorldConfigs
|
||||||
CONFIG_DEATH_BONES_BG_OR_ARENA,
|
CONFIG_DEATH_BONES_BG_OR_ARENA,
|
||||||
CONFIG_THREAT_RADIUS,
|
CONFIG_THREAT_RADIUS,
|
||||||
CONFIG_INSTANT_LOGOUT,
|
CONFIG_INSTANT_LOGOUT,
|
||||||
CONFIG_DISABLE_BREATHING,
|
|
||||||
CONFIG_ALL_TAXI_PATHS,
|
CONFIG_ALL_TAXI_PATHS,
|
||||||
CONFIG_DECLINED_NAMES_USED,
|
CONFIG_DECLINED_NAMES_USED,
|
||||||
CONFIG_LISTEN_RANGE_SAY,
|
CONFIG_LISTEN_RANGE_SAY,
|
||||||
|
|
@ -217,6 +216,12 @@ enum WorldConfigs
|
||||||
CONFIG_CLIENTCACHE_VERSION,
|
CONFIG_CLIENTCACHE_VERSION,
|
||||||
CONFIG_GUILD_EVENT_LOG_COUNT,
|
CONFIG_GUILD_EVENT_LOG_COUNT,
|
||||||
CONFIG_GUILD_BANK_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
|
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)
|
# Enable or disable instant logout for security level (0..4) or high (NOT in combat/while dueling/while falling)
|
||||||
# Default: 1 (Mods/GMs/Admins)
|
# Default: 1 (Mods/GMs/Admins)
|
||||||
#
|
#
|
||||||
# DisableWaterBreath
|
|
||||||
# Disable/enable waterbreathing for security level (0..4) or high
|
|
||||||
# Default: 4 (None)
|
|
||||||
#
|
|
||||||
# AllFlightPaths
|
# AllFlightPaths
|
||||||
# Players will start with all flight paths (Note: ALL flight paths, not only player's team)
|
# Players will start with all flight paths (Note: ALL flight paths, not only player's team)
|
||||||
# Default: 0 (false)
|
# 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
|
# Useful when you don't want old log events to be overwritten by new, but increasing can slow down performance
|
||||||
# Default: 25
|
# 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
|
# MaxPrimaryTradeSkill
|
||||||
# Max count that player can learn the primary trade skill.
|
# Max count that player can learn the primary trade skill.
|
||||||
# Default: 2
|
# Default: 2
|
||||||
|
|
@ -638,6 +661,12 @@ Quests.LowLevelHideDiff = 4
|
||||||
Quests.HighLevelHideDiff = 7
|
Quests.HighLevelHideDiff = 7
|
||||||
Guild.EventLogRecordsCount = 100
|
Guild.EventLogRecordsCount = 100
|
||||||
Guild.BankEventLogRecordsCount = 25
|
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
|
MaxPrimaryTradeSkill = 2
|
||||||
MinPetitionSigns = 9
|
MinPetitionSigns = 9
|
||||||
MaxGroupXPDistance = 74
|
MaxGroupXPDistance = 74
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8629"
|
#define REVISION_NR "8630"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue