ISpawner; ISpawnable, cleanup. All custom spawners should inherit from ISpawner. Also, Ridiculous, not rediculous,

This commit is contained in:
asayre 2010-12-26 05:18:57 +00:00
parent 2971234c1c
commit 18d1396670
17 changed files with 212 additions and 243 deletions

View file

@ -1548,10 +1548,10 @@ namespace Server.Mobiles
m_Mobile.IsBonded = false;
SpawnEntry se = m_Mobile.Spawner as SpawnEntry;
if( se != null && se.Home != Point3D.Zero )
if( se != null && se.HomeLocation != Point3D.Zero )
{
m_Mobile.Home = se.Home;
m_Mobile.RangeHome = se.Range;
m_Mobile.Home = se.HomeLocation;
m_Mobile.RangeHome = se.HomeRange;
}
if( m_Mobile.DeleteOnRelease || m_Mobile.IsDeadPet )
@ -2618,14 +2618,14 @@ namespace Server.Mobiles
if( se != null && se.ReturnOnDeactivate && !m_Mobile.Controlled )
{
if( se.Home == Point3D.Zero )
if( se.HomeLocation == Point3D.Zero )
{
if( !m_Mobile.Region.AcceptsSpawnsFrom( se.Region ) )
{
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( ReturnToHome ) );
}
}
else if( !m_Mobile.InRange( se.Home, se.Range ) )
else if( !m_Mobile.InRange( se.HomeLocation, se.HomeRange ) )
{
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( ReturnToHome ) );
}

View file

@ -4656,7 +4656,7 @@ namespace Server.Mobiles
}
else
{
SpawnEntry se = this.Spawner as SpawnEntry;
ISpawner se = this.Spawner;
if ( se != null && se.UnlinkOnTaming )
{
this.Spawner.Remove( this );