fix: Fixes spell durations for older expansions (#1119)
This commit is contained in:
parent
d6d02de296
commit
56c97ca84a
8 changed files with 68 additions and 59 deletions
|
|
@ -108,13 +108,12 @@ namespace Server.Spells.Fifth
|
|||
|
||||
StopTimer(Caster);
|
||||
|
||||
var timeVal = Math.Min(6 * Caster.Skills.Magery.Fixed / 50 + 1, 144);
|
||||
var duration = TimeSpan.FromSeconds(Math.Min(6 * Caster.Skills.Magery.Value / 5.0, 144));
|
||||
|
||||
var length = TimeSpan.FromSeconds(timeVal);
|
||||
Timer.StartTimer(length, () => EndIncognito(Caster), out var timerToken);
|
||||
Timer.StartTimer(duration, () => EndIncognito(Caster), out var timerToken);
|
||||
_table[Caster] = timerToken;
|
||||
|
||||
BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.Incognito, 1075819, length, Caster));
|
||||
BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.Incognito, 1075819, duration, Caster));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,12 @@ namespace Server.Spells.Fifth
|
|||
Effects.PlaySound(loc, Caster.Map, 0x20B);
|
||||
|
||||
var itemID = eastToWest ? 0x3915 : 0x3922;
|
||||
var duration = TimeSpan.FromSeconds(3 + Caster.Skills.Magery.Fixed / 25);
|
||||
var duration = Core.Expansion switch
|
||||
{
|
||||
Expansion.None => TimeSpan.FromSeconds(20),
|
||||
< Expansion.LBR => TimeSpan.FromSeconds(15 + Caster.Skills.Magery.Value * 0.4),
|
||||
_ => TimeSpan.FromSeconds(3 + Caster.Skills.Magery.Fixed * 0.4)
|
||||
};
|
||||
|
||||
for (var i = -2; i <= 2; ++i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -72,16 +72,11 @@ namespace Server.Spells.Fifth
|
|||
|
||||
// creature.ControlSlots = 2;
|
||||
|
||||
TimeSpan duration;
|
||||
|
||||
if (Core.AOS)
|
||||
var duration = Core.Expansion switch
|
||||
{
|
||||
duration = TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
duration = TimeSpan.FromSeconds(4.0 * Caster.Skills.Magery.Value);
|
||||
}
|
||||
Expansion.None => TimeSpan.FromSeconds(Caster.Skills.Magery.Value),
|
||||
_ => TimeSpan.FromSeconds(2 * Caster.Skills.Magery.Fixed / 5.0)
|
||||
};
|
||||
|
||||
SpellHelper.Summon(creature, Caster, 0x215, duration, false, false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue