chore(content): Updates to C# 9 syntax (#373)
This commit is contained in:
parent
a59fda6a3a
commit
1e2242bb1a
25 changed files with 155 additions and 405 deletions
|
|
@ -865,24 +865,9 @@ namespace Server.Misc
|
|||
{
|
||||
var vMax = max - 30;
|
||||
|
||||
var vStr = str - 10;
|
||||
var vDex = dex - 10;
|
||||
var vInt = intel - 10;
|
||||
|
||||
if (vStr < 0)
|
||||
{
|
||||
vStr = 0;
|
||||
}
|
||||
|
||||
if (vDex < 0)
|
||||
{
|
||||
vDex = 0;
|
||||
}
|
||||
|
||||
if (vInt < 0)
|
||||
{
|
||||
vInt = 0;
|
||||
}
|
||||
var vStr = Math.Max(str - 10, 0);
|
||||
var vDex = Math.Max(dex - 10, 0);
|
||||
var vInt = Math.Max(intel - 10, 0);
|
||||
|
||||
var total = vStr + vDex + vInt;
|
||||
|
||||
|
|
|
|||
|
|
@ -80,27 +80,14 @@ namespace Server
|
|||
* 6:00 AM -> 9:59 PM : Day
|
||||
*/
|
||||
|
||||
if (hours < 4)
|
||||
return hours switch
|
||||
{
|
||||
return NightLevel;
|
||||
}
|
||||
|
||||
if (hours < 6)
|
||||
{
|
||||
return NightLevel + ((hours - 4) * 60 + minutes) * (DayLevel - NightLevel) / 120;
|
||||
}
|
||||
|
||||
if (hours < 22)
|
||||
{
|
||||
return DayLevel;
|
||||
}
|
||||
|
||||
if (hours < 24)
|
||||
{
|
||||
return DayLevel + ((hours - 22) * 60 + minutes) * (NightLevel - DayLevel) / 120;
|
||||
}
|
||||
|
||||
return NightLevel; // should never be
|
||||
< 4 => NightLevel,
|
||||
< 6 => NightLevel + ((hours - 4) * 60 + minutes) * (DayLevel - NightLevel) / 120,
|
||||
< 22 => DayLevel,
|
||||
< 24 => DayLevel + ((hours - 22) * 60 + minutes) * (NightLevel - DayLevel) / 120,
|
||||
_ => NightLevel
|
||||
};
|
||||
}
|
||||
|
||||
private class LightCycleTimer : Timer
|
||||
|
|
|
|||
|
|
@ -841,7 +841,7 @@ namespace Server
|
|||
}
|
||||
else if (item is BaseInstrument instr)
|
||||
{
|
||||
var slayer = SlayerName.None;
|
||||
SlayerName slayer;
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -329,16 +329,7 @@ namespace Server.Misc
|
|||
}
|
||||
else
|
||||
{
|
||||
density = 150 - m_Stage * 5;
|
||||
|
||||
if (density < 10)
|
||||
{
|
||||
density = 10;
|
||||
}
|
||||
else if (density > 70)
|
||||
{
|
||||
density = 70;
|
||||
}
|
||||
density = Math.Clamp(150 - m_Stage * 5, 10, 70);
|
||||
}
|
||||
|
||||
if (density == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue