This commit is contained in:
mark 2009-07-19 05:13:25 +00:00
parent cc7814db35
commit bcdee05c6c
83 changed files with 268 additions and 146 deletions

View file

@ -582,7 +582,7 @@ namespace Server.Mobiles
}
}
if ( m_Mobile.Spell == null && DateTime.Now > m_NextCastTime && m_Mobile.InRange( c, 12 ) )
if ( m_Mobile.Spell == null && DateTime.Now > m_NextCastTime && m_Mobile.InRange( c, Core.ML ? 10 : 12 ) )
{
// We are ready to cast a spell
@ -621,7 +621,7 @@ namespace Server.Mobiles
{
if ( m_Mobile.InRange( toDispel, 10 ) )
RunFrom( toDispel );
else if ( !m_Mobile.InRange( toDispel, 12 ) )
else if ( !m_Mobile.InRange( toDispel, Core.ML ? 10 : 12 ) )
RunTo( toDispel );
}
else
@ -722,7 +722,7 @@ namespace Server.Mobiles
Mobile comb = m_Mobile.Combatant;
if ( comb != null && !comb.Deleted && comb.Alive && !comb.IsDeadBondedPet && m_Mobile.InRange( comb, 12 ) && CanDispel( comb ) )
if ( comb != null && !comb.Deleted && comb.Alive && !comb.IsDeadBondedPet && m_Mobile.InRange( comb, Core.ML ? 10 : 12 ) && CanDispel( comb ) )
{
active = comb;
activePrio = m_Mobile.GetDistanceToSqrt( comb );
@ -736,7 +736,7 @@ namespace Server.Mobiles
AggressorInfo info = aggressed[i];
Mobile m = info.Defender;
if ( m != comb && m.Combatant == m_Mobile && m_Mobile.InRange( m, 12 ) && CanDispel( m ) )
if ( m != comb && m.Combatant == m_Mobile && m_Mobile.InRange( m, Core.ML ? 10 : 12 ) && CanDispel( m ) )
{
double prio = m_Mobile.GetDistanceToSqrt( m );
@ -756,7 +756,7 @@ namespace Server.Mobiles
AggressorInfo info = aggressors[i];
Mobile m = info.Attacker;
if ( m != comb && m.Combatant == m_Mobile && m_Mobile.InRange( m, 12 ) && CanDispel( m ) )
if ( m != comb && m.Combatant == m_Mobile && m_Mobile.InRange( m, Core.ML ? 10 : 12 ) && CanDispel( m ) )
{
double prio = m_Mobile.GetDistanceToSqrt( m );
@ -790,7 +790,7 @@ namespace Server.Mobiles
actPrio = inactPrio = m_Mobile.GetDistanceToSqrt( comb );
}
foreach ( Mobile m in m_Mobile.GetMobilesInRange( 12 ) )
foreach ( Mobile m in m_Mobile.GetMobilesInRange( Core.ML ? 10 : 12 ) )
{
if ( m != m_Mobile && CanDispel( m ) )
{
@ -964,7 +964,7 @@ namespace Server.Mobiles
int teleRange = targ.Range;
if ( teleRange < 0 )
teleRange = 12;
teleRange = Core.ML ? 11 : 12;
for ( int i = 0; i < 10; ++i )
{

View file

@ -242,8 +242,6 @@ namespace Server.Mobiles
private bool m_IsPrisoner;
private Timer m_GhostDeletionTimer;
#endregion
public virtual InhumanSpeech SpeechType{ get{ return null; } }
@ -251,11 +249,7 @@ namespace Server.Mobiles
public bool IsStabled
{
get{ return m_IsStabled; }
set
{
m_IsStabled = value;
SetGhostDeletionTimer( !m_IsStabled );
}
set{ m_IsStabled = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
@ -1732,8 +1726,6 @@ namespace Server.Mobiles
if ( IsAnimatedDead )
Spells.Necromancy.AnimateDeadSpell.Register( m_SummonMaster, this );
SetGhostDeletionTimer( true );
}
public virtual bool IsHumanInTown()
@ -1930,7 +1922,7 @@ namespace Server.Mobiles
if ( master != null && master == from ) //So friends can't start the bonding process
{
if ( m_dMinTameSkill <= 29.1 || master.Skills[SkillName.AnimalTaming].Base >= m_dMinTameSkill || GetControlChance( master, true ) >= 1.0 )
if ( m_dMinTameSkill <= 29.1 || master.Skills[SkillName.AnimalTaming].Base >= m_dMinTameSkill || ( this is LesserHiryu && master.Skills[SkillName.Bushido].Base >= 90.0 ) )
{
if ( BondingBegin == DateTime.MinValue )
{
@ -4260,8 +4252,6 @@ namespace Server.Mobiles
GiftOfLifeSpell.HandleDeath( this );
CheckStatTimers();
SetGhostDeletionTimer( true );
}
else
{
@ -4881,26 +4871,8 @@ namespace Server.Mobiles
}
CheckStatTimers();
SetGhostDeletionTimer( false );
}
private void SetGhostDeletionTimer( bool running )
{
if( running && ( !IsDeadBondedPet || !Core.ML ) )
return;
if( m_GhostDeletionTimer != null )
m_GhostDeletionTimer.Stop();
if( !running )
return;
m_GhostDeletionTimer = new GhostDeletionTimer( this, TimeSpan.FromMinutes( 120 + Utility.Random( 120 ) ) );
m_GhostDeletionTimer.Start();
}
public override bool CanBeDamaged()
{
if ( IsDeadPet )
@ -4937,26 +4909,6 @@ namespace Server.Mobiles
[CommandProperty( AccessLevel.GameMaster )]
public int RemoveStep { get { return m_RemoveStep; } set { m_RemoveStep = value; } }
private class GhostDeletionTimer : Timer
{
private BaseCreature m_Creature;
public GhostDeletionTimer( BaseCreature Creature, TimeSpan delay ) : base( delay )
{
Priority = TimerPriority.FiveSeconds;
m_Creature = Creature;
}
protected override void OnTick()
{
if( Core.ML && m_Creature.IsDeadBondedPet )
{
m_Creature.Delete();
}
Stop();
}
}
}
public class LoyaltyTimer : Timer

View file

@ -45,7 +45,7 @@ namespace Server.Engines.BulkOrders
case 6: entries = LargeBulkEntry.ConvertEntries( this, LargeBulkEntry.Lady ); break;
case 7: entries = LargeBulkEntry.ConvertEntries( this, LargeBulkEntry.MaleLeatherSet ); useMaterials = true; break;
case 8: entries = LargeBulkEntry.ConvertEntries( this, LargeBulkEntry.Pirate ); break;
case 9: entries = LargeBulkEntry.ConvertEntries( this, LargeBulkEntry.ShoeSet ); break;
case 9: entries = LargeBulkEntry.ConvertEntries( this, LargeBulkEntry.ShoeSet ); useMaterials = Core.ML; break;
case 10: entries = LargeBulkEntry.ConvertEntries( this, LargeBulkEntry.StuddedSet ); useMaterials = true; break;
case 11: entries = LargeBulkEntry.ConvertEntries( this, LargeBulkEntry.TownCrier ); break;
case 12: entries = LargeBulkEntry.ConvertEntries( this, LargeBulkEntry.Wizard ); break;