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

@ -1,6 +1,6 @@
namespace Server.Items
{
[Server.Engines.Craft.Anvil]
[Engines.Craft.Anvil]
public class AnvilComponent : AddonComponent
{
[Constructible]
@ -27,7 +27,7 @@ namespace Server.Items
}
}
[Server.Engines.Craft.Forge]
[Engines.Craft.Forge]
public class ForgeComponent : AddonComponent
{
[Constructible]

View file

@ -84,7 +84,7 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( !from.InRange( this.GetWorldLocation(), 2 ) )
if ( !from.InRange( GetWorldLocation(), 2 ) )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
}

View file

@ -106,7 +106,7 @@ namespace Server.Items
public virtual BaseAddonDeed Deed => null;
Item IAddon.Deed => this.Deed;
Item IAddon.Deed => Deed;
public List<AddonComponent> Components => m_Components;
@ -240,7 +240,7 @@ namespace Server.Items
{
base.Hue = value;
if ( !Deleted && this.ShareHue && m_Components != null )
if ( !Deleted && ShareHue && m_Components != null )
{
foreach ( AddonComponent c in m_Components )
c.Hue = value;

View file

@ -18,7 +18,7 @@ namespace Server.Items
{
base.Hue = value;
if ( !Deleted && this.ShareHue && m_Components != null )
if ( !Deleted && ShareHue && m_Components != null )
{
Hue = value;
@ -47,7 +47,7 @@ namespace Server.Items
}
}
Item IAddon.Deed => this.Deed;
Item IAddon.Deed => Deed;
public virtual bool RetainDeedHue => false;
public virtual bool NeedsWall => false;

View file

@ -123,7 +123,7 @@ namespace Server.Items
BaseAddonContainer addon = m_Deed.Addon;
addon.Resource = m_Deed.Resource;
Server.Spells.SpellHelper.GetSurfaceTop( ref p );
Spells.SpellHelper.GetSurfaceTop( ref p );
BaseHouse house = null;

View file

@ -89,7 +89,7 @@ namespace Server.Items
{
BaseAddon addon = m_Deed.Addon;
Server.Spells.SpellHelper.GetSurfaceTop( ref p );
Spells.SpellHelper.GetSurfaceTop( ref p );
BaseHouse house = null;

View file

@ -5,9 +5,9 @@ namespace Server.Items
public class DartBoard : AddonComponent
{
public override bool NeedsWall => true;
public override Point3D WallPosition => this.East ? new Point3D( -1, 0, 0 ) : new Point3D( 0, -1, 0 );
public override Point3D WallPosition => East ? new Point3D( -1, 0, 0 ) : new Point3D( 0, -1, 0 );
public bool East => this.ItemID == 0x1E2F;
public bool East => ItemID == 0x1E2F;
[Constructible]
public DartBoard() : this( true )
@ -26,9 +26,9 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
Direction dir;
if ( from.Location != this.Location )
if ( from.Location != Location )
dir = from.GetDirectionTo( this );
else if ( this.East )
else if ( East )
dir = Direction.West;
else
dir = Direction.North;
@ -39,7 +39,7 @@ namespace Server.Items
if ( !from.InRange( this, 4 ) || !from.InLOS( this ) )
canThrow = false;
else if ( this.East )
else if ( East )
canThrow = ( dir == Direction.Left || dir == Direction.West || dir == Direction.Up );
else
canThrow = ( dir == Direction.Up || dir == Direction.North || dir == Direction.Right );

View file

@ -60,7 +60,7 @@ namespace Server.Items
m_Timer = null;
}
if ( state is Mobile from && !from.Deleted && !this.Deleted && IsFull )
if ( state is Mobile from && !from.Deleted && !Deleted && IsFull )
{
SackFlour flour = new SackFlour();
@ -115,7 +115,7 @@ namespace Server.Items
public void UpdateStage( FlourMillStage stage )
{
List<AddonComponent> components = this.Components;
List<AddonComponent> components = Components;
int[][] stageTable = m_StageTable;

View file

@ -46,7 +46,7 @@ namespace Server.Items
m_Timer = null;
}
if ( state is Mobile from && !from.Deleted && !this.Deleted && IsFull )
if ( state is Mobile from && !from.Deleted && !Deleted && IsFull )
{
SackFlour flour = new SackFlour();
@ -101,7 +101,7 @@ namespace Server.Items
public void UpdateStage( FlourMillStage stage )
{
List<AddonComponent> components = this.Components;
List<AddonComponent> components = Components;
int[][] stageTable = m_StageTable;

View file

@ -40,7 +40,7 @@ namespace Server.Items
public class GozaMatEastDeed : BaseAddonDeed
{
public override BaseAddon Addon => new GozaMatEastAddon( this.Hue );
public override BaseAddon Addon => new GozaMatEastAddon( Hue );
public override int LabelNumber => 1030404; // goza (east)
[Constructible]
@ -107,7 +107,7 @@ namespace Server.Items
public class GozaMatSouthDeed : BaseAddonDeed
{
public override BaseAddon Addon => new GozaMatSouthAddon( this.Hue );
public override BaseAddon Addon => new GozaMatSouthAddon( Hue );
public override int LabelNumber => 1030405; // goza (south)
[Constructible]
@ -174,7 +174,7 @@ namespace Server.Items
public class SquareGozaMatEastDeed : BaseAddonDeed
{
public override BaseAddon Addon => new SquareGozaMatEastAddon( this.Hue );
public override BaseAddon Addon => new SquareGozaMatEastAddon( Hue );
public override int LabelNumber => 1030407; // square goza (east)
[Constructible]
@ -240,7 +240,7 @@ namespace Server.Items
public class SquareGozaMatSouthDeed : BaseAddonDeed
{
public override BaseAddon Addon => new SquareGozaMatSouthAddon( this.Hue );
public override BaseAddon Addon => new SquareGozaMatSouthAddon( Hue );
public override int LabelNumber => 1030406; // square goza (south)
@ -308,7 +308,7 @@ namespace Server.Items
public class BrocadeGozaMatEastDeed : BaseAddonDeed
{
public override BaseAddon Addon => new BrocadeGozaMatEastAddon( this.Hue );
public override BaseAddon Addon => new BrocadeGozaMatEastAddon( Hue );
public override int LabelNumber => 1030408; // brocade goza (east)
[Constructible]
@ -374,7 +374,7 @@ namespace Server.Items
public class BrocadeGozaMatSouthDeed : BaseAddonDeed
{
public override BaseAddon Addon => new BrocadeGozaMatSouthAddon( this.Hue );
public override BaseAddon Addon => new BrocadeGozaMatSouthAddon( Hue );
public override int LabelNumber => 1030409; // brocade goza (south)
[Constructible]
@ -439,7 +439,7 @@ namespace Server.Items
public class BrocadeSquareGozaMatEastDeed : BaseAddonDeed
{
public override BaseAddon Addon => new BrocadeSquareGozaMatEastAddon( this.Hue );
public override BaseAddon Addon => new BrocadeSquareGozaMatEastAddon( Hue );
public override int LabelNumber => 1030411; // brocade square goza (east)
[Constructible]
@ -505,7 +505,7 @@ namespace Server.Items
public class BrocadeSquareGozaMatSouthDeed : BaseAddonDeed
{
public override BaseAddon Addon => new BrocadeSquareGozaMatSouthAddon( this.Hue );
public override BaseAddon Addon => new BrocadeSquareGozaMatSouthAddon( Hue );
public override int LabelNumber => 1030410; // brocade square goza (south)

View file

@ -41,7 +41,7 @@ namespace Server.Items
public class LargeStoneTableEastDeed : BaseAddonDeed
{
public override BaseAddon Addon => new LargeStoneTableEastAddon( this.Hue );
public override BaseAddon Addon => new LargeStoneTableEastAddon( Hue );
public override int LabelNumber => 1044511; // large stone table (east)
[Constructible]

View file

@ -41,7 +41,7 @@ namespace Server.Items
public class LargeStoneTableSouthDeed : BaseAddonDeed
{
public override BaseAddon Addon => new LargeStoneTableSouthAddon( this.Hue );
public override BaseAddon Addon => new LargeStoneTableSouthAddon( Hue );
public override int LabelNumber => 1044512; // large stone table (South)
[Constructible]

View file

@ -40,7 +40,7 @@ namespace Server.Items
public class MediumStoneTableEastDeed : BaseAddonDeed
{
public override BaseAddon Addon => new MediumStoneTableEastAddon( this.Hue );
public override BaseAddon Addon => new MediumStoneTableEastAddon( Hue );
public override int LabelNumber => 1044508; // stone table (east)
[Constructible]

View file

@ -85,7 +85,7 @@ namespace Server.Items
Map map = m_TeleDest.Map;
Point3D p = m_TeleDest.TelePoint;
Server.Mobiles.BaseCreature.TeleportPets( m, p, map );
Mobiles.BaseCreature.TeleportPets( m, p, map );
m.MoveToWorld( p, map );
}

View file

@ -31,7 +31,7 @@ namespace Server.Items
}
}
[Server.Engines.Craft.Forge]
[Engines.Craft.Forge]
public class ShrineOfWisdomComponent : AddonComponent
{
public override int LabelNumber => 1062046; // Shrine of Wisdom

View file

@ -292,40 +292,40 @@ namespace Server.Items
base.OnSingleClick( from );
if ( m_VacationLeft > 0 )
this.LabelTo( from, 1074430, m_VacationLeft.ToString() ); // Vacation days left: ~1_DAYS
LabelTo( from, 1074430, m_VacationLeft.ToString() ); // Vacation days left: ~1_DAYS
if ( m_Events.Count > 0 )
this.LabelTo( from, 1074426, m_Events.Count.ToString() ); // ~1_NUM~ event(s) to view!
LabelTo( from, 1074426, m_Events.Count.ToString() ); // ~1_NUM~ event(s) to view!
if ( m_RewardAvailable )
this.LabelTo( from, 1074362 ); // A reward is available!
LabelTo( from, 1074362 ); // A reward is available!
this.LabelTo( from, 1074247, String.Format("{0}\t{1}", m_LiveCreatures, MaxLiveCreatures) ); // Live Creatures: ~1_NUM~ / ~2_MAX~
LabelTo( from, 1074247, String.Format("{0}\t{1}", m_LiveCreatures, MaxLiveCreatures) ); // Live Creatures: ~1_NUM~ / ~2_MAX~
if ( DeadCreatures > 0 )
this.LabelTo( from, 1074248, DeadCreatures.ToString() ); // Dead Creatures: ~1_NUM~
LabelTo( from, 1074248, DeadCreatures.ToString() ); // Dead Creatures: ~1_NUM~
int decorations = Items.Count - m_LiveCreatures - DeadCreatures;
if ( decorations > 0 )
this.LabelTo( from, 1074249, (Items.Count - m_LiveCreatures - DeadCreatures).ToString() ); // Decorations: ~1_NUM~
LabelTo( from, 1074249, (Items.Count - m_LiveCreatures - DeadCreatures).ToString() ); // Decorations: ~1_NUM~
this.LabelTo( from, 1074250, "#" + FoodNumber() ); // Food state: ~1_STATE~
this.LabelTo( from, 1074251, "#" + WaterNumber() ); // Water state: ~1_STATE~
LabelTo( from, 1074250, "#" + FoodNumber() ); // Food state: ~1_STATE~
LabelTo( from, 1074251, "#" + WaterNumber() ); // Water state: ~1_STATE~
if ( m_Food.State == (int) FoodState.Dead )
this.LabelTo( from, 1074577, String.Format("{0}\t{1}", m_Food.Added, m_Food.Improve) ); // Food Added: ~1_CUR~ Needed: ~2_NEED~
LabelTo( from, 1074577, String.Format("{0}\t{1}", m_Food.Added, m_Food.Improve) ); // Food Added: ~1_CUR~ Needed: ~2_NEED~
else if ( m_Food.State == (int) FoodState.Overfed )
this.LabelTo( from, 1074577, String.Format("{0}\t{1}", m_Food.Added, m_Food.Maintain) ); // Food Added: ~1_CUR~ Needed: ~2_NEED~
LabelTo( from, 1074577, String.Format("{0}\t{1}", m_Food.Added, m_Food.Maintain) ); // Food Added: ~1_CUR~ Needed: ~2_NEED~
else
this.LabelTo( from, 1074253, String.Format("{0}\t{1}\t{2}", m_Food.Added, m_Food.Maintain, m_Food.Improve) ); // Food Added: ~1_CUR~ Feed: ~2_NEED~ Improve: ~3_GROW~
LabelTo( from, 1074253, String.Format("{0}\t{1}\t{2}", m_Food.Added, m_Food.Maintain, m_Food.Improve) ); // Food Added: ~1_CUR~ Feed: ~2_NEED~ Improve: ~3_GROW~
if ( m_Water.State == (int) WaterState.Dead )
this.LabelTo( from, 1074578, String.Format("{0}\t{1}", m_Water.Added, m_Water.Improve) ); // Water Added: ~1_CUR~ Needed: ~2_NEED~
LabelTo( from, 1074578, String.Format("{0}\t{1}", m_Water.Added, m_Water.Improve) ); // Water Added: ~1_CUR~ Needed: ~2_NEED~
else if ( m_Water.State == (int) WaterState.Strong )
this.LabelTo( from, 1074578, String.Format("{0}\t{1}", m_Water.Added, m_Water.Maintain) ); // Water Added: ~1_CUR~ Needed: ~2_NEED~
LabelTo( from, 1074578, String.Format("{0}\t{1}", m_Water.Added, m_Water.Maintain) ); // Water Added: ~1_CUR~ Needed: ~2_NEED~
else
this.LabelTo( from, 1074254, String.Format("{0}\t{1}\t{2}", m_Water.Added, m_Water.Maintain, m_Water.Improve) ); // Water Added: ~1_CUR~ Maintain: ~2_NEED~ Improve: ~3_GROW~
LabelTo( from, 1074254, String.Format("{0}\t{1}\t{2}", m_Water.Added, m_Water.Maintain, m_Water.Improve) ); // Water Added: ~1_CUR~ Maintain: ~2_NEED~ Improve: ~3_GROW~
}
public override void AddNameProperties( ObjectPropertyList list )

View file

@ -15,7 +15,7 @@ namespace Server.Items
{
Hue = 0x4F5;
ArmorAttributes.DurabilityBonus = 100;
this.HitPoints = this.MaxHitPoints = 255; //Cause the Durability bonus and such and the min/max hits as well as all other hits being whole #'s...
HitPoints = MaxHitPoints = 255; //Cause the Durability bonus and such and the min/max hits as well as all other hits being whole #'s...
Attributes.BonusStam = 8;
Attributes.AttackChance = 20;
}
@ -39,8 +39,8 @@ namespace Server.Items
if ( version <= 1 )
{
if ( this.HitPoints > 255 || this.MaxHitPoints > 255 )
this.HitPoints = this.MaxHitPoints = 255;
if ( HitPoints > 255 || MaxHitPoints > 255 )
HitPoints = MaxHitPoints = 255;
}
if ( version < 1 )

View file

@ -231,7 +231,7 @@ namespace Server.Items
m_Resource = value;
if ( CraftItem.RetainsColor( this.GetType() ) )
if ( CraftItem.RetainsColor( GetType() ) )
{
Hue = CraftResources.GetHue(m_Resource);
}
@ -414,7 +414,7 @@ namespace Server.Items
{
get
{
switch ( this.Layer )
switch ( Layer )
{
default:
case Layer.Neck: return ArmorBodyType.Gorget;
@ -1111,7 +1111,7 @@ namespace Server.Items
m_HitPoints = m_MaxHitPoints = Utility.RandomMinMax( InitMinHits, InitMaxHits );
this.Layer = (Layer)ItemData.Quality;
Layer = (Layer)ItemData.Quality;
m_AosAttributes = new AosAttributes( this );
m_AosArmorAttributes = new AosArmorAttributes( this );
@ -1213,7 +1213,7 @@ namespace Server.Items
if ( strBonus != 0 || dexBonus != 0 || intBonus != 0 )
{
string modName = this.Serial.ToString();
string modName = Serial.ToString();
if ( strBonus != 0 )
from.AddStatMod( new StatMod( StatType.Str, modName + "Str", strBonus, TimeSpan.Zero ) );
@ -1232,7 +1232,7 @@ namespace Server.Items
{
if ( parent is Mobile m )
{
string modName = this.Serial.ToString();
string modName = Serial.ToString();
m.RemoveStatMod( modName + "Str" );
m.RemoveStatMod( modName + "Dex" );
@ -1311,7 +1311,7 @@ namespace Server.Items
private string GetNameString()
{
string name = this.Name;
string name = Name;
if ( name == null )
name = String.Format( "#{0}", LabelNumber );
@ -1547,7 +1547,7 @@ namespace Server.Items
}
else
{
this.LabelTo( from, Name );
LabelTo( from, Name );
number = 1041000;
}

View file

@ -98,7 +98,7 @@ namespace Server.Items
break;
case 0:
string format = this.Name;
string format = Name;
if ( format != null )
{
@ -118,7 +118,7 @@ namespace Server.Items
}
m_PlayerName = format;
this.Name = null;
Name = null;
break;
}

View file

@ -99,7 +99,7 @@ namespace Server.Items
m_Author = author;
m_Writable = writable;
BookContent content = this.DefaultContent;
BookContent content = DefaultContent;
if ( content == null )
{
@ -119,7 +119,7 @@ namespace Server.Items
{
m_Writable = writable;
BookContent content = this.DefaultContent;
BookContent content = DefaultContent;
if ( content == null )
{
@ -159,7 +159,7 @@ namespace Server.Items
{
base.Serialize( writer );
BookContent content = this.DefaultContent;
BookContent content = DefaultContent;
SaveFlags flags = SaveFlags.None;
@ -214,7 +214,7 @@ namespace Server.Items
case 3:
case 2:
{
BookContent content = this.DefaultContent;
BookContent content = DefaultContent;
SaveFlags flags = (SaveFlags) reader.ReadByte();
@ -263,7 +263,7 @@ namespace Server.Items
}
else
{
BookContent content = this.DefaultContent;
BookContent content = DefaultContent;
if ( content != null )
m_Pages = content.Copy();
@ -325,7 +325,7 @@ namespace Server.Items
{
StringBuilder sb = new StringBuilder();
foreach( BookPageInfo bpi in this.m_Pages )
foreach( BookPageInfo bpi in m_Pages )
{
foreach( string line in bpi.Lines )
{
@ -343,7 +343,7 @@ namespace Server.Items
{
List<string> lines = new List<string>();
foreach( BookPageInfo bpi in this.m_Pages )
foreach( BookPageInfo bpi in m_Pages )
{
lines.AddRange( bpi.Lines );
}

View file

@ -267,7 +267,7 @@ namespace Server.Items
if ( strBonus == 0 && dexBonus == 0 && intBonus == 0 )
return;
string modName = this.Serial.ToString();
string modName = Serial.ToString();
if ( strBonus != 0 )
parent.AddStatMod( new StatMod( StatType.Str, modName + "Str", strBonus, TimeSpan.Zero ) );
@ -350,7 +350,7 @@ namespace Server.Items
if ( Core.AOS )
m_AosSkillBonuses.Remove();
string modName = this.Serial.ToString();
string modName = Serial.ToString();
mob.RemoveStatMod( modName + "Str" );
mob.RemoveStatMod( modName + "Dex" );
@ -498,7 +498,7 @@ namespace Server.Items
private string GetNameString()
{
string name = this.Name;
string name = Name;
if ( name == null )
name = String.Format( "#{0}", LabelNumber );
@ -673,7 +673,7 @@ namespace Server.Items
}
else
{
this.LabelTo( from, Name );
LabelTo( from, Name );
number = 1041000;
}

View file

@ -220,7 +220,7 @@ namespace Server.Items
if ( !base.CanEquip( m ) )
return false;
return !m_IsRewardItem || Engines.VeteranRewards.RewardSystem.CheckIsUsableBy( m, this, new object[]{ Hue, m_LabelNumber } );
return !m_IsRewardItem || RewardSystem.CheckIsUsableBy( m, this, new object[]{ Hue, m_LabelNumber } );
}
[Constructible]

View file

@ -405,7 +405,7 @@ namespace Server.Items
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 502502 ); // That is locked, but you open it with your godly powers.
//from.Send( new MessageLocalized( Serial, ItemID, MessageType.Regular, 0x3B2, 3, 502502, "", "" ) ); // That is locked, but you open it with your godly powers.
}
else if ( Key.ContainsKey( from.Backpack, this.KeyValue ) )
else if ( Key.ContainsKey( from.Backpack, KeyValue ) )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 501282 ); // You quickly unlock, open, and relock the door
}
@ -416,7 +416,7 @@ namespace Server.Items
else
{
if ( Hue == 0x44E && Map == Map.Malas ) // doom door into healer room in doom
this.SendLocalizedMessageTo( from, 1060014 ); // Only the dead may pass.
SendLocalizedMessageTo( from, 1060014 ); // Only the dead may pass.
else
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 502503 ); // That is locked.
@ -445,7 +445,7 @@ namespace Server.Items
{
Open = !m_Open;
BaseDoor link = this.Link;
BaseDoor link = Link;
if ( m_Open && link != null && !link.Open )
link.Open = true;

View file

@ -20,7 +20,7 @@ namespace Server.Items
public class IronGateShort : BaseDoor
{
[Constructible]
public IronGateShort( DoorFacing facing ) : base( 0x84c + (2 * (int)facing), 0x84d + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset( facing ) )
public IronGateShort( DoorFacing facing ) : base( 0x84c + (2 * (int)facing), 0x84d + (2 * (int)facing), 0xEC, 0xF3, GetOffset( facing ) )
{
}
@ -46,7 +46,7 @@ namespace Server.Items
public class IronGate : BaseDoor
{
[Constructible]
public IronGate( DoorFacing facing ) : base( 0x824 + (2 * (int)facing), 0x825 + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset( facing ) )
public IronGate( DoorFacing facing ) : base( 0x824 + (2 * (int)facing), 0x825 + (2 * (int)facing), 0xEC, 0xF3, GetOffset( facing ) )
{
}
@ -72,7 +72,7 @@ namespace Server.Items
public class LightWoodGate : BaseDoor
{
[Constructible]
public LightWoodGate( DoorFacing facing ) : base( 0x839 + (2 * (int)facing), 0x83A + (2 * (int)facing), 0xEB, 0xF2, BaseDoor.GetOffset( facing ) )
public LightWoodGate( DoorFacing facing ) : base( 0x839 + (2 * (int)facing), 0x83A + (2 * (int)facing), 0xEB, 0xF2, GetOffset( facing ) )
{
}
@ -98,7 +98,7 @@ namespace Server.Items
public class DarkWoodGate : BaseDoor
{
[Constructible]
public DarkWoodGate( DoorFacing facing ) : base( 0x866 + (2 * (int)facing), 0x867 + (2 * (int)facing), 0xEB, 0xF2, BaseDoor.GetOffset( facing ) )
public DarkWoodGate( DoorFacing facing ) : base( 0x866 + (2 * (int)facing), 0x867 + (2 * (int)facing), 0xEB, 0xF2, GetOffset( facing ) )
{
}
@ -124,7 +124,7 @@ namespace Server.Items
public class MetalDoor : BaseDoor
{
[Constructible]
public MetalDoor( DoorFacing facing ) : base( 0x675 + (2 * (int)facing), 0x676 + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset( facing ) )
public MetalDoor( DoorFacing facing ) : base( 0x675 + (2 * (int)facing), 0x676 + (2 * (int)facing), 0xEC, 0xF3, GetOffset( facing ) )
{
}
@ -150,7 +150,7 @@ namespace Server.Items
public class BarredMetalDoor : BaseDoor
{
[Constructible]
public BarredMetalDoor( DoorFacing facing ) : base( 0x685 + (2 * (int)facing), 0x686 + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset( facing ) )
public BarredMetalDoor( DoorFacing facing ) : base( 0x685 + (2 * (int)facing), 0x686 + (2 * (int)facing), 0xEC, 0xF3, GetOffset( facing ) )
{
}
@ -176,7 +176,7 @@ namespace Server.Items
public class BarredMetalDoor2 : BaseDoor
{
[Constructible]
public BarredMetalDoor2( DoorFacing facing ) : base( 0x1FED + (2 * (int)facing), 0x1FEE + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset( facing ) )
public BarredMetalDoor2( DoorFacing facing ) : base( 0x1FED + (2 * (int)facing), 0x1FEE + (2 * (int)facing), 0xEC, 0xF3, GetOffset( facing ) )
{
}
@ -202,7 +202,7 @@ namespace Server.Items
public class RattanDoor : BaseDoor
{
[Constructible]
public RattanDoor( DoorFacing facing ) : base( 0x695 + (2 * (int)facing), 0x696 + (2 * (int)facing), 0xEB, 0xF2, BaseDoor.GetOffset( facing ) )
public RattanDoor( DoorFacing facing ) : base( 0x695 + (2 * (int)facing), 0x696 + (2 * (int)facing), 0xEB, 0xF2, GetOffset( facing ) )
{
}
@ -228,7 +228,7 @@ namespace Server.Items
public class DarkWoodDoor : BaseDoor
{
[Constructible]
public DarkWoodDoor( DoorFacing facing ) : base( 0x6A5 + (2 * (int)facing), 0x6A6 + (2 * (int)facing), 0xEA, 0xF1, BaseDoor.GetOffset( facing ) )
public DarkWoodDoor( DoorFacing facing ) : base( 0x6A5 + (2 * (int)facing), 0x6A6 + (2 * (int)facing), 0xEA, 0xF1, GetOffset( facing ) )
{
}
@ -254,7 +254,7 @@ namespace Server.Items
public class MediumWoodDoor : BaseDoor
{
[Constructible]
public MediumWoodDoor( DoorFacing facing ) : base( 0x6B5 + (2 * (int)facing), 0x6B6 + (2 * (int)facing), 0xEA, 0xF1, BaseDoor.GetOffset( facing ) )
public MediumWoodDoor( DoorFacing facing ) : base( 0x6B5 + (2 * (int)facing), 0x6B6 + (2 * (int)facing), 0xEA, 0xF1, GetOffset( facing ) )
{
}
@ -280,7 +280,7 @@ namespace Server.Items
public class MetalDoor2 : BaseDoor
{
[Constructible]
public MetalDoor2( DoorFacing facing ) : base( 0x6C5 + (2 * (int)facing), 0x6C6 + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset( facing ) )
public MetalDoor2( DoorFacing facing ) : base( 0x6C5 + (2 * (int)facing), 0x6C6 + (2 * (int)facing), 0xEC, 0xF3, GetOffset( facing ) )
{
}
@ -306,7 +306,7 @@ namespace Server.Items
public class LightWoodDoor : BaseDoor
{
[Constructible]
public LightWoodDoor( DoorFacing facing ) : base( 0x6D5 + (2 * (int)facing), 0x6D6 + (2 * (int)facing), 0xEA, 0xF1, BaseDoor.GetOffset( facing ) )
public LightWoodDoor( DoorFacing facing ) : base( 0x6D5 + (2 * (int)facing), 0x6D6 + (2 * (int)facing), 0xEA, 0xF1, GetOffset( facing ) )
{
}
@ -332,7 +332,7 @@ namespace Server.Items
public class StrongWoodDoor : BaseDoor
{
[Constructible]
public StrongWoodDoor( DoorFacing facing ) : base( 0x6E5 + (2 * (int)facing), 0x6E6 + (2 * (int)facing), 0xEA, 0xF1, BaseDoor.GetOffset( facing ) )
public StrongWoodDoor( DoorFacing facing ) : base( 0x6E5 + (2 * (int)facing), 0x6E6 + (2 * (int)facing), 0xEA, 0xF1, GetOffset( facing ) )
{
}

View file

@ -9,7 +9,7 @@ namespace Server.Items
public class MetalHouseDoor : BaseHouseDoor
{
[Constructible]
public MetalHouseDoor( DoorFacing facing ) : base( facing, 0x675 + (2 * (int)facing), 0x676 + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset( facing ) )
public MetalHouseDoor( DoorFacing facing ) : base( facing, 0x675 + (2 * (int)facing), 0x676 + (2 * (int)facing), 0xEC, 0xF3, GetOffset( facing ) )
{
}
@ -35,7 +35,7 @@ namespace Server.Items
public class DarkWoodHouseDoor : BaseHouseDoor
{
[Constructible]
public DarkWoodHouseDoor( DoorFacing facing ) : base( facing, 0x6A5 + (2 * (int)facing), 0x6A6 + (2 * (int)facing), 0xEA, 0xF1, BaseDoor.GetOffset( facing ) )
public DarkWoodHouseDoor( DoorFacing facing ) : base( facing, 0x6A5 + (2 * (int)facing), 0x6A6 + (2 * (int)facing), 0xEA, 0xF1, GetOffset( facing ) )
{
}
@ -67,7 +67,7 @@ namespace Server.Items
[Constructible]
public GenericHouseDoor( DoorFacing facing, int baseItemID, int openedSound, int closedSound, bool autoAdjust )
: base( facing, baseItemID + (autoAdjust ? (2 * (int)facing) : 0), baseItemID + 1 + (autoAdjust ? (2 * (int)facing) : 0), openedSound, closedSound, BaseDoor.GetOffset( facing ) )
: base( facing, baseItemID + (autoAdjust ? (2 * (int)facing) : 0), baseItemID + 1 + (autoAdjust ? (2 * (int)facing) : 0), openedSound, closedSound, GetOffset( facing ) )
{
}
@ -128,7 +128,7 @@ namespace Server.Items
if ( Open )
loc = new Point3D( X - Offset.X, Y - Offset.Y, Z - Offset.Z );
else
loc = this.Location;
loc = Location;
return BaseHouse.FindHouseAt( loc, Map, 20 );
}

View file

@ -3,7 +3,7 @@ namespace Server.Items
public class SecretStoneDoor1 : BaseDoor
{
[Constructible]
public SecretStoneDoor1( DoorFacing facing ) : base( 0xE8 + (2 * (int)facing), 0xE9 + (2 * (int)facing), 0xED, 0xF4, BaseDoor.GetOffset( facing ) )
public SecretStoneDoor1( DoorFacing facing ) : base( 0xE8 + (2 * (int)facing), 0xE9 + (2 * (int)facing), 0xED, 0xF4, GetOffset( facing ) )
{
}
@ -29,7 +29,7 @@ namespace Server.Items
public class SecretDungeonDoor : BaseDoor
{
[Constructible]
public SecretDungeonDoor( DoorFacing facing ) : base( 0x314 + (2 * (int)facing), 0x315 + (2 * (int)facing), 0xED, 0xF4, BaseDoor.GetOffset( facing ) )
public SecretDungeonDoor( DoorFacing facing ) : base( 0x314 + (2 * (int)facing), 0x315 + (2 * (int)facing), 0xED, 0xF4, GetOffset( facing ) )
{
}
@ -55,7 +55,7 @@ namespace Server.Items
public class SecretStoneDoor2 : BaseDoor
{
[Constructible]
public SecretStoneDoor2( DoorFacing facing ) : base( 0x324 + (2 * (int)facing), 0x325 + (2 * (int)facing), 0xED, 0xF4, BaseDoor.GetOffset( facing ) )
public SecretStoneDoor2( DoorFacing facing ) : base( 0x324 + (2 * (int)facing), 0x325 + (2 * (int)facing), 0xED, 0xF4, GetOffset( facing ) )
{
}
@ -81,7 +81,7 @@ namespace Server.Items
public class SecretWoodenDoor : BaseDoor
{
[Constructible]
public SecretWoodenDoor( DoorFacing facing ) : base( 0x334 + (2 * (int)facing), 0x335 + (2 * (int)facing), 0xED, 0xF4, BaseDoor.GetOffset( facing ) )
public SecretWoodenDoor( DoorFacing facing ) : base( 0x334 + (2 * (int)facing), 0x335 + (2 * (int)facing), 0xED, 0xF4, GetOffset( facing ) )
{
}
@ -107,7 +107,7 @@ namespace Server.Items
public class SecretLightWoodDoor : BaseDoor
{
[Constructible]
public SecretLightWoodDoor( DoorFacing facing ) : base( 0x344 + (2 * (int)facing), 0x345 + (2 * (int)facing), 0xED, 0xF4, BaseDoor.GetOffset( facing ) )
public SecretLightWoodDoor( DoorFacing facing ) : base( 0x344 + (2 * (int)facing), 0x345 + (2 * (int)facing), 0xED, 0xF4, GetOffset( facing ) )
{
}
@ -133,7 +133,7 @@ namespace Server.Items
public class SecretStoneDoor3 : BaseDoor
{
[Constructible]
public SecretStoneDoor3( DoorFacing facing ) : base( 0x354 + (2 * (int)facing), 0x355 + (2 * (int)facing), 0xED, 0xF4, BaseDoor.GetOffset( facing ) )
public SecretStoneDoor3( DoorFacing facing ) : base( 0x354 + (2 * (int)facing), 0x355 + (2 * (int)facing), 0xED, 0xF4, GetOffset( facing ) )
{
}

View file

@ -67,7 +67,7 @@ namespace Server.Items
{
get
{
if ( this.Locked )
if ( Locked )
return "a locked treasure chest";
return "a treasure chest";
@ -103,27 +103,27 @@ namespace Server.Items
switch( m_TreasureLevel )
{
case TreasureLevel.Level1:
this.RequiredSkill = this.LockLevel = 5;
RequiredSkill = LockLevel = 5;
break;
case TreasureLevel.Level2:
this.RequiredSkill = this.LockLevel = 20;
RequiredSkill = LockLevel = 20;
break;
case TreasureLevel.Level3:
this.RequiredSkill = this.LockLevel = 50;
RequiredSkill = LockLevel = 50;
break;
case TreasureLevel.Level4:
this.RequiredSkill = this.LockLevel = 70;
RequiredSkill = LockLevel = 70;
break;
case TreasureLevel.Level5:
this.RequiredSkill = this.LockLevel = 90;
RequiredSkill = LockLevel = 90;
break;
case TreasureLevel.Level6:
this.RequiredSkill = this.LockLevel = 100;
RequiredSkill = LockLevel = 100;
break;
}
}

View file

@ -33,7 +33,7 @@ namespace Server.Items
public override bool CheckHold( Mobile m, Item item, bool message, bool checkItems, int plusItems, int plusWeight )
{
if ( this.IsSecure && !BaseHouse.CheckHold( m, this, item, message, checkItems, plusItems, plusWeight ) )
if ( IsSecure && !BaseHouse.CheckHold( m, this, item, message, checkItems, plusItems, plusWeight ) )
return false;
return base.CheckHold( m, item, message, checkItems, plusItems, plusWeight );
@ -72,7 +72,7 @@ namespace Server.Items
return false;
}
List<Item> list = this.Items;
List<Item> list = Items;
for ( int i = 0; i < list.Count; ++i )
{
@ -124,7 +124,7 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( from.AccessLevel > AccessLevel.Player || from.InRange( this.GetWorldLocation(), 2 ) || this.RootParent is PlayerVendor )
if ( from.AccessLevel > AccessLevel.Player || from.InRange( GetWorldLocation(), 2 ) || RootParent is PlayerVendor )
Open( from );
else
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
@ -173,7 +173,7 @@ namespace Server.Items
public override void OnItemRemoved( Item item )
{
if ( Items.Count == 0 )
this.Delete();
Delete();
base.OnItemRemoved( item );
}

View file

@ -73,7 +73,7 @@ namespace Server.Items
if ( m_Content != null )
return;
m_Content = FillableContent.Acquire( this.GetWorldLocation(), this.Map );
m_Content = FillableContent.Acquire( GetWorldLocation(), Map );
if ( m_Content != null )
Respawn();
@ -99,7 +99,7 @@ namespace Server.Items
{
int count = 0;
foreach( Item item in this.Items )
foreach( Item item in Items )
{
count += item.Amount;
}
@ -115,7 +115,7 @@ namespace Server.Items
{
if ( m_RespawnTimer == null )
{
int mins = Utility.RandomMinMax( this.MinRespawnMinutes, this.MaxRespawnMinutes );
int mins = Utility.RandomMinMax( MinRespawnMinutes, MaxRespawnMinutes );
TimeSpan delay = TimeSpan.FromMinutes( mins );
m_NextRespawnTime = DateTime.UtcNow + delay;
@ -198,7 +198,7 @@ namespace Server.Items
if ( item != null )
{
List<Item> list = this.Items;
List<Item> list = Items;
for( int j = 0; j < list.Count; ++j )
{
@ -734,7 +734,7 @@ namespace Server.Items
1,
new[]
{
typeof( Mobiles.Alchemist )
typeof( Alchemist )
},
new[]
{

View file

@ -288,9 +288,9 @@ namespace Server.Items
Locked = false;
Picker = from;
if ( this.TrapOnLockpick && ExecuteTrap( from ) )
if ( TrapOnLockpick && ExecuteTrap( from ) )
{
this.TrapOnLockpick = false;
TrapOnLockpick = false;
}
}

View file

@ -237,7 +237,7 @@ namespace Server.Items
from.SendLocalizedMessage( 1079974, String.Format( "{0}\t{1}", salvaged, salvaged + notSalvaged ) ); // Salvaged: ~1_COUNT~/~2_NUM~ tailored items
foreach (Item i in this.FindItemsByType(typeof(Item), true))
foreach (Item i in FindItemsByType(typeof(Item), true))
{
if ( ( i is Leather ) || ( i is Cloth ) || ( i is SpinedLeather ) || ( i is HornedLeather ) || ( i is BarbedLeather ) || ( i is Bandage ) || ( i is Bone ) )
{

View file

@ -151,7 +151,7 @@ namespace Server.Items
metalBox.AddItem( subItem );
}
this.Delete();
Delete();
return metalBox;
}

View file

@ -68,8 +68,8 @@ namespace Server.Items
{
if ( m_TrapType != TrapType.None )
{
Point3D loc = this.GetWorldLocation();
Map facet = this.Map;
Point3D loc = GetWorldLocation();
Map facet = Map;
if ( from.AccessLevel >= AccessLevel.GameMaster )
{
@ -189,7 +189,7 @@ namespace Server.Items
Effects.SendLocationParticles( EffectItem.Create( Location, Map, EffectItem.DefaultDuration ), 0x376A, 9, 32, 5022 );
Effects.PlaySound( Location, Map, 0x1F5 );
if ( this.TrapOnOpen )
if ( TrapOnOpen )
{
ExecuteTrap( from );
}
@ -197,7 +197,7 @@ namespace Server.Items
public override void Open( Mobile from )
{
if ( !this.TrapOnOpen || !ExecuteTrap( from ) )
if ( !TrapOnOpen || !ExecuteTrap( from ) )
base.Open( from );
}

View file

@ -284,12 +284,12 @@ namespace Server.Items
public override bool CheckLocked( Mobile from )
{
if ( !this.Locked )
if ( !Locked )
return false;
if ( this.Level == 0 && from.AccessLevel < AccessLevel.GameMaster )
if ( Level == 0 && from.AccessLevel < AccessLevel.GameMaster )
{
foreach ( Mobile m in this.Guardians )
foreach ( Mobile m in Guardians )
{
if ( m.Alive )
{
@ -322,7 +322,7 @@ namespace Server.Items
if ( p != null && p.Contains( m ) )
return true;
Map map = this.Map;
Map map = Map;
if ( map != null && (map.Rules & MapRules.HarmfulRestrictions) == 0 )
{
@ -475,7 +475,7 @@ namespace Server.Items
return;
from.SendLocalizedMessage( 1048124, "", 0x8A5 ); // The old, rusted chest crumbles when you hit it.
this.Delete();
Delete();
}
private class RemoveGump : Gump

View file

@ -15,7 +15,7 @@ namespace Server.Items
{
base.GetProperties( list );
list.Add( 1061078, this.ArtifactRarity.ToString() ); // artifact rarity ~1_val~
list.Add( 1061078, ArtifactRarity.ToString() ); // artifact rarity ~1_val~
}
public BaseDecorationArtifact( Serial serial ) : base( serial )
@ -52,7 +52,7 @@ namespace Server.Items
{
base.AddNameProperties( list );
list.Add( 1061078, this.ArtifactRarity.ToString() ); // artifact rarity ~1_val~
list.Add( 1061078, ArtifactRarity.ToString() ); // artifact rarity ~1_val~
}
public BaseDecorationContainerArtifact( Serial serial ) : base( serial )

View file

@ -1418,28 +1418,28 @@ namespace Server.Items
[CommandProperty( AccessLevel.GameMaster )]
public bool IsOn
{
get => this.ItemID == 0x24BF;
set => this.ItemID = value ? 0x24BF : 0x24C0;
get => ItemID == 0x24BF;
set => ItemID = value ? 0x24BF : 0x24C0;
}
[Constructible]
public TowerLanternArtifact() : base( 0x24C0 )
{
this.Light = LightType.Circle225;
Light = LightType.Circle225;
}
public override void OnDoubleClick( Mobile from )
{
if ( from.InRange( this.GetWorldLocation(), 2 ) )
if ( from.InRange( GetWorldLocation(), 2 ) )
{
if ( this.IsOn )
if ( IsOn )
{
this.IsOn = false;
IsOn = false;
from.PlaySound( 0x3BE );
}
else
{
this.IsOn = true;
IsOn = true;
from.PlaySound( 0x47 );
}
}
@ -1467,7 +1467,7 @@ namespace Server.Items
int version = reader.ReadEncodedInt();
if ( version == 0 )
this.Light = LightType.Circle225;
Light = LightType.Circle225;
}
}
#endregion

View file

@ -44,7 +44,7 @@ namespace Server.Items
item.Hue = m_Hue;
item.Movable = false;
item.MoveToWorld( this.Location, this.Map );
item.MoveToWorld( Location, Map );
return item;
}
@ -263,8 +263,8 @@ namespace Server.Items
{
if ( m_Item != null && value == null )
{
int delay = Utility.RandomMinMax( this.Entry.MinDelay, this.Entry.MaxDelay );
this.NextRespawn = DateTime.UtcNow + TimeSpan.FromMinutes( delay );
int delay = Utility.RandomMinMax( Entry.MinDelay, Entry.MaxDelay );
NextRespawn = DateTime.UtcNow + TimeSpan.FromMinutes( delay );
}
if ( Instance != null )
@ -299,12 +299,12 @@ namespace Server.Items
public void CheckRespawn()
{
if ( this.Item != null && ( this.Item.Deleted || this.Item.Movable || this.Item.Parent != null ) )
this.Item = null;
if ( Item != null && ( Item.Deleted || Item.Movable || Item.Parent != null ) )
Item = null;
if ( this.Item == null && DateTime.UtcNow >= this.NextRespawn )
if ( Item == null && DateTime.UtcNow >= NextRespawn )
{
this.Item = this.Entry.CreateInstance();
Item = Entry.CreateInstance();
}
}
}

View file

@ -48,7 +48,7 @@ namespace Server.Items
v.Direction = from.Direction & Direction.Mask;
v.MoveToWorld( from.Location, from.Map );
this.Delete();
Delete();
}
else
{
@ -82,7 +82,7 @@ namespace Server.Items
v.Direction = from.Direction & Direction.Mask;
v.MoveToWorld( from.Location, from.Map );
this.Delete();
Delete();
}
}
}

View file

@ -70,14 +70,14 @@ namespace Server.Items
}
else
{
pet.BardingExceptional = this.Exceptional;
pet.BardingCrafter = this.Crafter;
pet.BardingExceptional = Exceptional;
pet.BardingCrafter = Crafter;
pet.BardingHP = pet.BardingMaxHP;
pet.BardingResource = this.Resource;
pet.BardingResource = Resource;
pet.HasBarding = true;
pet.Hue = this.Hue;
pet.Hue = Hue;
this.Delete();
Delete();
from.SendLocalizedMessage( 1053027 ); // You place the barding on your swamp dragon. Use a bladed item on your dragon to remove the armor.
}

View file

@ -43,7 +43,7 @@ namespace Server.Items
if ( from.AccessLevel >= AccessLevel.GameMaster )
return true;
if ( !from.InRange( this.GetWorldLocation(), 1 ) )
if ( !from.InRange( GetWorldLocation(), 1 ) )
{
from.SendLocalizedMessage( 500446 ); // That is too far away.
return false;
@ -101,7 +101,7 @@ namespace Server.Items
public void EndPlace( Mobile from, HolidayTreeType type, Point3D loc )
{
this.Delete();
Delete();
HolidayTree tree = new HolidayTree( from, type, loc );
BaseHouse.FindHouseAt( tree )?.Addons.Add( tree );
}

View file

@ -35,7 +35,7 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( this.RootParent == from )
if ( RootParent == from )
{
from.CloseGump( typeof( NameChangeDeedGump ) );
from.SendGump( new NameChangeDeedGump( this ) );

View file

@ -103,7 +103,7 @@ namespace Server.Items
public bool IsUsableBy( Mobile from, bool byLandlord, bool byBackpack, bool noOfferee, bool sendMessage )
{
if ( this.Deleted || !from.CheckAlive( sendMessage ) )
if ( Deleted || !from.CheckAlive( sendMessage ) )
return false;
if ( noOfferee && Offeree != null )
@ -119,7 +119,7 @@ namespace Server.Items
if ( byLandlord && IsLandlord( from ) )
{
if ( from.Map != this.Map || !from.InRange( this, 5 ) )
if ( from.Map != Map || !from.InRange( this, 5 ) )
{
if ( sendMessage )
from.SendLocalizedMessage( 501853 ); // Target is too far away.

View file

@ -43,8 +43,8 @@ namespace Server.Items
{
//Dupe( Amount );
parent.FacialHairItemID = this.ItemID;
parent.FacialHairHue = this.Hue;
parent.FacialHairItemID = ItemID;
parent.FacialHairHue = Hue;
return DeathMoveResult.MoveToCorpse;
}

View file

@ -91,8 +91,8 @@ namespace Server.Items
{
// Dupe( Amount );
parent.HairItemID = this.ItemID;
parent.HairHue = this.Hue;
parent.HairItemID = ItemID;
parent.HairHue = Hue;
return DeathMoveResult.MoveToCorpse;
}

View file

@ -17,8 +17,8 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
Map map = this.Map;
Point3D loc = this.Location;
Map map = Map;
Point3D loc = Location;
if ( Parent != null || Movable || IsLockedDown || IsSecure || map == null || map == Map.Internal )
return;
@ -47,12 +47,12 @@ namespace Server.Items
public void Unlink()
{
ISpawner se = this.Spawner;
ISpawner se = Spawner;
if ( se != null )
{
this.Spawner.Remove( this );
this.Spawner = null;
Spawner.Remove( this );
Spawner = null;
}
}

View file

@ -489,9 +489,9 @@ namespace Server.Items
public override void Deserialize( GenericReader reader )
{
if ( CheckType( "PitcherWater" ) || CheckType( "GlassPitcher" ) )
base.InternalDeserialize( reader, false );
InternalDeserialize( reader, false );
else
base.InternalDeserialize( reader, true );
InternalDeserialize( reader, true );
int version = reader.ReadInt();
@ -711,18 +711,18 @@ namespace Server.Items
if ( bev.IsEmpty || !bev.ValidateUse( from, true ) )
return;
this.Content = bev.Content;
this.Poison = bev.Poison;
this.Poisoner = bev.Poisoner;
Content = bev.Content;
Poison = bev.Poison;
Poisoner = bev.Poisoner;
if ( bev.Quantity > this.MaxQuantity )
if ( bev.Quantity > MaxQuantity )
{
this.Quantity = this.MaxQuantity;
bev.Quantity -= this.MaxQuantity;
Quantity = MaxQuantity;
bev.Quantity -= MaxQuantity;
}
else
{
this.Quantity += bev.Quantity;
Quantity += bev.Quantity;
bev.Quantity = 0;
}
}
@ -758,18 +758,18 @@ namespace Server.Items
return;
}
this.Content = BeverageType.Water;
this.Poison = null;
this.Poisoner = null;
Content = BeverageType.Water;
Poison = null;
Poisoner = null;
if ( src.Quantity > this.MaxQuantity )
if ( src.Quantity > MaxQuantity )
{
this.Quantity = this.MaxQuantity;
src.Quantity -= this.MaxQuantity;
Quantity = MaxQuantity;
src.Quantity -= MaxQuantity;
}
else
{
this.Quantity += src.Quantity;
Quantity += src.Quantity;
src.Quantity = 0;
}
@ -913,7 +913,7 @@ namespace Server.Items
}
// *hic*
m_Drunk.PublicOverheadMessage( Network.MessageType.Regular, 0x3B2, 500849 );
m_Drunk.PublicOverheadMessage( MessageType.Regular, 0x3B2, 500849 );
}
if ( m_Drunk.BAC <= 0 )
@ -939,7 +939,7 @@ namespace Server.Items
if ( !bev.ValidateUse( from, true ) )
return;
if ( bev.IsFull && bev.Content == this.Content )
if ( bev.IsFull && bev.Content == Content )
{
from.SendLocalizedMessage( 500848 ); // Couldn't pour it there. It was already full.
}
@ -949,19 +949,19 @@ namespace Server.Items
}
else
{
bev.Content = this.Content;
bev.Poison = this.Poison;
bev.Poisoner = this.Poisoner;
bev.Content = Content;
bev.Poison = Poison;
bev.Poisoner = Poisoner;
if ( this.Quantity > bev.MaxQuantity )
if ( Quantity > bev.MaxQuantity )
{
bev.Quantity = bev.MaxQuantity;
this.Quantity -= bev.MaxQuantity;
Quantity -= bev.MaxQuantity;
}
else
{
bev.Quantity += this.Quantity;
this.Quantity = 0;
bev.Quantity += Quantity;
Quantity = 0;
}
from.PlaySound( 0x4E );
@ -976,7 +976,7 @@ namespace Server.Items
{
int bac = 0;
switch( this.Content )
switch( Content )
{
case BeverageType.Ale: bac = 1; break;
case BeverageType.Wine: bac = 2; break;
@ -1028,7 +1028,7 @@ namespace Server.Items
}
else if ( targ is AddonComponent component &&
( component.Addon is WaterVatEast || component.Addon is WaterVatSouth ) &&
this.Content == BeverageType.Water )
Content == BeverageType.Water )
{
if ( from is PlayerMobile player )
{

View file

@ -6,7 +6,7 @@ namespace Server.Items
[Constructible]
public Glass() : base( 0x1f81 )
{
this.Weight = 0.1;
Weight = 0.1;
}
public Glass( Serial serial ) : base( serial )
@ -33,7 +33,7 @@ namespace Server.Items
[Constructible]
public GlassBottle() : base( 0xe2b )
{
this.Weight = 0.3;
Weight = 0.3;
}
public GlassBottle( Serial serial ) : base( serial )

View file

@ -104,7 +104,7 @@ namespace Server.Items
{
if ( m_Item.Deleted ) return;
if ( CookableFood.IsHeatSource( targeted ) )
if ( IsHeatSource( targeted ) )
{
if ( from.BeginAction( typeof( CookableFood ) ) )
{

View file

@ -623,8 +623,8 @@ namespace Server.Items
{
int needs = mill.MaxFlour - mill.CurFlour;
if ( needs > this.Amount )
needs = this.Amount;
if ( needs > Amount )
needs = Amount;
mill.CurFlour += needs;
Consume( needs );

View file

@ -50,7 +50,7 @@ namespace Server.Items
base.GetContextMenuEntries( from, list );
if ( from.Alive )
list.Add( new ContextMenus.EatEntry( from, this ) );
list.Add( new EatEntry( from, this ) );
}
public override void OnDoubleClick( Mobile from )
@ -58,7 +58,7 @@ namespace Server.Items
if ( !Movable )
return;
if ( from.InRange( this.GetWorldLocation(), 1 ) )
if ( from.InRange( GetWorldLocation(), 1 ) )
{
Eat( from );
}
@ -189,8 +189,8 @@ namespace Server.Items
[Constructible]
public BreadLoaf( int amount ) : base( amount, 0x103B )
{
this.Weight = 1.0;
this.FillFactor = 3;
Weight = 1.0;
FillFactor = 3;
}
public BreadLoaf( Serial serial ) : base( serial )
@ -222,8 +222,8 @@ namespace Server.Items
[Constructible]
public Bacon( int amount ) : base( amount, 0x979 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Bacon( Serial serial ) : base( serial )
@ -255,8 +255,8 @@ namespace Server.Items
[Constructible]
public SlabOfBacon( int amount ) : base( amount, 0x976 )
{
this.Weight = 1.0;
this.FillFactor = 3;
Weight = 1.0;
FillFactor = 3;
}
public SlabOfBacon( Serial serial ) : base( serial )
@ -290,7 +290,7 @@ namespace Server.Items
[Constructible]
public FishSteak( int amount ) : base( amount, 0x97B )
{
this.FillFactor = 3;
FillFactor = 3;
}
public FishSteak( Serial serial ) : base( serial )
@ -324,7 +324,7 @@ namespace Server.Items
[Constructible]
public CheeseWheel( int amount ) : base( amount, 0x97E )
{
this.FillFactor = 3;
FillFactor = 3;
}
public CheeseWheel( Serial serial ) : base( serial )
@ -358,7 +358,7 @@ namespace Server.Items
[Constructible]
public CheeseWedge( int amount ) : base( amount, 0x97D )
{
this.FillFactor = 3;
FillFactor = 3;
}
public CheeseWedge( Serial serial ) : base( serial )
@ -392,7 +392,7 @@ namespace Server.Items
[Constructible]
public CheeseSlice( int amount ) : base( amount, 0x97C )
{
this.FillFactor = 1;
FillFactor = 1;
}
public CheeseSlice( Serial serial ) : base( serial )
@ -424,8 +424,8 @@ namespace Server.Items
[Constructible]
public FrenchBread( int amount ) : base( amount, 0x98C )
{
this.Weight = 2.0;
this.FillFactor = 3;
Weight = 2.0;
FillFactor = 3;
}
public FrenchBread( Serial serial ) : base( serial )
@ -458,8 +458,8 @@ namespace Server.Items
[Constructible]
public FriedEggs( int amount ) : base( amount, 0x9B6 )
{
this.Weight = 1.0;
this.FillFactor = 4;
Weight = 1.0;
FillFactor = 4;
}
public FriedEggs( Serial serial ) : base( serial )
@ -491,8 +491,8 @@ namespace Server.Items
[Constructible]
public CookedBird( int amount ) : base( amount, 0x9B7 )
{
this.Weight = 1.0;
this.FillFactor = 5;
Weight = 1.0;
FillFactor = 5;
}
public CookedBird( Serial serial ) : base( serial )
@ -524,8 +524,8 @@ namespace Server.Items
[Constructible]
public RoastPig( int amount ) : base( amount, 0x9BB )
{
this.Weight = 45.0;
this.FillFactor = 20;
Weight = 45.0;
FillFactor = 20;
}
public RoastPig( Serial serial ) : base( serial )
@ -557,8 +557,8 @@ namespace Server.Items
[Constructible]
public Sausage( int amount ) : base( amount, 0x9C0 )
{
this.Weight = 1.0;
this.FillFactor = 4;
Weight = 1.0;
FillFactor = 4;
}
public Sausage( Serial serial ) : base( serial )
@ -590,8 +590,8 @@ namespace Server.Items
[Constructible]
public Ham( int amount ) : base( amount, 0x9C9 )
{
this.Weight = 1.0;
this.FillFactor = 5;
Weight = 1.0;
FillFactor = 5;
}
public Ham( Serial serial ) : base( serial )
@ -619,8 +619,8 @@ namespace Server.Items
public Cake() : base( 0x9E9 )
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 10;
Weight = 1.0;
FillFactor = 10;
}
public Cake( Serial serial ) : base( serial )
@ -652,8 +652,8 @@ namespace Server.Items
[Constructible]
public Ribs( int amount ) : base( amount, 0x9F2 )
{
this.Weight = 1.0;
this.FillFactor = 5;
Weight = 1.0;
FillFactor = 5;
}
public Ribs( Serial serial ) : base( serial )
@ -681,8 +681,8 @@ namespace Server.Items
public Cookies() : base( 0x160b )
{
Stackable = Core.ML;
this.Weight = 1.0;
this.FillFactor = 4;
Weight = 1.0;
FillFactor = 4;
}
public Cookies( Serial serial ) : base( serial )
@ -710,8 +710,8 @@ namespace Server.Items
public Muffins() : base( 0x9eb )
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 4;
Weight = 1.0;
FillFactor = 4;
}
public Muffins( Serial serial ) : base( serial )
@ -742,8 +742,8 @@ namespace Server.Items
public CheesePizza() : base( 0x1040 )
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 6;
Weight = 1.0;
FillFactor = 6;
}
public CheesePizza( Serial serial ) : base( serial )
@ -773,8 +773,8 @@ namespace Server.Items
public SausagePizza() : base( 0x1040 )
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 6;
Weight = 1.0;
FillFactor = 6;
}
public SausagePizza( Serial serial ) : base( serial )
@ -835,8 +835,8 @@ namespace Server.Items
public FruitPie() : base( 0x1041 )
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 5;
Weight = 1.0;
FillFactor = 5;
}
public FruitPie( Serial serial ) : base( serial )
@ -866,8 +866,8 @@ namespace Server.Items
public MeatPie() : base( 0x1041 )
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 5;
Weight = 1.0;
FillFactor = 5;
}
public MeatPie( Serial serial ) : base( serial )
@ -897,8 +897,8 @@ namespace Server.Items
public PumpkinPie() : base( 0x1041 )
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 5;
Weight = 1.0;
FillFactor = 5;
}
public PumpkinPie( Serial serial ) : base( serial )
@ -928,8 +928,8 @@ namespace Server.Items
public ApplePie() : base( 0x1041 )
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 5;
Weight = 1.0;
FillFactor = 5;
}
public ApplePie( Serial serial ) : base( serial )
@ -959,8 +959,8 @@ namespace Server.Items
public PeachCobbler() : base( 0x1041 )
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 5;
Weight = 1.0;
FillFactor = 5;
}
public PeachCobbler( Serial serial ) : base( serial )
@ -990,8 +990,8 @@ namespace Server.Items
public Quiche() : base( 0x1041 )
{
Stackable = Core.ML;
this.Weight = 1.0;
this.FillFactor = 5;
Weight = 1.0;
FillFactor = 5;
}
public Quiche( Serial serial ) : base( serial )
@ -1023,8 +1023,8 @@ namespace Server.Items
[Constructible]
public LambLeg( int amount ) : base( amount, 0x160a )
{
this.Weight = 2.0;
this.FillFactor = 5;
Weight = 2.0;
FillFactor = 5;
}
public LambLeg( Serial serial ) : base( serial )
@ -1056,8 +1056,8 @@ namespace Server.Items
[Constructible]
public ChickenLeg( int amount ) : base( amount, 0x1608 )
{
this.Weight = 1.0;
this.FillFactor = 4;
Weight = 1.0;
FillFactor = 4;
}
public ChickenLeg( Serial serial ) : base( serial )
@ -1090,8 +1090,8 @@ namespace Server.Items
[Constructible]
public HoneydewMelon( int amount ) : base( amount, 0xC74 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public HoneydewMelon( Serial serial ) : base( serial )
@ -1124,8 +1124,8 @@ namespace Server.Items
[Constructible]
public YellowGourd( int amount ) : base( amount, 0xC64 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public YellowGourd( Serial serial ) : base( serial )
@ -1158,8 +1158,8 @@ namespace Server.Items
[Constructible]
public GreenGourd( int amount ) : base( amount, 0xC66 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public GreenGourd( Serial serial ) : base( serial )
@ -1192,8 +1192,8 @@ namespace Server.Items
[Constructible]
public EarOfCorn( int amount ) : base( amount, 0xC81 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public EarOfCorn( Serial serial ) : base( serial )
@ -1225,8 +1225,8 @@ namespace Server.Items
[Constructible]
public Turnip( int amount ) : base( amount, 0xD3A )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Turnip( Serial serial ) : base( serial )
@ -1253,7 +1253,7 @@ namespace Server.Items
[Constructible]
public SheafOfHay() : base( 0xF36 )
{
this.Weight = 10.0;
Weight = 10.0;
}
public SheafOfHay( Serial serial ) : base( serial )

View file

@ -49,8 +49,8 @@ namespace Server.Items
[Constructible]
public Banana( int amount ) : base( amount, 0x171f )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Banana( Serial serial ) : base( serial )
@ -82,8 +82,8 @@ namespace Server.Items
[Constructible]
public Bananas( int amount ) : base( amount, 0x1721 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Bananas( Serial serial ) : base( serial )
@ -114,8 +114,8 @@ namespace Server.Items
[Constructible]
public SplitCoconut( int amount ) : base( amount, 0x1725 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public SplitCoconut( Serial serial ) : base( serial )
@ -146,8 +146,8 @@ namespace Server.Items
[Constructible]
public Lemon( int amount ) : base( amount, 0x1728 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Lemon( Serial serial ) : base( serial )
@ -178,8 +178,8 @@ namespace Server.Items
[Constructible]
public Lemons( int amount ) : base( amount, 0x1729 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Lemons( Serial serial ) : base( serial )
@ -210,8 +210,8 @@ namespace Server.Items
[Constructible]
public Lime( int amount ) : base( amount, 0x172a )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Lime( Serial serial ) : base( serial )
@ -242,8 +242,8 @@ namespace Server.Items
[Constructible]
public Limes( int amount ) : base( amount, 0x172B )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Limes( Serial serial ) : base( serial )
@ -274,8 +274,8 @@ namespace Server.Items
[Constructible]
public Coconut( int amount ) : base( amount, 0x1726 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Coconut( Serial serial ) : base( serial )
@ -306,8 +306,8 @@ namespace Server.Items
[Constructible]
public OpenCoconut( int amount ) : base( amount, 0x1723 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public OpenCoconut( Serial serial ) : base( serial )
@ -338,8 +338,8 @@ namespace Server.Items
[Constructible]
public Dates( int amount ) : base( amount, 0x1727 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Dates( Serial serial ) : base( serial )
@ -370,8 +370,8 @@ namespace Server.Items
[Constructible]
public Grapes( int amount ) : base( amount, 0x9D1 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Grapes( Serial serial ) : base( serial )
@ -402,8 +402,8 @@ namespace Server.Items
[Constructible]
public Peach( int amount ) : base( amount, 0x9D2 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Peach( Serial serial ) : base( serial )
@ -434,8 +434,8 @@ namespace Server.Items
[Constructible]
public Pear( int amount ) : base( amount, 0x994 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Pear( Serial serial ) : base( serial )
@ -466,8 +466,8 @@ namespace Server.Items
[Constructible]
public Apple( int amount ) : base( amount, 0x9D0 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Apple( Serial serial ) : base( serial )
@ -498,8 +498,8 @@ namespace Server.Items
[Constructible]
public Watermelon( int amount ) : base( amount, 0xC5C )
{
this.Weight = 5.0;
this.FillFactor = 5;
Weight = 5.0;
FillFactor = 5;
}
public Watermelon( Serial serial ) : base( serial )
@ -539,8 +539,8 @@ namespace Server.Items
[Constructible]
public SmallWatermelon( int amount ) : base( amount, 0xC5D )
{
this.Weight = 5.0;
this.FillFactor = 5;
Weight = 5.0;
FillFactor = 5;
}
public SmallWatermelon( Serial serial ) : base( serial )
@ -572,8 +572,8 @@ namespace Server.Items
[Constructible]
public Squash( int amount ) : base( amount, 0xc72 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Squash( Serial serial ) : base( serial )
@ -605,8 +605,8 @@ namespace Server.Items
[Constructible]
public Cantaloupe( int amount ) : base( amount, 0xc79 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Cantaloupe( Serial serial ) : base( serial )

View file

@ -11,8 +11,8 @@ namespace Server.Items
[Constructible]
public Carrot( int amount ) : base( amount, 0xc78 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Carrot( Serial serial ) : base( serial )
@ -44,8 +44,8 @@ namespace Server.Items
[Constructible]
public Cabbage( int amount ) : base( amount, 0xc7b )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Cabbage( Serial serial ) : base( serial )
@ -77,8 +77,8 @@ namespace Server.Items
[Constructible]
public Onion( int amount ) : base( amount, 0xc6d )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Onion( Serial serial ) : base( serial )
@ -110,8 +110,8 @@ namespace Server.Items
[Constructible]
public Lettuce( int amount ) : base( amount, 0xc70 )
{
this.Weight = 1.0;
this.FillFactor = 1;
Weight = 1.0;
FillFactor = 1;
}
public Lettuce( Serial serial ) : base( serial )
@ -143,8 +143,8 @@ namespace Server.Items
[Constructible]
public Pumpkin( int amount ) : base( amount, 0xC6A )
{
this.Weight = 1.0;
this.FillFactor = 8;
Weight = 1.0;
FillFactor = 8;
}
public Pumpkin( Serial serial ) : base( serial )
@ -184,8 +184,8 @@ namespace Server.Items
[Constructible]
public SmallPumpkin( int amount ) : base( amount, 0xC6C )
{
this.Weight = 1.0;
this.FillFactor = 8;
Weight = 1.0;
FillFactor = 8;
}
public SmallPumpkin( Serial serial ) : base( serial )

View file

@ -93,7 +93,7 @@ namespace Server.Items
}
else
{
foreach ( NetState state in this.GetClientsInRange( 2 ) )
foreach ( NetState state in GetClientsInRange( 2 ) )
state.Send( p );
}
@ -152,7 +152,7 @@ namespace Server.Items
public override void OnClick()
{
if ( BaseBoard.ValidateDefault( m_From, m_Board ) )
if ( ValidateDefault( m_From, m_Board ) )
m_Board.Reset();
}
}

View file

@ -16,7 +16,7 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( !from.InRange( this.GetWorldLocation(), 2 ) )
if ( !from.InRange( GetWorldLocation(), 2 ) )
return;
Roll( from );
@ -32,7 +32,7 @@ namespace Server.Items
public void Roll( Mobile from )
{
this.PublicOverheadMessage( MessageType.Regular, 0, false, string.Format( "*{0} rolls {1}, {2}*", from.Name, Utility.Random( 1, 6 ), Utility.Random( 1, 6 ) ) );
PublicOverheadMessage( MessageType.Regular, 0, false, string.Format( "*{0} rolls {1}, {2}*", from.Name, Utility.Random( 1, 6 ), Utility.Random( 1, 6 ) ) );
}
public override void Serialize( GenericWriter writer )

View file

@ -112,7 +112,7 @@ namespace Server.Items
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( AddToHouse ) );
if ( !Guild.NewGuildSystem && m_Guild == null )
this.Delete();
Delete();
}
private void AddToHouse()
@ -161,11 +161,11 @@ namespace Server.Items
if ( (name = m_Guild.Name) == null || (name = name.Trim()).Length <= 0 )
name = "(unnamed)";
this.LabelTo( from, name );
LabelTo( from, name );
}
else if ( m_GuildName != null )
{
this.LabelTo( from, m_GuildName );
LabelTo( from, m_GuildName );
}
}
@ -226,7 +226,7 @@ namespace Server.Items
public bool CouldFit( IPoint3D p, Map map )
{
return map.CanFit( p.X, p.Y, p.Z, this.ItemData.Height );
return map.CanFit( p.X, p.Y, p.Z, ItemData.Height );
}
#endregion

View file

@ -148,7 +148,7 @@ namespace Server.Items
if ( strBonus != 0 || dexBonus != 0 || intBonus != 0 )
{
string modName = this.Serial.ToString();
string modName = Serial.ToString();
if ( strBonus != 0 )
from.AddStatMod( new StatMod( StatType.Str, modName + "Str", strBonus, TimeSpan.Zero ) );
@ -170,7 +170,7 @@ namespace Server.Items
{
m_AosSkillBonuses.Remove();
string modName = this.Serial.ToString();
string modName = Serial.ToString();
from.RemoveStatMod( modName + "Str" );
from.RemoveStatMod( modName + "Dex" );

View file

@ -159,7 +159,7 @@ namespace Server.Items
if ( m_Protected && from.AccessLevel == AccessLevel.Player )
return;
if ( !from.InRange( this.GetWorldLocation(), 2 ) )
if ( !from.InRange( GetWorldLocation(), 2 ) )
return;
if ( m_Burning )

View file

@ -180,7 +180,7 @@ namespace Server.Items
public virtual bool Validate( Mobile from )
{
if ( !from.CanSee( this ) || from.Map != this.Map || !from.Alive || InSecureTrade )
if ( !from.CanSee( this ) || from.Map != Map || !from.Alive || InSecureTrade )
return false;
else if ( from.AccessLevel >= AccessLevel.GameMaster )
return true;

View file

@ -289,7 +289,7 @@ namespace Server.Items
{
from.SendLocalizedMessage( 503020 ); // You are already digging treasure.
}
else if ( from.Map != this.m_Map )
else if ( from.Map != m_Map )
{
from.SendLocalizedMessage( 1010479 ); // You seem to be in the right place, but may be on the wrong facet!
}
@ -625,9 +625,9 @@ namespace Server.Items
if ( from is PlayerMobile mobile && mobile.Young )
return true;
if ( from == this.Decoder )
if ( from == Decoder )
{
this.Level = 1;
Level = 1;
from.SendLocalizedMessage( 1046446 ); // This is now a level one treasure map.
return true;
}
@ -779,7 +779,7 @@ namespace Server.Items
m_Map = map;
if ( !enabled )
this.Flags |= CMEFlags.Disabled;
Flags |= CMEFlags.Disabled;
}
public override void OnClick()
@ -912,12 +912,12 @@ namespace Server.Items
public void Turn1()
{
this.ItemID = 0x913;
ItemID = 0x913;
}
public void Turn2()
{
this.ItemID = 0x914;
ItemID = 0x914;
}
public override void Serialize( GenericWriter writer )

View file

@ -246,7 +246,7 @@ namespace Server.Items
if (qs is Haven.UzeraanTurmoilQuest)
{
var obj = qs.FindObjective(typeof(Engines.Quests.Haven.CashBankCheckObjective));
var obj = qs.FindObjective(typeof(Haven.CashBankCheckObjective));
if (obj != null && !obj.Completed)
{

View file

@ -43,7 +43,7 @@ namespace Server.Items
{
public GMItemPacket( Item item ) : base( 0x1A )
{
this.EnsureCapacity( 20 );
EnsureCapacity( 20 );
// 14 base length
// +2 - Amount

View file

@ -42,7 +42,7 @@ namespace Server.Items
{
from.SendLocalizedMessage( 1040016 ); // You cannot use this while riding a mount
}
else if ( Server.Spells.Ninjitsu.AnimalForm.UnderTransformation( from ) )
else if ( Spells.Ninjitsu.AnimalForm.UnderTransformation( from ) )
{
from.SendLocalizedMessage( 1070902 ); // You can't use this while in an animal form!
}
@ -80,7 +80,7 @@ namespace Server.Items
if (to is PlayerMobile mobile)
{
if (Server.Spells.Ninjitsu.AnimalForm.UnderTransformation(mobile))
if (Spells.Ninjitsu.AnimalForm.UnderTransformation(mobile))
{
mobile.SendLocalizedMessage(1114066, from.Name); // ~1_NAME~ knocked you out of animal form!
}
@ -172,11 +172,11 @@ namespace Server.Items
{
from.SendLocalizedMessage( 1040016 ); // You cannot use this while riding a mount
}
else if ( Server.Spells.Ninjitsu.AnimalForm.UnderTransformation( from ) )
else if ( Spells.Ninjitsu.AnimalForm.UnderTransformation( from ) )
{
from.SendLocalizedMessage( 1070902 ); // You can't use this while in an animal form!
}
else if (!to.Mounted && !Server.Spells.Ninjitsu.AnimalForm.UnderTransformation(to))
else if (!to.Mounted && !Spells.Ninjitsu.AnimalForm.UnderTransformation(to))
{
from.SendLocalizedMessage( 1049628 ); // You have no reason to throw a bola at that.
}

View file

@ -78,7 +78,7 @@ namespace Server.Items
public virtual void Cleanup()
{
List<Item> items = this.Items;
List<Item> items = Items;
for ( int i = items.Count - 1; i >= 0; --i )
{
@ -99,7 +99,7 @@ namespace Server.Items
private void RecurseDelete( BulletinMessage msg )
{
List<Item> found = new List<Item>();
List<Item> items = this.Items;
List<Item> items = Items;
for ( int i = items.Count - 1; i >= 0; --i )
{
@ -122,7 +122,7 @@ namespace Server.Items
public virtual bool GetLastPostTime( Mobile poster, bool onlyCheckRoot, ref DateTime lastPostTime )
{
List<Item> items = this.Items;
List<Item> items = Items;
bool wasSet = false;
for ( int i = 0; i < items.Count; ++i )
@ -168,7 +168,7 @@ namespace Server.Items
if ( from.AccessLevel >= AccessLevel.GameMaster )
return true;
return ( from.Map == this.Map && from.InRange( GetWorldLocation(), 2 ) );
return ( from.Map == Map && from.InRange( GetWorldLocation(), 2 ) );
}
public void PostMessage( Mobile from, BulletinMessage thread, string subject, string[] lines )
@ -331,7 +331,7 @@ namespace Server.Items
return m_Time.ToString( "MMM dd, yyyy" );
}
public override bool CheckTarget( Mobile from, Server.Targeting.Target targ, object targeted )
public override bool CheckTarget( Mobile from, Targeting.Target targ, object targeted )
{
return false;
}

View file

@ -55,10 +55,10 @@ namespace Server.Items
[CommandProperty( AccessLevel.GameMaster )]
public bool Active
{
get => this.ItemID == 0x1ECD;
get => ItemID == 0x1ECD;
set
{
this.ItemID = value ? 0x1ECD : 0x1ED0;
ItemID = value ? 0x1ECD : 0x1ED0;
InvalidateProperties();
}
}
@ -99,9 +99,9 @@ namespace Server.Items
{
base.GetProperties( list );
list.Add( this.Active ? 1060742 : 1060743 ); // active / inactive
list.Add( Active ? 1060742 : 1060743 ); // active / inactive
list.Add( 1060745 ); // broadcast
list.Add( 1060741, this.Charges.ToString() ); // charges: ~1_val~
list.Add( 1060741, Charges.ToString() ); // charges: ~1_val~
if ( Receivers.Count > 0 )
list.Add( 1060746, Receivers.Count.ToString() ); // links: ~1_val~
@ -111,9 +111,9 @@ namespace Server.Items
{
base.OnSingleClick( from );
LabelTo( from, this.Active ? 1060742 : 1060743 ); // active / inactive
LabelTo( from, Active ? 1060742 : 1060743 ); // active / inactive
LabelTo( from, 1060745 ); // broadcast
LabelTo( from, 1060741, this.Charges.ToString() ); // charges: ~1_val~
LabelTo( from, 1060741, Charges.ToString() ); // charges: ~1_val~
if ( Receivers.Count > 0 )
LabelTo( from, 1060746, Receivers.Count.ToString() ); // links: ~1_val~
@ -145,7 +145,7 @@ namespace Server.Items
}
else
{
this.Active = false;
Active = false;
break;
}
}
@ -298,10 +298,10 @@ namespace Server.Items
[CommandProperty( AccessLevel.GameMaster )]
public bool Active
{
get => this.ItemID == 0x1ED1;
get => ItemID == 0x1ED1;
set
{
this.ItemID = value ? 0x1ED1 : 0x1ED0;
ItemID = value ? 0x1ED1 : 0x1ED0;
InvalidateProperties();
}
}
@ -342,7 +342,7 @@ namespace Server.Items
{
base.GetProperties( list );
list.Add( this.Active ? 1060742 : 1060743 ); // active / inactive
list.Add( Active ? 1060742 : 1060743 ); // active / inactive
list.Add( 1060744 ); // receiver
}
@ -350,22 +350,22 @@ namespace Server.Items
{
base.OnSingleClick( from );
LabelTo( from, this.Active ? 1060742 : 1060743 ); // active / inactive
LabelTo( from, Active ? 1060742 : 1060743 ); // active / inactive
LabelTo( from, 1060744 ); // receiver
}
public void TransmitMessage( Mobile from, string message )
{
if ( !this.Active )
if ( !Active )
return;
string text = String.Format( "{0} says {1}", from.Name, message );
if ( this.RootParent is Mobile mobile )
if ( RootParent is Mobile mobile )
{
mobile.SendMessage( 0x2B2, "Crystal: " + text );
}
else if ( this.RootParent is Item item )
else if ( RootParent is Item item )
{
item.PublicOverheadMessage( MessageType.Regular, 0x2B2, false, "Crystal: " + text );
}

View file

@ -159,7 +159,7 @@ namespace Server.Items
private void AssignInstancedLoot()
{
if ( m_Aggressors.Count == 0 || this.Items.Count == 0 )
if ( m_Aggressors.Count == 0 || Items.Count == 0 )
return;
if ( m_InstancedItems == null )
@ -168,9 +168,9 @@ namespace Server.Items
List<Item> m_Stackables = new List<Item>();
List<Item> m_Unstackables = new List<Item>();
for ( int i = 0; i < this.Items.Count; i++ )
for ( int i = 0; i < Items.Count; i++ )
{
Item item = this.Items[i];
Item item = Items[i];
if ( item.LootType != LootType.Cursed ) //Don't have curesd items take up someone's item spot.. (?)
{
@ -240,9 +240,9 @@ namespace Server.Items
public void AddCarvedItem( Item carved, Mobile carver )
{
this.DropItem( carved );
DropItem( carved );
if ( this.InstancedCorpse )
if ( InstancedCorpse )
{
if ( m_InstancedItems == null )
m_InstancedItems = new Dictionary<Item, InstancedItemInfo>();
@ -954,7 +954,7 @@ namespace Server.Items
if ( !IsCriminalAction( from ) )
return true;
Map map = this.Map;
Map map = Map;
if ( map == null || (map.Rules & MapRules.HarmfulRestrictions) != 0 )
return false;
@ -986,10 +986,10 @@ namespace Server.Items
public virtual void Open( Mobile from, bool checkSelfLoot )
{
if ( from.AccessLevel > AccessLevel.Player || from.InRange( this.GetWorldLocation(), 2 ) )
if ( from.AccessLevel > AccessLevel.Player || from.InRange( GetWorldLocation(), 2 ) )
{
#region Self Looting
if ( checkSelfLoot && from == m_Owner && !GetFlag( CorpseFlag.SelfLooted ) && this.Items.Count != 0 )
if ( checkSelfLoot && from == m_Owner && !GetFlag( CorpseFlag.SelfLooted ) && Items.Count != 0 )
{
if ( from.FindItemOnLayer( Layer.OuterTorso ) is DeathRobe robe )
{
@ -1017,7 +1017,7 @@ namespace Server.Items
}
}
List<Item> items = new List<Item>( this.Items );
List<Item> items = new List<Item>( Items );
bool didntFit = false;
@ -1045,7 +1045,7 @@ namespace Server.Items
from.PlaySound( 0x3E3 );
if ( this.Items.Count != 0 )
if ( Items.Count != 0 )
{
from.SendLocalizedMessage( 1062472 ); // You gather some of your belongings. The rest remain on the corpse.
}
@ -1152,18 +1152,18 @@ namespace Server.Items
if ( m_CorpseName != null )
list.Add( m_CorpseName );
else
list.Add( 1046414, this.Name ); // the remains of ~1_NAME~
list.Add( 1046414, Name ); // the remains of ~1_NAME~
}
else // Bone form
{
list.Add( 1046414, this.Name ); // the remains of ~1_NAME~
list.Add( 1046414, Name ); // the remains of ~1_NAME~
}
}
public override void OnAosSingleClick( Mobile from )
{
int hue = Notoriety.GetHue( NotorietyHandlers.CorpseNotoriety( from, this ) );
ObjectPropertyList opl = this.PropertyList;
ObjectPropertyList opl = PropertyList;
if ( opl.Header > 0 )
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Label, hue, 3, opl.Header, Name, opl.HeaderArgs ) );
@ -1188,7 +1188,7 @@ namespace Server.Items
public void Carve( Mobile from, Item item )
{
if ( IsCriminalAction( from ) && this.Map != null && (this.Map.Rules & MapRules.HarmfulRestrictions) != 0 )
if ( IsCriminalAction( from ) && Map != null && (Map.Rules & MapRules.HarmfulRestrictions) != 0 )
{
if ( m_Owner == null || !m_Owner.Player )
from.SendLocalizedMessage( 1005035 ); // You did not earn the right to loot this creature!

View file

@ -68,7 +68,7 @@ namespace Server.Items
public override void OnSingleClick( Mobile from )
{
this.LabelTo( from, 1046414, Name ); // the remains of ~1_NAME~
LabelTo( from, 1046414, Name ); // the remains of ~1_NAME~
}
public DecayedCorpse( Serial serial ) : base( serial )

View file

@ -162,13 +162,13 @@ namespace Server.Items
int y = Location.Y + (Utility.Random( (m_SpawnRange * 2) + 1 ) - m_SpawnRange);
int z = Map.GetAverageZ( x, y );
if ( Map.CanSpawnMobile( new Point2D( x, y ), this.Z ) )
return new Point3D( x, y, this.Z );
if ( Map.CanSpawnMobile( new Point2D( x, y ), Z ) )
return new Point3D( x, y, Z );
else if ( Map.CanSpawnMobile( new Point2D( x, y ), z ) )
return new Point3D( x, y, z );
}
return this.Location;
return Location;
}
public virtual void DoEffect( Point3D loc, Map map )
@ -185,7 +185,7 @@ namespace Server.Items
{
if ( m_NextSpawn < DateTime.UtcNow )
{
Map map = this.Map;
Map map = Map;
BaseCreature bc = (BaseCreature)Activator.CreateInstance( m_Creatures[Utility.Random( m_Creatures.Length )] );
if ( bc != null )

View file

@ -41,7 +41,7 @@ namespace Server.Items
protected override void OnAmountChange( int oldValue )
{
int newValue = this.Amount;
int newValue = Amount;
UpdateTotal( this, TotalType.Gold, newValue - oldValue );
}
@ -119,7 +119,7 @@ namespace Server.Items
int baseTotal = base.GetTotal( type );
if ( type == TotalType.Gold )
baseTotal += this.Amount;
baseTotal += Amount;
return baseTotal;
}

View file

@ -16,13 +16,13 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( !from.InRange( this.GetWorldLocation(), 2 ) || !from.InLOS( this ) )
if ( !from.InRange( GetWorldLocation(), 2 ) || !from.InLOS( this ) )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that
}
else if ( Visible && ( ItemID == 4656 || ItemID == 4702 ) && DateTime.UtcNow >= m_NextUse )
{
Point3D p = this.GetWorldLocation();
Point3D p = GetWorldLocation();
if ( 1 > Utility.Random( Math.Max( Math.Abs( from.X - p.X ), Math.Abs( from.Y - p.Y ) ) ) )
{
@ -31,7 +31,7 @@ namespace Server.Items
Spells.SpellHelper.Damage( TimeSpan.FromSeconds( 0.5 ), from, Utility.Dice( 2, 10, 5 ) );
}
Effects.PlaySound( this.GetWorldLocation(), this.Map, 0x387 );
Effects.PlaySound( GetWorldLocation(), Map, 0x387 );
Timer.DelayCall( TimeSpan.FromSeconds( 0.25 ), new TimerCallback( Down1 ) );
Timer.DelayCall( TimeSpan.FromSeconds( 0.50 ), new TimerCallback( Down2 ) );
@ -51,8 +51,8 @@ namespace Server.Items
{
ItemID = ( ItemID == 4678 ? 4679 : 4713 );
Point3D p = this.GetWorldLocation();
Map f = this.Map;
Point3D p = GetWorldLocation();
Map f = Map;
if ( f == null )
return;

View file

@ -33,7 +33,7 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( from.InRange( this.GetWorldLocation(), 1 ) )
if ( from.InRange( GetWorldLocation(), 1 ) )
{
from.CloseGump( typeof( HairDyeGump ) );
from.SendGump( new HairDyeGump( this ) );

View file

@ -61,7 +61,7 @@ namespace Server.Items
if ( !CheckUse( this, from ) )
return;
if ( from.FindGump( typeof( InteriorDecorator.InternalGump ) ) == null )
if ( from.FindGump( typeof( InternalGump ) ) == null )
from.SendGump( new InternalGump( this ) );
if ( m_Command != DecorateCommand.None )
@ -148,7 +148,7 @@ namespace Server.Items
protected override void OnTarget( Mobile from, object targeted )
{
if ( targeted is Item item && InteriorDecorator.CheckUse( m_Decorator, from ) )
if ( targeted is Item item && CheckUse( m_Decorator, from ) )
{
BaseHouse house = BaseHouse.FindHouseAt( from );
@ -226,7 +226,7 @@ namespace Server.Items
protected override void OnTargetCancel( Mobile from, TargetCancelType cancelType )
{
if ( cancelType == TargetCancelType.Canceled )
from.CloseGump( typeof( InteriorDecorator.InternalGump ) );
from.CloseGump( typeof( InternalGump ) );
}
private static void Turn( Item item, Mobile from )

View file

@ -212,7 +212,7 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( !this.IsChildOf( from.Backpack ) )
if ( !IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 501661 ); // That key is unreachable.
return;
@ -268,7 +268,7 @@ namespace Server.Items
public bool UseOn( Mobile from, ILockable o )
{
if ( o.KeyValue == this.KeyValue )
if ( o.KeyValue == KeyValue )
{
if ( o is BaseDoor door && !door.UseLocks() )
return false;

View file

@ -21,7 +21,7 @@ namespace Server.Items
public override bool OnDragDrop( Mobile from, Item dropped )
{
if ( !this.IsChildOf( from.Backpack ) )
if ( !IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1060640 ); // The item must be in your backpack to use it.
return false;
@ -32,7 +32,7 @@ namespace Server.Items
from.SendLocalizedMessage( 501689 ); // Only non-blank keys can be put on a keyring.
return false;
}
if ( this.Keys.Count >= MaxKeys )
if ( Keys.Count >= MaxKeys )
{
from.SendLocalizedMessage( 1008138 ); // This keyring is full.
return false;
@ -45,7 +45,7 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( !this.IsChildOf( from.Backpack ) )
if ( !IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1060640 ); // The item must be in your backpack to use it.
return;
@ -116,7 +116,7 @@ namespace Server.Items
public void Open( Mobile from )
{
if ( !(this.Parent is Container cont) )
if ( !(Parent is Container cont) )
return;
for ( int i = m_Keys.Count - 1; i >= 0; i-- )
@ -161,14 +161,14 @@ namespace Server.Items
private void UpdateItemID()
{
if ( this.Keys.Count < 1 )
this.ItemID = 0x1011;
else if ( this.Keys.Count < 3 )
this.ItemID = 0x1769;
else if ( this.Keys.Count < 5 )
this.ItemID = 0x176A;
if ( Keys.Count < 1 )
ItemID = 0x1011;
else if ( Keys.Count < 3 )
ItemID = 0x1769;
else if ( Keys.Count < 5 )
ItemID = 0x176A;
else
this.ItemID = 0x176B;
ItemID = 0x176B;
}
public KeyRing( Serial serial ) : base( serial )

View file

@ -46,14 +46,14 @@ namespace Server.Items
int version = reader.ReadInt();
if ( version < 1 && ItemID == 0x2199 )
this.ItemID = 0x21A2;
ItemID = 0x21A2;
}
public sealed class GMItemPacket : Packet
{
public GMItemPacket( Item item ) : base( 0x1A )
{
this.EnsureCapacity( 20 );
EnsureCapacity( 20 );
// 14 base length
// +2 - Amount

View file

@ -21,7 +21,7 @@ namespace Server.Items
}
else
{
this.Delete();
Delete();
Item i = null;

View file

@ -187,7 +187,7 @@ namespace Server.Items
if ( house == null || !house.IsLockedDown( this ) )
from.SendLocalizedMessage( 1062396 ); // This bulletin board must be locked down in a house to be usable.
else if ( !from.InRange( this.GetWorldLocation(), 2 ) || !from.InLOS( this ) )
else if ( !from.InRange( GetWorldLocation(), 2 ) || !from.InLOS( this ) )
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
else if ( CheckAccess( house, from ) )
from.SendGump( new PlayerBBGump( from, house, this, 0 ) );

View file

@ -49,7 +49,7 @@ namespace Server.Items
v.SayTo( from, 503246 ); // Ah! it feels good to be working again.
this.Delete();
Delete();
}
else
{
@ -93,7 +93,7 @@ namespace Server.Items
v.SayTo( from, 503246 ); // Ah! it feels good to be working again.
this.Delete();
Delete();
}
}
}

View file

@ -18,7 +18,7 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( !from.InRange( this.GetWorldLocation(), 3 ))
if ( !from.InRange( GetWorldLocation(), 3 ))
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
else
from.SendAsciiMessage( "This looks like part of a larger contraption." );

View file

@ -49,7 +49,7 @@ namespace Server.Items
{
if ( m is PlayerMobile )
{
if ( !Utility.InRange( m.Location, this.Location, 1 ) && Utility.InRange( oldLocation, this.Location, 1 ) )
if ( !Utility.InRange( m.Location, Location, 1 ) && Utility.InRange( oldLocation, Location, 1 ) )
m.CloseGump( typeof( MoongateGump ) );
}
}

View file

@ -53,14 +53,14 @@ namespace Server.Items
{
Mobile from = e.Mobile;
if ( !e.Handled && from.InRange( this, 10 ) && e.Speech.ToLower() == this.Word )
if ( !e.Handled && from.InRange( this, 10 ) && e.Speech.ToLower() == Word )
{
BaseBoat boat = BaseBoat.FindBoatAt( from, from.Map );
if ( boat == null )
return;
if ( !this.Active )
if ( !Active )
{
if ( boat.TillerMan != null )
boat.TillerMan.Say( 502507 ); // Ar, Legend has it that these pillars are inactive! No man knows how it might be undone!

View file

@ -34,7 +34,7 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( from.InRange( this.GetWorldLocation(), 1 ) )
if ( from.InRange( GetWorldLocation(), 1 ) )
{
from.CloseGump( typeof( SpecialBeardDyeGump ) );
from.SendGump( new SpecialBeardDyeGump( this ) );

View file

@ -34,7 +34,7 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( from.InRange( this.GetWorldLocation(), 1 ) )
if ( from.InRange( GetWorldLocation(), 1 ) )
{
from.CloseGump( typeof( SpecialHairDyeGump ) );
from.SendGump( new SpecialHairDyeGump( this ) );

View file

@ -194,7 +194,7 @@ namespace Server.Items
if (p == Point3D.Zero)
p = m.Location;
Server.Mobiles.BaseCreature.TeleportPets(m, p, map);
BaseCreature.TeleportPets(m, p, map);
bool sendEffect = (!m.Hidden || m.AccessLevel == AccessLevel.Player);

View file

@ -105,7 +105,7 @@ namespace Server.Items
public void Empty( int message )
{
List<Item> items = this.Items;
List<Item> items = Items;
if ( items.Count > 0 )
{

View file

@ -101,7 +101,7 @@ namespace Server.Items
m_Broadcasting = true;
SendMessage( triggerer, this.OnlyToTriggerer, m_WarningString, m_WarningNumber );
SendMessage( triggerer, OnlyToTriggerer, m_WarningString, m_WarningNumber );
if ( NeighborRange >= 0 )
{

View file

@ -24,8 +24,8 @@ namespace Server.Items
[Constructible]
public WayPoint() : base( 0x1f14 )
{
this.Hue = 0x498;
this.Visible = false;
Hue = 0x498;
Visible = false;
//this.Movable = false;
}

View file

@ -27,8 +27,8 @@ namespace Server.Items
public override void OnMovement( Mobile m, Point3D oldLocation )
{
if ( m_TurnedOn && IsLockedDown && (!m.Hidden || m.AccessLevel == AccessLevel.Player) && Utility.InRange( m.Location, this.Location, 2 ) && !Utility.InRange( oldLocation, this.Location, 2 ) )
Effects.PlaySound( this.Location, this.Map, m_Sounds[Utility.Random( m_Sounds.Length )] );
if ( m_TurnedOn && IsLockedDown && (!m.Hidden || m.AccessLevel == AccessLevel.Player) && Utility.InRange( m.Location, Location, 2 ) && !Utility.InRange( oldLocation, Location, 2 ) )
Effects.PlaySound( Location, Map, m_Sounds[Utility.Random( m_Sounds.Length )] );
base.OnMovement( m, oldLocation );
}

View file

@ -141,7 +141,7 @@ namespace Server.Items
{
from.SendLocalizedMessage( 500447 ); // That is not accessible
}
else if ( from.InRange( this.GetWorldLocation(), 2 ) )
else if ( from.InRange( GetWorldLocation(), 2 ) )
{
from.SendLocalizedMessage( 501971 ); // Select the forge on which to smelt the ore, or another pile of ore with which to combine it.
from.Target = new InternalTarget( this );

View file

@ -45,7 +45,7 @@ namespace Server.Items
{
get
{
Mobile m = this.Parent as Mobile;
Mobile m = Parent as Mobile;
double ar = base.ArmorRating;
if ( m != null )
@ -114,7 +114,7 @@ namespace Server.Items
if ( !(Parent is Mobile owner) )
return damage;
double ar = this.ArmorRating;
double ar = ArmorRating;
double chance = (owner.Skills[SkillName.Parry].Value - (ar * 2.0)) / 100.0;
if ( chance < 0.01 )

View file

@ -1,7 +1,7 @@
namespace Server.Items
{
[FlippableAttribute( 0xFAF, 0xFB0 )]
[Server.Engines.Craft.Anvil]
[Engines.Craft.Anvil]
public class Anvil : Item
{
[Constructible]
@ -29,7 +29,7 @@ namespace Server.Items
}
}
[Server.Engines.Craft.Forge]
[Engines.Craft.Forge]
public class Forge : Item
{
[Constructible]

View file

@ -1,6 +1,6 @@
namespace Server.Items
{
[Server.Engines.Craft.Forge]
[Engines.Craft.Forge]
public class LargeForgeWest : Item
{
private InternalItem m_Item;
@ -65,7 +65,7 @@ namespace Server.Items
m_Item2 = reader.ReadItem() as InternalItem2;
}
[Server.Engines.Craft.Forge]
[Engines.Craft.Forge]
private class InternalItem : Item
{
private LargeForgeWest m_Item;
@ -120,7 +120,7 @@ namespace Server.Items
}
}
[Server.Engines.Craft.Forge]
[Engines.Craft.Forge]
private class InternalItem2 : Item
{
private LargeForgeWest m_Item;
@ -176,7 +176,7 @@ namespace Server.Items
}
}
[Server.Engines.Craft.Forge]
[Engines.Craft.Forge]
public class LargeForgeEast : Item
{
private InternalItem m_Item;
@ -241,7 +241,7 @@ namespace Server.Items
m_Item2 = reader.ReadItem() as InternalItem2;
}
[Server.Engines.Craft.Forge]
[Engines.Craft.Forge]
private class InternalItem : Item
{
private LargeForgeEast m_Item;
@ -296,7 +296,7 @@ namespace Server.Items
}
}
[Server.Engines.Craft.Forge]
[Engines.Craft.Forge]
private class InternalItem2 : Item
{
private LargeForgeEast m_Item;

View file

@ -20,7 +20,7 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( this.Parent != null || !this.VerifyMove( from ) )
if ( Parent != null || !VerifyMove( from ) )
return;
if ( !from.InRange( this, 2 ) )
@ -29,18 +29,18 @@ namespace Server.Items
return;
}
if ( this.ItemID == 0xA57 ) // rolled
if ( ItemID == 0xA57 ) // rolled
{
Direction dir = PlayerMobile.GetDirection4( from.Location, this.Location );
Direction dir = PlayerMobile.GetDirection4( from.Location, Location );
if ( dir == Direction.North || dir == Direction.South )
this.ItemID = 0xA55;
ItemID = 0xA55;
else
this.ItemID = 0xA56;
ItemID = 0xA56;
}
else // unrolled
{
this.ItemID = 0xA57;
ItemID = 0xA57;
if ( !from.HasGump( typeof( LogoutGump ) ) )
{

View file

@ -57,7 +57,7 @@ namespace Server.Items
{
get
{
switch ( this.ItemID )
switch ( ItemID )
{
case 0xDE3:
return CampfireStatus.Burning;
@ -71,24 +71,24 @@ namespace Server.Items
}
set
{
if ( this.Status == value )
if ( Status == value )
return;
switch ( value )
{
case CampfireStatus.Burning:
this.ItemID = 0xDE3;
this.Light = LightType.Circle300;
ItemID = 0xDE3;
Light = LightType.Circle300;
break;
case CampfireStatus.Extinguishing:
this.ItemID = 0xDE9;
this.Light = LightType.Circle150;
ItemID = 0xDE9;
Light = LightType.Circle150;
break;
default:
this.ItemID = 0xDEA;
this.Light = LightType.ArchedWindowEast;
ItemID = 0xDEA;
Light = LightType.ArchedWindowEast;
ClearEntries();
break;
}
@ -98,16 +98,16 @@ namespace Server.Items
private void OnTick()
{
DateTime now = DateTime.UtcNow;
TimeSpan age = now - this.Created;
TimeSpan age = now - Created;
if ( age >= TimeSpan.FromSeconds( 100.0 ) )
this.Delete();
Delete();
else if ( age >= TimeSpan.FromSeconds( 90.0 ) )
this.Status = CampfireStatus.Off;
Status = CampfireStatus.Off;
else if ( age >= TimeSpan.FromSeconds( 60.0 ) )
this.Status = CampfireStatus.Extinguishing;
Status = CampfireStatus.Extinguishing;
if ( this.Status == CampfireStatus.Off || this.Deleted )
if ( Status == CampfireStatus.Off || Deleted )
return;
foreach ( CampfireEntry entry in new ArrayList( m_Entries ) )
@ -123,7 +123,7 @@ namespace Server.Items
}
}
IPooledEnumerable<NetState> eable = this.GetClientsInRange( SecureRange );
IPooledEnumerable<NetState> eable = GetClientsInRange( SecureRange );
foreach ( NetState state in eable )
{
@ -172,7 +172,7 @@ namespace Server.Items
int version = reader.ReadInt();
this.Delete();
Delete();
}
}

View file

@ -41,10 +41,10 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( !this.VerifyMove( from ) )
if ( !VerifyMove( from ) )
return;
if ( !from.InRange( this.GetWorldLocation(), 2 ) )
if ( !from.InRange( GetWorldLocation(), 2 ) )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
return;
@ -64,7 +64,7 @@ namespace Server.Items
{
Consume();
if ( !this.Deleted && this.Parent == null )
if ( !Deleted && Parent == null )
from.PlaceInBackpack( this );
new Campfire().MoveToWorld( fireLocation, from.Map );
@ -76,8 +76,8 @@ namespace Server.Items
if ( from.Region.IsPartOf( typeof( DungeonRegion ) ) )
return Point3D.Zero;
if ( this.Parent == null )
return this.Location;
if ( Parent == null )
return Location;
ArrayList list = new ArrayList( 4 );

View file

@ -247,10 +247,10 @@ namespace Server.Items
public bool CouldFit( IPoint3D p, Map map )
{
if ( !map.CanFit( p.X, p.Y, p.Z, this.ItemData.Height ) )
if ( !map.CanFit( p.X, p.Y, p.Z, ItemData.Height ) )
return false;
if ( this.ItemID == m_NorthID )
if ( ItemID == m_NorthID )
return BaseAddon.IsWall( p.X, p.Y - 1, p.Z, map ); // North wall
else
return BaseAddon.IsWall( p.X - 1, p.Y, p.Z, map ); // West wall
@ -300,21 +300,21 @@ namespace Server.Items
private void FixMovingCrate()
{
if ( this.Deleted )
if ( Deleted )
return;
if ( this.Movable || this.IsLockedDown )
if ( Movable || IsLockedDown )
{
Item deed = this.Deed;
Item deed = Deed;
if ( this.Parent is Item item )
if ( Parent is Item item )
{
item.AddItem( deed );
deed.Location = this.Location;
deed.Location = Location;
}
else
{
deed.MoveToWorld( this.Location, this.Map );
deed.MoveToWorld( Location, Map );
}
Delete();
@ -331,7 +331,7 @@ namespace Server.Items
{
if ( from.InRange( GetWorldLocation(), 1 ) )
{
from.AddToBackpack( this.Deed );
from.AddToBackpack( Deed );
Delete();
}
else

View file

@ -131,7 +131,7 @@ namespace Server.Items
}
case 0:
{
m_TargetMap = this.Map;
m_TargetMap = Map;
if ( m_TargetMap == null || m_TargetMap == Map.Internal )
m_TargetMap = Map.Trammel;

View file

@ -35,9 +35,9 @@ namespace Server.Items
int xMins = 0, yMins = 0;
bool xEast = false, ySouth = false;
if ( Sextant.Format( from.Location, from.Map, ref xLong, ref yLat, ref xMins, ref yMins, ref xEast, ref ySouth ) )
if ( Format( from.Location, from.Map, ref xLong, ref yLat, ref xMins, ref yMins, ref xEast, ref ySouth ) )
{
string location = String.Format( "{0}° {1}'{2}, {3}° {4}'{5}", yLat, yMins, ySouth ? "S" : "N", xLong, xMins, xEast ? "E" : "W" );
string location = String.Format( "{0}<EFBFBD> {1}'{2}, {3}<7D> {4}'{5}", yLat, yMins, ySouth ? "S" : "N", xLong, xMins, xEast ? "E" : "W" );
from.LocalOverheadMessage( MessageType.Regular, from.SpeechHue, false, location );
}
}

View file

@ -11,17 +11,17 @@ namespace Server.Items
{
public ShipwreckedItem( int itemID ) : base( itemID )
{
int weight = this.ItemData.Weight;
int weight = ItemData.Weight;
if ( weight >= 255 )
weight = 1;
this.Weight = weight;
Weight = weight;
}
public override void OnSingleClick( Mobile from )
{
this.LabelTo( from, 1050039, String.Format( "#{0}\t#1041645", LabelNumber ) );
LabelTo( from, 1050039, String.Format( "#{0}\t#1041645", LabelNumber ) );
}
public override void AddNameProperties( ObjectPropertyList list )

View file

@ -221,7 +221,7 @@ namespace Server.Items
if ( index == 14 )
FinishEffect( p, Map, from );
else
this.Z -= 1;
Z -= 1;
}
}
@ -252,7 +252,7 @@ namespace Server.Items
LandTile t = map.Tiles.GetLandTile( tx, ty );
if ( t.Z == p.Z && ( (t.ID >= 0xA8 && t.ID <= 0xAB) || (t.ID >= 0x136 && t.ID <= 0x137) ) && !Spells.SpellHelper.CheckMulti( new Point3D( tx, ty, p.Z ), map ) )
if ( t.Z == p.Z && ( (t.ID >= 0xA8 && t.ID <= 0xAB) || (t.ID >= 0x136 && t.ID <= 0x137) ) && !SpellHelper.CheckMulti( new Point3D( tx, ty, p.Z ), map ) )
{
x = tx;
y = ty;

View file

@ -148,7 +148,7 @@ namespace Server.Items
bool stoneMining = ( mobile.StoneMining && mobile.Skills[SkillName.Mining].Base >= 100.0 );
if ( mobile.ToggleMiningStone == value || ( value && !stoneMining ) )
this.Flags |= CMEFlags.Disabled;
Flags |= CMEFlags.Disabled;
}
public override void OnClick()

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