Fixes for Last Moved (#194)
This commit is contained in:
parent
3a081d5322
commit
b476bcfd24
28 changed files with 155 additions and 398 deletions
|
|
@ -39,20 +39,7 @@ namespace Server.Engines.Chat
|
|||
public string Password
|
||||
{
|
||||
get => m_Password;
|
||||
set
|
||||
{
|
||||
string newValue = null;
|
||||
|
||||
if (value != null)
|
||||
{
|
||||
newValue = value.Trim();
|
||||
|
||||
if (string.IsNullOrEmpty(newValue))
|
||||
newValue = null;
|
||||
}
|
||||
|
||||
m_Password = newValue;
|
||||
}
|
||||
set => m_Password = value?.Trim().IsNullOrDefault(null);
|
||||
}
|
||||
|
||||
public bool VoiceRestricted
|
||||
|
|
|
|||
|
|
@ -239,12 +239,9 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
if (m_Counter >= m_Hill.ScoreInterval)
|
||||
{
|
||||
string hill = m_Hill.Name;
|
||||
string hill = m_Hill.Name.IsNullOrDefault("the hill");
|
||||
string king = m_Hill.King.Name ?? "";
|
||||
|
||||
if (string.IsNullOrEmpty(hill))
|
||||
hill = "the hill";
|
||||
|
||||
m_Hill.Game.Alert("{0} ({1}) is king of {2}!", king, ti.Name, hill);
|
||||
|
||||
m_Hill.PublicOverheadMessage(MessageType.Regular, 0x0481, false, "Capture!");
|
||||
|
|
|
|||
|
|
@ -33,11 +33,10 @@ namespace Server
|
|||
{
|
||||
int v = from.Virtues.GetValue((int)virtue);
|
||||
int vl;
|
||||
int vmax = GetMaxAmount(virtue);
|
||||
|
||||
if (v < 4000)
|
||||
vl = 0;
|
||||
else if (v >= vmax)
|
||||
else if (v >= GetMaxAmount(virtue))
|
||||
vl = 3;
|
||||
else
|
||||
vl = (v + 9999) / 10000;
|
||||
|
|
@ -45,16 +44,13 @@ namespace Server
|
|||
return (VirtueLevel)vl;
|
||||
}
|
||||
|
||||
public static int GetMaxAmount(VirtueName virtue)
|
||||
{
|
||||
if (virtue == VirtueName.Honor)
|
||||
return 20000;
|
||||
|
||||
if (virtue == VirtueName.Sacrifice)
|
||||
return 22000;
|
||||
|
||||
return 21000;
|
||||
}
|
||||
public static int GetMaxAmount(VirtueName virtue) =>
|
||||
virtue switch
|
||||
{
|
||||
VirtueName.Honor => 20000,
|
||||
VirtueName.Sacrifice => 22000,
|
||||
_ => 21000
|
||||
};
|
||||
|
||||
public static bool Award(Mobile from, VirtueName virtue, int amount, ref bool gainedPath)
|
||||
{
|
||||
|
|
@ -142,4 +138,4 @@ namespace Server
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue