Removes implicit this.

This commit is contained in:
Kamron Batman 2018-09-14 12:56:58 -07:00
parent 04b4cfe75b
commit 83dcf536d8
533 changed files with 2804 additions and 2806 deletions

View file

@ -77,7 +77,7 @@ namespace Server.Mobiles
public static Mobile FindRandomPlayer( BaseCreature creature )
{
List<DamageStore> rights = BaseCreature.GetLootingRights( creature.DamageEntries, creature.HitsMax );
List<DamageStore> rights = GetLootingRights( creature.DamageEntries, creature.HitsMax );
for ( int i = rights.Count - 1; i >= 0; --i )
{
@ -157,8 +157,8 @@ namespace Server.Mobiles
{
base.OnDeath( c );
if ( !Summoned && !NoKillAwards && DemonKnight.CheckArtifactChance( this ) )
DemonKnight.DistributeArtifact( this );
if ( !Summoned && !NoKillAwards && CheckArtifactChance( this ) )
DistributeArtifact( this );
}
[Constructible]

View file

@ -134,9 +134,9 @@ namespace Server.Mobiles
PlaySound( 0x37D );
}
if (m_Target.Hidden && InRange(m_Target, 3) && Core.TickCount - this.NextSkillTime >= 0 && UseSkill(SkillName.DetectHidden))
if (m_Target.Hidden && InRange(m_Target, 3) && Core.TickCount - NextSkillTime >= 0 && UseSkill(SkillName.DetectHidden))
{
Target targ = this.Target;
Target targ = Target;
if ( targ != null )
targ.Invoke( this, this );

View file

@ -99,7 +99,7 @@ namespace Server.Mobiles
{
if ( Hidden )
{
Effects.PlaySound( this.Location, this.Map, 0x2C8 );
Effects.PlaySound( Location, Map, 0x2C8 );
Combatant = null;
}
else
@ -117,7 +117,7 @@ namespace Server.Mobiles
{
if ( !m_HasTeleportedAway && Hits < (HitsMax / 2) )
{
Map map = this.Map;
Map map = Map;
if ( map != null )
{
@ -131,16 +131,16 @@ namespace Server.Mobiles
if ( !map.CanFit( x, y, z, 16, false, false ) )
continue;
Point3D from = this.Location;
Point3D from = Location;
Point3D to = new Point3D( x, y, z );
if ( !InLOS( to ) )
continue;
this.Location = to;
this.ProcessDelta();
this.Hidden = true;
this.Combatant = null;
Location = to;
ProcessDelta();
Hidden = true;
Combatant = null;
Effects.SendLocationParticles( EffectItem.Create( from, map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
Effects.SendLocationParticles( EffectItem.Create( to, map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 5023 );

View file

@ -109,10 +109,10 @@ namespace Server.Mobiles
m_Stunning = true;
defender.Animate( 21, 6, 1, true, false, 0 );
this.PlaySound( 0xEE );
PlaySound( 0xEE );
defender.LocalOverheadMessage( MessageType.Regular, 0x3B2, false, "You have been stunned by a colossal blow!" );
if ( this.Weapon is BaseWeapon weapon )
if ( Weapon is BaseWeapon weapon )
weapon.OnHit( this, defender );
if ( defender.Alive )
@ -148,10 +148,10 @@ namespace Server.Mobiles
if ( Utility.RandomBool() )
{
this.FixedParticles( 0x376A, 9, 32, 0x2539, EffectLayer.LeftHand );
this.PlaySound( 0x1DE );
FixedParticles( 0x376A, 9, 32, 0x2539, EffectLayer.LeftHand );
PlaySound( 0x1DE );
foreach ( Mobile m in this.GetMobilesInRange( 2 ) )
foreach ( Mobile m in GetMobilesInRange( 2 ) )
{
if ( m != this && IsEnemy( m ) )
{

View file

@ -80,8 +80,8 @@ namespace Server.Mobiles
public void ThrowHatchet( Mobile to )
{
int damage = 50;
this.MovingEffect( to, 0xF43, 10, 0, false, false );
this.DoHarmful( to );
MovingEffect( to, 0xF43, 10, 0, false, false );
DoHarmful( to );
AOS.Damage( to, this, damage, 100, 0, 0, 0, 0 );
}

View file

@ -110,12 +110,12 @@ namespace Server.Mobiles
public void BeginSavageDance()
{
if ( this.Map == null )
if ( Map == null )
return;
ArrayList list = new ArrayList();
foreach ( Mobile m in this.GetMobilesInRange( 8 ) )
foreach ( Mobile m in GetMobilesInRange( 8 ) )
{
if ( m != this && m is SavageShaman )
list.Add( m );
@ -149,7 +149,7 @@ namespace Server.Mobiles
ArrayList list = new ArrayList();
foreach ( Mobile m in this.GetMobilesInRange( 8 ) )
foreach ( Mobile m in GetMobilesInRange( 8 ) )
list.Add( m );
if ( list.Count > 0 )

View file

@ -56,12 +56,12 @@ namespace Server.Mobiles
{
ArrayList list = new ArrayList();
foreach ( Mobile m in this.GetMobilesInRange( 2 ) )
foreach ( Mobile m in GetMobilesInRange( 2 ) )
{
if ( m == this || !CanBeHarmful( m ) )
continue;
if ( m is BaseCreature creature && (creature.Controlled || creature.Summoned || creature.Team != this.Team) )
if ( m is BaseCreature creature && (creature.Controlled || creature.Summoned || creature.Team != Team) )
list.Add( m );
else if ( m.Player )
list.Add( m );

View file

@ -13,7 +13,7 @@ namespace Server.Mobiles
Title = "the brigand";
Hue = Utility.RandomSkinHue();
if ( this.Female = Utility.RandomBool() )
if ( Female = Utility.RandomBool() )
{
Body = 0x191;
Name = NameList.RandomName( "female" );

View file

@ -15,7 +15,7 @@ namespace Server.Mobiles
Race = Race.Elf;
Hue = Race.RandomSkinHue();
if ( this.Female = Utility.RandomBool() )
if ( Female = Utility.RandomBool() )
{
Body = 0x25E;
Name = NameList.RandomName( "female elf brigand" );

View file

@ -11,16 +11,16 @@ namespace Server.Mobiles
Title = "the executioner";
Hue = Utility.RandomSkinHue();
if ( this.Female = Utility.RandomBool() )
if ( Female = Utility.RandomBool() )
{
this.Body = 0x191;
this.Name = NameList.RandomName( "female" );
Body = 0x191;
Name = NameList.RandomName( "female" );
AddItem( new Skirt( Utility.RandomRedHue() ) );
}
else
{
this.Body = 0x190;
this.Name = NameList.RandomName( "male" );
Body = 0x190;
Name = NameList.RandomName( "male" );
AddItem( new ShortPants( Utility.RandomRedHue() ) );
}

View file

@ -107,10 +107,10 @@ namespace Server.Mobiles
m_Stunning = true;
defender.Animate( 21, 6, 1, true, false, 0 );
this.PlaySound( 0xEE );
PlaySound( 0xEE );
defender.LocalOverheadMessage( MessageType.Regular, 0x3B2, false, "You have been stunned by a colossal blow!" );
if ( this.Weapon is BaseWeapon weapon )
if ( Weapon is BaseWeapon weapon )
weapon.OnHit( this, defender );
if ( defender.Alive )

View file

@ -98,8 +98,8 @@ namespace Server.Mobiles
public override bool OnBeforeDeath()
{
BoneMagi rm = new BoneMagi();
rm.Team = this.Team;
rm.Combatant = this.Combatant;
rm.Team = Team;
rm.Combatant = Combatant;
rm.NoKillAwards = true;
if ( rm.Backpack == null )

View file

@ -107,8 +107,8 @@ namespace Server.Mobiles
public override bool OnBeforeDeath()
{
BoneKnight rm = new BoneKnight();
rm.Team = this.Team;
rm.Combatant = this.Combatant;
rm.Team = Team;
rm.Combatant = Combatant;
rm.NoKillAwards = true;
if ( rm.Backpack == null )

View file

@ -114,7 +114,7 @@ namespace Server.Mobiles
{
DoHarmful( m );
this.MovingParticles( m, 0x1C19, 1, 0, false, true, 0, 0, 9502, 6014, 0x11D, EffectLayer.Waist, 0 );
MovingParticles( m, 0x1C19, 1, 0, false, true, 0, 0, 9502, 6014, 0x11D, EffectLayer.Waist, 0 );
new InternalTimer( m, this ).Start();
}

View file

@ -106,7 +106,7 @@ namespace Server.Mobiles
int orcs = 0;
foreach ( Mobile m in this.GetMobilesInRange( 10 ) )
foreach ( Mobile m in GetMobilesInRange( 10 ) )
{
if ( m is OrcishLord )
++orcs;
@ -116,7 +116,7 @@ namespace Server.Mobiles
{
BaseCreature orc = new SpawnedOrcishLord();
orc.Team = this.Team;
orc.Team = Team;
Point3D loc = target.Location;
bool validLocation = false;
@ -127,7 +127,7 @@ namespace Server.Mobiles
int y = target.Y + Utility.Random( 3 ) - 1;
int z = map.GetAverageZ( x, y );
if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) )
if ( validLocation = map.CanFit( x, y, Z, 16, false, false ) )
loc = new Point3D( x, y, Z );
else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
loc = new Point3D( x, y, z );

View file

@ -61,7 +61,7 @@ namespace Server.Mobiles
for ( int i = 0; i < list.Count; ++i )
{
if ( list[i] is ContextMenus.PaperdollEntry )
if ( list[i] is PaperdollEntry )
list.RemoveAt( i-- );
}
}

View file

@ -61,7 +61,7 @@ namespace Server.Mobiles
public override bool OnBeforeDeath()
{
IMount mount = this.Mount;
IMount mount = Mount;
if ( mount != null )
mount.Rider = null;

View file

@ -8,7 +8,7 @@ namespace Server.Mobiles
[Constructible]
public SpawnedOrcishLord()
{
Container pack = this.Backpack;
Container pack = Backpack;
if ( pack != null )
pack.Delete();

View file

@ -113,14 +113,14 @@ namespace Server.Mobiles
if ( !m_FieldActive )
{
// should there be an effect when spells nullifying is on?
this.FixedParticles( 0, 10, 0, 0x2522, EffectLayer.Waist );
FixedParticles( 0, 10, 0, 0x2522, EffectLayer.Waist );
}
else if ( m_FieldActive && !CanUseField )
{
m_FieldActive = false;
// TODO: message and effect when field turns down; cannot be verified on OSI due to a bug
this.FixedParticles( 0x3735, 1, 30, 0x251F, EffectLayer.Waist );
FixedParticles( 0x3735, 1, 30, 0x251F, EffectLayer.Waist );
}
}
@ -130,7 +130,7 @@ namespace Server.Mobiles
if ( m_FieldActive )
{
this.FixedParticles( 0x376A, 20, 10, 0x2530, EffectLayer.Waist );
FixedParticles( 0x376A, 20, 10, 0x2530, EffectLayer.Waist );
PlaySound( 0x2F4 );
@ -156,17 +156,17 @@ namespace Server.Mobiles
{
bool move = base.Move( d );
if ( move && m_FieldActive && this.Combatant != null )
this.FixedParticles( 0, 10, 0, 0x2530, EffectLayer.Waist );
if ( move && m_FieldActive && Combatant != null )
FixedParticles( 0, 10, 0, 0x2530, EffectLayer.Waist );
return move;
}
public void SendEBolt( Mobile to )
{
this.MovingParticles( to, 0x379F, 7, 0, false, true, 0xBE3, 0xFCB, 0x211 );
MovingParticles( to, 0x379F, 7, 0, false, true, 0xBE3, 0xFCB, 0x211 );
to.PlaySound( 0x229 );
this.DoHarmful( to );
DoHarmful( to );
AOS.Damage( to, this, 50, 0, 0, 0, 0, 100 );
}
@ -187,8 +187,8 @@ namespace Server.Mobiles
m_FieldActive = CanUseField;
if ( this.Name == "Exodus Minion" )
this.Name = null;
if ( Name == "Exodus Minion" )
Name = null;
}
}
}

View file

@ -109,14 +109,14 @@ namespace Server.Mobiles
if ( !m_FieldActive )
{
// should there be an effect when spells nullifying is on?
this.FixedParticles( 0, 10, 0, 0x2522, EffectLayer.Waist );
FixedParticles( 0, 10, 0, 0x2522, EffectLayer.Waist );
}
else if ( m_FieldActive && !CanUseField )
{
m_FieldActive = false;
// TODO: message and effect when field turns down; cannot be verified on OSI due to a bug
this.FixedParticles( 0x3735, 1, 30, 0x251F, EffectLayer.Waist );
FixedParticles( 0x3735, 1, 30, 0x251F, EffectLayer.Waist );
}
}
@ -126,7 +126,7 @@ namespace Server.Mobiles
if ( m_FieldActive )
{
this.FixedParticles( 0x376A, 20, 10, 0x2530, EffectLayer.Waist );
FixedParticles( 0x376A, 20, 10, 0x2530, EffectLayer.Waist );
PlaySound( 0x2F4 );
@ -152,17 +152,17 @@ namespace Server.Mobiles
{
bool move = base.Move( d );
if ( move && m_FieldActive && this.Combatant != null )
this.FixedParticles( 0, 10, 0, 0x2530, EffectLayer.Waist );
if ( move && m_FieldActive && Combatant != null )
FixedParticles( 0, 10, 0, 0x2530, EffectLayer.Waist );
return move;
}
public void SendEBolt( Mobile to )
{
this.MovingParticles( to, 0x379F, 7, 0, false, true, 0xBE3, 0xFCB, 0x211 );
MovingParticles( to, 0x379F, 7, 0, false, true, 0xBE3, 0xFCB, 0x211 );
to.PlaySound( 0x229 );
this.DoHarmful( to );
DoHarmful( to );
AOS.Damage( to, this, 50, 0, 0, 0, 0, 100 );
}
@ -183,8 +183,8 @@ namespace Server.Mobiles
m_FieldActive = CanUseField;
if ( this.Name == "Exodus Overseer" )
this.Name = null;
if ( Name == "Exodus Overseer" )
Name = null;
}
}
}

View file

@ -149,7 +149,7 @@ namespace Server.Mobiles
public override bool OnBeforeDeath()
{
IMount mount = this.Mount;
IMount mount = Mount;
if ( mount != null )
mount.Rider = null;

View file

@ -165,7 +165,7 @@ namespace Server.Mobiles
public override bool OnBeforeDeath()
{
IMount mount = this.Mount;
IMount mount = Mount;
if ( mount != null )
{

View file

@ -76,7 +76,7 @@ namespace Server.Mobiles
"{0}!! You will pay for that!"
};
this.Say( true, String.Format( toSay[Utility.Random( toSay.Length )], from.Name ) );
Say( true, String.Format( toSay[Utility.Random( toSay.Length )], from.Name ) );
}
base.OnDamage( amount, from, willKill );

View file

@ -106,7 +106,7 @@ namespace Server.Mobiles
{
JukaLord toBuff = null;
foreach ( Mobile m in this.GetMobilesInRange( 8 ) )
foreach ( Mobile m in GetMobilesInRange( 8 ) )
{
if ( m is JukaLord lord && IsFriend( lord ) && lord.Combatant != null && CanBeBeneficial( lord ) && lord.CanBeginAction( typeof( JukaMage ) ) && InLOS( lord ) )
{
@ -122,7 +122,7 @@ namespace Server.Mobiles
m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds( Utility.RandomMinMax( 30, 60 ) );
toBuff.Say( true, "Give me the power to destroy my enemies!" );
this.Say( true, "Fight well my lord!" );
Say( true, "Fight well my lord!" );
DoBeneficial( toBuff );

View file

@ -109,11 +109,11 @@ namespace Server.Mobiles
public override void OnThink()
{
if ( Combatant != null && this.MagicDamageAbsorb < 1 )
if ( Combatant != null && MagicDamageAbsorb < 1 )
{
this.MagicDamageAbsorb = Utility.RandomMinMax( 5, 7 );
this.FixedParticles( 0x375A, 10, 15, 5037, EffectLayer.Waist );
this.PlaySound( 0x1E9 );
MagicDamageAbsorb = Utility.RandomMinMax( 5, 7 );
FixedParticles( 0x375A, 10, 15, 5037, EffectLayer.Waist );
PlaySound( 0x1E9 );
}
if ( DateTime.UtcNow >= m_NextAbilityTime )
@ -122,7 +122,7 @@ namespace Server.Mobiles
ArrayList list = new ArrayList();
foreach ( Mobile m in this.GetMobilesInRange( 8 ) )
foreach ( Mobile m in GetMobilesInRange( 8 ) )
{
if ( m is MeerWarrior && IsFriend( m ) && CanBeBeneficial( m ) && m.Hits < m.HitsMax && !m.Poisoned && !MortalStrike.IsWounded( m ) )
list.Add( m );

View file

@ -80,8 +80,8 @@ namespace Server.Mobiles
{
m_NextAbilityTime += TimeSpan.FromSeconds( 2.5 );
this.Say( true, "Beware, mortals! You have provoked my wrath!" );
this.FixedParticles( 0x376A, 10, 10, 9537, 33, 0, EffectLayer.Waist );
Say( true, "Beware, mortals! You have provoked my wrath!" );
FixedParticles( 0x376A, 10, 10, 9537, 33, 0, EffectLayer.Waist );
Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), new TimerCallback( DoAreaLeech_Finish ) );
}
@ -90,15 +90,15 @@ namespace Server.Mobiles
{
ArrayList list = new ArrayList();
foreach ( Mobile m in this.GetMobilesInRange( 6 ) )
foreach ( Mobile m in GetMobilesInRange( 6 ) )
{
if ( this.CanBeHarmful( m ) && this.IsEnemy( m ) )
if ( CanBeHarmful( m ) && IsEnemy( m ) )
list.Add( m );
}
if ( list.Count == 0 )
{
this.Say( true, "Bah! You have escaped my grasp this time, mortal!" );
Say( true, "Bah! You have escaped my grasp this time, mortal!" );
}
else
{
@ -125,17 +125,17 @@ namespace Server.Mobiles
m.MovingParticles( this, 0x36F4, 1, 0, false, false, 32, 0, 9535, 1, 0, (EffectLayer)255, 0x100 );
m.MovingParticles( this, 0x0001, 1, 0, false, true, 32, 0, 9535, 9536, 0, (EffectLayer)255, 0 );
this.DoHarmful( m );
this.Hits += AOS.Damage( m, this, damage, 100, 0, 0, 0, 0 );
DoHarmful( m );
Hits += AOS.Damage( m, this, damage, 100, 0, 0, 0, 0 );
}
this.Say( true, "If I cannot cleanse thy soul, I will destroy it!" );
Say( true, "If I cannot cleanse thy soul, I will destroy it!" );
}
}
private void DoFocusedLeech( Mobile combatant, string message )
{
this.Say( true, message );
Say( true, message );
Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerStateCallback( DoFocusedLeech_Stage1 ), combatant );
}
@ -144,11 +144,11 @@ namespace Server.Mobiles
{
Mobile combatant = (Mobile)state;
if ( this.CanBeHarmful( combatant ) )
if ( CanBeHarmful( combatant ) )
{
this.MovingParticles( combatant, 0x36FA, 1, 0, false, false, 1108, 0, 9533, 1, 0, (EffectLayer)255, 0x100 );
this.MovingParticles( combatant, 0x0001, 1, 0, false, true, 1108, 0, 9533, 9534, 0, (EffectLayer)255, 0 );
this.PlaySound( 0x1FB );
MovingParticles( combatant, 0x36FA, 1, 0, false, false, 1108, 0, 9533, 1, 0, (EffectLayer)255, 0x100 );
MovingParticles( combatant, 0x0001, 1, 0, false, true, 1108, 0, 9533, 9534, 0, (EffectLayer)255, 0 );
PlaySound( 0x1FB );
Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( DoFocusedLeech_Stage2 ), combatant );
}
@ -158,14 +158,14 @@ namespace Server.Mobiles
{
Mobile combatant = (Mobile)state;
if ( this.CanBeHarmful( combatant ) )
if ( CanBeHarmful( combatant ) )
{
combatant.MovingParticles( this, 0x36F4, 1, 0, false, false, 32, 0, 9535, 1, 0, (EffectLayer)255, 0x100 );
combatant.MovingParticles( this, 0x0001, 1, 0, false, true, 32, 0, 9535, 9536, 0, (EffectLayer)255, 0 );
this.PlaySound( 0x209 );
this.DoHarmful( combatant );
this.Hits += AOS.Damage( combatant, this, Utility.RandomMinMax( 30, 40 ) - (Core.AOS ? 0 : 10), 100, 0, 0, 0, 0 );
PlaySound( 0x209 );
DoHarmful( combatant );
Hits += AOS.Damage( combatant, this, Utility.RandomMinMax( 30, 40 ) - (Core.AOS ? 0 : 10), 100, 0, 0, 0, 0 );
}
}
@ -173,9 +173,9 @@ namespace Server.Mobiles
{
if ( DateTime.UtcNow >= m_NextAbilityTime )
{
Mobile combatant = this.Combatant;
Mobile combatant = Combatant;
if ( combatant != null && combatant.Map == this.Map && combatant.InRange( this, 12 ) )
if ( combatant != null && combatant.Map == Map && combatant.InRange( this, 12 ) )
{
m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds( Utility.RandomMinMax( 10, 15 ) );

View file

@ -80,9 +80,9 @@ namespace Server.Mobiles
{
if ( DateTime.UtcNow >= m_NextAbilityTime )
{
Mobile combatant = this.Combatant;
Mobile combatant = Combatant;
if ( combatant != null && combatant.Map == this.Map && combatant.InRange( this, 12 ) && IsEnemy( combatant ) && !UnderEffect( combatant ) )
if ( combatant != null && combatant.Map == Map && combatant.InRange( this, 12 ) && IsEnemy( combatant ) && !UnderEffect( combatant ) )
{
m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds( Utility.RandomMinMax( 20, 30 ) );
@ -90,7 +90,7 @@ namespace Server.Mobiles
{
if ( bc.Controlled && bc.ControlMaster != null && !bc.ControlMaster.Deleted && bc.ControlMaster.Alive )
{
if ( bc.ControlMaster.Map == this.Map && bc.ControlMaster.InRange( this, 12 ) && !UnderEffect( bc.ControlMaster ) )
if ( bc.ControlMaster.Map == Map && bc.ControlMaster.InRange( this, 12 ) && !UnderEffect( bc.ControlMaster ) )
{
Combatant = combatant = bc.ControlMaster;
}
@ -127,11 +127,11 @@ namespace Server.Mobiles
rabid.FocusMob = combatant;
rabid.MoveToWorld( loc, combatant.Map );
}
this.Say( 1071932 ); //Creatures of the forest, I call to thee! Aid me in the fight against all that is evil!
Say( 1071932 ); //Creatures of the forest, I call to thee! Aid me in the fight against all that is evil!
}
else if ( combatant.Player )
{
this.Say( true, "I call a plague of insects to sting your flesh!" );
Say( true, "I call a plague of insects to sting your flesh!" );
m_Table[combatant] = Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), TimeSpan.FromSeconds( 7.0 ), new TimerStateCallback( DoEffect ), new object[]{ combatant, 0 } );
}
}

View file

@ -53,7 +53,7 @@ namespace Server.Mobiles
{
if ( from != null && !willKill && amount > 3 && from != null && !InRange( from, 7 ) )
{
this.MovingEffect( from, 0xF51, 10, 0, false, false );
MovingEffect( from, 0xF51, 10, 0, false, false );
SpellHelper.Damage( TimeSpan.FromSeconds( 1.0 ), from, this, Utility.RandomMinMax( 30, 40 ) - (Core.AOS ? 0 : 10), 100, 0, 0, 0, 0 );
}

View file

@ -90,8 +90,8 @@ namespace Server.Mobiles
if ( version == 0 )
{
Server.SkillHandlers.AnimalTaming.ScaleStats( this, 0.50 );
Server.SkillHandlers.AnimalTaming.ScaleSkills( this, 0.80, 0.90 ); // 90% * 80% = 72% of original skills trainable to 90%
SkillHandlers.AnimalTaming.ScaleStats( this, 0.50 );
SkillHandlers.AnimalTaming.ScaleSkills( this, 0.80, 0.90 ); // 90% * 80% = 72% of original skills trainable to 90%
Skills[SkillName.Magery].Base = Skills[SkillName.Magery].Cap; // Greater dragons have a 90% cap reduction and 90% skill reduction on magery
}
}

View file

@ -167,15 +167,15 @@ namespace Server.Mobiles
public void Earthquake()
{
Map map = this.Map;
Map map = Map;
if (map == null)
return;
ArrayList targets = new ArrayList();
foreach (Mobile m in this.GetMobilesInRange(8))
foreach (Mobile m in GetMobilesInRange(8))
{
if (m == this || !CanBeHarmful(m))
continue;
if (m is BaseCreature creature && (creature.Controlled || creature.Summoned || creature.Team != this.Team))
if (m is BaseCreature creature && (creature.Controlled || creature.Summoned || creature.Team != Team))
targets.Add(m);
else if (m.Player)
targets.Add(m);

View file

@ -78,7 +78,7 @@ namespace Server.Mobiles
public void SpawnPixies( Mobile target )
{
Map map = this.Map;
Map map = Map;
if ( map == null )
return;
@ -89,11 +89,11 @@ namespace Server.Mobiles
{
Pixie pixie = new Pixie();
pixie.Team = this.Team;
pixie.Team = Team;
pixie.FightMode = FightMode.Closest;
bool validLocation = false;
Point3D loc = this.Location;
Point3D loc = Location;
for ( int j = 0; !validLocation && j < 10; ++j )
{
@ -101,7 +101,7 @@ namespace Server.Mobiles
int y = Y + Utility.Random( 3 ) - 1;
int z = map.GetAverageZ( x, y );
if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) )
if ( validLocation = map.CanFit( x, y, Z, 16, false, false ) )
loc = new Point3D( x, y, Z );
else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
loc = new Point3D( x, y, z );

View file

@ -13,7 +13,7 @@ namespace Server.Mobiles
public override double GetFightModeRanking( Mobile m, FightMode acqType, bool bPlayerOnly )
{
return m.Str / Math.Max( this.GetDistanceToSqrt( m ), 1.0 );
return m.Str / Math.Max( GetDistanceToSqrt( m ), 1.0 );
}
public override string DefaultName => "an animated weapon";

View file

@ -155,10 +155,10 @@ namespace Server.Mobiles
m_Stunning = true;
defender.Animate( 21, 6, 1, true, false, 0 );
this.PlaySound( 0xEE );
PlaySound( 0xEE );
defender.LocalOverheadMessage( MessageType.Regular, 0x3B2, false, "You have been stunned by a colossal blow!" );
if ( this.Weapon is BaseWeapon weapon )
if ( Weapon is BaseWeapon weapon )
weapon.OnHit( this, defender );
if ( defender.Alive )
@ -185,12 +185,12 @@ namespace Server.Mobiles
{
if ( Controlled || Summoned )
{
Mobile master = ( this.ControlMaster );
Mobile master = ( ControlMaster );
if ( master == null )
master = this.SummonMaster;
master = SummonMaster;
if ( master != null && master.Player && master.Map == this.Map && master.InRange( Location, 20 ) )
if ( master != null && master.Player && master.Map == Map && master.InRange( Location, 20 ) )
{
if ( master.Mana >= amount )
{

View file

@ -89,12 +89,12 @@ namespace Server.Mobiles
public override void OnDamagedBySpell( Mobile caster )
{
if ( this.Map != null && caster != this && 0.25 > Utility.RandomDouble() )
if ( Map != null && caster != this && 0.25 > Utility.RandomDouble() )
{
BaseCreature spawn = new PlagueSpawn( this );
spawn.Team = this.Team;
spawn.MoveToWorld( this.Location, this.Map );
spawn.Team = Team;
spawn.MoveToWorld( Location, Map );
spawn.Combatant = caster;
Say( 1053034 ); // * The plague beast creates another beast from its flesh! *
@ -108,12 +108,12 @@ namespace Server.Mobiles
public override void OnGotMeleeAttack( Mobile attacker )
{
if ( this.Map != null && attacker != this && 0.25 > Utility.RandomDouble() )
if ( Map != null && attacker != this && 0.25 > Utility.RandomDouble() )
{
BaseCreature spawn = new PlagueSpawn( this );
spawn.Team = this.Team;
spawn.MoveToWorld( this.Location, this.Map );
spawn.Team = Team;
spawn.MoveToWorld( Location, Map );
spawn.Combatant = attacker;
Say( 1053034 ); // * The plague beast creates another beast from its flesh! *
@ -222,7 +222,7 @@ namespace Server.Mobiles
{
int maxhits = 2000;
if ( this.IsParagon )
if ( IsParagon )
maxhits = (int)(maxhits * Paragon.HitsBuff);
if ( hp < 1000 && !Core.AOS )
@ -232,9 +232,9 @@ namespace Server.Mobiles
{
HitsMaxSeed = maxhits;
int newHits = this.Hits + hp + Utility.RandomMinMax( 10, 20 ); // increase the hp until it hits if it goes over it'll max at 2000
int newHits = Hits + hp + Utility.RandomMinMax( 10, 20 ); // increase the hp until it hits if it goes over it'll max at 2000
this.Hits = Math.Min( maxhits, newHits );
Hits = Math.Min( maxhits, newHits );
// Also provide heal for each devour on top of the hp increase
}
else

View file

@ -41,7 +41,7 @@ namespace Server.Mobiles
for ( int i = 0; i < list.Count; ++i )
{
if ( list[i] is ContextMenus.PaperdollEntry )
if ( list[i] is PaperdollEntry )
list.RemoveAt( i-- );
}
}

View file

@ -76,17 +76,17 @@ namespace Server.Mobiles
public void SpawnBogling( Mobile m )
{
Map map = this.Map;
Map map = Map;
if ( map == null )
return;
Bogling spawned = new Bogling();
spawned.Team = this.Team;
spawned.Team = Team;
bool validLocation = false;
Point3D loc = this.Location;
Point3D loc = Location;
for ( int j = 0; !validLocation && j < 10; ++j )
{
@ -94,7 +94,7 @@ namespace Server.Mobiles
int y = Y + Utility.Random( 3 ) - 1;
int z = map.GetAverageZ( x, y );
if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) )
if ( validLocation = map.CanFit( x, y, Z, 16, false, false ) )
loc = new Point3D( x, y, Z );
else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
loc = new Point3D( x, y, z );
@ -108,7 +108,7 @@ namespace Server.Mobiles
{
ArrayList toEat = new ArrayList();
foreach ( Mobile m in this.GetMobilesInRange( 2 ) )
foreach ( Mobile m in GetMobilesInRange( 2 ) )
{
if ( m is Bogling )
toEat.Add( m );
@ -130,7 +130,7 @@ namespace Server.Mobiles
{
base.OnGotMeleeAttack( attacker );
if ( this.Hits > (this.HitsMax / 4) )
if ( Hits > (HitsMax / 4) )
{
if ( 0.25 >= Utility.RandomDouble() )
SpawnBogling( attacker );

View file

@ -91,7 +91,7 @@ namespace Server.Mobiles
public override void AlterMeleeDamageTo( Mobile to, ref int damage )
{
if ( Utility.RandomBool() && (this.Mana > 14) && to != null )
if ( Utility.RandomBool() && (Mana > 14) && to != null )
{
damage = (damage + (damage / 2));
to.SendLocalizedMessage( 1060091 ); // You take extra damage from the crushing attack!
@ -117,9 +117,9 @@ namespace Server.Mobiles
public void PoisonAttack( Mobile m )
{
DoHarmful( m );
this.MovingParticles( m, 0x36D4, 1, 0, false, false, 0x3F, 0, 0x1F73, 1, 0, (EffectLayer)255, 0x100 );
MovingParticles( m, 0x36D4, 1, 0, false, false, 0x3F, 0, 0x1F73, 1, 0, (EffectLayer)255, 0x100 );
m.ApplyPoison( this, Poison.Regular );
m.SendLocalizedMessage( 1070821, this.Name ); // %s spits a poisonous substance at you!
m.SendLocalizedMessage( 1070821, Name ); // %s spits a poisonous substance at you!
}
public override int Hides => 8;

View file

@ -77,7 +77,7 @@ namespace Server.Mobiles
* Effect: - To: "0x57D4F5B" - ItemId: "0x27A3" - ItemIdName: "Tessen" - FromLocation: "(992 299, 24)" - ToLocation: "(992 308, 22)" - Speed: "10" - Duration: "0" - FixedDirection: "False" - Explode: "False" - Hue: "0x0" - Render: "0x0"
* Damage: 50-65
*/
Effects.SendPacket( attacker, attacker.Map, new HuedEffect( EffectType.Moving, Serial.Zero, Serial.Zero, 0x27A3, this.Location, attacker.Location, 10, 0, false, false, 0, 0 ) );
Effects.SendPacket( attacker, attacker.Map, new HuedEffect( EffectType.Moving, Serial.Zero, Serial.Zero, 0x27A3, Location, attacker.Location, 10, 0, false, false, 0, 0 ) );
AOS.Damage( attacker, this, Utility.RandomMinMax( 50, 65 ), 100, 0, 0, 0, 0 );
}
}
@ -92,7 +92,7 @@ namespace Server.Mobiles
* Effect: - To: "0x57D4F5B" - ItemId: "0x27A3" - ItemIdName: "Tessen" - FromLocation: "(992 299, 24)" - ToLocation: "(992 308, 22)" - Speed: "10" - Duration: "0" - FixedDirection: "False" - Explode: "False" - Hue: "0x0" - Render: "0x0"
* Damage: 50-65
*/
Effects.SendPacket( attacker, attacker.Map, new HuedEffect( EffectType.Moving, Serial.Zero, Serial.Zero, 0x27A3, this.Location, attacker.Location, 10, 0, false, false, 0, 0 ) );
Effects.SendPacket( attacker, attacker.Map, new HuedEffect( EffectType.Moving, Serial.Zero, Serial.Zero, 0x27A3, Location, attacker.Location, 10, 0, false, false, 0, 0 ) );
AOS.Damage( attacker, this, Utility.RandomMinMax( 50, 65 ), 100, 0, 0, 0, 0 );
}
}

View file

@ -2,7 +2,7 @@ using Server.Items;
namespace Server.Mobiles
{
[Server.Engines.Craft.Forge]
[Engines.Craft.Forge]
public class FireBeetle : BaseMount
{
public override string CorpseName => "a fire beetle corpse";

View file

@ -77,7 +77,7 @@ namespace Server.Mobiles
private void DoCounter( Mobile attacker )
{
if ( this.Map == null )
if ( Map == null )
return;
if ( attacker is BaseCreature creature && creature.BardProvoked )
@ -105,7 +105,7 @@ namespace Server.Mobiles
if ( target == null || !target.InRange( this, 18 ) )
target = attacker;
this.Animate( 10, 4, 1, true, false, 0 );
Animate( 10, 4, 1, true, false, 0 );
ArrayList targets = new ArrayList();
@ -114,7 +114,7 @@ namespace Server.Mobiles
if ( m == this || !CanBeHarmful( m ) )
continue;
if ( m is BaseCreature bc && (bc.Controlled || bc.Summoned || bc.Team != this.Team))
if ( m is BaseCreature bc && (bc.Controlled || bc.Summoned || bc.Team != Team))
targets.Add( m );
else if ( m.Player && m.Alive )
targets.Add( m );