Fixes brace style (#248)

This commit is contained in:
Kamron Batman 2020-09-13 21:49:46 -07:00 • committed by GitHub
parent a236617ad9
commit 8149620b0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1503 changed files with 28575 additions and 1717 deletions

View file

@ -51,7 +51,9 @@ namespace Server.Items
base.Locked = value;
if (!value)
{
StartResetTimer();
}
}
}
}
@ -63,7 +65,9 @@ namespace Server.Items
get
{
if (Locked)
{
return "a locked treasure chest";
}
return "a treasure chest";
}
@ -90,7 +94,9 @@ namespace Server.Items
MaxSpawnTime = reader.ReadShort();
if (!Locked)
{
StartResetTimer();
}
}
protected virtual void SetLockLevel()
@ -110,9 +116,13 @@ namespace Server.Items
private void StartResetTimer()
{
if (m_ResetTimer == null)
{
m_ResetTimer = new TreasureResetTimer(this);
}
else
{
m_ResetTimer.Delay = TimeSpan.FromMinutes(Utility.Random(MinSpawnTime, MaxSpawnTime));
}
m_ResetTimer.Start();
}
@ -161,15 +171,23 @@ namespace Server.Items
public void ClearContents()
{
for (var i = Items.Count - 1; i >= 0; --i)
{
if (i < Items.Count)
{
Items[i].Delete();
}
}
}
public void Reset()
{
if (m_ResetTimer != null)
{
if (m_ResetTimer.Running)
{
m_ResetTimer.Stop();
}
}
Locked = true;
ClearContents();