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

@ -137,14 +137,14 @@ namespace Server.Mobiles
public void SpawnRatmen( Mobile target )
{
Map map = this.Map;
Map map = Map;
if ( map == null )
return;
int rats = 0;
foreach ( Mobile m in this.GetMobilesInRange( 10 ) )
foreach ( Mobile m in GetMobilesInRange( 10 ) )
{
if ( m is Ratman || m is RatmanArcher || m is RatmanMage )
++rats;
@ -168,10 +168,10 @@ namespace Server.Mobiles
case 4: rat = new RatmanMage(); break;
}
rat.Team = this.Team;
rat.Team = Team;
bool validLocation = false;
Point3D loc = this.Location;
Point3D loc = Location;
for ( int j = 0; !validLocation && j < 10; ++j )
{
@ -179,7 +179,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

@ -98,7 +98,7 @@ namespace Server.Mobiles
return;
List<Mobile> toGive = new List<Mobile>();
List<DamageStore> rights = BaseCreature.GetLootingRights( this.DamageEntries, this.HitsMax );
List<DamageStore> rights = GetLootingRights( DamageEntries, HitsMax );
for ( int i = rights.Count - 1; i >= 0; --i )
{
@ -218,7 +218,7 @@ namespace Server.Mobiles
if ( NoGoodies )
return base.OnBeforeDeath();
Map map = this.Map;
Map map = Map;
if ( map != null )
{
@ -243,7 +243,7 @@ namespace Server.Mobiles
if ( Map == Map.Felucca )
{
//TODO: Confirm SE change or AoS one too?
List<DamageStore> rights = BaseCreature.GetLootingRights( this.DamageEntries, this.HitsMax );
List<DamageStore> rights = GetLootingRights( DamageEntries, HitsMax );
List<Mobile> toGive = new List<Mobile>();
for ( int i = rights.Count - 1; i >= 0; --i )

View file

@ -80,7 +80,7 @@ namespace Server.Mobiles
public override bool HandlesOnSpeech( Mobile from )
{
if ( from.InRange( this.Location, 2 ) )
if ( from.InRange( Location, 2 ) )
return true;
return base.HandlesOnSpeech( from );
@ -88,7 +88,7 @@ namespace Server.Mobiles
public override void OnSpeech( SpeechEventArgs e )
{
if ( !e.Handled && e.HasKeyword( Keyword ) && e.Mobile.InRange( this.Location, 2 ) )
if ( !e.Handled && e.HasKeyword( Keyword ) && e.Mobile.InRange( Location, 2 ) )
{
e.Handled = true;

View file

@ -5,7 +5,7 @@ namespace Server.Mobiles
[Constructible]
public CapturedHordeMinion()
{
this.FightMode = FightMode.None;
FightMode = FightMode.None;
}
public override bool InitialInnocent => true;

View file

@ -21,11 +21,11 @@ namespace Server.Mobiles
[Constructible]
public Dummy(AIType iAI, FightMode iFightMode, int iRangePerception, int iRangeFight, double dActiveSpeed, double dPassiveSpeed) : base(iAI, iFightMode, iRangePerception, iRangeFight, dActiveSpeed, dPassiveSpeed)
{
this.Body = 400 + Utility.Random(2);
this.Hue = Utility.RandomSkinHue();
Body = 400 + Utility.Random(2);
Hue = Utility.RandomSkinHue();
this.Skills[SkillName.DetectHidden].Base = 100;
this.Skills[SkillName.MagicResist].Base = 120;
Skills[SkillName.DetectHidden].Base = 100;
Skills[SkillName.MagicResist].Base = 120;
Team = Utility.Random(3);

View file

@ -26,11 +26,11 @@ namespace Server.Mobiles
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 125, 125, 90 );
this.Skills[SkillName.Macing].Base = 120;
this.Skills[SkillName.Anatomy].Base = 120;
this.Skills[SkillName.Healing].Base = 120;
this.Skills[SkillName.Tactics].Base = 120;
InitStats( 125, 125, 90 );
Skills[SkillName.Macing].Base = 120;
Skills[SkillName.Anatomy].Base = 120;
Skills[SkillName.Healing].Base = 120;
Skills[SkillName.Tactics].Base = 120;
// Equip
WarHammer war = new WarHammer();
@ -99,11 +99,11 @@ namespace Server.Mobiles
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 125, 125, 90 );
this.Skills[SkillName.Fencing].Base = 120;
this.Skills[SkillName.Anatomy].Base = 120;
this.Skills[SkillName.Healing].Base = 120;
this.Skills[SkillName.Tactics].Base = 120;
InitStats( 125, 125, 90 );
Skills[SkillName.Fencing].Base = 120;
Skills[SkillName.Anatomy].Base = 120;
Skills[SkillName.Healing].Base = 120;
Skills[SkillName.Tactics].Base = 120;
// Equip
Spear ssp = new Spear();
@ -172,12 +172,12 @@ namespace Server.Mobiles
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 125, 125, 90 );
this.Skills[SkillName.Swords].Base = 120;
this.Skills[SkillName.Anatomy].Base = 120;
this.Skills[SkillName.Healing].Base = 120;
this.Skills[SkillName.Tactics].Base = 120;
this.Skills[SkillName.Parry].Base = 120;
InitStats( 125, 125, 90 );
Skills[SkillName.Swords].Base = 120;
Skills[SkillName.Anatomy].Base = 120;
Skills[SkillName.Healing].Base = 120;
Skills[SkillName.Tactics].Base = 120;
Skills[SkillName.Parry].Base = 120;
// Equip
Katana kat = new Katana();
@ -246,13 +246,13 @@ namespace Server.Mobiles
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 90, 90, 125 );
this.Skills[SkillName.Magery].Base = 120;
this.Skills[SkillName.EvalInt].Base = 120;
this.Skills[SkillName.Inscribe].Base = 100;
this.Skills[SkillName.Wrestling].Base = 120;
this.Skills[SkillName.Meditation].Base = 120;
this.Skills[SkillName.Poisoning].Base = 100;
InitStats( 90, 90, 125 );
Skills[SkillName.Magery].Base = 120;
Skills[SkillName.EvalInt].Base = 120;
Skills[SkillName.Inscribe].Base = 100;
Skills[SkillName.Wrestling].Base = 120;
Skills[SkillName.Meditation].Base = 120;
Skills[SkillName.Poisoning].Base = 100;
// Equip
Spellbook book = new Spellbook();
@ -314,13 +314,13 @@ namespace Server.Mobiles
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 90, 90, 125 );
this.Skills[SkillName.Magery].Base = 100;
this.Skills[SkillName.EvalInt].Base = 120;
this.Skills[SkillName.Anatomy].Base = 80;
this.Skills[SkillName.Wrestling].Base = 80;
this.Skills[SkillName.Meditation].Base = 100;
this.Skills[SkillName.Poisoning].Base = 100;
InitStats( 90, 90, 125 );
Skills[SkillName.Magery].Base = 100;
Skills[SkillName.EvalInt].Base = 120;
Skills[SkillName.Anatomy].Base = 80;
Skills[SkillName.Wrestling].Base = 80;
Skills[SkillName.Meditation].Base = 100;
Skills[SkillName.Poisoning].Base = 100;
// Equip
Spellbook book = new Spellbook();
@ -404,14 +404,14 @@ namespace Server.Mobiles
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 125, 125, 125 );
this.Skills[SkillName.Magery].Base = 120;
this.Skills[SkillName.EvalInt].Base = 120;
this.Skills[SkillName.Anatomy].Base = 120;
this.Skills[SkillName.Wrestling].Base = 120;
this.Skills[SkillName.Meditation].Base = 120;
this.Skills[SkillName.Poisoning].Base = 100;
this.Skills[SkillName.Inscribe].Base = 100;
InitStats( 125, 125, 125 );
Skills[SkillName.Magery].Base = 120;
Skills[SkillName.EvalInt].Base = 120;
Skills[SkillName.Anatomy].Base = 120;
Skills[SkillName.Wrestling].Base = 120;
Skills[SkillName.Meditation].Base = 120;
Skills[SkillName.Poisoning].Base = 100;
Skills[SkillName.Inscribe].Base = 100;
// Equip
Spellbook book = new Spellbook();
@ -499,13 +499,13 @@ namespace Server.Mobiles
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 125, 125, 125 );
this.Skills[SkillName.Magery].Base = 120;
this.Skills[SkillName.EvalInt].Base = 120;
this.Skills[SkillName.Anatomy].Base = 120;
this.Skills[SkillName.Wrestling].Base = 120;
this.Skills[SkillName.Meditation].Base = 120;
this.Skills[SkillName.Healing].Base = 100;
InitStats( 125, 125, 125 );
Skills[SkillName.Magery].Base = 120;
Skills[SkillName.EvalInt].Base = 120;
Skills[SkillName.Anatomy].Base = 120;
Skills[SkillName.Wrestling].Base = 120;
Skills[SkillName.Meditation].Base = 120;
Skills[SkillName.Healing].Base = 100;
// Equip
Spellbook book = new Spellbook();
@ -588,13 +588,13 @@ namespace Server.Mobiles
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 105, 105, 105 );
this.Skills[SkillName.Magery].Base = 120;
this.Skills[SkillName.EvalInt].Base = 120;
this.Skills[SkillName.Swords].Base = 120;
this.Skills[SkillName.Tactics].Base = 120;
this.Skills[SkillName.Meditation].Base = 120;
this.Skills[SkillName.Poisoning].Base = 100;
InitStats( 105, 105, 105 );
Skills[SkillName.Magery].Base = 120;
Skills[SkillName.EvalInt].Base = 120;
Skills[SkillName.Swords].Base = 120;
Skills[SkillName.Tactics].Base = 120;
Skills[SkillName.Meditation].Base = 120;
Skills[SkillName.Poisoning].Base = 100;
// Equip
Spellbook book = new Spellbook();
@ -705,13 +705,13 @@ namespace Server.Mobiles
int jHue = 25 + Team * 40;
// Skills and Stats
this.InitStats( 105, 105, 105 );
this.Skills[SkillName.Healing].Base = 120;
this.Skills[SkillName.Anatomy].Base = 120;
this.Skills[SkillName.Stealing].Base = 120;
this.Skills[SkillName.ArmsLore].Base = 100;
this.Skills[SkillName.Meditation].Base = 120;
this.Skills[SkillName.Wrestling].Base = 120;
InitStats( 105, 105, 105 );
Skills[SkillName.Healing].Base = 120;
Skills[SkillName.Anatomy].Base = 120;
Skills[SkillName.Stealing].Base = 120;
Skills[SkillName.ArmsLore].Base = 100;
Skills[SkillName.Meditation].Base = 120;
Skills[SkillName.Wrestling].Base = 120;
// Equip
Spellbook book = new Spellbook();

View file

@ -150,7 +150,7 @@ namespace Server.Mobiles
Say( 1049499 ); // Behold my true form!
Map map = this.Map;
Map map = Map;
if ( map != null )
{
@ -167,11 +167,11 @@ namespace Server.Mobiles
{
int rdist = 10 + dist;
x = this.X + (int)(rx * rdist);
y = this.Y + (int)(ry * rdist);
x = X + (int)(rx * rdist);
y = Y + (int)(ry * rdist);
z = map.GetAverageZ( x, y );
if ( !(ok = map.CanFit( x, y, this.Z, 16, false, false ) ) )
if ( !(ok = map.CanFit( x, y, Z, 16, false, false ) ) )
ok = map.CanFit( x, y, z, 16, false, false );
if ( dist >= 0 )
@ -185,7 +185,7 @@ namespace Server.Mobiles
HarrowerTentacles spawn = new HarrowerTentacles( this );
spawn.Team = this.Team;
spawn.Team = Team;
spawn.MoveToWorld( new Point3D( x, y, z ), map );
@ -250,7 +250,7 @@ namespace Server.Mobiles
public void GivePowerScrolls()
{
List<Mobile> toGive = new List<Mobile>();
List<DamageStore> rights = BaseCreature.GetLootingRights( this.DamageEntries, this.HitsMax );
List<DamageStore> rights = GetLootingRights( DamageEntries, HitsMax );
for ( int i = rights.Count - 1; i >= 0; --i )
{
@ -327,7 +327,7 @@ namespace Server.Mobiles
{
if ( m_TrueForm )
{
List<DamageStore> rights = BaseCreature.GetLootingRights( this.DamageEntries, this.HitsMax );
List<DamageStore> rights = GetLootingRights( DamageEntries, HitsMax );
for ( int i = rights.Count - 1; i >= 0; --i )
{
@ -341,7 +341,7 @@ namespace Server.Mobiles
{
GivePowerScrolls();
Map map = this.Map;
Map map = Map;
if ( map != null )
{
@ -582,8 +582,8 @@ namespace Server.Mobiles
m.Location = to;
Server.Spells.SpellHelper.Turn( m_Owner, toTeleport );
Server.Spells.SpellHelper.Turn( toTeleport, m_Owner );
Spells.SpellHelper.Turn( m_Owner, toTeleport );
Spells.SpellHelper.Turn( toTeleport, m_Owner );
m.ProcessDelta();

View file

@ -80,12 +80,12 @@ namespace Server.Mobiles
public void SpawnPixies( Mobile target )
{
Map map = this.Map;
Map map = Map;
if ( map == null )
return;
this.Say( 1042154 ); // You shall never defeat me as long as I have my queen!
Say( 1042154 ); // You shall never defeat me as long as I have my queen!
int newPixies = Utility.RandomMinMax( 3, 6 );
@ -93,11 +93,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 )
{
@ -105,7 +105,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 );
@ -143,18 +143,18 @@ namespace Server.Mobiles
public void CheckQueen()
{
if ( this.Map == null )
if ( Map == null )
return;
if ( !m_SpawnedQueen )
{
this.Say( 1042153 ); // Come forth my queen!
Say( 1042153 ); // Come forth my queen!
m_Queen = new Silvani();
((BaseCreature)m_Queen).Team = this.Team;
((BaseCreature)m_Queen).Team = Team;
m_Queen.MoveToWorld( this.Location, this.Map );
m_Queen.MoveToWorld( Location, Map );
m_SpawnedQueen = true;
}

View file

@ -82,7 +82,7 @@ namespace Server.Mobiles
public override bool OnBeforeDeath()
{
IMount mount = this.Mount;
IMount mount = Mount;
if ( mount != null )
mount.Rider = null;
@ -227,7 +227,7 @@ namespace Server.Mobiles
public void AddUnholyBone( Mobile target, double chanceToThrow )
{
if ( this.Map == null )
if ( Map == null )
return;
if ( chanceToThrow >= Utility.RandomDouble() )

View file

@ -22,7 +22,7 @@ namespace Server.Mobiles
public ParagonStamRegen( Mobile m )
: base( FastRegenRate, FastRegenRate )
{
this.Priority = TimerPriority.FiftyMS;
Priority = TimerPriority.FiftyMS;
m_Owner = m as BaseCreature;
}

View file

@ -76,19 +76,19 @@ 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 && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != this.Team) )
if ( m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != Team) )
targets.Add( m );
else if ( m.Player )
targets.Add( m );

View file

@ -77,17 +77,17 @@ namespace Server.Mobiles
public void DrainLife()
{
if ( this.Map == null )
if ( Map == null )
return;
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 && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != this.Team) )
if ( m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != Team) )
list.Add( m );
else if ( m.Player )
list.Add( m );

View file

@ -110,7 +110,7 @@ namespace Server.Mobiles
private void DoCounter( Mobile attacker )
{
if ( this.Map == null || ( attacker is BaseCreature && ((BaseCreature)attacker).BardProvoked ) )
if ( Map == null || ( attacker is BaseCreature && ((BaseCreature)attacker).BardProvoked ) )
return;
if ( 0.2 > Utility.RandomDouble() )
@ -135,7 +135,7 @@ namespace Server.Mobiles
if ( target == null || !target.InRange( this, 25 ) )
target = attacker;
this.Animate( 10, 4, 1, true, false, 0 );
Animate( 10, 4, 1, true, false, 0 );
ArrayList targets = new ArrayList();
@ -144,7 +144,7 @@ namespace Server.Mobiles
if ( m == this || !CanBeHarmful( m ) )
continue;
if ( m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != this.Team) )
if ( m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != Team) )
targets.Add( m );
else if ( m.Player )
targets.Add( m );

View file

@ -54,7 +54,7 @@ namespace Server.Mobiles
public void SpawnPixies( Mobile target )
{
Map map = this.Map;
Map map = Map;
if ( map == null )
return;
@ -65,11 +65,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 )
{
@ -77,7 +77,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 );