fix: Fixes starting champion with valor (#1088)
This commit is contained in:
parent
087cc15f39
commit
bc2ed44440
1 changed files with 108 additions and 115 deletions
|
|
@ -3,10 +3,10 @@ using Server.Engines.CannedEvil;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
using Server.Targeting;
|
using Server.Targeting;
|
||||||
|
|
||||||
namespace Server
|
namespace Server;
|
||||||
|
|
||||||
|
public static class ValorVirtue
|
||||||
{
|
{
|
||||||
public static class ValorVirtue
|
|
||||||
{
|
|
||||||
private const int LossAmount = 250;
|
private const int LossAmount = 250;
|
||||||
private static readonly TimeSpan LossDelay = TimeSpan.FromDays(7.0);
|
private static readonly TimeSpan LossDelay = TimeSpan.FromDays(7.0);
|
||||||
|
|
||||||
|
|
@ -63,10 +63,7 @@ namespace Server
|
||||||
{
|
{
|
||||||
from.SendLocalizedMessage(1054038); // The Champion of this region has already been challenged!
|
from.SendLocalizedMessage(1054038); // The Champion of this region has already been challenged!
|
||||||
}
|
}
|
||||||
else
|
else if (idol.Spawn.Active)
|
||||||
{
|
|
||||||
var vl = VirtueHelper.GetLevel(from, VirtueName.Valor);
|
|
||||||
if (idol.Spawn.Active)
|
|
||||||
{
|
{
|
||||||
if (idol.Spawn.Champion != null) // TODO: Message?
|
if (idol.Spawn.Champion != null) // TODO: Message?
|
||||||
{
|
{
|
||||||
|
|
@ -114,15 +111,14 @@ namespace Server
|
||||||
from.SendLocalizedMessage(1054039);
|
from.SendLocalizedMessage(1054039);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (VirtueHelper.GetLevel(from, VirtueName.Valor) == VirtueLevel.Knight)
|
||||||
{
|
|
||||||
if (vl == VirtueLevel.Knight)
|
|
||||||
{
|
{
|
||||||
VirtueHelper.Atrophy(from, VirtueName.Valor, 11000);
|
VirtueHelper.Atrophy(from, VirtueName.Valor, 11000);
|
||||||
// Your challenge is heard by the Champion of this region! Beware its wrath!
|
// Your challenge is heard by the Champion of this region! Beware its wrath!
|
||||||
from.SendLocalizedMessage(1054037);
|
from.SendLocalizedMessage(1054037);
|
||||||
idol.Spawn.EndRestart();
|
idol.Spawn.Start();
|
||||||
idol.Spawn.HasBeenAdvanced = true;
|
// Uncomment to not allow advancing level after starting with valor.
|
||||||
|
// idol.Spawn.HasBeenAdvanced = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -130,8 +126,6 @@ namespace Server
|
||||||
from.SendLocalizedMessage(1054036);
|
from.SendLocalizedMessage(1054036);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class InternalTarget : Target
|
private class InternalTarget : Target
|
||||||
{
|
{
|
||||||
|
|
@ -144,5 +138,4 @@ namespace Server
|
||||||
Valor(from, targeted);
|
Valor(from, targeted);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue