misc generics, tweaks, OCD changes, yadda yadda
This commit is contained in:
parent
5f07f81fe1
commit
f9c2f5b04e
17 changed files with 36 additions and 45 deletions
|
|
@ -1,9 +1,8 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Multis;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Items
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
|
@ -121,7 +121,7 @@ namespace Server.Items
|
|||
|
||||
private static void DeleteAll()
|
||||
{
|
||||
ArrayList list = new ArrayList();
|
||||
List<PublicMoongate> list = new List<PublicMoongate>();
|
||||
|
||||
foreach ( Item item in World.Items.Values )
|
||||
{
|
||||
|
|
@ -129,8 +129,8 @@ namespace Server.Items
|
|||
list.Add( item );
|
||||
}
|
||||
|
||||
foreach ( Item item in list )
|
||||
item.Delete();
|
||||
foreach ( PublicMoongate pmg in list )
|
||||
pmg.Delete();
|
||||
|
||||
if ( list.Count > 0 )
|
||||
World.Broadcast( 0x35, true, "{0} moongates removed.", list.Count );
|
||||
|
|
@ -284,7 +284,7 @@ namespace Server.Items
|
|||
} );
|
||||
|
||||
public static readonly PMList[] UORLists = new PMList[] { Trammel, Felucca };
|
||||
public static readonly PMList[] UORlistsYoung = new PMList[] { Trammel };
|
||||
public static readonly PMList[] UORListsYoung = new PMList[] { Trammel };
|
||||
public static readonly PMList[] LBRLists = new PMList[] { Trammel, Felucca, Ilshenar };
|
||||
public static readonly PMList[] LBRListsYoung = new PMList[] { Trammel, Ilshenar };
|
||||
public static readonly PMList[] AOSLists = new PMList[] { Trammel, Felucca, Ilshenar, Malas };
|
||||
|
|
@ -330,7 +330,7 @@ namespace Server.Items
|
|||
else if ( (flags & 0x4) != 0 )
|
||||
checkLists = young ? PMList.LBRListsYoung : PMList.LBRLists;
|
||||
else
|
||||
checkLists = young ? PMList.UORlistsYoung : PMList.UORLists;
|
||||
checkLists = young ? PMList.UORListsYoung : PMList.UORLists;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -6,13 +6,12 @@ namespace Server.Misc
|
|||
{
|
||||
public class AccountPrompt
|
||||
{
|
||||
// This script prompts the console for a username and password when 0 accounts have been loaded
|
||||
public static void Initialize()
|
||||
{
|
||||
if ( Accounts.Count == 0 && !Core.Service )
|
||||
{
|
||||
Console.WriteLine( "This server has no accounts." );
|
||||
Console.Write( "Do you want to create an administrator account now? (y/n)" );
|
||||
Console.Write( "Do you want to create the owner account now? (y/n)" );
|
||||
|
||||
if( Console.ReadKey( true ).Key == ConsoleKey.Y )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
using Server;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Server;
|
||||
using Server.Commands;
|
||||
|
||||
namespace Server.Misc
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Multis;
|
||||
using Server.Mobiles;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Misc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Misc;
|
||||
using Server.Items;
|
||||
using Server.Accounting;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Misc
|
||||
{
|
||||
|
|
@ -15,7 +14,7 @@ namespace Server.Misc
|
|||
|
||||
public class GiftGiving
|
||||
{
|
||||
private static ArrayList m_Givers = new ArrayList();
|
||||
private static List<GiftGiver> m_Givers = new List<GiftGiver>();
|
||||
|
||||
public static void Register( GiftGiver giver )
|
||||
{
|
||||
|
|
@ -38,7 +37,7 @@ namespace Server.Misc
|
|||
|
||||
for ( int i = 0; i < m_Givers.Count; ++i )
|
||||
{
|
||||
GiftGiver giver = (GiftGiver) m_Givers[i];
|
||||
GiftGiver giver = m_Givers[i];
|
||||
|
||||
if ( now < giver.Start || now >= giver.Finish )
|
||||
continue; // not in the correct timefream
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Server;
|
||||
|
|
@ -166,7 +166,7 @@ namespace Server.Misc
|
|||
EventSink.Login += new LoginEventHandler( EventSink_Login );
|
||||
}
|
||||
|
||||
private static ArrayList m_ActivePollers = new ArrayList();
|
||||
private static List<ShardPoller> m_ActivePollers = new List<ShardPoller>();
|
||||
|
||||
private static void EventSink_Login( LoginEventArgs e )
|
||||
{
|
||||
|
|
@ -188,7 +188,7 @@ namespace Server.Misc
|
|||
|
||||
for ( int i = 0; i < m_ActivePollers.Count; ++i )
|
||||
{
|
||||
ShardPoller poller = (ShardPoller)m_ActivePollers[i];
|
||||
ShardPoller poller = m_ActivePollers[i];
|
||||
|
||||
if ( poller.Deleted || !poller.Active )
|
||||
continue;
|
||||
|
|
@ -219,7 +219,7 @@ namespace Server.Misc
|
|||
{
|
||||
object[] states = (object[])state;
|
||||
Mobile from = (Mobile)states[0];
|
||||
Queue queue = (Queue)states[1];
|
||||
Queue<ShardPoller> queue = (Queue<ShardPoller>)states[1];
|
||||
|
||||
from.SendGump( new ShardPollGump( from, this, false, queue ) );
|
||||
}
|
||||
|
|
@ -402,14 +402,14 @@ namespace Server.Misc
|
|||
private Mobile m_From;
|
||||
private ShardPoller m_Poller;
|
||||
private bool m_Editing;
|
||||
private Queue m_Polls;
|
||||
private Queue<ShardPoller> m_Polls;
|
||||
|
||||
public bool Editing{ get{ return m_Editing; } }
|
||||
|
||||
public void QueuePoll( ShardPoller poller )
|
||||
{
|
||||
if ( m_Polls == null )
|
||||
m_Polls = new Queue( 4 );
|
||||
m_Polls = new Queue<ShardPoller>( 4 );
|
||||
|
||||
m_Polls.Enqueue( poller );
|
||||
}
|
||||
|
|
@ -426,7 +426,7 @@ namespace Server.Misc
|
|||
|
||||
private const int LabelColor32 = 0xFFFFFF;
|
||||
|
||||
public ShardPollGump( Mobile from, ShardPoller poller, bool editing, Queue polls ) : base( 50, 50 )
|
||||
public ShardPollGump( Mobile from, ShardPoller poller, bool editing, Queue<ShardPoller> polls ) : base( 50, 50 )
|
||||
{
|
||||
m_From = from;
|
||||
m_Poller = poller;
|
||||
|
|
@ -522,7 +522,7 @@ namespace Server.Misc
|
|||
{
|
||||
if ( m_Polls != null && m_Polls.Count > 0 )
|
||||
{
|
||||
ShardPoller poller = (ShardPoller)m_Polls.Dequeue();
|
||||
ShardPoller poller = m_Polls.Dequeue();
|
||||
|
||||
if ( poller != null )
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( poller.SendQueuedPoll_Callback ), new object[]{ m_From, m_Polls } );
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Guilds;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
|
@ -255,9 +255,9 @@ namespace Server.SkillHandlers
|
|||
return m.Player;
|
||||
}
|
||||
|
||||
private ArrayList m_List;
|
||||
private List<Mobile> m_List;
|
||||
|
||||
private TrackWhoGump( Mobile from, ArrayList list, int range ) : base( 20, 30 )
|
||||
private TrackWhoGump( Mobile from, List<Mobile> list, int range ) : base( 20, 30 )
|
||||
{
|
||||
m_From = from;
|
||||
m_List = list;
|
||||
|
|
@ -288,7 +288,7 @@ namespace Server.SkillHandlers
|
|||
|
||||
for ( int i = 0; i < list.Count && i < 12; ++i )
|
||||
{
|
||||
Mobile m = (Mobile)list[i];
|
||||
Mobile m = list[i];
|
||||
|
||||
AddItem( 20 + ((i % 4) * 100), 20 + ((i / 4) * 155), ShrinkTable.Lookup( m ) );
|
||||
AddButton( 20 + ((i % 4) * 100), 130 + ((i / 4) * 155), 4005, 4007, i + 1, GumpButtonType.Reply, 0 );
|
||||
|
|
@ -304,7 +304,7 @@ namespace Server.SkillHandlers
|
|||
|
||||
if ( index >= 0 && index < m_List.Count && index < 12 )
|
||||
{
|
||||
Mobile m = (Mobile)m_List[index];
|
||||
Mobile m = m_List[index];
|
||||
|
||||
m_From.QuestArrow = new TrackArrow( m_From, m, m_Range * 2 );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue