Removes implicit this.

This commit is contained in:
Kamron Batman 2018-09-14 12:56:58 -07:00
parent 04b4cfe75b
commit 83dcf536d8
533 changed files with 2804 additions and 2806 deletions

View file

@ -36,7 +36,7 @@ namespace Server.Accounting
/// </summary>
public void Delete()
{
for ( int i = 0; i < this.Length; ++i )
for ( int i = 0; i < Length; ++i )
{
Mobile m = this[i];
@ -235,12 +235,12 @@ namespace Server.Accounting
{
get
{
if ( this.AccessLevel != AccessLevel.Player )
if ( AccessLevel != AccessLevel.Player )
return false;
TimeSpan inactiveLength = DateTime.UtcNow - m_LastLogin;
return (inactiveLength > ((this.Count == 0) ? EmptyInactiveDuration : InactiveDuration));
return (inactiveLength > ((Count == 0) ? EmptyInactiveDuration : InactiveDuration));
}
}
@ -546,7 +546,7 @@ namespace Server.Accounting
public void RemoveYoungStatus( int message )
{
this.Young = false;
Young = false;
for ( int i = 0; i < m_Mobiles.Length; i++ )
{
@ -690,7 +690,7 @@ namespace Server.Accounting
}
m_TotalGameTime = totalGameTime;
if ( this.Young )
if ( Young )
CheckYoung();
Accounts.Add( this );
@ -871,7 +871,7 @@ namespace Server.Accounting
}
public bool HasAccess( IPAddress ipAddress ) {
AccessLevel level = Misc.AccountHandler.LockdownLevel;
AccessLevel level = AccountHandler.LockdownLevel;
if ( level > AccessLevel.Player )
{
@ -883,7 +883,7 @@ namespace Server.Accounting
}
else
{
for ( int i = 0; !hasAccess && i < this.Length; ++i )
for ( int i = 0; !hasAccess && i < Length; ++i )
{
Mobile m = this[i];
@ -954,7 +954,7 @@ namespace Server.Accounting
}
public bool CheckAccess( IPAddress ipAddress ) {
bool hasAccess = this.HasAccess( ipAddress );
bool hasAccess = HasAccess( ipAddress );
if ( hasAccess ) {
LogAccess( ipAddress );
@ -1111,7 +1111,7 @@ namespace Server.Accounting
{
int count = 0;
for ( int i = 0; i < this.Length; ++i )
for ( int i = 0; i < Length; ++i )
{
if ( this[i] != null )
++count;
@ -1192,7 +1192,7 @@ namespace Server.Accounting
public int CompareTo( object obj )
{
if ( obj is Account account )
return this.CompareTo( account );
return CompareTo( account );
throw new ArgumentException();
}

View file

@ -510,7 +510,7 @@ namespace Server.Commands
for ( int i = 0; i < subArgs.Length; ++i )
subArgs[i] = e.Arguments[i + 5];
Add.Invoke( e.Mobile, p, p2, subArgs, null, outline, false );
Invoke( e.Mobile, p, p2, subArgs, null, outline, false );
}
else
{
@ -530,7 +530,7 @@ namespace Server.Commands
for ( int i = 0; i < subArgs.Length; ++i )
subArgs[i] = e.Arguments[i + 5];
Add.Invoke( e.Mobile, p, p2, subArgs, null, outline, false );
Invoke( e.Mobile, p, p2, subArgs, null, outline, false );
}
else
{

View file

@ -2095,7 +2095,7 @@ namespace Server.Commands
if ( info.m_Declaring == null )
nsHtml.WriteLine( " <!-- DBG-ST -->"+info.LinkName( "../types/" ) + "<br>" );
using( StreamWriter typeHtml = Docs.GetWriter( info.FileName ) )
using( StreamWriter typeHtml = GetWriter( info.FileName ) )
{
typeHtml.WriteLine( "<html>" );
typeHtml.WriteLine( " <head>" );
@ -2399,7 +2399,7 @@ namespace Server.Commands
string rootType = type.Name.Substring( 0, index );
StringBuilder nameBuilder = new StringBuilder( rootType );
StringBuilder fnamBuilder = new StringBuilder( "docs/types/" + Docs.SanitizeType( rootType ) );
StringBuilder fnamBuilder = new StringBuilder( "docs/types/" + SanitizeType( rootType ) );
StringBuilder linkBuilder;
if ( DontLink( type ) )//if ( DontLink( rootType ) )
linkBuilder = new StringBuilder( "<font color=\"blue\">" + rootType + "</font>" );
@ -2421,8 +2421,8 @@ namespace Server.Commands
linkBuilder.Append( ',' );
}
string sanitizedName = Docs.SanitizeType( typeArguments[i].Name );
string aliasedName = Docs.AliasForName( sanitizedName );
string sanitizedName = SanitizeType( typeArguments[i].Name );
string aliasedName = AliasForName( sanitizedName );
nameBuilder.Append( sanitizedName );
fnamBuilder.Append( "T" );
@ -2444,15 +2444,15 @@ namespace Server.Commands
if ( name == null ) typeName = type.Name;
else typeName = name;
if ( fnam == null ) fileName = "docs/types/" + Docs.SanitizeType( type.Name ) + ".html";
if ( fnam == null ) fileName = "docs/types/" + SanitizeType( type.Name ) + ".html";
else fileName = fnam + ".html";
if ( link == null )
{
if ( DontLink( type ) ) //if ( DontLink( type.Name ) )
linkName = "<font color=\"blue\">" + Docs.SanitizeType( type.Name ) + "</font>";
linkName = "<font color=\"blue\">" + SanitizeType( type.Name ) + "</font>";
else
linkName = "<a href=\"" + "@directory@" + Docs.SanitizeType( type.Name ) + ".html\">" + Docs.SanitizeType( type.Name ) + "</a>";
linkName = "<a href=\"" + "@directory@" + SanitizeType( type.Name ) + ".html\">" + SanitizeType( type.Name ) + "</a>";
}
else linkName = link;

View file

@ -53,7 +53,7 @@ namespace Server.Commands.Generic
public bool IsValid( object obj )
{
for ( int i = 0; i < this.Count; ++i )
for ( int i = 0; i < Count; ++i )
{
if ( !this[i].IsValid( obj ) )
return false;
@ -64,7 +64,7 @@ namespace Server.Commands.Generic
public void Filter( ArrayList list )
{
for ( int i = 0; i < this.Count; ++i )
for ( int i = 0; i < Count; ++i )
this[i].Filter( list );
}

View file

@ -44,7 +44,7 @@ namespace Server.Commands.Generic
{
m_Property = property;
this.IsAscending = isAscending;
IsAscending = isAscending;
}
}

View file

@ -87,7 +87,7 @@ namespace Server.Commands.Generic
public static ObjectConditional ParseDirect( Mobile from, string[] args, int offset, int size )
{
if ( args == null || size == 0 )
return ObjectConditional.Empty;
return Empty;
int index = 0;

View file

@ -385,7 +385,7 @@ namespace Server.Commands
public override void OnCancel( NetState state )
{
state.Mobile.SendMenu( new EquipMenu( state.Mobile, m_Mobile, ViewEqTarget.GetEquip( m_Mobile ) ) );
state.Mobile.SendMenu( new EquipMenu( state.Mobile, m_Mobile, GetEquip( m_Mobile ) ) );
}
public override void OnResponse( NetState state, int index )
@ -935,7 +935,7 @@ namespace Server.Commands
[Description( "View some stats about the server." )]
public static void Stats_OnCommand( CommandEventArgs e )
{
e.Mobile.SendMessage( "Open Connections: {0}", Network.NetState.Instances.Count );
e.Mobile.SendMessage( "Open Connections: {0}", NetState.Instances.Count );
e.Mobile.SendMessage( "Mobiles: {0}", World.Mobiles.Count );
e.Mobile.SendMessage( "Items: {0}", World.Items.Count );
}

View file

@ -20,7 +20,7 @@ namespace Server.ContextMenus
}
else
{
this.Owner.From.BankBox.Open();
Owner.From.BankBox.Open();
}
}
}

View file

@ -91,7 +91,7 @@ namespace Server.Engines.BulkOrders
}
}
public override void OnResponse( Server.Network.NetState sender, RelayInfo info )
public override void OnResponse( Network.NetState sender, RelayInfo info )
{
BOBFilter f = ( m_From.UseOwnFilter ? m_From.BOBFilter : m_Book.Filter );

View file

@ -242,7 +242,7 @@ namespace Server.Engines.BulkOrders
{
}
public override void OnResponse( Server.Network.NetState sender, RelayInfo info )
public override void OnResponse( Network.NetState sender, RelayInfo info )
{
int index = info.ButtonID;

View file

@ -12,7 +12,7 @@ namespace Server.Engines.BulkOrders
private int m_Price;
private int m_Page;
public override void OnResponse( Server.Network.NetState sender, RelayInfo info )
public override void OnResponse( Network.NetState sender, RelayInfo info )
{
if ( info.ButtonID == 2 )
{

View file

@ -64,20 +64,20 @@ namespace Server.Engines.BulkOrders
else
material = BulkMaterialType.None;
this.Hue = hue;
this.AmountMax = amountMax;
this.Entries = entries;
this.RequireExceptional = reqExceptional;
this.Material = material;
Hue = hue;
AmountMax = amountMax;
Entries = entries;
RequireExceptional = reqExceptional;
Material = material;
}
public LargeSmithBOD( int amountMax, bool reqExceptional, BulkMaterialType mat, LargeBulkEntry[] entries )
{
this.Hue = 0x44E;
this.AmountMax = amountMax;
this.Entries = entries;
this.RequireExceptional = reqExceptional;
this.Material = mat;
Hue = 0x44E;
AmountMax = amountMax;
Entries = entries;
RequireExceptional = reqExceptional;
Material = mat;
}
public override List<Item> ComputeRewards( bool full )

View file

@ -59,20 +59,20 @@ namespace Server.Engines.BulkOrders
else
material = BulkMaterialType.None;
this.Hue = hue;
this.AmountMax = amountMax;
this.Entries = entries;
this.RequireExceptional = reqExceptional;
this.Material = material;
Hue = hue;
AmountMax = amountMax;
Entries = entries;
RequireExceptional = reqExceptional;
Material = material;
}
public LargeTailorBOD( int amountMax, bool reqExceptional, BulkMaterialType mat, LargeBulkEntry[] entries )
{
this.Hue = 0x483;
this.AmountMax = amountMax;
this.Entries = entries;
this.RequireExceptional = reqExceptional;
this.Material = mat;
Hue = 0x483;
AmountMax = amountMax;
Entries = entries;
RequireExceptional = reqExceptional;
Material = mat;
}
public override List<Item> ComputeRewards( bool full )

View file

@ -163,13 +163,13 @@ namespace Server.Engines.BulkOrders
private SmallSmithBOD( SmallBulkEntry entry, BulkMaterialType material, int amountMax, bool reqExceptional )
{
this.Hue = 0x44E;
this.AmountMax = amountMax;
this.Type = entry.Type;
this.Number = entry.Number;
this.Graphic = entry.Graphic;
this.RequireExceptional = reqExceptional;
this.Material = material;
Hue = 0x44E;
AmountMax = amountMax;
Type = entry.Type;
Number = entry.Number;
Graphic = entry.Graphic;
RequireExceptional = reqExceptional;
Material = material;
}
[Constructible]
@ -199,26 +199,26 @@ namespace Server.Engines.BulkOrders
SmallBulkEntry entry = entries[Utility.Random( entries.Length )];
this.Hue = hue;
this.AmountMax = amountMax;
this.Type = entry.Type;
this.Number = entry.Number;
this.Graphic = entry.Graphic;
this.RequireExceptional = reqExceptional;
this.Material = material;
Hue = hue;
AmountMax = amountMax;
Type = entry.Type;
Number = entry.Number;
Graphic = entry.Graphic;
RequireExceptional = reqExceptional;
Material = material;
}
}
public SmallSmithBOD( int amountCur, int amountMax, Type type, int number, int graphic, bool reqExceptional, BulkMaterialType mat )
{
this.Hue = 0x44E;
this.AmountMax = amountMax;
this.AmountCur = amountCur;
this.Type = type;
this.Number = number;
this.Graphic = graphic;
this.RequireExceptional = reqExceptional;
this.Material = mat;
Hue = 0x44E;
AmountMax = amountMax;
AmountCur = amountCur;
Type = type;
Number = number;
Graphic = graphic;
RequireExceptional = reqExceptional;
Material = mat;
}
public SmallSmithBOD( Serial serial ) : base( serial )

View file

@ -155,13 +155,13 @@ namespace Server.Engines.BulkOrders
private SmallTailorBOD( SmallBulkEntry entry, BulkMaterialType material, int amountMax, bool reqExceptional )
{
this.Hue = 0x483;
this.AmountMax = amountMax;
this.Type = entry.Type;
this.Number = entry.Number;
this.Graphic = entry.Graphic;
this.RequireExceptional = reqExceptional;
this.Material = material;
Hue = 0x483;
AmountMax = amountMax;
Type = entry.Type;
Number = entry.Number;
Graphic = entry.Graphic;
RequireExceptional = reqExceptional;
Material = material;
}
[Constructible]
@ -191,26 +191,26 @@ namespace Server.Engines.BulkOrders
SmallBulkEntry entry = entries[Utility.Random( entries.Length )];
this.Hue = hue;
this.AmountMax = amountMax;
this.Type = entry.Type;
this.Number = entry.Number;
this.Graphic = entry.Graphic;
this.RequireExceptional = reqExceptional;
this.Material = material;
Hue = hue;
AmountMax = amountMax;
Type = entry.Type;
Number = entry.Number;
Graphic = entry.Graphic;
RequireExceptional = reqExceptional;
Material = material;
}
}
public SmallTailorBOD( int amountCur, int amountMax, Type type, int number, int graphic, bool reqExceptional, BulkMaterialType mat )
{
this.Hue = 0x483;
this.AmountMax = amountMax;
this.AmountCur = amountCur;
this.Type = type;
this.Number = number;
this.Graphic = graphic;
this.RequireExceptional = reqExceptional;
this.Material = mat;
Hue = 0x483;
AmountMax = amountMax;
AmountCur = amountCur;
Type = type;
Number = number;
Graphic = graphic;
RequireExceptional = reqExceptional;
Material = mat;
}
public SmallTailorBOD( Serial serial ) : base( serial )

View file

@ -52,7 +52,7 @@ namespace Server.Engines.CannedEvil
if ( m_Skull != null && m_Skull.Deleted )
Skull = null;
if ( from.Map != this.Map || !from.InRange( GetWorldLocation(), 3 ) )
if ( from.Map != Map || !from.InRange( GetWorldLocation(), 3 ) )
{
from.SendLocalizedMessage( 500446 ); // That is too far away.
}
@ -79,7 +79,7 @@ namespace Server.Engines.CannedEvil
if ( m_Skull != null && m_Skull.Deleted )
Skull = null;
if ( from.Map != this.Map || !from.InRange( GetWorldLocation(), 3 ) )
if ( from.Map != Map || !from.InRange( GetWorldLocation(), 3 ) )
{
from.SendLocalizedMessage( 500446 ); // That is too far away.
}
@ -101,12 +101,12 @@ namespace Server.Engines.CannedEvil
}
else
{
if ( skull.Type == this.Type )
if ( skull.Type == Type )
{
skull.Movable = false;
skull.MoveToWorld( GetWorldTop(), this.Map );
skull.MoveToWorld( GetWorldTop(), Map );
this.Skull = skull;
Skull = skull;
}
else
{

View file

@ -55,7 +55,7 @@ namespace Server.Engines.CannedEvil
{
if ( Validate( m_Power ) && Validate( m_Enlightenment ) && Validate( m_Venom ) && Validate( m_Pain ) && Validate( m_Greed ) && Validate( m_Death ) )
{
Mobile harrower = Harrower.Spawn( new Point3D( X, Y, Z + 6 ), this.Map );
Mobile harrower = Harrower.Spawn( new Point3D( X, Y, Z + 6 ), Map );
if ( harrower == null )
return;

View file

@ -94,7 +94,7 @@ namespace Server.Engines.CannedEvil
if ( m_Region != null )
m_Region.Unregister();
if ( !Deleted && this.Map != Map.Internal )
if ( !Deleted && Map != Map.Internal )
{
m_Region = new ChampionSpawnRegion( this );
m_Region.Register();
@ -626,7 +626,7 @@ namespace Server.Engines.CannedEvil
if ( !m_ConfinedRoaming )
{
bc.Home = this.Location;
bc.Home = Location;
bc.RangeHome = (int)(Math.Sqrt( m_SpawnArea.Width * m_SpawnArea.Width + m_SpawnArea.Height * m_SpawnArea.Height )/2);
}
else
@ -684,7 +684,7 @@ namespace Server.Engines.CannedEvil
public int GetSubLevel()
{
int level = this.Level;
int level = Level;
if ( level <= Level1 )
return 0;
@ -1199,7 +1199,7 @@ namespace Server.Engines.CannedEvil
public ChampionSpawn ChampionSpawn => m_Spawn;
public ChampionSpawnRegion( ChampionSpawn spawn ) : base( null, spawn.Map, Region.Find( spawn.Location, spawn.Map ), spawn.SpawnArea )
public ChampionSpawnRegion( ChampionSpawn spawn ) : base( null, spawn.Map, Find( spawn.Location, spawn.Map ), spawn.SpawnArea )
{
m_Spawn = spawn;
}

View file

@ -122,7 +122,7 @@ namespace Server.Engines.ConPVP
if ( CantDoAnything( from ) )
return false;
if ( spell is Server.Spells.Fourth.RecallSpell )
if ( spell is Spells.Fourth.RecallSpell )
from.SendMessage( "You may not cast this spell." );
string title = null, option = null;
@ -2203,7 +2203,7 @@ namespace Server.Engines.ConPVP
public override void CheckGate(Mobile m, int range)
{
if ( DuelContext.CheckCombat( m ) )
if ( CheckCombat( m ) )
{
m.SendMessage( 0x22, "You have recently been in combat with another player and cannot use this moongate." );
}
@ -2215,7 +2215,7 @@ namespace Server.Engines.ConPVP
public override void UseGate( Mobile m )
{
if ( DuelContext.CheckCombat( m ) )
if ( CheckCombat( m ) )
{
m.SendMessage( 0x22, "You have recently been in combat with another player and cannot use this moongate." );
}

View file

@ -146,9 +146,9 @@ namespace Server.Engines.ConPVP
public void DropTo( Mobile mob, Mobile killer )
{
if ( mob != null && !mob.Deleted )
this.MoveToWorld( mob.Location, mob.Map );
MoveToWorld( mob.Location, mob.Map );
else if ( killer != null && !killer.Deleted )
this.MoveToWorld( killer.Location, killer.Map );
MoveToWorld( killer.Location, killer.Map );
else if ( m_Game != null )
m_Game.ReturnBomb();
}
@ -169,10 +169,10 @@ namespace Server.Engines.ConPVP
{
base.OnLocationChange(oldLocation);
if ( m_Flying || !Visible || m_Game == null || this.Parent != null )
if ( m_Flying || !Visible || m_Game == null || Parent != null )
return;
IPooledEnumerable<NetState> eable = this.GetClientsInRange( 0 );
IPooledEnumerable<NetState> eable = GetClientsInRange( 0 );
foreach ( NetState ns in eable )
{
Mobile m = ns.Mobile;
@ -202,9 +202,9 @@ namespace Server.Engines.ConPVP
{
m.Target = new BombTarget( this, m );
}
else if ( this.Parent == null )
else if ( Parent == null )
{
if ( m.InRange( this.Location, 1 ) && m.Location.Z != this.Z )
if ( m.InRange( Location, 1 ) && m.Location.Z != Z )
{
BRTeamInfo useTeam = m_Game.GetTeamInfo( m );
if ( useTeam == null )
@ -284,9 +284,9 @@ namespace Server.Engines.ConPVP
pt.Z += item.ItemData.CalcHeight + 1;
m_Flying = true;
this.Visible = false;
Visible = false;
m_Thrower = from;
this.MoveToWorld( this.GetWorldLocation(), from.Map );
MoveToWorld( GetWorldLocation(), from.Map );
BeginFlight( pt );
return true;
@ -294,8 +294,8 @@ namespace Server.Engines.ConPVP
private void HitObject( Point3D ballLoc, int objZ, int objHeight )
{
DoAnim( this.GetWorldLocation(), ballLoc, this.Map );
this.MoveToWorld( ballLoc );
DoAnim( GetWorldLocation(), ballLoc, Map );
MoveToWorld( ballLoc );
m_Path.Clear();
m_PathIdx = 0;
@ -326,13 +326,13 @@ namespace Server.Engines.ConPVP
private void DoAnim( Point3D start, Point3D end, Map map )
{
Effects.SendMovingEffect( new Entity( Serial.Zero, start, map ), new Entity( Serial.Zero, end, map ),
this.ItemID, 15, 0, false, false, this.Hue, 0 );
ItemID, 15, 0, false, false, Hue, 0 );
}
private void DoCatch( Mobile m )
{
m_Flying = false;
this.Visible = true;
Visible = true;
if ( m == null || !m.Alive || !m.Player || m_Game == null )
return;
@ -342,7 +342,7 @@ namespace Server.Engines.ConPVP
if ( useTeam == null )
return;
DoAnim( this.GetWorldLocation(), m.Location, m.Map );
DoAnim( GetWorldLocation(), m.Location, m.Map );
string verb = "caught";
@ -350,7 +350,7 @@ namespace Server.Engines.ConPVP
verb = "intercepted";
if ( !TakeBomb( m, useTeam, verb ) )
this.MoveToWorld( m.Location, m.Map );
MoveToWorld( m.Location, m.Map );
}
private Point3DList m_Path = new Point3DList();
@ -358,7 +358,7 @@ namespace Server.Engines.ConPVP
private void BeginFlight( Point3D dest )
{
Point3D org = this.GetWorldLocation();
Point3D org = GetWorldLocation();
org.Z += 10; // always add 10 at the start cause we're coming from a mobile's eye level
@ -483,28 +483,28 @@ namespace Server.Engines.ConPVP
int height;
bool found = false;
if ( m_PathIdx < m_Path.Count && this.Map != null && this.Map.Tiles != null && this.Map != Map.Internal )
if ( m_PathIdx < m_Path.Count && Map != null && Map.Tiles != null && Map != Map.Internal )
{
int pathCheckEnd = m_PathIdx + 5;
if ( m_Path.Count < pathCheckEnd )
pathCheckEnd = m_Path.Count;
this.Visible = false;
Visible = false;
if ( m_PathIdx > 0 ) // move to the next location
this.MoveToWorld( m_Path[m_PathIdx - 1] );
MoveToWorld( m_Path[m_PathIdx - 1] );
Point3D pTop = new Point3D( this.GetWorldLocation() ), pBottom = new Point3D( m_Path[pathCheckEnd-1] );
Point3D pTop = new Point3D( GetWorldLocation() ), pBottom = new Point3D( m_Path[pathCheckEnd-1] );
Utility.FixPoints( ref pTop, ref pBottom );
for ( int i = m_PathIdx; i < pathCheckEnd; i++ )
{
Point3D point = m_Path[i];
LandTile landTile = this.Map.Tiles.GetLandTile( point.X, point.Y );
LandTile landTile = Map.Tiles.GetLandTile( point.X, point.Y );
int landZ = 0, landAvg = 0, landTop = 0;
this.Map.GetAverageZ( point.X, point.Y, ref landZ, ref landAvg, ref landTop );
Map.GetAverageZ( point.X, point.Y, ref landZ, ref landAvg, ref landTop );
if ( landZ <= point.Z && landTop >= point.Z && !landTile.Ignored )
{
@ -512,12 +512,12 @@ namespace Server.Engines.ConPVP
return;
}
StaticTile[] statics = this.Map.Tiles.GetStaticTiles( point.X, point.Y, true );
StaticTile[] statics = Map.Tiles.GetStaticTiles( point.X, point.Y, true );
if ( landTile.ID == 0x244 && statics.Length == 0 ) // 0x244 = invalid land tile
{
bool empty = true;
IPooledEnumerable<Item> eable = this.Map.GetItemsInRange( point, 0 );
IPooledEnumerable<Item> eable = Map.GetItemsInRange( point, 0 );
foreach ( Item item in eable )
{
@ -549,7 +549,7 @@ namespace Server.Engines.ConPVP
if ( i > m_PathIdx )
point = m_Path[i-1];
else
point = this.GetWorldLocation();
point = GetWorldLocation();
HitObject( point, t.Z, height );
return;
}
@ -558,7 +558,7 @@ namespace Server.Engines.ConPVP
Rectangle2D rect = new Rectangle2D( pTop.X, pTop.Y, ( pBottom.X - pTop.X ) + 1, ( pBottom.Y - pTop.Y ) + 1 );
IPooledEnumerable<Item> area = this.Map.GetItemsInBounds( rect );
IPooledEnumerable<Item> area = Map.GetItemsInBounds( rect );
foreach ( Item i in area )
{
if ( i == this || i.ItemID >= 0x4000 )
@ -593,7 +593,7 @@ namespace Server.Engines.ConPVP
if ( j > m_PathIdx )
point = m_Path[j-1];
else
point = this.GetWorldLocation();
point = GetWorldLocation();
break;
}
}
@ -604,9 +604,9 @@ namespace Server.Engines.ConPVP
area.Free();
if ( i is BRGoal goal )
{
Point3D oldLoc = new Point3D( this.GetWorldLocation() );
Point3D oldLoc = new Point3D( GetWorldLocation() );
if ( CheckScore( goal, m_Thrower, 3 ) )
DoAnim( oldLoc, point, this.Map );
DoAnim( oldLoc, point, Map );
else
HitObject( point, loc.Z, height );
}
@ -619,7 +619,7 @@ namespace Server.Engines.ConPVP
area.Free();
IPooledEnumerable<NetState> clients = this.Map.GetClientsInBounds( rect );
IPooledEnumerable<NetState> clients = Map.GetClientsInBounds( rect );
foreach ( NetState ns in clients)
{
Mobile m = ns.Mobile;
@ -657,20 +657,20 @@ namespace Server.Engines.ConPVP
m_PathIdx = pathCheckEnd;
if ( m_PathIdx > 0 && m_PathIdx - 1 < m_Path.Count )
DoAnim( this.GetWorldLocation(), m_Path[m_PathIdx - 1], this.Map );
DoAnim( GetWorldLocation(), m_Path[m_PathIdx - 1], Map );
Timer.DelayCall( TimeSpan.FromSeconds( 0.1 ), new TimerCallback( ContinueFlight ) ).Start();
}
else
{
if ( m_PathIdx > 0 && m_PathIdx - 1 < m_Path.Count )
this.MoveToWorld( m_Path[m_PathIdx - 1] );
MoveToWorld( m_Path[m_PathIdx - 1] );
else if ( m_Path.Count > 0 )
this.MoveToWorld( m_Path.Last );
MoveToWorld( m_Path.Last );
int myZ = this.Map.GetAverageZ( this.X, this.Y );
int myZ = Map.GetAverageZ( X, Y );
StaticTile[] statics = this.Map.Tiles.GetStaticTiles( this.X, this.Y, true );
StaticTile[] statics = Map.Tiles.GetStaticTiles( X, Y, true );
for ( int j = 0; j < statics.Length; j++ )
{
StaticTile t = statics[j];
@ -678,25 +678,25 @@ namespace Server.Engines.ConPVP
ItemData id = TileData.ItemTable[t.ID & TileData.MaxItemValue];
height = id.CalcHeight;
if ( t.Z + height > myZ && t.Z + height <= this.Z )
if ( t.Z + height > myZ && t.Z + height <= Z )
myZ = t.Z + height;
}
IPooledEnumerable<Item> eable = this.GetItemsInRange( 0 );
IPooledEnumerable<Item> eable = GetItemsInRange( 0 );
foreach ( Item item in eable )
{
if ( item.Visible && item != this )
{
height = item.ItemData.CalcHeight;
if ( item.Z + height > myZ && item.Z + height <= this.Z )
if ( item.Z + height > myZ && item.Z + height <= Z )
myZ = item.Z + height;
}
}
eable.Free();
this.Z = myZ;
Z = myZ;
m_Flying = false;
this.Visible = true;
Visible = true;
m_Path.Clear();
m_PathIdx = 0;
@ -738,7 +738,7 @@ namespace Server.Engines.ConPVP
m_Game.ReturnBomb();
m_Flying = false;
this.Visible = true;
Visible = true;
m_Path.Clear();
m_PathIdx = 0;
@ -799,62 +799,62 @@ namespace Server.Engines.ConPVP
private void Remake()
{
foreach ( AddonComponent ac in this.Components )
foreach ( AddonComponent ac in Components )
{
ac.Addon = null;
ac.Delete();
}
this.Components.Clear();
Components.Clear();
// stairs
this.AddComponent( new AddonComponent( 0x74D ), -1, +1, -5 );
this.AddComponent( new AddonComponent( 0x71F ), 0, +1, -5 );
this.AddComponent( new AddonComponent( 0x74B ), +1, +1, -5 );
this.AddComponent( new AddonComponent( 0x736 ), +1, 0, -5 );
this.AddComponent( new AddonComponent( 0x74C ), +1, -1, -5 );
this.AddComponent( new AddonComponent( 0x737 ), 0, -1, -5 );
this.AddComponent( new AddonComponent( 0x74A ), -1, -1, -5 );
this.AddComponent( new AddonComponent( 0x749 ), -1, 0, -5 );
AddComponent( new AddonComponent( 0x74D ), -1, +1, -5 );
AddComponent( new AddonComponent( 0x71F ), 0, +1, -5 );
AddComponent( new AddonComponent( 0x74B ), +1, +1, -5 );
AddComponent( new AddonComponent( 0x736 ), +1, 0, -5 );
AddComponent( new AddonComponent( 0x74C ), +1, -1, -5 );
AddComponent( new AddonComponent( 0x737 ), 0, -1, -5 );
AddComponent( new AddonComponent( 0x74A ), -1, -1, -5 );
AddComponent( new AddonComponent( 0x749 ), -1, 0, -5 );
// Center Sparkle
this.AddComponent( new AddonComponent( 0x375A ), 0, 0, -1 );
AddComponent( new AddonComponent( 0x375A ), 0, 0, -1 );
if ( !m_North )
{
// Pillars
this.AddComponent( new AddonComponent( 0x0CE ), 0, +1, -2 );
this.AddComponent( new AddonComponent( 0x0CC ), 0, -1, -2 );
this.AddComponent( new AddonComponent( 0x0D0 ), 0, 0, -2 );
AddComponent( new AddonComponent( 0x0CE ), 0, +1, -2 );
AddComponent( new AddonComponent( 0x0CC ), 0, -1, -2 );
AddComponent( new AddonComponent( 0x0D0 ), 0, 0, -2 );
// Yellow parts
this.AddComponent( SetHue( new AddonComponent( 0x0DF ), 0x499 ), 0, +1, 7 );
this.AddComponent( SetHue( new AddonComponent( 0x0DF ), 0x499 ), 0, 0, 16 );
this.AddComponent( SetHue( new AddonComponent( 0x0DF ), 0x499 ), 0, -1, 7 );
AddComponent( SetHue( new AddonComponent( 0x0DF ), 0x499 ), 0, +1, 7 );
AddComponent( SetHue( new AddonComponent( 0x0DF ), 0x499 ), 0, 0, 16 );
AddComponent( SetHue( new AddonComponent( 0x0DF ), 0x499 ), 0, -1, 7 );
// Blue Sparkles
this.AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), 0, +1, 12 );
this.AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), 0, +1, -1 );
this.AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), 0, -1, 12 );
this.AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), 0, -1, -1 );
AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), 0, +1, 12 );
AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), 0, +1, -1 );
AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), 0, -1, 12 );
AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), 0, -1, -1 );
}
else
{
// Pillars
this.AddComponent( new AddonComponent( 0x0CF ), +1, 0, -2 );
this.AddComponent( new AddonComponent( 0x0CC ), -1, 0, -2 );
this.AddComponent( new AddonComponent( 0x0D1 ), 0, 0, -2 );
AddComponent( new AddonComponent( 0x0CF ), +1, 0, -2 );
AddComponent( new AddonComponent( 0x0CC ), -1, 0, -2 );
AddComponent( new AddonComponent( 0x0D1 ), 0, 0, -2 );
// Yellow parts
this.AddComponent( SetHue( new AddonComponent( 0x0DF ), 0x499 ), +1, 0, 7 );
this.AddComponent( SetHue( new AddonComponent( 0x0DF ), 0x499 ), 0, 0, 16 );
this.AddComponent( SetHue( new AddonComponent( 0x0DF ), 0x499 ), -1, 0, 7 );
AddComponent( SetHue( new AddonComponent( 0x0DF ), 0x499 ), +1, 0, 7 );
AddComponent( SetHue( new AddonComponent( 0x0DF ), 0x499 ), 0, 0, 16 );
AddComponent( SetHue( new AddonComponent( 0x0DF ), 0x499 ), -1, 0, 7 );
// Blue Sparkles
this.AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), +1, 0, 12 );
this.AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), +1, 0, -1 );
this.AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), -1, 0, 12 );
this.AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), -1, 0, -1 );
AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), +1, 0, 12 );
AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), +1, 0, -1 );
AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), -1, 0, 12 );
AddComponent( SetHue( new AddonComponent( 0x377A ), 0x84C ), -1, 0, -1 );
}
}
@ -863,9 +863,9 @@ namespace Server.Engines.ConPVP
[Constructible]
public BRGoal()
{
this.ItemID = 0x51D;
this.Hue = 0x84C;
this.Visible = true;
ItemID = 0x51D;
Hue = 0x84C;
Visible = true;
Remake();
}
@ -902,7 +902,7 @@ namespace Server.Engines.ConPVP
}
}
this.Hue = 0x84C;
Hue = 0x84C;
}
public override bool ShareHue => false;
@ -914,9 +914,9 @@ namespace Server.Engines.ConPVP
{
m_Team = value;
if ( m_Team != null && m_Team.Color != 0 )
this.Hue = m_Team.Color;
Hue = m_Team.Color;
else
this.Hue = 0x84C;
Hue = 0x84C;
}
}
@ -934,9 +934,9 @@ namespace Server.Engines.ConPVP
return false;
if ( m_Team != null && m_Team.Color != 0 )
this.Hue = m_Team.Color;
Hue = m_Team.Color;
else
this.Hue = 0x84C;
Hue = 0x84C;
if ( m.Backpack.FindItemByType( typeof( BRBomb ), true ) is BRBomb b )
b.CheckScore( this, m, 7 );
@ -1180,13 +1180,13 @@ namespace Server.Engines.ConPVP
public int CompareTo( object obj )
{
BRPlayerInfo pi = (BRPlayerInfo)obj;
int res = pi.Captures.CompareTo( this.Captures );
int res = pi.Captures.CompareTo( Captures );
if ( res == 0 )
{
res = pi.Score.CompareTo( this.Score );
res = pi.Score.CompareTo( Score );
if ( res == 0 )
res = pi.Kills.CompareTo( this.Kills );
res = pi.Kills.CompareTo( Kills );
}
return res;
}
@ -1255,13 +1255,13 @@ namespace Server.Engines.ConPVP
public int CompareTo( object obj )
{
BRTeamInfo ti = (BRTeamInfo)obj;
int res = ti.Captures.CompareTo( this.Captures );
int res = ti.Captures.CompareTo( Captures );
if ( res == 0 )
{
res = ti.Score.CompareTo( this.Score );
res = ti.Score.CompareTo( Score );
if ( res == 0 )
res = ti.Kills.CompareTo( this.Kills );
res = ti.Kills.CompareTo( Kills );
}
return res;
}
@ -1399,7 +1399,7 @@ namespace Server.Engines.ConPVP
public override string ToString()
{
if ( m_Name != null )
return String.Format( "({0}) ...", this.Name );
return String.Format( "({0}) ...", Name );
else
return "...";
}

View file

@ -268,9 +268,9 @@ namespace Server.Engines.ConPVP
}
else if ( ourTeam == useTeam )
{
if ( this.Location == m_TeamInfo.Origin && this.Map == m_TeamInfo.Game.Facet )
if ( Location == m_TeamInfo.Origin && Map == m_TeamInfo.Game.Facet )
{
from.Send( new UnicodeMessage( this.Serial, this.ItemID, MessageType.Regular, 0x3B2, 3, "ENU", this.Name, "Touch me not for I am chaste." ) );
from.Send( new UnicodeMessage( Serial, ItemID, MessageType.Regular, 0x3B2, 3, "ENU", Name, "Touch me not for I am chaste." ) );
}
else
{
@ -350,7 +350,7 @@ namespace Server.Engines.ConPVP
private void Countdown_OnTick()
{
Mobile owner = this.RootParent as Mobile;
Mobile owner = RootParent as Mobile;
switch ( m_ReturnCount )
{
@ -1055,7 +1055,7 @@ namespace Server.Engines.ConPVP
if ( hadFlag )
playerInfo.Score += 4; // fragged flag carrier
if ( mob.InRange( teamInfo.Origin, 24 ) && mob.Map == this.Facet )
if ( mob.InRange( teamInfo.Origin, 24 ) && mob.Map == Facet )
playerInfo.Score += 1; // fragged in base -- guarding
for ( int i = 0; i < m_Controller.TeamInfo.Length; ++i )

View file

@ -664,15 +664,15 @@ namespace Server.Engines.ConPVP
playerInfo.Score += 1; // base frag
// extra points for killing someone on the waypoint
if ( this.Controller.PointA != null )
if ( Controller.PointA != null )
{
if ( mob.InRange( this.Controller.PointA, 2 ) )
if ( mob.InRange( Controller.PointA, 2 ) )
playerInfo.Score += 1;
}
if ( this.Controller.PointB != null )
if ( Controller.PointB != null )
{
if ( mob.InRange( this.Controller.PointB, 2 ) )
if ( mob.InRange( Controller.PointB, 2 ) )
playerInfo.Score += 1;
}
}
@ -1058,9 +1058,9 @@ namespace Server.Engines.ConPVP
[Constructible]
public DDWayPoint()
{
this.ItemID = 0x519;
this.Visible = true;
this.Name = "SET MY NAME";
ItemID = 0x519;
Visible = true;
Name = "SET MY NAME";
AddComponent( new DDStep( 0x7A8 ), -1, -1, -5 );
AddComponent( new DDStep( 0x7A6 ), 0, -1, -5 );
@ -1130,7 +1130,7 @@ namespace Server.Engines.ConPVP
{
for (int i=0;i<Components.Count;i++)
((Item)Components[i]).Hue = UncapturableHue;
this.Hue = UncapturableHue;
Hue = UncapturableHue;
}
public void SetNonCaptureHue()
@ -1139,9 +1139,9 @@ namespace Server.Engines.ConPVP
((Item)Components[i]).Hue = NonCapturedHue;
if ( m_TeamOwner != null )
this.Hue = m_TeamOwner.Color;
Hue = m_TeamOwner.Color;
else
this.Hue = NonCapturedHue;
Hue = NonCapturedHue;
}
public void SetCaptureHue( int stage )
@ -1149,7 +1149,7 @@ namespace Server.Engines.ConPVP
if ( m_TeamOwner == null )
return;
this.Hue = m_TeamOwner.Color;
Hue = m_TeamOwner.Color;
for (int i=0;i<Components.Count;i++)
{
@ -1181,7 +1181,7 @@ namespace Server.Engines.ConPVP
{
public DDStep( int itemID ) : base( itemID )
{
this.Visible = true;
Visible = true;
}
public DDStep( Serial serial ) : base( serial )

View file

@ -536,13 +536,13 @@ namespace Server.Engines.ConPVP
public int CompareTo(object obj)
{
KHPlayerInfo pi = (KHPlayerInfo)obj;
int res = pi.Score.CompareTo(this.Score);
int res = pi.Score.CompareTo(Score);
if (res == 0)
{
res = pi.Captures.CompareTo(this.Captures);
res = pi.Captures.CompareTo(Captures);
if (res == 0)
res = pi.Kills.CompareTo(this.Kills);
res = pi.Kills.CompareTo(Kills);
}
return res;
}
@ -610,13 +610,13 @@ namespace Server.Engines.ConPVP
public int CompareTo(object obj)
{
KHTeamInfo ti = (KHTeamInfo)obj;
int res = ti.Score.CompareTo(this.Score);
int res = ti.Score.CompareTo(Score);
if (res == 0)
{
res = ti.Captures.CompareTo(this.Captures);
res = ti.Captures.CompareTo(Captures);
if (res == 0)
res = ti.Kills.CompareTo(this.Kills);
res = ti.Kills.CompareTo(Kills);
}
return res;
}
@ -730,7 +730,7 @@ namespace Server.Engines.ConPVP
public override string ToString()
{
if (m_Name != null)
return String.Format("({0}) ...", this.Name);
return String.Format("({0}) ...", Name);
else
return "...";
}

View file

@ -45,7 +45,7 @@ namespace Server.Engines.ConPVP
m_Ladder.Serialize( writer );
writer.Write( (bool) ( Server.Engines.ConPVP.Ladder.Instance == m_Ladder ) );
writer.Write( (bool) ( Ladder.Instance == m_Ladder ) );
}
public override void Deserialize( GenericReader reader )
@ -62,7 +62,7 @@ namespace Server.Engines.ConPVP
m_Ladder = new Ladder( reader );
if ( version < 1 || reader.ReadBool() )
Server.Engines.ConPVP.Ladder.Instance = m_Ladder;
Ladder.Instance = m_Ladder;
break;
}

View file

@ -13,7 +13,7 @@ namespace Server.Engines.ConPVP
{
GoLocation = goloc;
this.Disabled = !isGuarded;
Disabled = !isGuarded;
Register();
}

View file

@ -1975,7 +1975,7 @@ namespace Server.Engines.ConPVP
{
Mobile check = (Mobile) part.Players[j];
if ( check.Deleted || check.Map == null || check.Map == Map.Internal || !check.Alive || Factions.Sigil.ExistsOn( check ) || check.Region.IsPartOf( typeof( Regions.Jail ) ) )
if ( check.Deleted || check.Map == null || check.Map == Map.Internal || !check.Alive || Sigil.ExistsOn( check ) || check.Region.IsPartOf( typeof( Regions.Jail ) ) )
{
bad = true;
break;
@ -2134,7 +2134,7 @@ namespace Server.Engines.ConPVP
{
Mobile check = (Mobile) part.Players[j];
if ( check.Deleted || check.Map == null || check.Map == Map.Internal || !check.Alive || Factions.Sigil.ExistsOn( check ) || check.Region.IsPartOf( typeof( Regions.Jail ) ) )
if ( check.Deleted || check.Map == null || check.Map == Map.Internal || !check.Alive || Sigil.ExistsOn( check ) || check.Region.IsPartOf( typeof( Regions.Jail ) ) )
{
bad = true;
break;
@ -2702,7 +2702,7 @@ namespace Server.Engines.ConPVP
{
TournyParticipant p = (TournyParticipant)obj;
return p.TotalLadderXP - this.TotalLadderXP;
return p.TotalLadderXP - TotalLadderXP;
}
}

View file

@ -82,7 +82,7 @@ namespace Server.Items
base.OnAdded( parent );
if ( m_Owner == null )
m_Owner = this.RootParent as Mobile;
m_Owner = RootParent as Mobile;
}
public override void OnSingleClick( Mobile from )

View file

@ -69,7 +69,7 @@ namespace Server.Engines.Craft
{
if ( m_Recipe != null )
{
Console.WriteLine( "Warning: Attempted add of recipe #{0} to the crafting of {1} in CraftSystem {2}.", id, this.m_Type.Name, system );
Console.WriteLine( "Warning: Attempted add of recipe #{0} to the crafting of {1} in CraftSystem {2}.", id, m_Type.Name, system );
return;
}
@ -938,7 +938,7 @@ namespace Server.Engines.Craft
if ( allRequiredSkills && chance >= 0.0 )
{
if ( this.Recipe == null || !(from is PlayerMobile) || ((PlayerMobile)from).HasRecipe( this.Recipe ) )
if ( Recipe == null || !(from is PlayerMobile) || ((PlayerMobile)from).HasRecipe( Recipe ) )
{
int badCraft = craftSystem.CanCraft( from, tool, m_Type );

View file

@ -38,7 +38,7 @@ namespace Server.Engines.Craft
AddButton( 20, 125, 4005, 4007, 0, GumpButtonType.Reply, 0 );
}
public override void OnResponse( Server.Network.NetState sender, RelayInfo info )
public override void OnResponse( Network.NetState sender, RelayInfo info )
{
bool makersMark = ( info.ButtonID == 1 );

View file

@ -20,7 +20,7 @@ namespace Server.Engines.Craft
Mobile m = e.Mobile;
m.SendMessage( "Target a player to teach them all of the recipies." );
m.BeginTarget( -1, false, Server.Targeting.TargetFlags.None, new TargetCallback(
m.BeginTarget( -1, false, Targeting.TargetFlags.None, new TargetCallback(
delegate( Mobile from, object targeted )
{
if ( targeted is PlayerMobile mobile )
@ -45,7 +45,7 @@ namespace Server.Engines.Craft
Mobile m = e.Mobile;
m.SendMessage( "Target a player to have them forget all of the recipies they've learned." );
m.BeginTarget( -1, false, Server.Targeting.TargetFlags.None, new TargetCallback(
m.BeginTarget( -1, false, Targeting.TargetFlags.None, new TargetCallback(
delegate( Mobile from, object targeted )
{
if ( targeted is PlayerMobile mobile )

View file

@ -470,13 +470,13 @@ namespace Server.Engines.Craft
public override Item CompleteCraft( out int message )
{
message = Verify( this.Container );
message = Verify( Container );
if ( message == 0 )
{
int trapLevel = (int)(From.Skills.Tinkering.Value / 10);
Container.TrapType = this.TrapType;
Container.TrapType = TrapType;
Container.TrapPower = trapLevel * 9;
Container.TrapLevel = trapLevel;
Container.TrapOnLockpick = true;

View file

@ -184,7 +184,7 @@ namespace Server.Engines.Doom
if ( m_Region != null )
return;
Map map = this.Map;
Map map = Map;
if ( map == null || map == Map.Internal )
return;
@ -217,7 +217,7 @@ namespace Server.Engines.Doom
public virtual void SpawnTrap()
{
Map map = this.Map;
Map map = Map;
if ( map == null )
return;
@ -248,7 +248,7 @@ namespace Server.Engines.Doom
{
int x = Utility.Random( m_RegionBounds.X, m_RegionBounds.Width );
int y = Utility.Random( m_RegionBounds.Y, m_RegionBounds.Height );
int z = this.Z;
int z = Z;
if ( !map.CanFit( x, y, z, 16, false, false ) )
z = map.GetAverageZ( x, y );
@ -269,7 +269,7 @@ namespace Server.Engines.Doom
{
int playerCount = 0;
Map map = this.Map;
Map map = Map;
if ( map != null )
{
@ -335,7 +335,7 @@ namespace Server.Engines.Doom
item.Delete();
else if ( obj is Mobile mob )
{
mob.MoveToWorld( GetWorldLocation(), this.Map );
mob.MoveToWorld( GetWorldLocation(), Map );
m_Creatures.Add( mob );
}
@ -669,7 +669,7 @@ namespace Server.Engines.Doom
private GauntletSpawner m_Spawner;
public GauntletRegion( GauntletSpawner spawner, Map map )
: base( null, map, Region.Find( spawner.Location, spawner.Map ), spawner.RegionBounds )
: base( null, map, Find( spawner.Location, spawner.Map ), spawner.RegionBounds )
{
m_Spawner = spawner;

View file

@ -19,7 +19,7 @@ namespace Server.Engines.Doom
public override void OnDoubleClick( Mobile m )
{
if ( !m.InRange( this.GetWorldLocation(), 3 ) )
if ( !m.InRange( GetWorldLocation(), 3 ) )
return;
if ( m_Controller.Enabled )
return;
@ -169,7 +169,7 @@ namespace Server.Engines.Doom
}
else
{
Server.Mobiles.BaseCreature.TeleportPets( m, LeverPuzzleController.lr_Exit, Map.Malas );
BaseCreature.TeleportPets( m, LeverPuzzleController.lr_Exit, Map.Malas );
m.MoveToWorld( LeverPuzzleController.lr_Exit, Map.Malas );
return false;
}

View file

@ -8,7 +8,7 @@ namespace Server.Engines.Doom
private LeverPuzzleController Controller;
public LampRoomRegion ( LeverPuzzleController controller )
: base( null, Map.Malas, Region.Find( LeverPuzzleController.lr_Enter, Map.Malas ), LeverPuzzleController.lr_Rect )
: base( null, Map.Malas, Find( LeverPuzzleController.lr_Enter, Map.Malas ), LeverPuzzleController.lr_Rect )
{
Controller = controller;
Register();
@ -97,7 +97,7 @@ namespace Server.Engines.Doom
}
public LeverPuzzleRegion ( LeverPuzzleController controller, int[] loc )
: base( null, Map.Malas, Region.Find( LeverPuzzleController.lr_Enter, Map.Malas ), new Rectangle2D(loc[0],loc[1],1,1) )
: base( null, Map.Malas, Find( LeverPuzzleController.lr_Enter, Map.Malas ), new Rectangle2D(loc[0],loc[1],1,1) )
{
Controller = controller;
Register();

View file

@ -32,8 +32,8 @@ namespace Server.Ethics
writer.Write( (int) 0 ); // version
for ( int i = 0; i < Ethics.Ethic.Ethics.Length; ++i )
Ethics.Ethic.Ethics[i].Serialize( writer );
for ( int i = 0; i < Ethic.Ethics.Length; ++i )
Ethic.Ethics[i].Serialize( writer );
}
public override void Deserialize( GenericReader reader )
@ -46,8 +46,8 @@ namespace Server.Ethics
{
case 0:
{
for ( int i = 0; i < Ethics.Ethic.Ethics.Length; ++i )
Ethics.Ethic.Ethics[i].Deserialize( reader );
for ( int i = 0; i < Ethic.Ethics.Length; ++i )
Ethic.Ethics[i].Deserialize( reader );
break;
}

View file

@ -13,7 +13,7 @@ namespace Server.Ethics
if ( from.Power < m_Definition.Power )
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You lack the power to invoke this ability." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You lack the power to invoke this ability." );
return false;
}

View file

@ -62,7 +62,7 @@ namespace Server.Ethics.Evil
Effects.PlaySound( p, from.Mobile.Map, 0x1FB );
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You curse the area." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You curse the area." );
FinishInvoke( from );
}

View file

@ -22,7 +22,7 @@ namespace Server.Ethics.Evil
if ( from.Familiar != null )
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You already have an unholy familiar." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You already have an unholy familiar." );
return;
}
@ -34,7 +34,7 @@ namespace Server.Ethics.Evil
UnholyFamiliar familiar = new UnholyFamiliar();
if ( Mobiles.BaseCreature.Summon( familiar, from.Mobile, from.Mobile.Location, 0x217, TimeSpan.FromHours( 1.0 ) ) )
if ( BaseCreature.Summon( familiar, from.Mobile, from.Mobile.Location, 0x217, TimeSpan.FromHours( 1.0 ) ) )
{
from.Familiar = familiar;

View file

@ -27,19 +27,19 @@ namespace Server.Ethics.Evil
if ( !(obj is Item item) )
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You may not imbue that." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You may not imbue that." );
return;
}
if ( item.Parent != from.Mobile )
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You may only imbue items you are wearing." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You may only imbue items you are wearing." );
return;
}
if ( ( item.SavedFlags & 0x300 ) != 0 )
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "That has already beem imbued." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "That has already beem imbued." );
return;
}
@ -60,7 +60,7 @@ namespace Server.Ethics.Evil
}
else
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You may not imbue that." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You may not imbue that." );
}
}
}

View file

@ -85,7 +85,7 @@ namespace Server.Ethics.Evil
sb.Append( '.' );
}
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x59, false, sb.ToString() );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x59, false, sb.ToString() );
FinishInvoke( from );
}

View file

@ -16,13 +16,13 @@ namespace Server.Ethics.Evil
{
if ( from.IsShielded )
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You are already under the protection of an unholy shield." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You are already under the protection of an unholy shield." );
return;
}
from.BeginShield();
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You are now under the protection of an unholy shield." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You are now under the protection of an unholy shield." );
FinishInvoke( from );
}

View file

@ -21,7 +21,7 @@ namespace Server.Ethics.Evil
if ( from.Steed != null )
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You already have an unholy steed." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You already have an unholy steed." );
return;
}

View file

@ -63,7 +63,7 @@ namespace Server.Ethics.Hero
Effects.PlaySound( p, from.Mobile.Map, 0x299 );
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You consecrate the area." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You consecrate the area." );
FinishInvoke( from );
}

View file

@ -27,19 +27,19 @@ namespace Server.Ethics.Hero
if ( !(obj is Item item) )
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You may not imbue that." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You may not imbue that." );
return;
}
if ( item.Parent != from.Mobile )
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You may only imbue items you are wearing." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You may only imbue items you are wearing." );
return;
}
if ( ( item.SavedFlags & 0x300 ) != 0 )
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "That has already beem imbued." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "That has already beem imbued." );
return;
}
@ -60,7 +60,7 @@ namespace Server.Ethics.Hero
}
else
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You may not imbue that." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You may not imbue that." );
}
}
}

View file

@ -85,7 +85,7 @@ namespace Server.Ethics.Hero
sb.Append( '.' );
}
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x59, false, sb.ToString() );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x59, false, sb.ToString() );
FinishInvoke( from );
}

View file

@ -16,13 +16,13 @@ namespace Server.Ethics.Hero
{
if ( from.IsShielded )
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You are already under the protection of a holy shield." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You are already under the protection of a holy shield." );
return;
}
from.BeginShield();
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You are now under the protection of a holy shield." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You are now under the protection of a holy shield." );
FinishInvoke( from );
}

View file

@ -21,7 +21,7 @@ namespace Server.Ethics.Hero
if ( from.Steed != null )
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You already have a holy steed." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You already have a holy steed." );
return;
}

View file

@ -22,7 +22,7 @@ namespace Server.Ethics.Hero
if ( from.Familiar != null )
{
from.Mobile.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, false, "You already have a holy familiar." );
from.Mobile.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, false, "You already have a holy familiar." );
return;
}
@ -34,7 +34,7 @@ namespace Server.Ethics.Hero
HolyFamiliar familiar = new HolyFamiliar();
if ( Mobiles.BaseCreature.Summon( familiar, from.Mobile, from.Mobile.Location, 0x217, TimeSpan.FromHours( 1.0 ) ) )
if ( BaseCreature.Summon( familiar, from.Mobile, from.Mobile.Location, 0x217, TimeSpan.FromHours( 1.0 ) ) )
{
from.Familiar = familiar;

View file

@ -592,7 +592,7 @@ namespace Server.Factions
sigils[i].ReturnHome();
}
List<Faction> factions = Faction.Factions;
List<Faction> factions = Factions;
for ( int i = 0; i < factions.Count; ++i )
{
@ -644,7 +644,7 @@ namespace Server.Factions
sigils[i].ReturnHome();
}
List<Faction> factions = Faction.Factions;
List<Faction> factions = Factions;
for ( int i = 0; i < factions.Count; ++i )
{
@ -997,7 +997,7 @@ namespace Server.Factions
if ( smallest == null )
return true; // sanity
if ( StabilityFactor > 0 && (((this.Members.Count + influx) * 100) / StabilityFactor) > smallest.Members.Count )
if ( StabilityFactor > 0 && (((Members.Count + influx) * 100) / StabilityFactor) > smallest.Members.Count )
return false;
return true;
@ -1052,7 +1052,7 @@ namespace Server.Factions
{
Faction victimFaction = bc.FactionAllegiance;
if ( bc.Map == Faction.Facet && victimFaction != null && killerState.Faction != victimFaction )
if ( bc.Map == Facet && victimFaction != null && killerState.Faction != victimFaction )
{
int silver = killerState.Faction.AwardSilver( killer, bc.FactionSilverWorth );
@ -1061,7 +1061,7 @@ namespace Server.Factions
}
#region Ethics
if ( bc.Map == Faction.Facet && bc.GetEthicAllegiance( killer ) == BaseCreature.Allegiance.Enemy )
if ( bc.Map == Facet && bc.GetEthicAllegiance( killer ) == BaseCreature.Allegiance.Enemy )
{
Ethics.Player killerEPL = Ethics.Player.Find( killer );

View file

@ -26,7 +26,7 @@ namespace Server.Factions
get
{
if ( m_Factions == null )
Reflector.ProcessTypes();
ProcessTypes();
return m_Factions;
}

View file

@ -13,7 +13,7 @@ namespace Server.Factions
set => m_Faction = value;
}
public StrongholdRegion( Faction faction ) : base( faction.Definition.FriendlyName, Faction.Facet, Region.DefaultPriority, faction.Definition.Stronghold.Area )
public StrongholdRegion( Faction faction ) : base( faction.Definition.FriendlyName, Faction.Facet, DefaultPriority, faction.Definition.Stronghold.Area )
{
m_Faction = faction;

View file

@ -436,7 +436,7 @@ namespace Server.Factions
Sheriff = null;
Finance = null;
TownMonolith monolith = this.Monolith;
TownMonolith monolith = Monolith;
if ( monolith != null )
monolith.Faction = f;

View file

@ -15,7 +15,7 @@ namespace Server {
public override bool Use( Mobile from ) {
if ( Faction.ClearSkillLoss( from ) ) {
from.LocalOverheadMessage( Server.Network.MessageType.Regular, 2219, false, "The gem shatters as you invoke its power." );
from.LocalOverheadMessage( Network.MessageType.Regular, 2219, false, "The gem shatters as you invoke its power." );
from.PlaySound( 909 );
from.FixedEffect( 0x373A, 10, 30 );

View file

@ -23,7 +23,7 @@ namespace Server {
_screamed = true;
_mobile.PlaySound( _mobile.Female ? 814 : 1088 );
_mobile.PublicOverheadMessage( Server.Network.MessageType.Regular, 2118, false, "Aaaaah!" );
_mobile.PublicOverheadMessage( Network.MessageType.Regular, 2118, false, "Aaaaah!" );
}
_mobile.Damage( Utility.Dice( 2, 6, 0 ) );
@ -82,7 +82,7 @@ namespace Server {
killer.SendSound( 1470 );
killer.LocalOverheadMessage(
Server.Network.MessageType.Regular, 2119, false,
Network.MessageType.Regular, 2119, false,
"You notice a strange item on the corpse, and decide to pick it up."
);
@ -110,14 +110,14 @@ namespace Server {
} else if ( from is PlayerMobile mobile && mobile.DuelContext != null ) {
mobile.SendMessage( "You can't use that." );
} else if ( Faction.Find( from ) == null ) {
from.LocalOverheadMessage( Server.Network.MessageType.Regular, 2119, false, "The object vanishes from your hands as you touch it." );
from.LocalOverheadMessage( Network.MessageType.Regular, 2119, false, "The object vanishes from your hands as you touch it." );
Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), delegate {
from.LocalOverheadMessage( Server.Network.MessageType.Regular, 2118, false, "You feel a strange tingling sensation throughout your body." );
from.LocalOverheadMessage( Network.MessageType.Regular, 2118, false, "You feel a strange tingling sensation throughout your body." );
} );
Timer.DelayCall( TimeSpan.FromSeconds( 4.0 ), delegate {
from.LocalOverheadMessage( Server.Network.MessageType.Regular, 2118, false, "Your skin begins to burn." );
from.LocalOverheadMessage( Network.MessageType.Regular, 2118, false, "Your skin begins to burn." );
} );
new DestructionTimer( from ).Start();

View file

@ -17,9 +17,9 @@ namespace Server {
}
public override bool Use( Mobile user ) {
if ( this.Movable ) {
user.BeginTarget( 12, true, Server.Targeting.TargetFlags.None, delegate( Mobile from, object obj ) {
if ( this.Movable && !this.Deleted ) {
if ( Movable ) {
user.BeginTarget( 12, true, Targeting.TargetFlags.None, delegate( Mobile from, object obj ) {
if ( Movable && !Deleted ) {
if ( obj is IPoint3D pt ) {
SpellHelper.GetSurfaceTop( ref pt );
@ -27,15 +27,15 @@ namespace Server {
Map facet = from.Map;
if ( facet != null && facet.CanFit( pt.X, pt.Y, pt.Z, 16, false, false, true ) ) {
this.Movable = false;
Movable = false;
Effects.SendMovingEffect(
from, new Entity( Serial.Zero, origin, facet ),
this.ItemID & 0x3FFF, 7, 0, false, false, this.Hue - 1, 0
ItemID & 0x3FFF, 7, 0, false, false, Hue - 1, 0
);
Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), delegate {
this.Delete();
Delete();
Effects.PlaySound( origin, facet, 530 );
Effects.PlaySound( origin, facet, 263 );

View file

@ -37,7 +37,7 @@ namespace Server {
}
if ( used ) {
from.LocalOverheadMessage( Server.Network.MessageType.Regular, 2219, false, "The urn shatters as you invoke its power." );
from.LocalOverheadMessage( Network.MessageType.Regular, 2219, false, "The urn shatters as you invoke its power." );
from.PlaySound( 64 );
Effects.PlaySound( from.Location, from.Map, 1481 );

View file

@ -263,7 +263,7 @@ namespace Server.Factions
from.SendLocalizedMessage( 1005223 ); // You cannot give the sigil to someone not in a faction
else if ( fromFaction != toFaction )
from.SendLocalizedMessage( 1005222 ); // You cannot give the sigil to someone not in your faction
else if ( Sigil.ExistsOn( targ ) )
else if ( ExistsOn( targ ) )
from.SendLocalizedMessage( 1005220 ); // You cannot give this sigil to someone who already has a sigil
else if ( !targ.Alive )
from.SendLocalizedMessage( 1042248 ); // You cannot give a sigil to a dead person.

View file

@ -74,7 +74,7 @@ namespace Server.Factions
Conceal();
DoVisibleEffect();
Effects.PlaySound( this.Location, this.Map, this.EffectSound );
Effects.PlaySound( Location, Map, EffectSound );
DoAttackEffect( from );
int silverToAward = ( from.Alive ? 20 : 40 );
@ -120,7 +120,7 @@ namespace Server.Factions
{
foreach( Item item in m.GetItemsInRange( p, 0 ) )
{
if ( item is BaseFactionTrap trap && trap.Faction == this.Faction )
if ( item is BaseFactionTrap trap && trap.Faction == Faction )
return 1075263; // There is already a trap belonging to your faction at this location.;
}
}

View file

@ -15,7 +15,7 @@ namespace Server.Factions
public override void DoVisibleEffect()
{
Effects.SendLocationEffect( this.Location, this.Map, 0x3709, 28, 10, 0x1D3, 5 );
Effects.SendLocationEffect( Location, Map, 0x3709, 28, 10, 0x1D3, 5 );
}
public override void DoAttackEffect( Mobile m )

View file

@ -15,7 +15,7 @@ namespace Server.Factions
public override void DoVisibleEffect()
{
Effects.SendLocationEffect( this.Location, this.Map, 0x11AD, 25, 10 );
Effects.SendLocationEffect( Location, Map, 0x11AD, 25, 10 );
}
public override void DoAttackEffect( Mobile m )

View file

@ -15,7 +15,7 @@ namespace Server.Factions
public override void DoVisibleEffect()
{
Effects.SendLocationEffect( this.Location, this.Map, 0x11A4, 12, 6 );
Effects.SendLocationEffect( Location, Map, 0x11A4, 12, 6 );
}
public override void DoAttackEffect( Mobile m )

View file

@ -74,7 +74,7 @@ namespace Server.Factions
if ( pl == null )
from.SendLocalizedMessage( 1010366 ); // You cannot mount a faction war horse!
else if ( pl.Faction != this.Faction )
else if ( pl.Faction != Faction )
from.SendLocalizedMessage( 1010367 ); // You cannot ride an opposing faction's war horse!
else if ( pl.Rank.Rank < 2 )
from.SendLocalizedMessage( 1010368 ); // You must achieve a faction rank of at least two before riding a war horse!

View file

@ -147,7 +147,7 @@ namespace Server.Factions
private bool WasNamed( string speech )
{
string name = this.Name;
string name = Name;
return ( name != null && Insensitive.StartsWith( speech, name ) );
}
@ -164,17 +164,17 @@ namespace Server.Factions
{
if ( m_Town == null || !m_Town.IsSheriff( from ) )
{
this.Say( 1042189 ); // I don't work for you!
Say( 1042189 ); // I don't work for you!
}
else if ( Town.FromRegion( this.Region ) == m_Town )
else if ( Town.FromRegion( Region ) == m_Town )
{
this.Say( 1042180 ); // Your orders, sire?
Say( 1042180 ); // Your orders, sire?
m_OrdersEnd = DateTime.UtcNow + TimeSpan.FromSeconds( 10.0 );
}
}
else if ( DateTime.UtcNow < m_OrdersEnd )
{
if ( m_Town != null && m_Town.IsSheriff( from ) && Town.FromRegion( this.Region ) == m_Town )
if ( m_Town != null && m_Town.IsSheriff( from ) && Town.FromRegion( Region ) == m_Town )
{
m_OrdersEnd = DateTime.UtcNow + TimeSpan.FromSeconds( 10.0 );

View file

@ -38,12 +38,12 @@ namespace Server.Factions
public override void VendorBuy( Mobile from )
{
if ( this.Faction == null || Faction.Find( from, true ) != this.Faction )
if ( Faction == null || Faction.Find( from, true ) != Faction )
PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1042201, from.NetState ); // You are not in my faction, I cannot sell you a horse!
else if ( FactionGump.Exists( from ) )
from.SendLocalizedMessage( 1042160 ); // You already have a faction menu open.
else if ( from is PlayerMobile mobile )
mobile.SendGump( new HorseBreederGump( mobile, this.Faction ) );
mobile.SendGump( new HorseBreederGump( mobile, Faction ) );
}
public override void VendorSell( Mobile from )

View file

@ -221,11 +221,11 @@ namespace Server.Engines.Help
{
BaseHouse house = BaseHouse.FindHouseAt( from );
if ( house != null && house.IsAosRules && !from.Region.IsPartOf( typeof( Engines.ConPVP.SafeZone ) ) ) // Dueling
if ( house != null && house.IsAosRules && !from.Region.IsPartOf( typeof( ConPVP.SafeZone ) ) ) // Dueling
{
from.Location = house.BanLocation;
}
else if ( from.Region.IsPartOf( typeof( Server.Regions.Jail ) ) )
else if ( from.Region.IsPartOf( typeof( Regions.Jail ) ) )
{
from.SendLocalizedMessage( 1114345, "", 0x35 ); // You'll need a better jailbreak plan than that!
}

View file

@ -301,7 +301,7 @@ namespace Server.Engines.Help
using ( StringWriter writer = new StringWriter() )
{
writer.WriteLine( "RunUO Speech Log Page - {0}", PageQueue.GetPageTypeName( entry.Type ) );
writer.WriteLine( "RunUO Speech Log Page - {0}", GetPageTypeName( entry.Type ) );
writer.WriteLine();
writer.WriteLine( "From: '{0}', Account: '{1}'", sender.RawName, sender.Account is Account ? sender.Account.Username : "???" );

View file

@ -282,7 +282,7 @@ namespace Server.Menus.Questions
else
destMap = m_Mobile.Kills >= 5 ? Map.Felucca : Map.Trammel;
Mobiles.BaseCreature.TeleportPets( m_Mobile, dest, destMap );
BaseCreature.TeleportPets( m_Mobile, dest, destMap );
m_Mobile.MoveToWorld( dest, destMap );
}
}

View file

@ -66,7 +66,7 @@ namespace Server.Items
if ( m.InRange( this, 3 ) )
{
Server.Mobiles.BaseCreature.TeleportPets( m, m_PointDest, m_MapDest );
Mobiles.BaseCreature.TeleportPets( m, m_PointDest, m_MapDest );
m.MoveToWorld( m_PointDest, m_MapDest );
}

View file

@ -96,7 +96,7 @@ namespace Server.Mobiles
Gold gold = new Gold( Utility.RandomMinMax( 190, 230 ) );
gold.MoveToWorld( Location, Map );
Container pack = this.Backpack;
Container pack = Backpack;
if ( pack != null )
{
pack.Movable = true;

View file

@ -272,7 +272,7 @@ namespace Server.Items
{
int correctCylinders, correctColors;
if ( solution.Matches( this.Solution, out correctCylinders, out correctColors ) )
if ( solution.Matches( Solution, out correctCylinders, out correctColors ) )
{
LockPick( m );

View file

@ -115,7 +115,7 @@ namespace Server.Items
m_Step = 0;
TimeSpan delay = m_CloseTime - DateTime.UtcNow;
Timer.DelayCall( delay > TimeSpan.Zero ? delay : TimeSpan.Zero, new TimerCallback( Start ) );
DelayCall( delay > TimeSpan.Zero ? delay : TimeSpan.Zero, new TimerCallback( Start ) );
return;
}
@ -173,7 +173,7 @@ namespace Server.Items
m_CloseDelay = reader.ReadTimeSpan();
int elevation = reader.ReadEncodedInt();
this.Z -= elevation;
Z -= elevation;
}
}
}

View file

@ -22,9 +22,9 @@ namespace Server.Engines.MLQuests.Definitions
Effects.SendLocationParticles( EffectItem.Create( pm.Location, pm.Map, EffectItem.DefaultDuration ), 0, 0, 0, 0, 0, 5060, 0 );
Effects.PlaySound( pm.Location, pm.Map, 0x243 );
Effects.SendMovingParticles( new Entity( Server.Serial.Zero, new Point3D( pm.X - 6, pm.Y - 6, pm.Z + 15 ), pm.Map ), pm, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 );
Effects.SendMovingParticles( new Entity( Server.Serial.Zero, new Point3D( pm.X - 4, pm.Y - 6, pm.Z + 15 ), pm.Map ), pm, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 );
Effects.SendMovingParticles( new Entity( Server.Serial.Zero, new Point3D( pm.X - 6, pm.Y - 4, pm.Z + 15 ), pm.Map ), pm, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 );
Effects.SendMovingParticles( new Entity( Serial.Zero, new Point3D( pm.X - 6, pm.Y - 6, pm.Z + 15 ), pm.Map ), pm, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 );
Effects.SendMovingParticles( new Entity( Serial.Zero, new Point3D( pm.X - 4, pm.Y - 6, pm.Z + 15 ), pm.Map ), pm, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 );
Effects.SendMovingParticles( new Entity( Serial.Zero, new Point3D( pm.X - 6, pm.Y - 4, pm.Z + 15 ), pm.Map ), pm, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 );
Effects.SendTargetParticles( pm, 0x375A, 35, 90, 0x00, 0x00, 9502, (EffectLayer)255, 0x100 );
}

View file

@ -262,7 +262,7 @@ namespace Server.Engines.MLQuests.Gumps
public sealed class CloseRaceChanger : Packet
{
public static readonly Packet Instance = Packet.SetStatic( new CloseRaceChanger() );
public static readonly Packet Instance = SetStatic( new CloseRaceChanger() );
private CloseRaceChanger()
: base( 0xBF )

View file

@ -20,7 +20,7 @@ namespace Server.Engines.MyRunUO
{
if ( Config.Enabled )
{
Timer.DelayCall( TimeSpan.FromSeconds( 10.0 ), Config.CharacterUpdateInterval, new TimerCallback( Begin ) );
DelayCall( TimeSpan.FromSeconds( 10.0 ), Config.CharacterUpdateInterval, new TimerCallback( Begin ) );
CommandSystem.Register( "InitMyRunUO", AccessLevel.Administrator, new CommandEventHandler( InitMyRunUO_OnCommand ) );
CommandSystem.Register( "UpdateMyRunUO", AccessLevel.Administrator, new CommandEventHandler( UpdateMyRunUO_OnCommand ) );
@ -608,7 +608,7 @@ namespace Server.Engines.MyRunUO
public void CollectGuilds( DateTime endTime )
{
m_List.AddRange( Guild.List.Values );
m_List.AddRange( BaseGuild.List.Values );
m_Stage = Stage.DumpingGuilds;
m_Index = 0;
}

View file

@ -35,7 +35,7 @@ namespace Server.Engines.PartySystem
{
if ( obj is Mobile mobile )
{
Party p = Party.Get( mobile );
Party p = Get( mobile );
if ( p == null )
{
@ -57,7 +57,7 @@ namespace Server.Engines.PartySystem
public static void EventSink_PlayerDeath( PlayerDeathEventArgs e )
{
Mobile from = e.Mobile;
Party p = Party.Get( from );
Party p = Get( from );
if ( p != null )
{
@ -83,7 +83,7 @@ namespace Server.Engines.PartySystem
protected override void OnTick()
{
Party p = Party.Get( m_Mobile );
Party p = Get( m_Mobile );
if ( p == null )
return;
@ -116,7 +116,7 @@ namespace Server.Engines.PartySystem
public static void EventSink_Login( LoginEventArgs e )
{
Mobile from = e.Mobile;
Party p = Party.Get( from );
Party p = Get( from );
if ( p != null )
new RejoinTimer( from ).Start();
@ -127,7 +127,7 @@ namespace Server.Engines.PartySystem
public static void EventSink_Logout( LogoutEventArgs e )
{
Mobile from = e.Mobile;
Party p = Party.Get( from );
Party p = Get( from );
if ( p != null )
p.Remove( from );
@ -294,7 +294,7 @@ namespace Server.Engines.PartySystem
return;
}
Party p = Party.Get( from );
Party p = Get( from );
if ( p == null )
from.Party = p = new Party( from );

View file

@ -4,7 +4,7 @@ namespace Server.Engines.PartySystem
{
public static void Initialize()
{
PartyCommands.Handler = new PartyCommandHandlers();
Handler = new PartyCommandHandlers();
}
public override void OnAdd( Mobile from )

View file

@ -97,7 +97,7 @@ namespace Server.Items
from.NonlocalOverheadMessage( MessageType.Emote, 0x961, 1061915, from.Name ); // * ~1_PLAYER_NAME~ pushes a strange green thorn into the ground. *
from.BeginAction( typeof( GreenThorns ) );
new GreenThorns.EndActionTimer( from ).Start();
new EndActionTimer( from ).Start();
effect.Start();
}

View file

@ -32,7 +32,7 @@ namespace Server.Items
if ( item != this )
return base.CheckItemUse( from, item );
if ( from != this.RootParent )
if ( from != RootParent )
{
from.SendLocalizedMessage( 1042038 ); // You must have the object in your backpack to use it.
return false;
@ -59,7 +59,7 @@ namespace Server.Items
AddContext( from, new OrangePetalsContext( timer ) );
this.Consume();
Consume();
}
private static Hashtable m_Table = new Hashtable();

View file

@ -81,7 +81,7 @@ namespace Server.Engines.Plants
}
}
}
else if ( PlantBowl.IsDirtPatch( targeted ) )
else if ( IsDirtPatch( targeted ) )
{
PlantItem fullBowl = new PlantItem( false );

View file

@ -168,10 +168,10 @@ namespace Server.Engines.Plants
public bool IsGrowable => m_PlantStatus >= PlantStatus.BowlOfDirt && m_PlantStatus <= PlantStatus.Stage9;
[CommandProperty( AccessLevel.GameMaster )]
public bool IsCrossable => PlantHueInfo.IsCrossable( this.PlantHue ) && PlantTypeInfo.IsCrossable( this.PlantType );
public bool IsCrossable => PlantHueInfo.IsCrossable( PlantHue ) && PlantTypeInfo.IsCrossable( PlantType );
[CommandProperty( AccessLevel.GameMaster )]
public bool Reproduces => PlantHueInfo.CanReproduce( this.PlantHue ) && PlantTypeInfo.CanReproduce( this.PlantType );
public bool Reproduces => PlantHueInfo.CanReproduce( PlantHue ) && PlantTypeInfo.CanReproduce( PlantType );
private static ArrayList m_Instances = new ArrayList();
@ -315,7 +315,7 @@ namespace Server.Engines.Plants
if ( m_PlantStatus >= PlantStatus.DecorativePlant )
return;
Point3D loc = this.GetWorldLocation();
Point3D loc = GetWorldLocation();
if ( !from.InLOS( loc ) || !from.InRange( loc, 2 ) )
{

View file

@ -8,18 +8,18 @@ namespace Server.Engines.Quests.Ambitious
{
private static Type[] m_TypeReferenceTable = new[]
{
typeof( Ambitious.DontOfferConversation ),
typeof( Ambitious.AcceptConversation ),
typeof( Ambitious.DuringKillQueensConversation ),
typeof( Ambitious.GatherFungiConversation ),
typeof( Ambitious.DuringFungiGatheringConversation ),
typeof( Ambitious.EndConversation ),
typeof( Ambitious.FullBackpackConversation ),
typeof( Ambitious.End2Conversation ),
typeof( Ambitious.KillQueensObjective ),
typeof( Ambitious.ReturnAfterKillsObjective ),
typeof( Ambitious.GatherFungiObjective ),
typeof( Ambitious.GetRewardObjective )
typeof( DontOfferConversation ),
typeof( AcceptConversation ),
typeof( DuringKillQueensConversation ),
typeof( GatherFungiConversation ),
typeof( DuringFungiGatheringConversation ),
typeof( EndConversation ),
typeof( FullBackpackConversation ),
typeof( End2Conversation ),
typeof( KillQueensObjective ),
typeof( ReturnAfterKillsObjective ),
typeof( GatherFungiObjective ),
typeof( GetRewardObjective )
};
public override Type[] TypeReferenceTable => m_TypeReferenceTable;

View file

@ -30,9 +30,9 @@ namespace Server.Engines.Quests.Ambitious
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
this.Direction = GetDirectionTo( player );
Direction = GetDirectionTo( player );
if ( player.Quest is AmbitiousQueenQuest qs && qs.RedSolen == this.RedSolen )
if ( player.Quest is AmbitiousQueenQuest qs && qs.RedSolen == RedSolen )
{
if ( qs.IsObjectiveInProgress( typeof( KillQueensObjective ) ) )
{
@ -78,7 +78,7 @@ namespace Server.Engines.Quests.Ambitious
}
else
{
QuestSystem newQuest = new AmbitiousQueenQuest( player, this.RedSolen );
QuestSystem newQuest = new AmbitiousQueenQuest( player, RedSolen );
if ( player.Quest == null && QuestSystem.CanOfferQuest( player, typeof( AmbitiousQueenQuest ) ) )
{
@ -93,11 +93,11 @@ namespace Server.Engines.Quests.Ambitious
public override bool OnDragDrop( Mobile from, Item dropped )
{
this.Direction = GetDirectionTo( from );
Direction = GetDirectionTo( from );
if ( from is PlayerMobile player )
{
if ( player.Quest is AmbitiousQueenQuest qs && qs.RedSolen == this.RedSolen )
if ( player.Quest is AmbitiousQueenQuest qs && qs.RedSolen == RedSolen )
{
QuestObjective obj = qs.FindObjective( typeof( GatherFungiObjective ) );

View file

@ -7,49 +7,49 @@ namespace Server.Engines.Quests.Collector
{
private static Type[] m_TypeReferenceTable = new[]
{
typeof( Collector.DontOfferConversation ),
typeof( Collector.DeclineConversation ),
typeof( Collector.AcceptConversation ),
typeof( Collector.ElwoodDuringFishConversation ),
typeof( Collector.ReturnPearlsConversation ),
typeof( Collector.AlbertaPaintingConversation ),
typeof( Collector.AlbertaStoolConversation ),
typeof( Collector.AlbertaEndPaintingConversation ),
typeof( Collector.AlbertaAfterPaintingConversation ),
typeof( Collector.ElwoodDuringPainting1Conversation ),
typeof( Collector.ElwoodDuringPainting2Conversation ),
typeof( Collector.ReturnPaintingConversation ),
typeof( Collector.GabrielAutographConversation ),
typeof( Collector.GabrielNoSheetMusicConversation ),
typeof( Collector.NoSheetMusicConversation ),
typeof( Collector.GetSheetMusicConversation ),
typeof( Collector.GabrielSheetMusicConversation ),
typeof( Collector.GabrielIgnoreConversation ),
typeof( Collector.ElwoodDuringAutograph1Conversation ),
typeof( Collector.ElwoodDuringAutograph2Conversation ),
typeof( Collector.ElwoodDuringAutograph3Conversation ),
typeof( Collector.ReturnAutographConversation ),
typeof( Collector.TomasToysConversation ),
typeof( Collector.TomasDuringCollectingConversation ),
typeof( Collector.ReturnImagesConversation ),
typeof( Collector.ElwoodDuringToys1Conversation ),
typeof( Collector.ElwoodDuringToys2Conversation ),
typeof( Collector.ElwoodDuringToys3Conversation ),
typeof( Collector.FullEndConversation ),
typeof( Collector.FishPearlsObjective ),
typeof( Collector.ReturnPearlsObjective ),
typeof( Collector.FindAlbertaObjective ),
typeof( Collector.SitOnTheStoolObjective ),
typeof( Collector.ReturnPaintingObjective ),
typeof( Collector.FindGabrielObjective ),
typeof( Collector.FindSheetMusicObjective ),
typeof( Collector.ReturnSheetMusicObjective ),
typeof( Collector.ReturnAutographObjective ),
typeof( Collector.FindTomasObjective ),
typeof( Collector.CaptureImagesObjective ),
typeof( Collector.ReturnImagesObjective ),
typeof( Collector.ReturnToysObjective ),
typeof( Collector.MakeRoomObjective )
typeof( DontOfferConversation ),
typeof( DeclineConversation ),
typeof( AcceptConversation ),
typeof( ElwoodDuringFishConversation ),
typeof( ReturnPearlsConversation ),
typeof( AlbertaPaintingConversation ),
typeof( AlbertaStoolConversation ),
typeof( AlbertaEndPaintingConversation ),
typeof( AlbertaAfterPaintingConversation ),
typeof( ElwoodDuringPainting1Conversation ),
typeof( ElwoodDuringPainting2Conversation ),
typeof( ReturnPaintingConversation ),
typeof( GabrielAutographConversation ),
typeof( GabrielNoSheetMusicConversation ),
typeof( NoSheetMusicConversation ),
typeof( GetSheetMusicConversation ),
typeof( GabrielSheetMusicConversation ),
typeof( GabrielIgnoreConversation ),
typeof( ElwoodDuringAutograph1Conversation ),
typeof( ElwoodDuringAutograph2Conversation ),
typeof( ElwoodDuringAutograph3Conversation ),
typeof( ReturnAutographConversation ),
typeof( TomasToysConversation ),
typeof( TomasDuringCollectingConversation ),
typeof( ReturnImagesConversation ),
typeof( ElwoodDuringToys1Conversation ),
typeof( ElwoodDuringToys2Conversation ),
typeof( ElwoodDuringToys3Conversation ),
typeof( FullEndConversation ),
typeof( FishPearlsObjective ),
typeof( ReturnPearlsObjective ),
typeof( FindAlbertaObjective ),
typeof( SitOnTheStoolObjective ),
typeof( ReturnPaintingObjective ),
typeof( FindGabrielObjective ),
typeof( FindSheetMusicObjective ),
typeof( ReturnSheetMusicObjective ),
typeof( ReturnAutographObjective ),
typeof( FindTomasObjective ),
typeof( CaptureImagesObjective ),
typeof( ReturnImagesObjective ),
typeof( ReturnToysObjective ),
typeof( MakeRoomObjective )
};
public override Type[] TypeReferenceTable => m_TypeReferenceTable;

View file

@ -168,7 +168,7 @@ namespace Server.Engines.Quests.Collector
public override void OnClick()
{
Mobile from = Owner.From;
if ( !m_Obsidian.Deleted && m_Obsidian.Quantity >= Obsidian.m_Partial && m_Obsidian.Quantity < Obsidian.m_Completed && m_Obsidian.IsChildOf( from.Backpack ) && from.CheckAlive() )
if ( !m_Obsidian.Deleted && m_Obsidian.Quantity >= m_Partial && m_Obsidian.Quantity < m_Completed && m_Obsidian.IsChildOf( from.Backpack ) && from.CheckAlive() )
{
for ( int i = 0; i < m_Obsidian.Quantity - 1; i++ )
from.AddToBackpack( new Obsidian() );
@ -200,27 +200,27 @@ namespace Server.Engines.Quests.Collector
protected override void OnTarget( Mobile from, object targeted )
{
if ( m_Obsidian.Deleted || m_Obsidian.Quantity >= Obsidian.m_Completed || !(targeted is Item targ) )
if ( m_Obsidian.Deleted || m_Obsidian.Quantity >= m_Completed || !(targeted is Item targ) )
return;
if ( m_Obsidian.IsChildOf( from.Backpack ) && targ.IsChildOf( from.Backpack ) && targ is Obsidian targObsidian && targ != m_Obsidian )
{
if ( targObsidian.Quantity < Obsidian.m_Completed )
if ( targObsidian.Quantity < m_Completed )
{
if ( targObsidian.Quantity + m_Obsidian.Quantity <= Obsidian.m_Completed )
if ( targObsidian.Quantity + m_Obsidian.Quantity <= m_Completed )
{
targObsidian.Quantity += m_Obsidian.Quantity;
m_Obsidian.Delete();
}
else
{
int delta = Obsidian.m_Completed - targObsidian.Quantity;
int delta = m_Completed - targObsidian.Quantity;
targObsidian.Quantity += delta;
m_Obsidian.Quantity -= delta;
}
if ( targObsidian.Quantity >= Obsidian.m_Completed )
targObsidian.StatueName = Obsidian.RandomName( from );
if ( targObsidian.Quantity >= m_Completed )
targObsidian.StatueName = RandomName( from );
from.Send( new AsciiMessage( targObsidian.Serial, targObsidian.ItemID, MessageType.Regular, 0x59, 3, m_Obsidian.Name, "Something Happened." ) );

View file

@ -179,9 +179,9 @@ namespace Server.Engines.Quests.Collector
}
else
{
weapon.DamageLevel = (WeaponDamageLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
weapon.AccuracyLevel = (WeaponAccuracyLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
weapon.DurabilityLevel = (WeaponDurabilityLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
weapon.DamageLevel = (WeaponDamageLevel)RandomMinMaxScaled( 2, 3 );
weapon.AccuracyLevel = (WeaponAccuracyLevel)RandomMinMaxScaled( 2, 3 );
weapon.DurabilityLevel = (WeaponDurabilityLevel)RandomMinMaxScaled( 2, 3 );
}
bag.DropItem( weapon );
@ -204,8 +204,8 @@ namespace Server.Engines.Quests.Collector
BaseArmor armor = Loot.RandomArmorOrShield();
item = armor;
armor.ProtectionLevel = (ArmorProtectionLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
armor.Durability = (ArmorDurabilityLevel)BaseCreature.RandomMinMaxScaled( 2, 3 );
armor.ProtectionLevel = (ArmorProtectionLevel)RandomMinMaxScaled( 2, 3 );
armor.Durability = (ArmorDurabilityLevel)RandomMinMaxScaled( 2, 3 );
}
bag.DropItem( item );

View file

@ -38,7 +38,7 @@ namespace Server.Engines.Quests
return false;
}
pm.SendLocalizedMessage( this.NotWorkingMessage );
pm.SendLocalizedMessage( NotWorkingMessage );
}
return base.OnMoveOver( m );

View file

@ -97,7 +97,7 @@ namespace Server.Engines.Quests
m_PlayTimer = null;
HornOfRetreatMoongate gate = new HornOfRetreatMoongate( this.DestLoc, this.DestMap, from, this.Hue );
HornOfRetreatMoongate gate = new HornOfRetreatMoongate( DestLoc, DestMap, from, Hue );
gate.MoveToWorld( from.Location, from.Map );

View file

@ -101,12 +101,12 @@ namespace Server.Engines.Quests
public virtual void RenderMessage( BaseQuestGump gump )
{
gump.AddHtmlObject( 70, 130, 300, 100, this.Message, BaseQuestGump.Blue, false, false );
gump.AddHtmlObject( 70, 130, 300, 100, Message, BaseQuestGump.Blue, false, false );
}
public virtual void RenderProgress( BaseQuestGump gump )
{
gump.AddHtmlObject( 70, 260, 270, 100, this.Completed ? 1049077 : 1049078, BaseQuestGump.Blue, false, false );
gump.AddHtmlObject( 70, 260, 270, 100, Completed ? 1049077 : 1049078, BaseQuestGump.Blue, false, false );
}
public virtual void CheckCompletionStatus()

View file

@ -125,7 +125,7 @@ namespace Server.Engines.Quests
public virtual void BaseDeserialize( GenericReader reader )
{
Type[] referenceTable = this.TypeReferenceTable;
Type[] referenceTable = TypeReferenceTable;
int version = reader.ReadEncodedInt();
@ -177,7 +177,7 @@ namespace Server.Engines.Quests
public virtual void BaseSerialize( GenericWriter writer )
{
Type[] referenceTable = this.TypeReferenceTable;
Type[] referenceTable = TypeReferenceTable;
writer.WriteEncodedInt( (int) 0 ); // version
@ -315,7 +315,7 @@ namespace Server.Engines.Quests
{
m_From.Quest = null;
TimeSpan restartDelay = this.RestartDelay;
TimeSpan restartDelay = RestartDelay;
if ( ( completed && restartDelay > TimeSpan.Zero ) || ( !completed && restartDelay == TimeSpan.MaxValue ) )
{
@ -326,7 +326,7 @@ namespace Server.Engines.Quests
bool found = false;
Type ourQuestType = this.GetType();
Type ourQuestType = GetType();
for ( int i = 0; i < doneQuests.Count; ++i )
{

View file

@ -12,7 +12,7 @@ namespace Server.Engines.Quests.Necro
public override void OnRead()
{
Container bag = Mardoth.GetNewContainer();
Container bag = BaseQuester.GetNewContainer();
bag.DropItem( new DarkTidesHorn() );

View file

@ -7,41 +7,41 @@ namespace Server.Engines.Quests.Necro
{
private static Type[] m_TypeReferenceTable = new[]
{
typeof( Necro.AcceptConversation ),
typeof( Necro.AnimateMaabusCorpseObjective ),
typeof( Necro.BankerConversation ),
typeof( Necro.CashBankCheckObjective ),
typeof( Necro.FetchAbraxusScrollObjective ),
typeof( Necro.FindBankObjective ),
typeof( Necro.FindCallingScrollObjective ),
typeof( Necro.FindCityOfLightObjective ),
typeof( Necro.FindCrystalCaveObjective ),
typeof( Necro.FindMaabusCorpseObjective ),
typeof( Necro.FindMaabusTombObjective ),
typeof( Necro.FindMardothAboutKronusObjective ),
typeof( Necro.FindMardothAboutVaultObjective ),
typeof( Necro.FindMardothEndObjective ),
typeof( Necro.FindVaultOfSecretsObjective ),
typeof( Necro.FindWellOfTearsObjective ),
typeof( Necro.HorusConversation ),
typeof( Necro.LostCallingScrollConversation ),
typeof( Necro.MaabasConversation ),
typeof( Necro.MardothEndConversation ),
typeof( Necro.MardothKronusConversation ),
typeof( Necro.MardothVaultConversation ),
typeof( Necro.RadarConversation ),
typeof( Necro.ReadAbraxusScrollConversation ),
typeof( Necro.ReadAbraxusScrollObjective ),
typeof( Necro.ReanimateMaabusConversation ),
typeof( Necro.RetrieveAbraxusScrollObjective ),
typeof( Necro.ReturnToCrystalCaveObjective ),
typeof( Necro.SecondHorusConversation ),
typeof( Necro.SpeakCavePasswordObjective ),
typeof( Necro.UseCallingScrollObjective ),
typeof( Necro.VaultOfSecretsConversation ),
typeof( Necro.FindHorusAboutRewardObjective ),
typeof( Necro.HealConversation ),
typeof( Necro.HorusRewardConversation )
typeof( AcceptConversation ),
typeof( AnimateMaabusCorpseObjective ),
typeof( BankerConversation ),
typeof( CashBankCheckObjective ),
typeof( FetchAbraxusScrollObjective ),
typeof( FindBankObjective ),
typeof( FindCallingScrollObjective ),
typeof( FindCityOfLightObjective ),
typeof( FindCrystalCaveObjective ),
typeof( FindMaabusCorpseObjective ),
typeof( FindMaabusTombObjective ),
typeof( FindMardothAboutKronusObjective ),
typeof( FindMardothAboutVaultObjective ),
typeof( FindMardothEndObjective ),
typeof( FindVaultOfSecretsObjective ),
typeof( FindWellOfTearsObjective ),
typeof( HorusConversation ),
typeof( LostCallingScrollConversation ),
typeof( MaabasConversation ),
typeof( MardothEndConversation ),
typeof( MardothKronusConversation ),
typeof( MardothVaultConversation ),
typeof( RadarConversation ),
typeof( ReadAbraxusScrollConversation ),
typeof( ReadAbraxusScrollObjective ),
typeof( ReanimateMaabusConversation ),
typeof( RetrieveAbraxusScrollObjective ),
typeof( ReturnToCrystalCaveObjective ),
typeof( SecondHorusConversation ),
typeof( SpeakCavePasswordObjective ),
typeof( UseCallingScrollObjective ),
typeof( VaultOfSecretsConversation ),
typeof( FindHorusAboutRewardObjective ),
typeof( HealConversation ),
typeof( HorusRewardConversation )
};
public override Type[] TypeReferenceTable => m_TypeReferenceTable;

View file

@ -103,11 +103,11 @@ namespace Server.Engines.Quests.Necro
if ( m_Step == 4 )
{
int baseX = KronusScroll.m_WellOfTearsArea.X;
int baseY = KronusScroll.m_WellOfTearsArea.Y;
int width = KronusScroll.m_WellOfTearsArea.Width;
int height = KronusScroll.m_WellOfTearsArea.Height;
Map map = KronusScroll.m_WellOfTearsMap;
int baseX = m_WellOfTearsArea.X;
int baseY = m_WellOfTearsArea.Y;
int width = m_WellOfTearsArea.Width;
int height = m_WellOfTearsArea.Height;
Map map = m_WellOfTearsMap;
Effects.SendLocationParticles( EffectItem.Create( m_Player.Location, m_Player.Map, TimeSpan.FromSeconds( 1.0 ) ), 0, 0, 0, 0x13C4 );
Effects.PlaySound( m_Player.Location, m_Player.Map, 0x243 );

View file

@ -141,9 +141,9 @@ namespace Server.Engines.Quests.Necro
}
else
{
weapon.DamageLevel = (WeaponDamageLevel)BaseCreature.RandomMinMaxScaled( 2, 4 );
weapon.AccuracyLevel = (WeaponAccuracyLevel)BaseCreature.RandomMinMaxScaled( 2, 4 );
weapon.DurabilityLevel = (WeaponDurabilityLevel)BaseCreature.RandomMinMaxScaled( 2, 4 );
weapon.DamageLevel = (WeaponDamageLevel)RandomMinMaxScaled( 2, 4 );
weapon.AccuracyLevel = (WeaponAccuracyLevel)RandomMinMaxScaled( 2, 4 );
weapon.DurabilityLevel = (WeaponDurabilityLevel)RandomMinMaxScaled( 2, 4 );
}
cont.DropItem( weapon );

View file

@ -7,39 +7,39 @@ namespace Server.Engines.Quests.Ninja
{
private static Type[] m_TypeReferenceTable = new[]
{
typeof( Ninja.AcceptConversation ),
typeof( Ninja.FindZoelConversation ),
typeof( Ninja.RadarConversation ),
typeof( Ninja.EnterCaveConversation ),
typeof( Ninja.SneakPastGuardiansConversation ),
typeof( Ninja.NeedToHideConversation ),
typeof( Ninja.UseTeleporterConversation ),
typeof( Ninja.GiveZoelNoteConversation ),
typeof( Ninja.LostNoteConversation ),
typeof( Ninja.GainInnInformationConversation ),
typeof( Ninja.ReturnFromInnConversation ),
typeof( Ninja.SearchForSwordConversation ),
typeof( Ninja.HallwayWalkConversation ),
typeof( Ninja.ReturnSwordConversation ),
typeof( Ninja.SlayHenchmenConversation ),
typeof( Ninja.ContinueSlayHenchmenConversation ),
typeof( Ninja.GiveEminoSwordConversation ),
typeof( Ninja.LostSwordConversation ),
typeof( Ninja.EarnGiftsConversation ),
typeof( Ninja.EarnLessGiftsConversation ),
typeof( Ninja.FindEminoBeginObjective ),
typeof( Ninja.FindZoelObjective ),
typeof( Ninja.EnterCaveObjective ),
typeof( Ninja.SneakPastGuardiansObjective ),
typeof( Ninja.UseTeleporterObjective ),
typeof( Ninja.GiveZoelNoteObjective ),
typeof( Ninja.GainInnInformationObjective ),
typeof( Ninja.ReturnFromInnObjective ),
typeof( Ninja.SearchForSwordObjective ),
typeof( Ninja.HallwayWalkObjective ),
typeof( Ninja.ReturnSwordObjective ),
typeof( Ninja.SlayHenchmenObjective ),
typeof( Ninja.GiveEminoSwordObjective )
typeof( AcceptConversation ),
typeof( FindZoelConversation ),
typeof( RadarConversation ),
typeof( EnterCaveConversation ),
typeof( SneakPastGuardiansConversation ),
typeof( NeedToHideConversation ),
typeof( UseTeleporterConversation ),
typeof( GiveZoelNoteConversation ),
typeof( LostNoteConversation ),
typeof( GainInnInformationConversation ),
typeof( ReturnFromInnConversation ),
typeof( SearchForSwordConversation ),
typeof( HallwayWalkConversation ),
typeof( ReturnSwordConversation ),
typeof( SlayHenchmenConversation ),
typeof( ContinueSlayHenchmenConversation ),
typeof( GiveEminoSwordConversation ),
typeof( LostSwordConversation ),
typeof( EarnGiftsConversation ),
typeof( EarnLessGiftsConversation ),
typeof( FindEminoBeginObjective ),
typeof( FindZoelObjective ),
typeof( EnterCaveObjective ),
typeof( SneakPastGuardiansObjective ),
typeof( UseTeleporterObjective ),
typeof( GiveZoelNoteObjective ),
typeof( GainInnInformationObjective ),
typeof( ReturnFromInnObjective ),
typeof( SearchForSwordObjective ),
typeof( HallwayWalkObjective ),
typeof( ReturnSwordObjective ),
typeof( SlayHenchmenObjective ),
typeof( GiveEminoSwordObjective )
};
public override Type[] TypeReferenceTable => m_TypeReferenceTable;

View file

@ -23,8 +23,8 @@ namespace Server.Engines.Quests.Ninja
private void GenerateTreasure()
{
for ( int i = this.Items.Count - 1; i >= 0; i-- )
this.Items[i].Delete();
for ( int i = Items.Count - 1; i >= 0; i-- )
Items[i].Delete();
for ( int i = 0; i < 75; i++ )
{

View file

@ -17,7 +17,7 @@ namespace Server.Engines.Quests.Ninja
return true;
// If the mobile is to the north of the barrier, allow him to pass
if ( this.Y >= m.Y )
if ( Y >= m.Y )
return true;
if ( m is BaseCreature creature )
@ -25,7 +25,7 @@ namespace Server.Engines.Quests.Ninja
Mobile master = creature.GetMaster();
// Allow creatures to cross from the south to the north only if their master is near to the north
return master != null && this.Y >= master.Y && master.InRange(this, 4);
return master != null && Y >= master.Y && master.InRange(this, 4);
}
if ( m is PlayerMobile pm )

View file

@ -7,42 +7,42 @@ namespace Server.Engines.Quests.Samurai
{
private static Type[] m_TypeReferenceTable = new[]
{
typeof( Samurai.AcceptConversation ),
typeof( Samurai.RadarConversation ),
typeof( Samurai.FirstTrialIntroConversation ),
typeof( Samurai.FirstTrialKillConversation ),
typeof( Samurai.GainKarmaConversation ),
typeof( Samurai.SecondTrialIntroConversation ),
typeof( Samurai.SecondTrialAttackConversation ),
typeof( Samurai.ThirdTrialIntroConversation ),
typeof( Samurai.ThirdTrialKillConversation ),
typeof( Samurai.FourthTrialIntroConversation ),
typeof( Samurai.FourthTrialCatsConversation ),
typeof( Samurai.FifthTrialIntroConversation ),
typeof( Samurai.FifthTrialReturnConversation ),
typeof( Samurai.LostSwordConversation ),
typeof( Samurai.SixthTrialIntroConversation ),
typeof( Samurai.SeventhTrialIntroConversation ),
typeof( Samurai.EndConversation ),
typeof( Samurai.FindHaochiObjective ),
typeof( Samurai.FirstTrialIntroObjective ),
typeof( Samurai.FirstTrialKillObjective ),
typeof( Samurai.FirstTrialReturnObjective ),
typeof( Samurai.SecondTrialIntroObjective ),
typeof( Samurai.SecondTrialAttackObjective ),
typeof( Samurai.SecondTrialReturnObjective ),
typeof( Samurai.ThirdTrialIntroObjective ),
typeof( Samurai.ThirdTrialKillObjective ),
typeof( Samurai.ThirdTrialReturnObjective ),
typeof( Samurai.FourthTrialIntroObjective ),
typeof( Samurai.FourthTrialCatsObjective ),
typeof( Samurai.FourthTrialReturnObjective ),
typeof( Samurai.FifthTrialIntroObjective ),
typeof( Samurai.FifthTrialReturnObjective ),
typeof( Samurai.SixthTrialIntroObjective ),
typeof( Samurai.SixthTrialReturnObjective ),
typeof( Samurai.SeventhTrialIntroObjective ),
typeof( Samurai.SeventhTrialReturnObjective )
typeof( AcceptConversation ),
typeof( RadarConversation ),
typeof( FirstTrialIntroConversation ),
typeof( FirstTrialKillConversation ),
typeof( GainKarmaConversation ),
typeof( SecondTrialIntroConversation ),
typeof( SecondTrialAttackConversation ),
typeof( ThirdTrialIntroConversation ),
typeof( ThirdTrialKillConversation ),
typeof( FourthTrialIntroConversation ),
typeof( FourthTrialCatsConversation ),
typeof( FifthTrialIntroConversation ),
typeof( FifthTrialReturnConversation ),
typeof( LostSwordConversation ),
typeof( SixthTrialIntroConversation ),
typeof( SeventhTrialIntroConversation ),
typeof( EndConversation ),
typeof( FindHaochiObjective ),
typeof( FirstTrialIntroObjective ),
typeof( FirstTrialKillObjective ),
typeof( FirstTrialReturnObjective ),
typeof( SecondTrialIntroObjective ),
typeof( SecondTrialAttackObjective ),
typeof( SecondTrialReturnObjective ),
typeof( ThirdTrialIntroObjective ),
typeof( ThirdTrialKillObjective ),
typeof( ThirdTrialReturnObjective ),
typeof( FourthTrialIntroObjective ),
typeof( FourthTrialCatsObjective ),
typeof( FourthTrialReturnObjective ),
typeof( FifthTrialIntroObjective ),
typeof( FifthTrialReturnObjective ),
typeof( SixthTrialIntroObjective ),
typeof( SixthTrialReturnObjective ),
typeof( SeventhTrialIntroObjective ),
typeof( SeventhTrialReturnObjective )
};
public override Type[] TypeReferenceTable => m_TypeReferenceTable;

View file

@ -23,8 +23,8 @@ namespace Server.Engines.Quests.Samurai
private void GenerateTreasure()
{
for ( int i = this.Items.Count - 1; i >= 0; i-- )
this.Items[i].Delete();
for ( int i = Items.Count - 1; i >= 0; i-- )
Items[i].Delete();
for ( int i = 0; i < 75; i++ )
{

View file

@ -42,7 +42,7 @@ namespace Server.Engines.Quests.Samurai
if ( obj != null && !obj.Completed )
obj.Complete();
this.SendLocalizedMessageTo( from, 1063251 ); // You light a candle in honor.
SendLocalizedMessageTo( from, 1063251 ); // You light a candle in honor.
}
}
}

View file

@ -30,17 +30,17 @@ namespace Server.Engines.Quests.Matriarch
public override bool CanTalkTo( PlayerMobile to )
{
if ( SolenMatriarchQuest.IsFriend( to, this.RedSolen ) )
if ( SolenMatriarchQuest.IsFriend( to, RedSolen ) )
return true;
return to.Quest is SolenMatriarchQuest qs && qs.RedSolen == this.RedSolen;
return to.Quest is SolenMatriarchQuest qs && qs.RedSolen == RedSolen;
}
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
this.Direction = GetDirectionTo( player );
Direction = GetDirectionTo( player );
if ( player.Quest is SolenMatriarchQuest qs && qs.RedSolen == this.RedSolen )
if ( player.Quest is SolenMatriarchQuest qs && qs.RedSolen == RedSolen )
{
if ( qs.IsObjectiveInProgress( typeof( KillInfiltratorsObjective ) ) )
{
@ -89,9 +89,9 @@ namespace Server.Engines.Quests.Matriarch
}
}
}
else if ( SolenMatriarchQuest.IsFriend( player, this.RedSolen ) )
else if ( SolenMatriarchQuest.IsFriend( player, RedSolen ) )
{
QuestSystem newQuest = new SolenMatriarchQuest( player, this.RedSolen );
QuestSystem newQuest = new SolenMatriarchQuest( player, RedSolen );
if ( player.Quest == null && QuestSystem.CanOfferQuest( player, typeof( SolenMatriarchQuest ) ) )
{
@ -110,13 +110,13 @@ namespace Server.Engines.Quests.Matriarch
{
if ( dropped is Seed )
{
if ( player.Quest is SolenMatriarchQuest qs && qs.RedSolen == this.RedSolen )
if ( player.Quest is SolenMatriarchQuest qs && qs.RedSolen == RedSolen )
{
SayTo( player, 1054080 ); // Thank you for that plant seed. Those have such wonderful flavor.
}
else
{
QuestSystem newQuest = new SolenMatriarchQuest( player, this.RedSolen );
QuestSystem newQuest = new SolenMatriarchQuest( player, RedSolen );
if ( player.Quest == null && QuestSystem.CanOfferQuest( player, typeof( SolenMatriarchQuest ) ) )
{
@ -124,7 +124,7 @@ namespace Server.Engines.Quests.Matriarch
}
else
{
newQuest.AddConversation( new DontOfferConversation( SolenMatriarchQuest.IsFriend( player, this.RedSolen ) ) );
newQuest.AddConversation( new DontOfferConversation( SolenMatriarchQuest.IsFriend( player, RedSolen ) ) );
}
}
@ -150,7 +150,7 @@ namespace Server.Engines.Quests.Matriarch
{
if ( from is PlayerMobile pm )
{
if ( pm.Quest is SolenMatriarchQuest qs && qs.RedSolen == this.RedSolen )
if ( pm.Quest is SolenMatriarchQuest qs && qs.RedSolen == RedSolen )
{
if ( qs.IsObjectiveInProgress( typeof( ProcessFungiObjective ) ) )
{
@ -209,9 +209,9 @@ namespace Server.Engines.Quests.Matriarch
public void OnGivenFungi( PlayerMobile player, ZoogiFungus fungi )
{
this.Direction = GetDirectionTo( player );
Direction = GetDirectionTo( player );
if ( player.Quest is SolenMatriarchQuest qs && qs.RedSolen == this.RedSolen )
if ( player.Quest is SolenMatriarchQuest qs && qs.RedSolen == RedSolen )
{
QuestObjective obj = qs.FindObjective( typeof( ProcessFungiObjective ) );

Some files were not shown because too many files have changed in this diff Show more