Merge branch 'dev/2.6'
This commit is contained in:
commit
57a73805bb
27 changed files with 167 additions and 159 deletions
|
|
@ -75,7 +75,7 @@ namespace Server.Items
|
|||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ namespace Server.Factions
|
|||
return null;
|
||||
}
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ namespace Server.Factions
|
|||
mob.SolidHueOverride = OwnershipHue;
|
||||
}
|
||||
|
||||
public override void OnRemoved( object parent )
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
base.OnRemoved( parent );
|
||||
|
||||
|
|
@ -442,7 +442,7 @@ namespace Server.Factions
|
|||
return ( monolith != null && !monolith.Deleted );
|
||||
}
|
||||
|
||||
public override void OnParentDeleted( object parent )
|
||||
public override void OnParentDeleted(IEntity parent)
|
||||
{
|
||||
base.OnParentDeleted( parent );
|
||||
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ namespace Server.Engines.Help
|
|||
{
|
||||
from.SendLocalizedMessage( 1061632 ); // You can't do that while carrying the sigil.
|
||||
}
|
||||
else if ( from.CanUseStuckMenu() && from.Region.CanUseStuckMenu( from ) && !CheckCombat( from ) && !from.Frozen && !from.Criminal && (Core.AOS || from.Kills < 5) )
|
||||
else if ( from is PlayerMobile && ((PlayerMobile)from).CanUseStuckMenu() && from.Region.CanUseStuckMenu( from ) && !CheckCombat( from ) && !from.Frozen && !from.Criminal && (Core.AOS || from.Kills < 5) )
|
||||
{
|
||||
StuckMenu menu = new StuckMenu( from, from, true );
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Gumps;
|
||||
|
||||
|
|
@ -203,7 +204,8 @@ namespace Server.Menus.Questions
|
|||
|
||||
new TeleportTimer( m_Mobile, entry, TimeSpan.FromSeconds( 10.0 + (Utility.RandomDouble() * 110.0) ) ).Start();
|
||||
|
||||
m_Mobile.UsedStuckMenu();
|
||||
if (m_Mobile is PlayerMobile)
|
||||
((PlayerMobile)m_Mobile).UsedStuckMenu();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace Server.Engines.Quests.Necro
|
|||
return false;
|
||||
}
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
|
|
|
|||
|
|
@ -667,7 +667,7 @@ namespace Server.Items
|
|||
return v;
|
||||
}
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
if ( parent is Mobile )
|
||||
{
|
||||
|
|
@ -1265,7 +1265,7 @@ namespace Server.Items
|
|||
return base.OnEquip( from );
|
||||
}
|
||||
|
||||
public override void OnRemoved( object parent )
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
if ( parent is Mobile )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ namespace Server.Items
|
|||
return m_AosClothingAttributes.LowerStatReq;
|
||||
}
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
Mobile mob = parent as Mobile;
|
||||
|
||||
|
|
@ -351,7 +351,7 @@ namespace Server.Items
|
|||
base.OnAdded( parent );
|
||||
}
|
||||
|
||||
public override void OnRemoved( object parent )
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
Mobile mob = parent as Mobile;
|
||||
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ namespace Server.Items
|
|||
|
||||
public override int BasePhysicalResistance{ get{ return 3; } }
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ namespace Server.Items
|
|||
((Mobile)parent).VirtualArmorMod += 2;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
base.OnRemoved( parent );
|
||||
|
||||
|
|
|
|||
|
|
@ -728,7 +728,7 @@ namespace Server.Items
|
|||
return true;
|
||||
}
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ namespace Server.Items
|
|||
|
||||
public override int BasePhysicalResistance{ get{ return 3; } }
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ namespace Server.Items
|
|||
((Mobile)parent).VirtualArmorMod += 2;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
base.OnRemoved( parent );
|
||||
|
||||
|
|
@ -390,7 +390,7 @@ namespace Server.Items
|
|||
|
||||
public override int BasePhysicalResistance{ get{ return 3; } }
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
|
|
@ -398,7 +398,7 @@ namespace Server.Items
|
|||
((Mobile)parent).VirtualArmorMod += 2;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
base.OnRemoved( parent );
|
||||
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ namespace Server.Items
|
|||
public override int DefaultMaxWeight {
|
||||
get {
|
||||
if ( Core.ML ) {
|
||||
Mobile m = ParentEntity as Mobile;
|
||||
Mobile m = Parent as Mobile;
|
||||
if ( m != null && m.Player && m.Backpack == this ) {
|
||||
return 550;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ namespace Server.Items
|
|||
m_HitPoints = m_MaxHitPoints = Utility.RandomMinMax( InitMinHits, InitMaxHits );
|
||||
}
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
if ( Core.AOS && parent is Mobile )
|
||||
{
|
||||
|
|
@ -171,7 +171,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnRemoved( object parent )
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
if ( Core.AOS && parent is Mobile )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnAdded ( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
if ( Burning && parent is Container )
|
||||
Douse();
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace Server.Items
|
|||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnRemoved( object parent )
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
Mobile m = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -191,8 +191,8 @@ namespace Server.Items
|
|||
|
||||
InvalidateWeight();
|
||||
}
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
if ( parent is Mobile )
|
||||
{
|
||||
|
|
@ -201,8 +201,8 @@ namespace Server.Items
|
|||
m_Attributes.AddStatBonuses( mob );
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnRemoved( object parent )
|
||||
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
if ( parent is Mobile )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ namespace Server.Items
|
|||
book.m_AosSkillBonuses = new AosSkillBonuses( newItem, m_AosSkillBonuses );
|
||||
}
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
if ( Core.AOS && parent is Mobile )
|
||||
{
|
||||
|
|
@ -484,7 +484,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnRemoved( object parent )
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
if ( Core.AOS && parent is Mobile )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace Server.Items
|
|||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
public override void OnRemoved( object parent )
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
base.OnRemoved( parent );
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnRemoved( object parent )
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
base.OnRemoved( parent );
|
||||
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
|
|
@ -190,7 +190,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnRemoved( object parent )
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
base.OnRemoved( parent );
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
if( !IsEmpty )
|
||||
{
|
||||
IEntity rootParent = RootParentEntity;
|
||||
IEntity rootParent = RootParent;
|
||||
|
||||
if( rootParent != null && rootParent.Map != null && rootParent.Map != Map.Internal )
|
||||
MoveToWorld( rootParent.Location, rootParent.Map );
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ namespace Server.Items
|
|||
return base.CanEquip( from );
|
||||
}
|
||||
|
||||
public override void OnAdded(object parent)
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
if (parent is Mobile)
|
||||
{
|
||||
|
|
@ -259,7 +259,7 @@ namespace Server.Items
|
|||
InvalidateProperties();
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
if (parent is Mobile)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -659,7 +659,7 @@ namespace Server.Items
|
|||
return true;
|
||||
}
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
|
|
@ -675,7 +675,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnRemoved( object parent )
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
if ( parent is Mobile )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2661,7 +2661,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if (!item.Deleted && (item.LootType == LootType.Blessed || item.Insured))
|
||||
{
|
||||
if (this.Backpack != item.ParentEntity)
|
||||
if (this.Backpack != item.Parent)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -2938,6 +2938,47 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
#region Stuck Menu
|
||||
private DateTime[] m_StuckMenuUses;
|
||||
|
||||
public bool CanUseStuckMenu()
|
||||
{
|
||||
if (m_StuckMenuUses == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < m_StuckMenuUses.Length; ++i)
|
||||
{
|
||||
if ((DateTime.UtcNow - m_StuckMenuUses[i]) > TimeSpan.FromDays(1.0))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void UsedStuckMenu()
|
||||
{
|
||||
if (m_StuckMenuUses == null)
|
||||
{
|
||||
m_StuckMenuUses = new DateTime[2];
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_StuckMenuUses.Length; ++i)
|
||||
{
|
||||
if ((DateTime.UtcNow - m_StuckMenuUses[i]) > TimeSpan.FromDays(1.0))
|
||||
{
|
||||
m_StuckMenuUses[i] = DateTime.UtcNow;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private List<Mobile> m_PermaFlags;
|
||||
private List<Mobile> m_VisList;
|
||||
private Hashtable m_AntiMacroTable;
|
||||
|
|
@ -3312,6 +3353,24 @@ namespace Server.Mobiles
|
|||
|
||||
switch ( version )
|
||||
{
|
||||
case 29:
|
||||
{
|
||||
if (reader.ReadBool())
|
||||
{
|
||||
m_StuckMenuUses = new DateTime[reader.ReadInt()];
|
||||
|
||||
for (int i = 0; i < m_StuckMenuUses.Length; ++i)
|
||||
{
|
||||
m_StuckMenuUses[i] = reader.ReadDateTime();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_StuckMenuUses = null;
|
||||
}
|
||||
|
||||
goto case 28;
|
||||
}
|
||||
case 28:
|
||||
{
|
||||
m_PeacedUntil = reader.ReadDateTime();
|
||||
|
|
@ -3603,7 +3662,23 @@ namespace Server.Mobiles
|
|||
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 28 ); // version
|
||||
writer.Write( (int) 29 ); // version
|
||||
|
||||
if (m_StuckMenuUses != null)
|
||||
{
|
||||
writer.Write(true);
|
||||
|
||||
writer.Write(m_StuckMenuUses.Length);
|
||||
|
||||
for (int i = 0; i < m_StuckMenuUses.Length; ++i)
|
||||
{
|
||||
writer.Write(m_StuckMenuUses[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.Write(false);
|
||||
}
|
||||
|
||||
writer.Write( (DateTime) m_PeacedUntil );
|
||||
writer.Write( (DateTime) m_AnkhNextUse );
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("2.5.0.*")]
|
||||
[assembly: AssemblyVersion("2.6.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ namespace Server
|
|||
{
|
||||
public Map m_Map;
|
||||
public Point3D m_Location, m_WorldLoc;
|
||||
public object m_Parent;
|
||||
public IEntity m_Parent;
|
||||
|
||||
public BounceInfo( Item item )
|
||||
{
|
||||
|
|
@ -480,7 +480,7 @@ namespace Server
|
|||
m_Parent = item.Parent;
|
||||
}
|
||||
|
||||
private BounceInfo( Map map, Point3D loc, Point3D worldLoc, object parent )
|
||||
private BounceInfo( Map map, Point3D loc, Point3D worldLoc, IEntity parent )
|
||||
{
|
||||
m_Map = map;
|
||||
m_Location = loc;
|
||||
|
|
@ -496,7 +496,7 @@ namespace Server
|
|||
Point3D loc = reader.ReadPoint3D();
|
||||
Point3D worldLoc = reader.ReadPoint3D();
|
||||
|
||||
object parent;
|
||||
IEntity parent;
|
||||
|
||||
Serial serial = reader.ReadInt();
|
||||
|
||||
|
|
@ -594,7 +594,7 @@ namespace Server
|
|||
private int m_Hue;
|
||||
private int m_Amount;
|
||||
private Layer m_Layer;
|
||||
private object m_Parent; // Mobile, Item, or null=World
|
||||
private IEntity m_Parent; // Mobile, Item, or null=World
|
||||
private Map m_Map;
|
||||
private LootType m_LootType;
|
||||
private DateTime m_LastMovedTime;
|
||||
|
|
@ -1149,12 +1149,16 @@ namespace Server
|
|||
|
||||
if ( bounce != null )
|
||||
{
|
||||
object parent = bounce.m_Parent;
|
||||
IEntity parent = bounce.m_Parent;
|
||||
|
||||
if ( parent is Item && !((Item)parent).Deleted )
|
||||
if (parent.Deleted)
|
||||
{
|
||||
MoveToWorld(bounce.m_WorldLoc, bounce.m_Map);
|
||||
}
|
||||
else if ( parent is Item )
|
||||
{
|
||||
Item p = (Item)parent;
|
||||
object root = p.RootParent;
|
||||
IEntity root = p.RootParent;
|
||||
if ( p.IsAccessibleTo( from ) && ( !(root is Mobile) || ((Mobile)root).CheckNonlocalDrop( from, this, p ) ) )
|
||||
{
|
||||
Location = bounce.m_Location;
|
||||
|
|
@ -1165,7 +1169,7 @@ namespace Server
|
|||
MoveToWorld( from.Location, from.Map );
|
||||
}
|
||||
}
|
||||
else if ( parent is Mobile && !((Mobile)parent).Deleted )
|
||||
else if ( parent is Mobile )
|
||||
{
|
||||
if ( !((Mobile)parent).EquipItem( this ) )
|
||||
MoveToWorld( bounce.m_WorldLoc, bounce.m_Map );
|
||||
|
|
@ -1898,11 +1902,11 @@ namespace Server
|
|||
{
|
||||
}
|
||||
|
||||
public virtual void OnRemoved( object parent )
|
||||
public virtual void OnRemoved( IEntity parent )
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnAdded( object parent )
|
||||
public virtual void OnAdded( IEntity parent )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -2157,10 +2161,8 @@ namespace Server
|
|||
|
||||
if ( GetSaveFlag( flags, SaveFlag.Parent ) )
|
||||
{
|
||||
if ( m_Parent is Mobile && !( (Mobile) m_Parent ).Deleted )
|
||||
writer.Write( ( (Mobile) m_Parent ).Serial );
|
||||
else if ( m_Parent is Item && !( (Item) m_Parent ).Deleted )
|
||||
writer.Write( ( (Item) m_Parent ).Serial );
|
||||
if (m_Parent != null && !m_Parent.Deleted)
|
||||
writer.Write(m_Parent.Serial);
|
||||
else
|
||||
writer.Write( (int) Serial.MinusOne );
|
||||
}
|
||||
|
|
@ -2918,11 +2920,12 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
public object RootParent
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public IEntity RootParent
|
||||
{
|
||||
get
|
||||
{
|
||||
object p = m_Parent;
|
||||
IEntity p = m_Parent;
|
||||
|
||||
while ( p is Item )
|
||||
{
|
||||
|
|
@ -2944,7 +2947,7 @@ namespace Server
|
|||
|
||||
public bool ParentsContain<T>() where T : Item
|
||||
{
|
||||
object p = m_Parent;
|
||||
IEntity p = m_Parent;
|
||||
|
||||
while( p is Item )
|
||||
{
|
||||
|
|
@ -3325,7 +3328,7 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
public virtual void OnParentDeleted( object parent )
|
||||
public virtual void OnParentDeleted( IEntity parent )
|
||||
{
|
||||
this.Delete();
|
||||
}
|
||||
|
|
@ -3539,28 +3542,6 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public IEntity ParentEntity
|
||||
{
|
||||
get
|
||||
{
|
||||
IEntity p = Parent as IEntity;
|
||||
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public IEntity RootParentEntity
|
||||
{
|
||||
get
|
||||
{
|
||||
IEntity p = RootParent as IEntity;
|
||||
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
#region Location Location Location!
|
||||
|
||||
public virtual void OnLocationChange( Point3D oldLocation )
|
||||
|
|
@ -3728,7 +3709,8 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
public virtual object Parent
|
||||
[CommandProperty(AccessLevel.GameMaster, AccessLevel.Developer)]
|
||||
public IEntity Parent
|
||||
{
|
||||
get
|
||||
{
|
||||
|
|
@ -3739,7 +3721,7 @@ namespace Server
|
|||
if ( m_Parent == value )
|
||||
return;
|
||||
|
||||
object oldParent = m_Parent;
|
||||
IEntity oldParent = m_Parent;
|
||||
|
||||
m_Parent = value;
|
||||
|
||||
|
|
@ -4190,12 +4172,12 @@ namespace Server
|
|||
|
||||
public Point3D GetWorldLocation()
|
||||
{
|
||||
object root = RootParent;
|
||||
IEntity root = RootParent;
|
||||
|
||||
if ( root == null )
|
||||
return m_Location;
|
||||
else
|
||||
return ((IEntity)root).Location;
|
||||
return root.Location;
|
||||
|
||||
//return root == null ? m_Location : new Point3D( (IPoint3D) root );
|
||||
}
|
||||
|
|
@ -4204,22 +4186,22 @@ namespace Server
|
|||
|
||||
public Point3D GetSurfaceTop()
|
||||
{
|
||||
object root = RootParent;
|
||||
IEntity root = RootParent;
|
||||
|
||||
if ( root == null )
|
||||
return new Point3D( m_Location.m_X, m_Location.m_Y, m_Location.m_Z + (ItemData.Surface ? ItemData.CalcHeight : 0) );
|
||||
else
|
||||
return ((IEntity)root).Location;
|
||||
return root.Location;
|
||||
}
|
||||
|
||||
public Point3D GetWorldTop()
|
||||
{
|
||||
object root = RootParent;
|
||||
IEntity root = RootParent;
|
||||
|
||||
if ( root == null )
|
||||
return new Point3D( m_Location.m_X, m_Location.m_Y, m_Location.m_Z + ItemData.CalcHeight );
|
||||
else
|
||||
return ((IEntity)root).Location;
|
||||
return root.Location;
|
||||
}
|
||||
|
||||
public void SendLocalizedMessageTo( Mobile to, int number )
|
||||
|
|
@ -4378,14 +4360,14 @@ namespace Server
|
|||
return true;*/
|
||||
}
|
||||
|
||||
public bool IsChildOf( object o )
|
||||
public bool IsChildOf(IEntity o)
|
||||
{
|
||||
return IsChildOf( o, false );
|
||||
}
|
||||
|
||||
public bool IsChildOf( object o, bool allowNull )
|
||||
public bool IsChildOf(IEntity o, bool allowNull)
|
||||
{
|
||||
object p = m_Parent;
|
||||
IEntity p = m_Parent;
|
||||
|
||||
if ( (p == null || o == null) && !allowNull )
|
||||
return false;
|
||||
|
|
@ -4536,7 +4518,7 @@ namespace Server
|
|||
|
||||
int ourHue = Hue;
|
||||
Map thisMap = this.Map;
|
||||
object thisParent = this.m_Parent;
|
||||
IEntity thisParent = this.m_Parent;
|
||||
Point3D worldLoc = this.GetWorldLocation();
|
||||
LootType type = this.LootType;
|
||||
|
||||
|
|
|
|||
|
|
@ -749,7 +749,6 @@ namespace Server
|
|||
private bool m_DisplayGuildTitle;
|
||||
private Mobile m_GuildFealty;
|
||||
private long m_NextSpellTime;
|
||||
private DateTime[] m_StuckMenuUses;
|
||||
private Timer m_ExpireCombatant;
|
||||
private Timer m_ExpireCriminal;
|
||||
private Timer m_ExpireAggrTimer;
|
||||
|
|
@ -3502,26 +3501,6 @@ namespace Server
|
|||
this.Region.OnCriminalAction( this, message );
|
||||
}
|
||||
|
||||
public virtual bool CanUseStuckMenu()
|
||||
{
|
||||
if( m_StuckMenuUses == null )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
for( int i = 0; i < m_StuckMenuUses.Length; ++i )
|
||||
{
|
||||
if( (DateTime.UtcNow - m_StuckMenuUses[i]) > TimeSpan.FromDays( 1.0 ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsSnoop( Mobile from )
|
||||
{
|
||||
return (from != this);
|
||||
|
|
@ -5415,23 +5394,6 @@ namespace Server
|
|||
{
|
||||
}
|
||||
|
||||
public void UsedStuckMenu()
|
||||
{
|
||||
if( m_StuckMenuUses == null )
|
||||
{
|
||||
m_StuckMenuUses = new DateTime[2];
|
||||
}
|
||||
|
||||
for( int i = 0; i < m_StuckMenuUses.Length; ++i )
|
||||
{
|
||||
if( (DateTime.UtcNow - m_StuckMenuUses[i]) > TimeSpan.FromDays( 1.0 ) )
|
||||
{
|
||||
m_StuckMenuUses[i] = DateTime.UtcNow;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Squelched
|
||||
{
|
||||
|
|
@ -5451,6 +5413,11 @@ namespace Server
|
|||
|
||||
switch( version )
|
||||
{
|
||||
case 32:
|
||||
{
|
||||
// Removed StuckMenu
|
||||
goto case 31;
|
||||
}
|
||||
case 31:
|
||||
{
|
||||
m_LastStrGain = reader.ReadDeltaTime();
|
||||
|
|
@ -5714,19 +5681,17 @@ namespace Server
|
|||
m_StatMods = new List<StatMod>();
|
||||
m_SkillMods = new List<SkillMod>();
|
||||
|
||||
if( reader.ReadBool() )
|
||||
if (version < 32)
|
||||
{
|
||||
m_StuckMenuUses = new DateTime[reader.ReadInt()];
|
||||
|
||||
for( int i = 0; i < m_StuckMenuUses.Length; ++i )
|
||||
if (reader.ReadBool())
|
||||
{
|
||||
m_StuckMenuUses[i] = reader.ReadDateTime();
|
||||
int count = reader.ReadInt();
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
reader.ReadDateTime();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_StuckMenuUses = null;
|
||||
}
|
||||
|
||||
if( m_Player && m_Map != Map.Internal )
|
||||
{
|
||||
|
|
@ -5883,7 +5848,7 @@ namespace Server
|
|||
|
||||
public virtual void Serialize( GenericWriter writer )
|
||||
{
|
||||
writer.Write( (int)31 ); // version
|
||||
writer.Write( (int)32 ); // version
|
||||
|
||||
writer.WriteDeltaTime( m_LastStrGain );
|
||||
writer.WriteDeltaTime( m_LastIntGain );
|
||||
|
|
@ -6001,22 +5966,6 @@ namespace Server
|
|||
writer.Write( (byte)m_StrLock );
|
||||
writer.Write( (byte)m_DexLock );
|
||||
writer.Write( (byte)m_IntLock );
|
||||
|
||||
if( m_StuckMenuUses != null )
|
||||
{
|
||||
writer.Write( true );
|
||||
|
||||
writer.Write( m_StuckMenuUses.Length );
|
||||
|
||||
for( int i = 0; i < m_StuckMenuUses.Length; ++i )
|
||||
{
|
||||
writer.Write( m_StuckMenuUses[i] );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.Write( false );
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue