Removes implicit this.
This commit is contained in:
parent
04b4cfe75b
commit
83dcf536d8
533 changed files with 2804 additions and 2806 deletions
|
|
@ -39,7 +39,7 @@ namespace Server.Items
|
|||
get => base.ItemID;
|
||||
set {
|
||||
if ( base.ItemID != value ) {
|
||||
Map facet = ( this.Parent == null ? this.Map : null );
|
||||
Map facet = ( Parent == null ? Map : null );
|
||||
|
||||
if ( facet != null ) {
|
||||
facet.OnLeave( this );
|
||||
|
|
@ -57,8 +57,8 @@ namespace Server.Items
|
|||
[Obsolete( "Replace with calls to OnLeave and OnEnter surrounding component invalidation.", true )]
|
||||
public virtual void RefreshComponents()
|
||||
{
|
||||
if ( this.Parent == null ) {
|
||||
Map facet = this.Map;
|
||||
if ( Parent == null ) {
|
||||
Map facet = Map;
|
||||
|
||||
if ( facet != null ) {
|
||||
facet.OnLeave( this );
|
||||
|
|
@ -71,7 +71,7 @@ namespace Server.Items
|
|||
{
|
||||
get
|
||||
{
|
||||
MultiComponentList mcl = this.Components;
|
||||
MultiComponentList mcl = Components;
|
||||
|
||||
if ( mcl.List.Length > 0 ) {
|
||||
int id = mcl.List[0].m_ItemID;
|
||||
|
|
@ -117,10 +117,10 @@ namespace Server.Items
|
|||
|
||||
public virtual bool Contains( int x, int y )
|
||||
{
|
||||
MultiComponentList mcl = this.Components;
|
||||
MultiComponentList mcl = Components;
|
||||
|
||||
x -= this.X + mcl.Min.m_X;
|
||||
y -= this.Y + mcl.Min.m_Y;
|
||||
x -= X + mcl.Min.m_X;
|
||||
y -= Y + mcl.Min.m_Y;
|
||||
|
||||
return x >= 0
|
||||
&& x < mcl.Width
|
||||
|
|
@ -131,7 +131,7 @@ namespace Server.Items
|
|||
|
||||
public bool Contains( Mobile m )
|
||||
{
|
||||
if ( m.Map == this.Map )
|
||||
if ( m.Map == Map )
|
||||
return Contains( m.X, m.Y );
|
||||
else
|
||||
return false;
|
||||
|
|
@ -139,7 +139,7 @@ namespace Server.Items
|
|||
|
||||
public bool Contains( Item item )
|
||||
{
|
||||
if ( item.Map == this.Map )
|
||||
if ( item.Map == Map )
|
||||
return Contains( item.X, item.Y );
|
||||
else
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -73,11 +73,11 @@ namespace Server.Items
|
|||
get => base.ItemID;
|
||||
set
|
||||
{
|
||||
int oldID = this.ItemID;
|
||||
int oldID = ItemID;
|
||||
|
||||
base.ItemID = value;
|
||||
|
||||
if ( this.ItemID != oldID )
|
||||
if ( ItemID != oldID )
|
||||
UpdateContainerData();
|
||||
}
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ namespace Server.Items
|
|||
|
||||
public virtual void UpdateContainerData()
|
||||
{
|
||||
this.ContainerData = ContainerData.GetData( this.ItemID );
|
||||
ContainerData = ContainerData.GetData( ItemID );
|
||||
}
|
||||
|
||||
public virtual Rectangle2D Bounds => ContainerData.Bounds;
|
||||
|
|
@ -199,9 +199,9 @@ namespace Server.Items
|
|||
return false;
|
||||
}
|
||||
|
||||
int maxItems = this.MaxItems;
|
||||
int maxItems = MaxItems;
|
||||
|
||||
if ( checkItems && maxItems != 0 && (this.TotalItems + plusItems + item.TotalItems + (item.IsVirtualItem ? 0 : 1)) > maxItems )
|
||||
if ( checkItems && maxItems != 0 && (TotalItems + plusItems + item.TotalItems + (item.IsVirtualItem ? 0 : 1)) > maxItems )
|
||||
{
|
||||
if ( message )
|
||||
SendFullItemsMessage( m, item );
|
||||
|
|
@ -209,7 +209,7 @@ namespace Server.Items
|
|||
return false;
|
||||
}
|
||||
|
||||
if ( MaxWeight != 0 && (this.TotalWeight + plusWeight + item.TotalWeight + item.PileWeight) > MaxWeight )
|
||||
if ( MaxWeight != 0 && (TotalWeight + plusWeight + item.TotalWeight + item.PileWeight) > MaxWeight )
|
||||
{
|
||||
if ( message )
|
||||
SendFullWeightMessage( m, item );
|
||||
|
|
@ -218,7 +218,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
object parent = this.Parent;
|
||||
object parent = Parent;
|
||||
|
||||
while ( parent != null )
|
||||
{
|
||||
|
|
@ -1490,7 +1490,7 @@ namespace Server.Items
|
|||
|
||||
public virtual bool TryDropItem( Mobile from, Item dropped, bool sendFullMessage, bool playSound )
|
||||
{
|
||||
List<Item> list = this.Items;
|
||||
List<Item> list = Items;
|
||||
|
||||
for ( int i = 0; i < list.Count; ++i )
|
||||
{
|
||||
|
|
@ -1524,7 +1524,7 @@ namespace Server.Items
|
|||
{
|
||||
Item dropped = droppedItems[i];
|
||||
|
||||
List<Item> list = this.Items;
|
||||
List<Item> list = Items;
|
||||
|
||||
bool stacked = false;
|
||||
|
||||
|
|
@ -1600,7 +1600,7 @@ namespace Server.Items
|
|||
AddItem( dropped );
|
||||
|
||||
Rectangle2D bounds = dropped.GetGraphicBounds();
|
||||
Rectangle2D ourBounds = this.Bounds;
|
||||
Rectangle2D ourBounds = Bounds;
|
||||
|
||||
int x, y;
|
||||
|
||||
|
|
@ -1653,7 +1653,7 @@ namespace Server.Items
|
|||
{
|
||||
if ( DisplaysContent )
|
||||
{
|
||||
object root = this.RootParent;
|
||||
object root = RootParent;
|
||||
|
||||
if ( root == null || root is Item || root == from || from.AccessLevel > AccessLevel.Player )
|
||||
return true;
|
||||
|
|
@ -1705,7 +1705,7 @@ namespace Server.Items
|
|||
|
||||
if ( ObjectPropertyList.Enabled )
|
||||
{
|
||||
List<Item> items = this.Items;
|
||||
List<Item> items = Items;
|
||||
|
||||
for ( int i = 0; i < items.Count; ++i )
|
||||
to.Send( items[i].OPLPacket );
|
||||
|
|
@ -1722,7 +1722,7 @@ namespace Server.Items
|
|||
if ( m_Openers != null )
|
||||
{
|
||||
Point3D worldLoc = GetWorldLocation();
|
||||
Map map = this.Map;
|
||||
Map map = Map;
|
||||
|
||||
for ( int i = 0; i < m_Openers.Count; ++i )
|
||||
{
|
||||
|
|
@ -1782,7 +1782,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from.AccessLevel > AccessLevel.Player || from.InRange( this.GetWorldLocation(), 2 ) )
|
||||
if ( from.AccessLevel > AccessLevel.Player || from.InRange( GetWorldLocation(), 2 ) )
|
||||
DisplayTo( from );
|
||||
else
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
|
|
|
|||
|
|
@ -84,8 +84,8 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
if ( this.ItemID == 0xE41 )
|
||||
this.ItemID = 0xE7C;
|
||||
if ( ItemID == 0xE41 )
|
||||
ItemID = 0xE7C;
|
||||
}
|
||||
|
||||
private static bool m_SendRemovePacket;
|
||||
|
|
@ -99,7 +99,7 @@ namespace Server.Items
|
|||
m_Open = false;
|
||||
|
||||
if ( m_Owner != null && m_SendRemovePacket )
|
||||
m_Owner.Send( this.RemovePacket );
|
||||
m_Owner.Send( RemovePacket );
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@ namespace Server.Items
|
|||
|
||||
Mobile to;
|
||||
|
||||
if ( this.Trade.From.Container != this )
|
||||
to = this.Trade.From.Mobile;
|
||||
if ( Trade.From.Container != this )
|
||||
to = Trade.From.Mobile;
|
||||
else
|
||||
to = this.Trade.To.Mobile;
|
||||
to = Trade.To.Mobile;
|
||||
|
||||
return m.CheckTrade( to, item, this, message, checkItems, plusItems, plusWeight );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue