Adds style cop (#109)
This commit is contained in:
parent
3e715bcb60
commit
556a17aba8
1725 changed files with 33831 additions and 38046 deletions
|
|
@ -52,13 +52,13 @@ namespace Server.Mobiles
|
|||
}
|
||||
|
||||
[CommandProperty(AccessLevel.Developer)]
|
||||
public int TriggerRange{ get; set; }
|
||||
public int TriggerRange { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.Developer)]
|
||||
public TextDefinition SpawnMessage{ get; set; }
|
||||
public TextDefinition SpawnMessage { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.Developer)]
|
||||
public bool InstantFlag{ get; set; }
|
||||
public bool InstantFlag { get; set; }
|
||||
|
||||
public override string DefaultName => "Proximity Spawner";
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ namespace Server.Mobiles
|
|||
if (m is BaseCreature bc && (bc.IsDeadBondedPet || !(bc.Controlled || bc.Summoned)))
|
||||
return false;
|
||||
|
||||
return m.AccessLevel == AccessLevel.Player && (m.Player || m.Alive && !m.Hidden && m.CanBeDamaged());
|
||||
return m.AccessLevel == AccessLevel.Player && (m.Player || (m.Alive && !m.Hidden && m.CanBeDamaged()));
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
|
|
|
|||
|
|
@ -23,14 +23,14 @@ namespace Server.Mobiles
|
|||
private InternalTimer m_Timer;
|
||||
private int m_WalkingRange = -1;
|
||||
|
||||
// [Constructible]
|
||||
// [Constructible]
|
||||
public Spawner(int amount, int minDelay, int maxDelay, int team, int homeRange, string spawnedNames) : base(0x1f13)
|
||||
{
|
||||
InitSpawn(amount, TimeSpan.FromMinutes(minDelay), TimeSpan.FromMinutes(maxDelay), team, homeRange);
|
||||
AddEntry(spawnedNames, 100, amount, false);
|
||||
}
|
||||
|
||||
// [Constructible]
|
||||
// [Constructible]
|
||||
public Spawner(string spawnedName) : base(0x1f13)
|
||||
{
|
||||
InitSpawn(1, TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(10), 0, 4);
|
||||
|
|
@ -58,11 +58,11 @@ namespace Server.Mobiles
|
|||
public override string DefaultName => "Spawner";
|
||||
public bool IsFull => Spawned?.Count >= m_Count;
|
||||
public bool IsEmpty => Spawned?.Count == 0;
|
||||
public DateTime End{ get; set; }
|
||||
public DateTime End { get; set; }
|
||||
|
||||
public List<SpawnerEntry> Entries{ get; private set; }
|
||||
public List<SpawnerEntry> Entries { get; private set; }
|
||||
|
||||
public Dictionary<ISpawnable, SpawnerEntry> Spawned{ get; private set; }
|
||||
public Dictionary<ISpawnable, SpawnerEntry> Spawned { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.Developer)]
|
||||
public int Count
|
||||
|
|
@ -73,7 +73,7 @@ namespace Server.Mobiles
|
|||
m_Count = value;
|
||||
|
||||
if (m_Timer != null)
|
||||
if (!IsFull && !m_Timer.Running || IsFull && m_Timer.Running)
|
||||
if ((!IsFull && !m_Timer.Running) || (IsFull && m_Timer.Running))
|
||||
DoTimer();
|
||||
|
||||
InvalidateProperties();
|
||||
|
|
@ -81,7 +81,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
|
||||
[CommandProperty(AccessLevel.Developer)]
|
||||
public WayPoint WayPoint{ get; set; }
|
||||
public virtual WayPoint WayPoint { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.Developer)]
|
||||
public bool Running
|
||||
|
|
@ -326,7 +326,7 @@ namespace Server.Mobiles
|
|||
for (int i = 0; i < m_Count; i++)
|
||||
Spawn();
|
||||
|
||||
DoTimer(); //Turn off the timer!
|
||||
DoTimer(); // Turn off the timer!
|
||||
}
|
||||
|
||||
public virtual void Spawn()
|
||||
|
|
@ -415,7 +415,7 @@ namespace Server.Mobiles
|
|||
return null;
|
||||
CPA attr = Properties.GetCPA(thisProp);
|
||||
|
||||
if (attr == null || AccessLevel.Developer < attr.WriteLevel || !thisProp.CanWrite || attr.ReadOnly)
|
||||
if (attr == null || attr.WriteLevel > AccessLevel.Developer || !thisProp.CanWrite || attr.ReadOnly)
|
||||
return null;
|
||||
realProps[i] = thisProp;
|
||||
}
|
||||
|
|
@ -440,8 +440,8 @@ namespace Server.Mobiles
|
|||
if (map == null || map == Map.Internal || Parent != null)
|
||||
return false;
|
||||
|
||||
//Defrag taken care of in Spawn(), beforehand
|
||||
//Count check taken care of in Spawn(), beforehand
|
||||
// Defrag taken care of in Spawn(), beforehand
|
||||
// Count check taken care of in Spawn(), beforehand
|
||||
|
||||
Type type = SpawnerType.GetType(entry.SpawnedName);
|
||||
|
||||
|
|
@ -454,7 +454,7 @@ namespace Server.Mobiles
|
|||
string[] propargs;
|
||||
|
||||
if (string.IsNullOrEmpty(entry.Properties))
|
||||
propargs = new string[0];
|
||||
propargs = Array.Empty<string>();
|
||||
else
|
||||
propargs = CommandSystem.Split(entry.Properties.Trim());
|
||||
|
||||
|
|
@ -469,7 +469,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
|
||||
if (string.IsNullOrEmpty(entry.Parameters))
|
||||
paramargs = new string[0];
|
||||
paramargs = Array.Empty<string>();
|
||||
else
|
||||
paramargs = entry.Parameters.Trim().Split(' ');
|
||||
|
||||
|
|
@ -542,7 +542,7 @@ namespace Server.Mobiles
|
|||
int walkrange = GetWalkingRange();
|
||||
|
||||
c.RangeHome = walkrange >= 0 ? walkrange : m_HomeRange;
|
||||
c.CurrentWayPoint = GetWayPoint();
|
||||
c.CurrentWayPoint = WayPoint;
|
||||
|
||||
if (m_Team > 0)
|
||||
c.Team = m_Team;
|
||||
|
|
@ -591,8 +591,6 @@ namespace Server.Mobiles
|
|||
|
||||
public virtual int GetWalkingRange() => m_WalkingRange;
|
||||
|
||||
public virtual WayPoint GetWayPoint() => WayPoint;
|
||||
|
||||
public virtual Point3D GetSpawnPosition(ISpawnable spawned, Map map)
|
||||
{
|
||||
if (map == null || map == Map.Internal)
|
||||
|
|
@ -717,7 +715,7 @@ namespace Server.Mobiles
|
|||
InvalidateProperties();
|
||||
}
|
||||
|
||||
public void RemoveSpawn(int index) //Entry
|
||||
public void RemoveSpawn(int index) // Entry
|
||||
{
|
||||
if (index >= 0 && index < Entries.Count)
|
||||
RemoveSpawn(Entries[index]);
|
||||
|
|
@ -823,126 +821,126 @@ namespace Server.Mobiles
|
|||
switch (version)
|
||||
{
|
||||
case 7:
|
||||
{
|
||||
int size = reader.ReadInt();
|
||||
{
|
||||
int size = reader.ReadInt();
|
||||
|
||||
Entries = new List<SpawnerEntry>(size);
|
||||
Entries = new List<SpawnerEntry>(size);
|
||||
|
||||
for (int i = 0; i < size; ++i)
|
||||
Entries.Add(new SpawnerEntry(this, reader));
|
||||
for (int i = 0; i < size; ++i)
|
||||
Entries.Add(new SpawnerEntry(this, reader));
|
||||
|
||||
goto case 4; //Skip the other crap
|
||||
}
|
||||
goto case 4; // Skip the other crap
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
int size = reader.ReadInt();
|
||||
|
||||
bool addentries = Entries.Count == 0;
|
||||
|
||||
for (int i = 0; i < size; ++i)
|
||||
if (addentries)
|
||||
Entries.Add(new SpawnerEntry(string.Empty, 100, reader.ReadInt()));
|
||||
else
|
||||
Entries[i].SpawnedMaxCount = reader.ReadInt();
|
||||
|
||||
goto case 5;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
int size = reader.ReadInt();
|
||||
|
||||
bool addentries = Entries.Count == 0;
|
||||
|
||||
for (int i = 0; i < size; ++i)
|
||||
if (addentries)
|
||||
Entries.Add(new SpawnerEntry(string.Empty, reader.ReadInt(), 1));
|
||||
else
|
||||
Entries[i].SpawnedProbability = reader.ReadInt();
|
||||
|
||||
goto case 4;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
m_WalkingRange = reader.ReadInt();
|
||||
|
||||
goto case 3;
|
||||
}
|
||||
case 3:
|
||||
case 2:
|
||||
{
|
||||
WayPoint = reader.ReadItem() as WayPoint;
|
||||
|
||||
goto case 1;
|
||||
}
|
||||
|
||||
case 1:
|
||||
{
|
||||
m_Group = reader.ReadBool();
|
||||
|
||||
goto case 0;
|
||||
}
|
||||
|
||||
case 0:
|
||||
{
|
||||
m_MinDelay = reader.ReadTimeSpan();
|
||||
m_MaxDelay = reader.ReadTimeSpan();
|
||||
m_Count = reader.ReadInt();
|
||||
m_Team = reader.ReadInt();
|
||||
m_HomeRange = reader.ReadInt();
|
||||
m_Running = reader.ReadBool();
|
||||
|
||||
TimeSpan ts = TimeSpan.Zero;
|
||||
|
||||
if (m_Running)
|
||||
ts = reader.ReadDeltaTime() - DateTime.UtcNow;
|
||||
|
||||
if (version < 7)
|
||||
{
|
||||
int size = reader.ReadInt();
|
||||
|
||||
bool addentries = Entries.Count == 0;
|
||||
|
||||
for (int i = 0; i < size; ++i)
|
||||
{
|
||||
string typeName = reader.ReadString();
|
||||
|
||||
if (addentries)
|
||||
Entries.Add(new SpawnerEntry(typeName, 100, 1));
|
||||
Entries.Add(new SpawnerEntry(string.Empty, 100, reader.ReadInt()));
|
||||
else
|
||||
Entries[i].SpawnedName = typeName;
|
||||
Entries[i].SpawnedMaxCount = reader.ReadInt();
|
||||
|
||||
if (SpawnerType.GetType(typeName) == null)
|
||||
{
|
||||
m_WarnTimer ??= new WarnTimer();
|
||||
goto case 5;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
int size = reader.ReadInt();
|
||||
|
||||
m_WarnTimer.Add(Location, Map, typeName);
|
||||
}
|
||||
}
|
||||
bool addentries = Entries.Count == 0;
|
||||
|
||||
int count = reader.ReadInt();
|
||||
for (int i = 0; i < size; ++i)
|
||||
if (addentries)
|
||||
Entries.Add(new SpawnerEntry(string.Empty, reader.ReadInt(), 1));
|
||||
else
|
||||
Entries[i].SpawnedProbability = reader.ReadInt();
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
if (reader.ReadEntity() is ISpawnable e)
|
||||
{
|
||||
if (e is BaseCreature creature)
|
||||
creature.RemoveIfUntamed = true;
|
||||
goto case 4;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
m_WalkingRange = reader.ReadInt();
|
||||
|
||||
e.Spawner = this;
|
||||
goto case 3;
|
||||
}
|
||||
case 3:
|
||||
case 2:
|
||||
{
|
||||
WayPoint = reader.ReadItem() as WayPoint;
|
||||
|
||||
for (int j = 0; j < Entries.Count; j++)
|
||||
if (SpawnerType.GetType(Entries[j].SpawnedName) == e.GetType())
|
||||
{
|
||||
Entries[j].Spawned.Add(e);
|
||||
Spawned.Add(e, Entries[j]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
goto case 1;
|
||||
}
|
||||
|
||||
DoTimer(ts);
|
||||
case 1:
|
||||
{
|
||||
m_Group = reader.ReadBool();
|
||||
|
||||
break;
|
||||
}
|
||||
goto case 0;
|
||||
}
|
||||
|
||||
case 0:
|
||||
{
|
||||
m_MinDelay = reader.ReadTimeSpan();
|
||||
m_MaxDelay = reader.ReadTimeSpan();
|
||||
m_Count = reader.ReadInt();
|
||||
m_Team = reader.ReadInt();
|
||||
m_HomeRange = reader.ReadInt();
|
||||
m_Running = reader.ReadBool();
|
||||
|
||||
TimeSpan ts = TimeSpan.Zero;
|
||||
|
||||
if (m_Running)
|
||||
ts = reader.ReadDeltaTime() - DateTime.UtcNow;
|
||||
|
||||
if (version < 7)
|
||||
{
|
||||
int size = reader.ReadInt();
|
||||
|
||||
bool addentries = Entries.Count == 0;
|
||||
|
||||
for (int i = 0; i < size; ++i)
|
||||
{
|
||||
string typeName = reader.ReadString();
|
||||
|
||||
if (addentries)
|
||||
Entries.Add(new SpawnerEntry(typeName, 100, 1));
|
||||
else
|
||||
Entries[i].SpawnedName = typeName;
|
||||
|
||||
if (SpawnerType.GetType(typeName) == null)
|
||||
{
|
||||
m_WarnTimer ??= new WarnTimer();
|
||||
|
||||
m_WarnTimer.Add(Location, Map, typeName);
|
||||
}
|
||||
}
|
||||
|
||||
int count = reader.ReadInt();
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
if (reader.ReadEntity() is ISpawnable e)
|
||||
{
|
||||
if (e is BaseCreature creature)
|
||||
creature.RemoveIfUntamed = true;
|
||||
|
||||
e.Spawner = this;
|
||||
|
||||
for (int j = 0; j < Entries.Count; j++)
|
||||
if (SpawnerType.GetType(Entries[j].SpawnedName) == e.GetType())
|
||||
{
|
||||
Entries[j].Spawned.Add(e);
|
||||
Spawned.Add(e, Entries[j]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DoTimer(ts);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (version < 4)
|
||||
|
|
@ -970,7 +968,7 @@ namespace Server.Mobiles
|
|||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private Spawner m_Spawner;
|
||||
private readonly Spawner m_Spawner;
|
||||
|
||||
public InternalTimer(Spawner spawner, TimeSpan delay) : base(delay)
|
||||
{
|
||||
|
|
@ -992,7 +990,7 @@ namespace Server.Mobiles
|
|||
|
||||
private class WarnTimer : Timer
|
||||
{
|
||||
private List<WarnEntry> m_List;
|
||||
private readonly List<WarnEntry> m_List;
|
||||
|
||||
public WarnTimer() : base(TimeSpan.FromSeconds(1.0))
|
||||
{
|
||||
|
|
@ -1031,8 +1029,8 @@ namespace Server.Mobiles
|
|||
|
||||
private class WarnEntry
|
||||
{
|
||||
public Map m_Map;
|
||||
public string m_Name;
|
||||
public readonly Map m_Map;
|
||||
public readonly string m_Name;
|
||||
public Point3D m_Point;
|
||||
|
||||
public WarnEntry(Point3D p, Map map, string name)
|
||||
|
|
@ -1081,7 +1079,7 @@ namespace Server.Mobiles
|
|||
Spawned = new List<ISpawnable>(count);
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
//IEntity e = World.FindEntity( reader.ReadInt() );
|
||||
// IEntity e = World.FindEntity( reader.ReadInt() );
|
||||
|
||||
if (reader.ReadEntity() is ISpawnable e)
|
||||
{
|
||||
|
|
@ -1097,19 +1095,19 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
public int SpawnedProbability{ get; set; }
|
||||
public int SpawnedProbability { get; set; }
|
||||
|
||||
public int SpawnedMaxCount{ get; set; }
|
||||
public int SpawnedMaxCount { get; set; }
|
||||
|
||||
public string SpawnedName{ get; set; }
|
||||
public string SpawnedName { get; set; }
|
||||
|
||||
public string Properties{ get; set; }
|
||||
public string Properties { get; set; }
|
||||
|
||||
public string Parameters{ get; set; }
|
||||
public string Parameters { get; set; }
|
||||
|
||||
public EntryFlags Valid{ get; set; }
|
||||
public EntryFlags Valid { get; set; }
|
||||
|
||||
public List<ISpawnable> Spawned{ get; }
|
||||
public List<ISpawnable> Spawned { get; }
|
||||
|
||||
public bool IsFull => Spawned.Count >= SpawnedMaxCount;
|
||||
|
||||
|
|
@ -1162,16 +1160,16 @@ namespace Server.Mobiles
|
|||
{
|
||||
if (c.Controlled || c.IsStabled)
|
||||
remove = true;
|
||||
/*
|
||||
else if ( c.Combatant == null && ( c.GetDistanceToSqrt( Location ) > (c.RangeHome * 4) ) )
|
||||
{
|
||||
//m_Spawned[i].Delete();
|
||||
m_Spawned.RemoveAt( i );
|
||||
--i;
|
||||
c.Delete();
|
||||
remove = true;
|
||||
}
|
||||
*/
|
||||
/*
|
||||
else if (c.Combatant == null && ( c.GetDistanceToSqrt( Location ) > (c.RangeHome * 4) ))
|
||||
{
|
||||
//m_Spawned[i].Delete();
|
||||
m_Spawned.RemoveAt( i );
|
||||
--i;
|
||||
c.Delete();
|
||||
remove = true;
|
||||
}
|
||||
*/
|
||||
}
|
||||
else if (m.Spawner == null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
private SpawnerEntry m_Entry;
|
||||
private int m_Page;
|
||||
private Spawner m_Spawner;
|
||||
private readonly Spawner m_Spawner;
|
||||
|
||||
public SpawnerGump(Spawner spawner, SpawnerEntry focusentry = null, int page = 0) : base(50, 50)
|
||||
{
|
||||
|
|
@ -25,7 +25,7 @@ namespace Server.Mobiles
|
|||
AddHtml(245, 1, 250, 20, "<BASEFONT COLOR=#F4F4F4>#</BASEFONT>");
|
||||
AddHtml(282, 1, 250, 20, "<BASEFONT COLOR=#F4F4F4>Prb</BASEFONT>");
|
||||
|
||||
//AddLabel( 95, 1, 0, "Creatures List" );
|
||||
// AddLabel( 95, 1, 0, "Creatures List" );
|
||||
|
||||
int offset = 0;
|
||||
|
||||
|
|
@ -41,21 +41,21 @@ namespace Server.Mobiles
|
|||
|
||||
if (entry == null || m_Entry != entry)
|
||||
AddButton(5, 22 * i + 21 + offset, entry != null ? 0xFBA : 0xFA5, entry != null ? 0xFBC : 0xFA7,
|
||||
GetButtonID(2, i * 2)); //Expand
|
||||
GetButtonID(2, i * 2)); // Expand
|
||||
else
|
||||
AddButton(5, 22 * i + 21 + offset, 0xFBB, 0xFBC,
|
||||
GetButtonID(2, i * 2)); //Unexpand
|
||||
GetButtonID(2, i * 2)); // Unexpand
|
||||
|
||||
AddButton(38, 22 * i + 21 + offset, 0xFA2, 0xFA4, GetButtonID(2, 1 + i * 2)); //Delete
|
||||
AddButton(38, 22 * i + 21 + offset, 0xFA2, 0xFA4, GetButtonID(2, 1 + i * 2)); // Delete
|
||||
|
||||
AddImageTiled(71, 22 * i + 20 + offset, 161, 23, 0xA40); //creature text box
|
||||
AddImageTiled(72, 22 * i + 21 + offset, 159, 21, 0xBBC); //creature text box
|
||||
AddImageTiled(71, 22 * i + 20 + offset, 161, 23, 0xA40); // creature text box
|
||||
AddImageTiled(72, 22 * i + 21 + offset, 159, 21, 0xBBC); // creature text box
|
||||
|
||||
AddImageTiled(235, 22 * i + 20 + offset, 35, 23, 0xA40); //maxcount text box
|
||||
AddImageTiled(236, 22 * i + 21 + offset, 33, 21, 0xBBC); //maxcount text box
|
||||
AddImageTiled(235, 22 * i + 20 + offset, 35, 23, 0xA40); // maxcount text box
|
||||
AddImageTiled(236, 22 * i + 21 + offset, 33, 21, 0xBBC); // maxcount text box
|
||||
|
||||
AddImageTiled(273, 22 * i + 20 + offset, 35, 23, 0xA40); //probability text box
|
||||
AddImageTiled(274, 22 * i + 21 + offset, 33, 21, 0xBBC); //probability text box
|
||||
AddImageTiled(273, 22 * i + 20 + offset, 35, 23, 0xA40); // probability text box
|
||||
AddImageTiled(274, 22 * i + 21 + offset, 33, 21, 0xBBC); // probability text box
|
||||
|
||||
string name = "";
|
||||
string probability = "";
|
||||
|
|
@ -73,24 +73,24 @@ namespace Server.Mobiles
|
|||
}
|
||||
|
||||
AddTextEntry(75, 22 * i + 21 + offset, 156, 21, (flags & EntryFlags.InvalidType) != 0 ? 33 : 0, textindex,
|
||||
name); //creature
|
||||
AddTextEntry(239, 22 * i + 21 + offset, 30, 21, 0, textindex + 1, maxcount); //max count
|
||||
AddTextEntry(277, 22 * i + 21 + offset, 30, 21, 0, textindex + 2, probability); //probability
|
||||
name); // creature
|
||||
AddTextEntry(239, 22 * i + 21 + offset, 30, 21, 0, textindex + 1, maxcount); // max count
|
||||
AddTextEntry(277, 22 * i + 21 + offset, 30, 21, 0, textindex + 2, probability); // probability
|
||||
|
||||
if (entry != null && m_Entry == entry)
|
||||
{
|
||||
AddLabel(5, 22 * i + 42, 0x384, "Params");
|
||||
AddImageTiled(55, 22 * i + 42, 253, 23, 0xA40); //Parameters
|
||||
AddImageTiled(56, 22 * i + 43, 251, 21, 0xBBC); //Parameters
|
||||
AddImageTiled(55, 22 * i + 42, 253, 23, 0xA40); // Parameters
|
||||
AddImageTiled(56, 22 * i + 43, 251, 21, 0xBBC); // Parameters
|
||||
|
||||
AddLabel(5, 22 * i + 64, 0x384, "Props");
|
||||
AddImageTiled(55, 22 * i + 64, 253, 23, 0xA40); //Properties
|
||||
AddImageTiled(56, 22 * i + 65, 251, 21, 0xBBC); //Properties
|
||||
AddImageTiled(55, 22 * i + 64, 253, 23, 0xA40); // Properties
|
||||
AddImageTiled(56, 22 * i + 65, 251, 21, 0xBBC); // Properties
|
||||
|
||||
AddTextEntry(59, 22 * i + 42, 248, 21, (flags & EntryFlags.InvalidParams) != 0 ? 33 : 0, textindex + 3,
|
||||
entry.Parameters); //parameters
|
||||
entry.Parameters); // parameters
|
||||
AddTextEntry(59, 22 * i + 62, 248, 21, (flags & EntryFlags.InvalidProps) != 0 ? 33 : 0, textindex + 4,
|
||||
entry.Properties); //properties
|
||||
entry.Properties); // properties
|
||||
|
||||
offset += 44;
|
||||
}
|
||||
|
|
@ -218,73 +218,73 @@ namespace Server.Mobiles
|
|||
|
||||
switch (type)
|
||||
{
|
||||
case 0: //Cancel
|
||||
case 0: // Cancel
|
||||
return;
|
||||
case 1:
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
switch (index)
|
||||
{
|
||||
if (m_Spawner.Entries != null && m_Page > 0)
|
||||
{
|
||||
m_Page--;
|
||||
m_Entry = null;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
if (m_Spawner.Entries != null && m_Page > 0)
|
||||
{
|
||||
m_Page--;
|
||||
m_Entry = null;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
if ((m_Page + 1) * 13 <= m_Spawner.Entries?.Count)
|
||||
{
|
||||
m_Page++;
|
||||
m_Entry = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
if ((m_Page + 1) * 13 <= m_Spawner.Entries?.Count)
|
||||
{
|
||||
m_Page++;
|
||||
m_Entry = null;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: //Okay
|
||||
{
|
||||
CreateArray(info, state.Mobile, m_Spawner);
|
||||
return;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
m_Spawner.BringToHome();
|
||||
break;
|
||||
}
|
||||
case 4: // Complete respawn
|
||||
{
|
||||
m_Spawner.Respawn();
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
CreateArray(info, state.Mobile, m_Spawner);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case 2: // Okay
|
||||
{
|
||||
CreateArray(info, state.Mobile, m_Spawner);
|
||||
return;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
m_Spawner.BringToHome();
|
||||
break;
|
||||
}
|
||||
case 4: // Complete respawn
|
||||
{
|
||||
m_Spawner.Respawn();
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
CreateArray(info, state.Mobile, m_Spawner);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
int entryindex = index / 2 + m_Page * 13;
|
||||
int buttontype = index % 2;
|
||||
|
||||
if (entryindex >= 0 && entryindex < m_Spawner.Entries.Count)
|
||||
{
|
||||
SpawnerEntry entry = m_Spawner.Entries[entryindex];
|
||||
if (buttontype == 0) // Spawn creature
|
||||
m_Entry = m_Entry != entry ? entry : null;
|
||||
else // Remove creatures
|
||||
m_Spawner.RemoveSpawn(entryindex);
|
||||
}
|
||||
int entryindex = index / 2 + m_Page * 13;
|
||||
int buttontype = index % 2;
|
||||
|
||||
CreateArray(info, state.Mobile, m_Spawner);
|
||||
break;
|
||||
}
|
||||
if (entryindex >= 0 && entryindex < m_Spawner.Entries.Count)
|
||||
{
|
||||
SpawnerEntry entry = m_Spawner.Entries[entryindex];
|
||||
if (buttontype == 0) // Spawn creature
|
||||
m_Entry = m_Entry != entry ? entry : null;
|
||||
else // Remove creatures
|
||||
m_Spawner.RemoveSpawn(entryindex);
|
||||
}
|
||||
|
||||
CreateArray(info, state.Mobile, m_Spawner);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_Entry != null && m_Spawner.Entries?.Contains(m_Entry) == true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue