- Future ML craftables added to the special repair list until the craft system is updated.

- Items can now be repaired while wearing them.
- Items can now be fortified while wearing them.
- Fixed repair deed messages not sending.
- Sound effect added to powder of fortifying.
- Map issue for fishing and SOSs fixed, where it would not allow fishing in empty resource banks when not on the target SOS map.
- Added proximity spawner.
- Improved spawner mouseover menu, now also shows types set on the spawner which are not yet spawned.
- Fixed spawners only deleting half of their spawned objects when deleted.
- Added the ability to set TextDefinition objects in the props gump.
- WaitTeleporters now round delays to nearest in the remaining time messages.
- Updated TextDefinition to be more usable; made it parsable from string and added safe serialization/deserialization methods.
- Improved checking whether a mobile can flee.
- Monsters that give ML minor artifacts will no longer flee when low on hits (like paragons).
- Monsters that give ML minor artifacts will no longer spawn as paragon.
- Fixed issue with pets not eating certain foods.
- AI and targeting fixes for Red Death, Pyre and Swoop.
- Fame and karma added to Rend.
- Swoop corrected to have 0 karma.
- Stat and skill tweaks for Putrefier.
- Changelings will no longer show their fame title when morphed.
- Added travel restrictions for ML dungeons.
- Fixed issue of travel restriction message displaying twice.
- Monster teleporting is no longer affected by region travel restrictions.
This commit is contained in:
eos 2012-03-07 18:59:52 +00:00
parent 4bcde77cc2
commit a0e13d5007
25 changed files with 432 additions and 140 deletions

View file

@ -28,7 +28,8 @@ namespace Server.Mobiles
private bool m_Group;
private WayPoint m_WayPoint;
public bool IsFull{ get{ return ( m_Spawned != null && m_Spawned.Count >= m_Count ); } }
public bool IsFull{ get{ return ( m_Spawned.Count >= m_Count ); } }
public bool IsEmpty{ get{ return ( m_Spawned.Count == 0 ); } }
public List<string> SpawnNames
{
@ -43,6 +44,11 @@ namespace Server.Mobiles
}
}
public List<ISpawnable> Spawned
{
get { return m_Spawned; }
}
public virtual int SpawnNamesCount { get { return m_SpawnNames.Count; } }
public override void OnAfterDuped( Item newItem )
@ -126,6 +132,12 @@ namespace Server.Mobiles
set { m_MaxDelay = value; InvalidateProperties(); }
}
public DateTime End
{
get { return m_End; }
set { m_End = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public TimeSpan NextSpawn
{
@ -231,7 +243,7 @@ namespace Server.Mobiles
list.Add( 1060660, "team\t{0}", m_Team ); // ~1_val~: ~2_val~
list.Add( 1060661, "speed\t{0} to {1}", m_MinDelay, m_MaxDelay ); // ~1_val~: ~2_val~
if ( m_Spawned.Count != 0 )
if ( m_SpawnNames.Count != 0 )
list.Add( SpawnedStats() );
}
else
@ -266,7 +278,9 @@ namespace Server.Mobiles
{
if ( m_Running )
{
m_Timer.Stop();
if ( m_Timer != null )
m_Timer.Stop();
m_Running = false;
}
}
@ -356,7 +370,7 @@ namespace Server.Mobiles
}
}
public void Respawn()
public virtual void Respawn()
{
RemoveSpawned();
@ -364,7 +378,7 @@ namespace Server.Mobiles
Spawn();
}
public void Spawn()
public virtual void Spawn()
{
if ( SpawnNamesCount > 0 )
Spawn( Utility.Random( SpawnNamesCount ) );
@ -511,6 +525,11 @@ namespace Server.Mobiles
public Point3D HomeLocation { get { return this.Location; } }
public virtual bool CheckSpawnCount()
{
return ( m_Spawned.Count >= m_Count );
}
public void Spawn( int index )
{
Map map = Map;
@ -520,7 +539,7 @@ namespace Server.Mobiles
Defrag();
if ( m_Spawned.Count >= m_Count )
if ( !CheckSpawnCount() )
return;
ISpawnable spawned = CreateSpawnedObject( index );
@ -555,7 +574,7 @@ namespace Server.Mobiles
bc.Home = this.HomeLocation;
}
}
}
public Point3D GetSpawnPosition()
{
@ -600,7 +619,7 @@ namespace Server.Mobiles
DoTimer( delay );
}
public void DoTimer( TimeSpan delay )
public virtual void DoTimer( TimeSpan delay )
{
if ( !m_Running )
return;
@ -640,7 +659,18 @@ namespace Server.Mobiles
{
Defrag();
Dictionary<string, int> counts = new Dictionary<string, int>();
Dictionary<string, int> counts = new Dictionary<string, int>( StringComparer.OrdinalIgnoreCase );
foreach ( string entry in m_SpawnNames )
{
string name = ParseType( entry );
Type type = ScriptCompiler.FindTypeByName( name );
if ( type == null )
counts[name] = 0;
else
counts[type.Name] = 0;
}
foreach ( ISpawnable spawned in m_Spawned )
{
@ -695,7 +725,7 @@ namespace Server.Mobiles
{
Defrag();
for ( int i = 0; i < m_Spawned.Count; ++i )
for ( int i = m_Spawned.Count - 1; i >= 0; --i )
m_Spawned[i].Delete();
InvalidateProperties();