fix: Fixes NPC slowness. (#955)

* Adds the following configurations:
  * `movement.delay.npcMinDelay` - 0.1 - Pets or Non-monster NPCs
  * `movement.delay.npcMaxDelay` - 0.4 - Pets or Non-monster NPCs
  * `movement.delay.monsterMinDelay` - 0.4 - Non-pet Monsters or NPC vs Player Combat
  * `movement.delay.monsterMaxDelay` - 0.8 - Non-pet Monsters or NPC vs Player Combat
  * `movement.delay.monsterMinDex` - 150 - Dex maximum for delay by dex
  * `movement.delay.MinDex` - 190 - Dex maximum for delay by dex
This commit is contained in:
Kamron Batman 2022-03-10 22:55:06 -08:00 • committed by GitHub
parent 44bd129734
commit bdee7bc671
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
357 changed files with 767 additions and 962 deletions

View file

@ -5,7 +5,7 @@ namespace Server.Mobiles
public class CuSidhe : BaseMount
{
[Constructible]
public CuSidhe(string name = null) : base(name, 277, 0x3E91, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public CuSidhe(string name = null) : base(name, 277, 0x3E91, AIType.AI_Animal, FightMode.Aggressor, 10, 1)
{
var chance = Utility.RandomDouble() * 23301;

View file

@ -15,7 +15,7 @@ namespace Server.Mobiles
private bool m_CanTalk;
[Constructible]
public Ferret() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public Ferret() : base(AIType.AI_Animal, FightMode.Aggressor)
{
Body = 0x117;

View file

@ -3,7 +3,7 @@ namespace Server.Mobiles
public class RagingGrizzlyBear : BaseCreature
{
[Constructible]
public RagingGrizzlyBear() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public RagingGrizzlyBear() : base(AIType.AI_Animal, FightMode.Aggressor)
{
Body = 212;
BaseSoundID = 0xA3;

View file

@ -3,7 +3,7 @@ namespace Server.Mobiles
public class Squirrel : BaseCreature
{
[Constructible]
public Squirrel() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public Squirrel() : base(AIType.AI_Animal, FightMode.Aggressor)
{
Body = 0x116;

View file

@ -6,7 +6,7 @@ namespace Server.Mobiles
{
[Constructible]
public Hydra()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
: base(AIType.AI_Melee)
{
Body = 0x109;
BaseSoundID = 0x16A;
@ -67,7 +67,7 @@ namespace Server.Mobiles
// TODO: uncomment once added
if (Utility.RandomDouble() < 0.2)
c.DropItem( new ParrotItem() );
if (Utility.RandomDouble() < 0.05)
c.DropItem( new ThorvaldsMedallion() );
*/

View file

@ -3,7 +3,7 @@ namespace Server.Mobiles
public class FetidEssence : BaseCreature
{
[Constructible]
public FetidEssence() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
public FetidEssence() : base(AIType.AI_Mage)
{
Body = 273;

View file

@ -3,7 +3,7 @@ namespace Server.Mobiles
public class InterredGrizzle : BaseCreature
{
[Constructible]
public InterredGrizzle() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
public InterredGrizzle() : base(AIType.AI_Mage)
{
Body = 259;

View file

@ -10,7 +10,7 @@ namespace Server.Mobiles
private DateTime m_NextUndress;
[Constructible]
public MLDryad() : base(AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4)
public MLDryad() : base(AIType.AI_Mage, FightMode.Evil)
{
Body = 266;
BaseSoundID = 0x57B;

View file

@ -15,7 +15,7 @@ namespace Server.Mobiles
private DateTime m_NextUndress;
[Constructible]
public Satyr() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public Satyr() : base(AIType.AI_Animal, FightMode.Aggressor)
{
Body = 271;
BaseSoundID = 0x586;

View file

@ -3,7 +3,7 @@ namespace Server.Mobiles
public class CorruptedSoul : BaseCreature
{
[Constructible]
public CorruptedSoul() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, .1, 5)
public CorruptedSoul() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.1, 5)
{
Body = 0x3CA;
Hue = 0x453;

View file

@ -6,7 +6,7 @@ namespace Server.Mobiles
public class FeralTreefellow : BaseCreature
{
[Constructible]
public FeralTreefellow() : base(AIType.AI_Melee, FightMode.Evil, 10, 1, 0.2, 0.4)
public FeralTreefellow() : base(AIType.AI_Melee, FightMode.Evil)
{
Body = 301;

View file

@ -5,7 +5,7 @@ namespace Server.Mobiles
public class Minotaur : BaseCreature
{
[Constructible]
public Minotaur() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4) // NEED TO CHECK
public Minotaur() : base(AIType.AI_Melee) // NEED TO CHECK
{
Body = 263;

View file

@ -5,7 +5,7 @@ namespace Server.Mobiles
public class MinotaurCaptain : BaseCreature
{
[Constructible]
public MinotaurCaptain() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4) // NEED TO CHECK
public MinotaurCaptain() : base(AIType.AI_Melee) // NEED TO CHECK
{
Body = 280;

View file

@ -5,7 +5,7 @@ namespace Server.Mobiles
public class MinotaurScout : BaseCreature
{
[Constructible]
public MinotaurScout() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4) // NEED TO CHECK
public MinotaurScout() : base(AIType.AI_Melee) // NEED TO CHECK
{
Body = 281;

View file

@ -5,7 +5,7 @@ namespace Server.Mobiles
public class PestilentBandage : BaseCreature
{
[Constructible]
public PestilentBandage() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4) // NEED TO CHECK
public PestilentBandage() : base(AIType.AI_Melee) // NEED TO CHECK
{
Body = 154;
Hue = 0x515;

View file

@ -5,7 +5,7 @@ namespace Server.Mobiles
public class TormentedMinotaur : BaseCreature
{
[Constructible]
public TormentedMinotaur() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public TormentedMinotaur() : base(AIType.AI_Melee)
{
Body = 262;

View file

@ -5,7 +5,7 @@ namespace Server.Mobiles
public class Troglodyte : BaseCreature
{
[Constructible]
public Troglodyte() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4) // NEED TO CHECK
public Troglodyte() : base(AIType.AI_Melee) // NEED TO CHECK
{
Body = 267;
BaseSoundID = 0x59F;

View file

@ -6,7 +6,7 @@ namespace Server.Mobiles
public class GreaterDragon : BaseCreature
{
[Constructible]
public GreaterDragon() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.3, 0.5)
public GreaterDragon() : base(AIType.AI_Mage)
{
Body = Utility.RandomList(12, 59);
BaseSoundID = 362;

View file

@ -3,7 +3,7 @@ namespace Server.Mobiles
public class CorrosiveSlime : BaseCreature
{
[Constructible]
public CorrosiveSlime() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public CorrosiveSlime() : base(AIType.AI_Melee)
{
Body = 51;
BaseSoundID = 456;

View file

@ -6,7 +6,7 @@ namespace Server.Mobiles
{
[Constructible]
public CorporealBrume()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
: base(AIType.AI_Melee)
{
Body = 0x104; // TODO: Verify
BaseSoundID = 0x56B;

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
{
[Constructible]
public CrystalDaemon()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
: base(AIType.AI_Mage)
{
Body = 0x310;
Hue = 0x3E8;
@ -46,7 +46,7 @@ namespace Server.Mobiles
public override void OnDeath( Container c )
{
base.OnDeath( c );
if (Utility.RandomDouble() < 0.4)
c.DropItem( new ScatteredCrystals() );
}

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
{
[Constructible]
public CrystalLatticeSeeker()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
: base(AIType.AI_Mage)
{
Body = 0x7B;
Hue = 0x47E;
@ -52,10 +52,10 @@ namespace Server.Mobiles
public override void OnDeath( Container c )
{
base.OnDeath( c );
if (Utility.RandomDouble() < 0.75)
c.DropItem( new CrystallineFragments() );
if (Utility.RandomDouble() < 0.07)
c.DropItem( new PiecesOfCrystal() );
}

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
{
[Constructible]
public CrystalVortex()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
: base(AIType.AI_Melee)
{
Body = 0xD;
Hue = 0x2B2;
@ -59,10 +59,10 @@ namespace Server.Mobiles
public override void OnDeath( Container c )
{
base.OnDeath( c );
if (Utility.RandomDouble() < 0.75)
c.DropItem( new CrystallineFragments() );
if (Utility.RandomDouble() < 0.06)
c.DropItem( new JaggedCrystals() );
}

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
{
[Constructible]
public MantraEffervescence()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
: base(AIType.AI_Mage)
{
Body = 0x111;
BaseSoundID = 0x56E;

View file

@ -6,7 +6,7 @@ namespace Server.Mobiles
{
[Constructible]
public Protector()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
: base(AIType.AI_Melee)
{
Body = 401;
Female = true;
@ -86,7 +86,7 @@ namespace Server.Mobiles
public override void OnDeath( Container c )
{
base.OnDeath( c );
if (Utility.RandomDouble() < 0.4)
c.DropItem( new ProtectorsEssence() );
}

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
{
[Constructible]
public UnfrozenMummy()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.4, 0.8)
: base(AIType.AI_Mage)
{
Body = 0x9B;
Hue = 0x480;
@ -46,10 +46,10 @@ namespace Server.Mobiles
public override void OnDeath( Container c )
{
base.OnDeath( c );
if (Utility.RandomDouble() < 0.6)
c.DropItem( new BrokenCrystals() );
if (Utility.RandomDouble() < 0.1)
c.DropItem( new ParrotItem() );
}

View file

@ -27,7 +27,7 @@ namespace Server.Mobiles
[Constructible]
public Changeling()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
: base(AIType.AI_Mage)
{
Body = 264;
Hue = DefaultHue;