mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue