cleanup: Fixes bugs and cleans up code (#660)
This commit is contained in:
parent
1de0b656a9
commit
679e8100f4
99 changed files with 160 additions and 346 deletions
|
|
@ -1,8 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Regions;
|
||||
using Server.Utilities;
|
||||
|
||||
namespace Server.Engines.Doom
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ namespace Server.Engines.Doom
|
|||
m_Tiles = new List<LeverPuzzleRegion>();
|
||||
for (; i < 9; i++)
|
||||
{
|
||||
m_Tiles.Add(new LeverPuzzleRegion(this, TA[i]));
|
||||
m_Tiles.Add(new LeverPuzzleRegion(TA[i]));
|
||||
}
|
||||
|
||||
m_Teles = new List<Item>();
|
||||
|
|
@ -400,7 +400,7 @@ namespace Server.Engines.Doom
|
|||
{
|
||||
if ((player = GetOccupant(i)) != null)
|
||||
{
|
||||
new RockTimer(player, this).Start();
|
||||
new RockTimer(player).Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -570,7 +570,7 @@ namespace Server.Engines.Doom
|
|||
m_Tiles = new List<LeverPuzzleRegion>();
|
||||
for (var i = 4; i < 9; i++)
|
||||
{
|
||||
m_Tiles.Add(new LeverPuzzleRegion(this, TA[i]));
|
||||
m_Tiles.Add(new LeverPuzzleRegion(TA[i]));
|
||||
}
|
||||
|
||||
m_LampRoom = new LampRoomRegion(this);
|
||||
|
|
@ -584,14 +584,12 @@ namespace Server.Engines.Doom
|
|||
{
|
||||
private readonly Mobile m_Player;
|
||||
private int Count;
|
||||
private LeverPuzzleController m_Controller;
|
||||
|
||||
public RockTimer(Mobile player, LeverPuzzleController controller)
|
||||
public RockTimer(Mobile player)
|
||||
: base(TimeSpan.Zero, TimeSpan.FromSeconds(.25))
|
||||
{
|
||||
Count = 0;
|
||||
m_Player = player;
|
||||
m_Controller = controller;
|
||||
}
|
||||
|
||||
private int Rock() => 0x1363 + Utility.Random(0, 11);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ namespace Server.Engines.Doom
|
|||
{
|
||||
public Mobile m_Occupant;
|
||||
|
||||
public LeverPuzzleRegion(LeverPuzzleController controller, int[] loc)
|
||||
public LeverPuzzleRegion(int[] loc)
|
||||
: base(null, Map.Malas, Find(LeverPuzzleController.lr_Enter, Map.Malas), new Rectangle2D(loc[0], loc[1], 1, 1))
|
||||
{
|
||||
Register();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue