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

@ -11,9 +11,6 @@
<ProjectReference Include="..\Server\Server.csproj" />
<ProjectReference Include="..\UOContent\UOContent.csproj" />
<DataFiles Include="$(SolutionDir)\Distribution\Data\**" />
<DataFiles Update="..\..\Distribution\Data\Professions\LBR\prof.txt">
<Link>Data\Professions\LBR\prof.txt</Link>
</DataFiles>
</ItemGroup>
<Target Name="CopyData" AfterTargets="AfterBuild">
<Copy SourceFiles="@(DataFiles)" DestinationFolder="$(OutDir)\Data\%(RecursiveDir)" />

View file

@ -67,6 +67,12 @@ public static class ServerConfiguration
return Enum.TryParse(strValue, out T value) ? value : defaultValue;
}
public static double GetSetting(string key, double defaultValue)
{
m_Settings.Settings.TryGetValue(key, out var strValue);
return double.TryParse(strValue, out var value) ? value : defaultValue;
}
public static T? GetSetting<T>(string key) where T : struct, Enum
{
if (!m_Settings.Settings.TryGetValue(key, out var strValue))
@ -168,6 +174,24 @@ public static class ServerConfiguration
return value;
}
public static double GetOrUpdateSetting(string key, double defaultValue)
{
double value;
if (m_Settings.Settings.TryGetValue(key, out var strValue))
{
value = double.TryParse(strValue, out value) ? value : defaultValue;
}
else
{
SetSetting(key, (value = defaultValue).ToString());
}
return value;
}
public static void SetSetting(string key, double value) => SetSetting(key, value.ToString());
public static void SetSetting(string key, TimeSpan value) => SetSetting(key, value.ToString());
public static void SetSetting(string key, int value) => SetSetting(key, value.ToString());

View file

@ -6,7 +6,7 @@ namespace Server.Mobiles
{
[Constructible]
public UnholyFamiliar()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
: base(AIType.AI_Melee)
{
Body = 99;
BaseSoundID = 0xE5;

View file

@ -6,7 +6,7 @@ namespace Server.Mobiles
{
[Constructible]
public UnholySteed()
: base("a dark steed", 0x74, 0x3EA7, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
: base("a dark steed", 0x74, 0x3EA7, AIType.AI_Melee, FightMode.Aggressor, 10, 1)
{
SetStr(496, 525);
SetDex(86, 105);

View file

@ -6,7 +6,7 @@ namespace Server.Mobiles
{
[Constructible]
public HolyFamiliar()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
: base(AIType.AI_Melee)
{
Body = 100;
BaseSoundID = 0xE5;

View file

@ -6,7 +6,7 @@ namespace Server.Mobiles
{
[Constructible]
public HolySteed()
: base("a silver steed", 0x75, 0x3EA8, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
: base("a silver steed", 0x75, 0x3EA8, AIType.AI_Melee, FightMode.Aggressor, 10, 1)
{
SetStr(496, 525);
SetDex(86, 105);

View file

@ -10,7 +10,7 @@ namespace Server.Factions
[Constructible]
public FactionWarHorse(Faction faction = null)
: base("a war horse", 0xE2, 0x3EA0, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
: base("a war horse", 0xE2, 0x3EA0, AIType.AI_Melee, FightMode.Aggressor, 10, 1)
{
BaseSoundID = 0xA8;

View file

@ -35,7 +35,7 @@ namespace Server.Factions
private DateTime m_OrdersEnd;
private Town m_Town;
public BaseFactionGuard(string title) : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public BaseFactionGuard(string title) : base(AIType.AI_Melee)
{
Orders = new Orders(this);
Title = title;

View file

@ -5,7 +5,7 @@ namespace Server.Mobiles
public class GrimmochDrummel : BaseCreature
{
[Constructible]
public GrimmochDrummel() : base(AIType.AI_Archer, FightMode.Closest, 10, 1, 0.2, 0.4)
public GrimmochDrummel() : base(AIType.AI_Archer)
{
Title = "the Cursed";

View file

@ -5,7 +5,7 @@ namespace Server.Mobiles
public class LysanderGathenwale : BaseCreature
{
[Constructible]
public LysanderGathenwale() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
public LysanderGathenwale() : base(AIType.AI_Mage)
{
Title = "the Cursed";

View file

@ -5,7 +5,7 @@ namespace Server.Mobiles
public class MorgBergen : BaseCreature
{
[Constructible]
public MorgBergen() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public MorgBergen() : base(AIType.AI_Melee)
{
Title = "the Cursed";

View file

@ -5,7 +5,7 @@ namespace Server.Mobiles
public class TavaraSewel : BaseCreature
{
[Constructible]
public TavaraSewel() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public TavaraSewel() : base(AIType.AI_Melee)
{
Title = "the Cursed";

View file

@ -180,7 +180,7 @@ namespace Server.Engines.MLQuests.Definitions
{
[Constructible]
public Jamal()
: base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.2, 0.4)
: base(AIType.AI_Vendor, FightMode.None, 2)
{
Title = "the Fisherman";
Body = 400;
@ -224,7 +224,7 @@ namespace Server.Engines.MLQuests.Definitions
{
[Constructible]
public Iosep()
: base(AIType.AI_Vendor, FightMode.None, 2, 1, 0.2, 0.4)
: base(AIType.AI_Vendor, FightMode.None, 2)
{
Title = "the Exporter";
Body = 400;

View file

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

View file

@ -9,7 +9,7 @@ namespace Server.Engines.Quests.Necro
private PlayerMobile m_Necromancer;
private bool m_ToDelete;
public SummonedPaladin(PlayerMobile necromancer) : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public SummonedPaladin(PlayerMobile necromancer) : base(AIType.AI_Melee, FightMode.Aggressor)
{
m_Necromancer = necromancer;

View file

@ -6,7 +6,7 @@ namespace Server.Engines.Quests.Ninja
public class Henchman : BaseCreature
{
[Constructible]
public Henchman() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public Henchman() : base(AIType.AI_Melee, FightMode.Aggressor)
{
InitStats(45, 30, 5);

View file

@ -6,7 +6,7 @@ namespace Server.Engines.Quests.Samurai
public class CursedSoul : BaseCreature
{
[Constructible]
public CursedSoul() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public CursedSoul() : base(AIType.AI_Melee, FightMode.Aggressor)
{
Body = 3;
BaseSoundID = 471;

View file

@ -5,7 +5,7 @@ namespace Server.Engines.Quests.Samurai
public class DeadlyImp : BaseCreature
{
[Constructible]
public DeadlyImp() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public DeadlyImp() : base(AIType.AI_Melee, FightMode.Aggressor)
{
Body = 74;
BaseSoundID = 422;

View file

@ -5,7 +5,7 @@ namespace Server.Engines.Quests.Samurai
public class DiseasedCat : BaseCreature
{
[Constructible]
public DiseasedCat() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public DiseasedCat() : base(AIType.AI_Animal, FightMode.Aggressor)
{
Body = 0xC9;
Hue = Utility.RandomAnimalHue();

View file

@ -5,7 +5,7 @@ namespace Server.Engines.Quests.Samurai
public class FierceDragon : BaseCreature
{
[Constructible]
public FierceDragon() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public FierceDragon() : base(AIType.AI_Melee, FightMode.Aggressor)
{
Body = 103;
BaseSoundID = 362;

View file

@ -5,7 +5,7 @@ namespace Server.Engines.Quests.Samurai
public class InjuredWolf : BaseCreature
{
[Constructible]
public InjuredWolf() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public InjuredWolf() : base(AIType.AI_Animal, FightMode.Aggressor)
{
Body = 0xE1;
BaseSoundID = 0xE5;

View file

@ -6,7 +6,7 @@ namespace Server.Engines.Quests.Samurai
public class YoungNinja : BaseCreature
{
[Constructible]
public YoungNinja() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public YoungNinja() : base(AIType.AI_Melee, FightMode.Aggressor)
{
InitStats(45, 30, 5);
SetHits(20, 30);

View file

@ -6,7 +6,7 @@ namespace Server.Engines.Quests.Samurai
public class YoungRonin : BaseCreature
{
[Constructible]
public YoungRonin() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public YoungRonin() : base(AIType.AI_Melee, FightMode.Aggressor)
{
InitStats(45, 30, 5);
SetHits(10, 20);

View file

@ -9,7 +9,7 @@ namespace Server.Engines.Quests.Haven
public class MilitiaFighter : BaseCreature
{
[Constructible]
public MilitiaFighter() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public MilitiaFighter() : base(AIType.AI_Melee)
{
InitStats(40, 30, 5);
Title = "the Militia Fighter";

View file

@ -276,7 +276,7 @@ namespace Server.Engines.Events
private readonly Mobile m_From;
public NaughtyTwin(Mobile from)
: base(AIType.AI_Melee, FightMode.None, 10, 1, 0.2, 0.4)
: base(AIType.AI_Melee, FightMode.None)
{
if (TrickOrTreat.CheckMobile(from))
{

View file

@ -8,7 +8,7 @@
public partial class CreepyCake : Food
{
[Constructible]
public CreepyCake() : base(0x9e9, 1) => Hue = 0x3E4;
public CreepyCake() : base(0x9e9) => Hue = 0x3E4;
public override string DefaultName => "Creepy Cake";
}

View file

@ -4,7 +4,7 @@
public partial class MrPlainsCookies : Food
{
[Constructible]
public MrPlainsCookies() : base(0x160C, 1)
public MrPlainsCookies() : base(0x160C)
{
Weight = 1.0;
FillFactor = 4;

View file

@ -9,7 +9,7 @@ namespace Server.Mobiles
{
[Constructible]
public PumpkinHead()
: base(Utility.RandomBool() ? AIType.AI_Melee : AIType.AI_Mage, FightMode.Closest, 10, 1, 0.05, 0.1)
: base(Utility.RandomBool() ? AIType.AI_Melee : AIType.AI_Mage)
{
Body = 1246 + Utility.Random(2);

View file

@ -169,7 +169,7 @@ namespace Server.Engines.Events
public override string DefaultName => _deadPlayer != null ? $"{_deadPlayer.Name}'s Zombie Skeleton" : "Zombie Skeleton";
public ZombieSkeleton(PlayerMobile player = null)
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
: base(AIType.AI_Melee)
{
_deadPlayer = player;

View file

@ -27,7 +27,7 @@ namespace Server.Items
public class WasabiClumps : Food
{
[Constructible]
public WasabiClumps() : base(0x24EB, 1)
public WasabiClumps() : base(0x24EB)
{
Stackable = false;
Weight = 1.0;
@ -80,7 +80,7 @@ namespace Server.Items
public class BentoBox : Food
{
[Constructible]
public BentoBox() : base(0x2836, 1)
public BentoBox() : base(0x2836)
{
Stackable = false;
Weight = 5.0;
@ -120,7 +120,7 @@ namespace Server.Items
public class SushiRolls : Food
{
[Constructible]
public SushiRolls() : base(0x283E, 1)
public SushiRolls() : base(0x283E)
{
Stackable = false;
Weight = 3.0;
@ -149,7 +149,7 @@ namespace Server.Items
public class SushiPlatter : Food
{
[Constructible]
public SushiPlatter() : base(0x2840, 1)
public SushiPlatter() : base(0x2840)
{
Stackable = Core.ML;
Weight = 3.0;
@ -202,7 +202,7 @@ namespace Server.Items
public class GreenTea : Food
{
[Constructible]
public GreenTea() : base(0x284C, 1)
public GreenTea() : base(0x284C)
{
Stackable = false;
Weight = 4.0;
@ -231,7 +231,7 @@ namespace Server.Items
public class MisoSoup : Food
{
[Constructible]
public MisoSoup() : base(0x284D, 1)
public MisoSoup() : base(0x284D)
{
Stackable = false;
Weight = 4.0;
@ -260,7 +260,7 @@ namespace Server.Items
public class WhiteMisoSoup : Food
{
[Constructible]
public WhiteMisoSoup() : base(0x284E, 1)
public WhiteMisoSoup() : base(0x284E)
{
Stackable = false;
Weight = 4.0;
@ -289,7 +289,7 @@ namespace Server.Items
public class RedMisoSoup : Food
{
[Constructible]
public RedMisoSoup() : base(0x284F, 1)
public RedMisoSoup() : base(0x284F)
{
Stackable = false;
Weight = 4.0;
@ -318,7 +318,7 @@ namespace Server.Items
public class AwaseMisoSoup : Food
{
[Constructible]
public AwaseMisoSoup() : base(0x2850, 1)
public AwaseMisoSoup() : base(0x2850)
{
Stackable = false;
Weight = 4.0;

View file

@ -51,7 +51,7 @@ namespace Server.Items
public class WoodenBowlOfCarrots : Food
{
[Constructible]
public WoodenBowlOfCarrots() : base(0x15F9, 1)
public WoodenBowlOfCarrots() : base(0x15F9)
{
Stackable = false;
Weight = 1.0;
@ -91,7 +91,7 @@ namespace Server.Items
public class WoodenBowlOfCorn : Food
{
[Constructible]
public WoodenBowlOfCorn() : base(0x15FA, 1)
public WoodenBowlOfCorn() : base(0x15FA)
{
Stackable = false;
Weight = 1.0;
@ -131,7 +131,7 @@ namespace Server.Items
public class WoodenBowlOfLettuce : Food
{
[Constructible]
public WoodenBowlOfLettuce() : base(0x15FB, 1)
public WoodenBowlOfLettuce() : base(0x15FB)
{
Stackable = false;
Weight = 1.0;
@ -171,7 +171,7 @@ namespace Server.Items
public class WoodenBowlOfPeas : Food
{
[Constructible]
public WoodenBowlOfPeas() : base(0x15FC, 1)
public WoodenBowlOfPeas() : base(0x15FC)
{
Stackable = false;
Weight = 1.0;
@ -211,7 +211,7 @@ namespace Server.Items
public class PewterBowlOfCarrots : Food
{
[Constructible]
public PewterBowlOfCarrots() : base(0x15FE, 1)
public PewterBowlOfCarrots() : base(0x15FE)
{
Stackable = false;
Weight = 1.0;
@ -251,7 +251,7 @@ namespace Server.Items
public class PewterBowlOfCorn : Food
{
[Constructible]
public PewterBowlOfCorn() : base(0x15FF, 1)
public PewterBowlOfCorn() : base(0x15FF)
{
Stackable = false;
Weight = 1.0;
@ -291,7 +291,7 @@ namespace Server.Items
public class PewterBowlOfLettuce : Food
{
[Constructible]
public PewterBowlOfLettuce() : base(0x1600, 1)
public PewterBowlOfLettuce() : base(0x1600)
{
Stackable = false;
Weight = 1.0;
@ -331,7 +331,7 @@ namespace Server.Items
public class PewterBowlOfPeas : Food
{
[Constructible]
public PewterBowlOfPeas() : base(0x1601, 1)
public PewterBowlOfPeas() : base(0x1601)
{
Stackable = false;
Weight = 1.0;
@ -371,7 +371,7 @@ namespace Server.Items
public class PewterBowlOfPotatos : Food
{
[Constructible]
public PewterBowlOfPotatos() : base(0x1602, 1)
public PewterBowlOfPotatos() : base(0x1602)
{
Stackable = false;
Weight = 1.0;
@ -461,7 +461,7 @@ namespace Server.Items
public class WoodenBowlOfStew : Food
{
[Constructible]
public WoodenBowlOfStew() : base(0x1604, 1)
public WoodenBowlOfStew() : base(0x1604)
{
Stackable = false;
Weight = 2.0;
@ -501,7 +501,7 @@ namespace Server.Items
public class WoodenBowlOfTomatoSoup : Food
{
[Constructible]
public WoodenBowlOfTomatoSoup() : base(0x1606, 1)
public WoodenBowlOfTomatoSoup() : base(0x1606)
{
Stackable = false;
Weight = 2.0;

View file

@ -534,7 +534,7 @@ namespace Server.Items
public class Cake : Food
{
[Constructible]
public Cake() : base(0x9E9, 1)
public Cake() : base(0x9E9)
{
Stackable = false;
Weight = 1.0;
@ -591,7 +591,7 @@ namespace Server.Items
public class Cookies : Food
{
[Constructible]
public Cookies() : base(0x160b, 1)
public Cookies() : base(0x160b)
{
Stackable = Core.ML;
Weight = 1.0;
@ -620,7 +620,7 @@ namespace Server.Items
public class Muffins : Food
{
[Constructible]
public Muffins() : base(0x9eb, 1)
public Muffins() : base(0x9eb)
{
Stackable = false;
Weight = 1.0;
@ -650,7 +650,7 @@ namespace Server.Items
public class CheesePizza : Food
{
[Constructible]
public CheesePizza() : base(0x1040, 1)
public CheesePizza() : base(0x1040)
{
Stackable = false;
Weight = 1.0;
@ -681,7 +681,7 @@ namespace Server.Items
public class SausagePizza : Food
{
[Constructible]
public SausagePizza() : base(0x1040, 1)
public SausagePizza() : base(0x1040)
{
Stackable = false;
Weight = 1.0;
@ -712,7 +712,7 @@ namespace Server.Items
public class FruitPie : Food
{
[Constructible]
public FruitPie() : base(0x1041, 1)
public FruitPie() : base(0x1041)
{
Stackable = false;
Weight = 1.0;
@ -743,7 +743,7 @@ namespace Server.Items
public class MeatPie : Food
{
[Constructible]
public MeatPie() : base(0x1041, 1)
public MeatPie() : base(0x1041)
{
Stackable = false;
Weight = 1.0;
@ -774,7 +774,7 @@ namespace Server.Items
public class PumpkinPie : Food
{
[Constructible]
public PumpkinPie() : base(0x1041, 1)
public PumpkinPie() : base(0x1041)
{
Stackable = false;
Weight = 1.0;
@ -805,7 +805,7 @@ namespace Server.Items
public class ApplePie : Food
{
[Constructible]
public ApplePie() : base(0x1041, 1)
public ApplePie() : base(0x1041)
{
Stackable = false;
Weight = 1.0;
@ -836,7 +836,7 @@ namespace Server.Items
public class PeachCobbler : Food
{
[Constructible]
public PeachCobbler() : base(0x1041, 1)
public PeachCobbler() : base(0x1041)
{
Stackable = false;
Weight = 1.0;
@ -867,7 +867,7 @@ namespace Server.Items
public class Quiche : Food
{
[Constructible]
public Quiche() : base(0x1041, 1)
public Quiche() : base(0x1041)
{
Stackable = Core.ML;
Weight = 1.0;

View file

@ -3,7 +3,7 @@ namespace Server.Items
public class FruitBasket : Food
{
[Constructible]
public FruitBasket() : base(0x993, 1)
public FruitBasket() : base(0x993)
{
Weight = 2.0;
FillFactor = 5;

View file

@ -13,7 +13,7 @@ namespace Server.Items
{
}
public CandyCane(int itemID) : base(itemID, 1)
public CandyCane(int itemID) : base(itemID)
{
Stackable = false;
LootType = LootType.Blessed;
@ -126,7 +126,7 @@ namespace Server.Items
[Constructible]
public GingerBreadCookie()
: base(Utility.RandomBool() ? 0x2be1 : 0x2be2, 1)
: base(Utility.RandomBool() ? 0x2be1 : 0x2be2)
{
Stackable = false;
LootType = LootType.Blessed;

View file

@ -65,7 +65,7 @@ namespace Server.Items
public class Spam : Food
{
[Constructible]
public Spam() : base(0x1044, 1)
public Spam() : base(0x1044)
{
Stackable = false;
LootType = LootType.Blessed;

View file

@ -9,7 +9,7 @@ namespace Server.Mobiles
{
// public override bool IsInvulnerable => true; // TODO: Wailing banshees are NOT invulnerable, are any of the others?
public BaseTalismanSummon() : base(AIType.AI_Melee, FightMode.None, 10, 1, 0.2, 0.4)
public BaseTalismanSummon() : base(AIType.AI_Melee, FightMode.None)
{
// TODO: Stats/skills
}

View file

@ -103,7 +103,7 @@ namespace Server.Items
{
int damage = Utility.RandomMinMax(15, 35);
AOS.Damage(From, From, damage, false, 0, 0, 0, 0, 0, 0, 100, false, false, false);
AOS.Damage(From, From, damage, false, 0, 0, 0, 0, 0, 0, 100);
}
}
}

View file

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using Server.ContextMenus;
using Server.Engines.Quests;
using Server.Engines.Quests.Necro;
@ -810,31 +809,45 @@ namespace Server.Mobiles
switch (Action)
{
case ActionType.Wander:
m_Mobile.OnActionWander();
return DoActionWander();
{
m_Mobile.OnActionWander();
return DoActionWander();
}
case ActionType.Combat:
m_Mobile.OnActionCombat();
return DoActionCombat();
{
m_Mobile.OnActionCombat();
return DoActionCombat();
}
case ActionType.Guard:
m_Mobile.OnActionGuard();
return DoActionGuard();
{
m_Mobile.OnActionGuard();
return DoActionGuard();
}
case ActionType.Flee:
m_Mobile.OnActionFlee();
return DoActionFlee();
{
m_Mobile.OnActionFlee();
return DoActionFlee();
}
case ActionType.Interact:
m_Mobile.OnActionInteract();
return DoActionInteract();
{
m_Mobile.OnActionInteract();
return DoActionInteract();
}
case ActionType.Backoff:
m_Mobile.OnActionBackoff();
return DoActionBackoff();
{
m_Mobile.OnActionBackoff();
return DoActionBackoff();
}
default:
return false;
{
return false;
}
}
}
@ -843,42 +856,54 @@ namespace Server.Mobiles
switch (Action)
{
case ActionType.Wander:
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
m_Mobile.FocusMob = null;
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
break;
{
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
m_Mobile.FocusMob = null;
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
break;
}
case ActionType.Combat:
m_Mobile.Warmode = true;
m_Mobile.FocusMob = null;
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
break;
{
m_Mobile.Warmode = true;
m_Mobile.FocusMob = null;
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
break;
}
case ActionType.Guard:
m_Mobile.Warmode = true;
m_Mobile.FocusMob = null;
m_Mobile.Combatant = null;
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
m_NextStopGuard = Core.TickCount + (int)TimeSpan.FromSeconds(10).TotalMilliseconds;
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
break;
{
m_Mobile.Warmode = true;
m_Mobile.FocusMob = null;
m_Mobile.Combatant = null;
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
m_NextStopGuard = Core.TickCount + (int)TimeSpan.FromSeconds(10).TotalMilliseconds;
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
break;
}
case ActionType.Flee:
m_Mobile.Warmode = true;
m_Mobile.FocusMob = null;
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
break;
{
m_Mobile.Warmode = true;
m_Mobile.FocusMob = null;
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
break;
}
case ActionType.Interact:
m_Mobile.Warmode = false;
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
break;
{
m_Mobile.Warmode = false;
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
break;
}
case ActionType.Backoff:
m_Mobile.Warmode = false;
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
break;
{
m_Mobile.Warmode = false;
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
break;
}
}
}
@ -1012,12 +1037,7 @@ namespace Server.Mobiles
public virtual bool Obey()
{
if (m_Mobile.Deleted)
{
return false;
}
return m_Mobile.ControlOrder switch
var shouldObey = !m_Mobile.Deleted && m_Mobile.ControlOrder switch
{
OrderType.None => DoOrderNone(),
OrderType.Come => DoOrderCome(),
@ -1034,6 +1054,15 @@ namespace Server.Mobiles
OrderType.Transfer => DoOrderTransfer(),
_ => false
};
if (shouldObey)
{
// TODO: This might cause the movement timer to reset too often if someone is spamming commands.
// Test this thoroughly.
m_Mobile.ResetSpeeds();
}
return shouldObey;
}
public virtual void OnCurrentOrderChanged()
@ -1046,104 +1075,128 @@ namespace Server.Mobiles
switch (m_Mobile.ControlOrder)
{
case OrderType.None:
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.Home = m_Mobile.Location;
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
{
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.Home = m_Mobile.Location;
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
}
case OrderType.Come:
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
{
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
}
case OrderType.Drop:
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = true;
m_Mobile.Combatant = null;
break;
{
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = true;
m_Mobile.Combatant = null;
break;
}
case OrderType.Friend:
case OrderType.Unfriend:
m_Mobile.ControlMaster.RevealingAction();
break;
{
m_Mobile.ControlMaster.RevealingAction();
break;
}
case OrderType.Guard:
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = true;
m_Mobile.Combatant = null;
var petname = $"{m_Mobile.Name}";
m_Mobile.ControlMaster.SendLocalizedMessage(1049671, petname); // ~1_PETNAME~ is now guarding you.
break;
{
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = true;
m_Mobile.Combatant = null;
var petname = $"{m_Mobile.Name}";
m_Mobile.ControlMaster.SendLocalizedMessage(1049671, petname); // ~1_PETNAME~ is now guarding you.
break;
}
case OrderType.Attack:
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
{
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = true;
m_Mobile.Combatant = null;
break;
m_Mobile.Warmode = true;
m_Mobile.Combatant = null;
break;
}
case OrderType.Patrol:
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
{
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
}
case OrderType.Release:
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
{
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
}
case OrderType.Stay:
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
{
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
}
case OrderType.Stop:
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.Home = m_Mobile.Location;
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
{
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.Home = m_Mobile.Location;
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
}
case OrderType.Follow:
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
{
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
}
case OrderType.Transfer:
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
{
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.PassiveSpeed;
m_Mobile.PlaySound(m_Mobile.GetIdleSound());
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
m_Mobile.Warmode = false;
m_Mobile.Combatant = null;
break;
}
}
}
@ -1824,32 +1877,50 @@ namespace Server.Mobiles
switch (iRndMove)
{
case 0:
DoMove(Direction.Up);
break;
{
DoMove(Direction.Up);
break;
}
case 1:
DoMove(Direction.North);
break;
{
DoMove(Direction.North);
break;
}
case 2:
DoMove(Direction.Left);
break;
{
DoMove(Direction.Left);
break;
}
case 3:
DoMove(Direction.West);
break;
{
DoMove(Direction.West);
break;
}
case 5:
DoMove(Direction.Down);
break;
{
DoMove(Direction.Down);
break;
}
case 6:
DoMove(Direction.South);
break;
{
DoMove(Direction.South);
break;
}
case 7:
DoMove(Direction.Right);
break;
{
DoMove(Direction.Right);
break;
}
case 8:
DoMove(Direction.East);
break;
{
DoMove(Direction.East);
break;
}
default:
DoMove(m_Mobile.Direction);
break;
{
DoMove(m_Mobile.Direction);
break;
}
}
}
}
@ -1857,100 +1928,24 @@ namespace Server.Mobiles
public double TransformMoveDelay(double delay)
{
var isPassive = delay == m_Mobile.PassiveSpeed;
var isControlled = m_Mobile.Controlled || m_Mobile.Summoned;
double max = m_Mobile.IsMonster ? SpeedInfo.MaxMonsterDelay : SpeedInfo.MaxDelay;
if (delay == 0.2)
if (!m_Mobile.IsDeadPet && (m_Mobile.ReduceSpeedWithDamage || m_Mobile.IsSubdued))
{
delay = 0.3;
}
else if (delay == 0.25)
{
delay = 0.45;
}
else if (delay == 0.3)
{
delay = 0.6;
}
else if (delay == 0.4)
{
delay = 0.9;
}
else if (delay == 0.5)
{
delay = 1.05;
}
else if (delay == 0.6)
{
delay = 1.2;
}
else if (delay == 0.8)
{
delay = 1.5;
}
double offset = m_Mobile.StamMax <= 0 ? 1.0 : m_Mobile.Stam / (double)m_Mobile.StamMax;
if (isPassive)
{
delay += 0.2;
}
if (!isControlled)
{
delay += 0.1;
}
else if (m_Mobile.Controlled)
{
if (m_Mobile.ControlOrder == OrderType.Follow && m_Mobile.ControlTarget == m_Mobile.ControlMaster)
if (offset < 1.0)
{
delay *= 0.5;
delay += (max - delay) * (1.0 - offset);
}
delay -= 0.075;
}
if (m_Mobile.ReduceSpeedWithDamage || m_Mobile.IsSubdued)
{
var offset = (double)m_Mobile.Hits / m_Mobile.HitsMax;
if (offset < 0.0)
{
offset = 0.0;
}
else if (offset > 1.0)
{
offset = 1.0;
}
offset = 1.0 - offset;
delay += offset * 0.8;
}
if (delay < 0.0)
{
delay = 0.0;
}
if (double.IsNaN(delay))
{
using (var op = new StreamWriter("nan_transform.txt", true))
{
op.WriteLine(
$"NaN in TransformMoveDelay: {Core.Now}, {GetType()}, {m_Mobile?.GetType()}, {m_Mobile.HitsMax}"
);
}
return 1.0;
}
return delay;
return Math.Min(delay, max);
}
public virtual bool CheckMove() => Core.TickCount - NextMove >= 0;
public virtual bool DoMove(Direction d) => DoMove(d, false);
public virtual bool DoMove(Direction d, bool badStateOk)
public virtual bool DoMove(Direction d, bool badStateOk = false)
{
var res = DoMoveImpl(d);
@ -2712,7 +2707,7 @@ namespace Server.Mobiles
public virtual void OnCurrentSpeedChanged()
{
m_Timer.Stop();
m_Timer.Delay = TimeSpan.FromSeconds(Utility.RandomDouble());
m_Timer.Delay = TimeSpan.FromMilliseconds(Utility.Random(128) * 8);
m_Timer.Interval = TimeSpan.FromSeconds(Math.Max(0.0, m_Mobile.CurrentSpeed));
m_Timer.Start();
}
@ -2740,70 +2735,72 @@ namespace Server.Mobiles
public override void OnClick()
{
if (!m_Mobile.Deleted && m_Mobile.Controlled && m_From.CheckAlive())
if (m_Mobile.Deleted || !m_Mobile.Controlled || !m_From.CheckAlive())
{
if (m_Mobile.IsDeadPet && m_Order is OrderType.Guard or OrderType.Attack or OrderType.Transfer or OrderType.Drop)
{
return;
}
return;
}
var isOwner = m_From == m_Mobile.ControlMaster;
var isFriend = !isOwner && m_Mobile.IsPetFriend(m_From);
if (m_Mobile.IsDeadPet && m_Order is OrderType.Guard or OrderType.Attack or OrderType.Transfer or OrderType.Drop)
{
return;
}
if (!isOwner && !isFriend)
{
return;
}
var isOwner = m_From == m_Mobile.ControlMaster;
var isFriend = !isOwner && m_Mobile.IsPetFriend(m_From);
if (isFriend && m_Order != OrderType.Follow && m_Order != OrderType.Stay && m_Order != OrderType.Stop)
{
return;
}
if (!isOwner && !isFriend)
{
return;
}
switch (m_Order)
{
case OrderType.Follow:
case OrderType.Attack:
case OrderType.Transfer:
case OrderType.Friend:
case OrderType.Unfriend:
if (isFriend && m_Order != OrderType.Follow && m_Order != OrderType.Stay && m_Order != OrderType.Stop)
{
return;
}
switch (m_Order)
{
case OrderType.Follow:
case OrderType.Attack:
case OrderType.Transfer:
case OrderType.Friend:
case OrderType.Unfriend:
{
if (m_Order == OrderType.Transfer && m_From.HasTrade)
{
if (m_Order == OrderType.Transfer && m_From.HasTrade)
{
m_From.SendLocalizedMessage(1010507); // You cannot transfer a pet with a trade pending
}
else if (m_Order == OrderType.Friend && m_From.HasTrade)
{
m_From.SendLocalizedMessage(1070947); // You cannot friend a pet with a trade pending
}
else
{
m_AI.BeginPickTarget(m_From, m_Order);
}
break;
m_From.SendLocalizedMessage(1010507); // You cannot transfer a pet with a trade pending
}
case OrderType.Release:
else if (m_Order == OrderType.Friend && m_From.HasTrade)
{
if (m_Mobile.Summoned)
{
goto default;
}
m_From.SendGump(new ConfirmReleaseGump(m_From, m_Mobile));
break;
m_From.SendLocalizedMessage(1070947); // You cannot friend a pet with a trade pending
}
default:
else
{
if (m_Mobile.CheckControlChance(m_From))
{
m_Mobile.ControlOrder = m_Order;
}
break;
m_AI.BeginPickTarget(m_From, m_Order);
}
}
break;
}
case OrderType.Release:
{
if (m_Mobile.Summoned)
{
goto default;
}
m_From.SendGump(new ConfirmReleaseGump(m_From, m_Mobile));
break;
}
default:
{
if (m_Mobile.CheckControlChance(m_From))
{
m_Mobile.ControlOrder = m_Order;
}
break;
}
}
}
}
@ -2904,14 +2901,10 @@ namespace Server.Mobiles
{
var args = $"{to.Name}\t{from.Name}\t ";
from.SendLocalizedMessage(
1043248,
args
); // The pet refuses to be transferred because it will not obey ~1_NAME~.~3_BLANK~
to.SendLocalizedMessage(
1043249,
args
); // The pet will not accept you as a master because it does not trust you.~3_BLANK~
// The pet refuses to be transferred because it will not obey ~1_NAME~.~3_BLANK~
from.SendLocalizedMessage(1043248, args);
// The pet will not accept you as a master because it does not trust you.~3_BLANK~
to.SendLocalizedMessage(1043249, args);
return false;
}
@ -2919,14 +2912,10 @@ namespace Server.Mobiles
{
var args = $"{to.Name}\t{from.Name}\t ";
from.SendLocalizedMessage(
1043250,
args
); // The pet refuses to be transferred because it will not obey you sufficiently.~3_BLANK~
to.SendLocalizedMessage(
1043251,
args
); // The pet will not accept you as a master because it does not trust ~2_NAME~.~3_BLANK~
// The pet refuses to be transferred because it will not obey you sufficiently.~3_BLANK~
from.SendLocalizedMessage(1043250, args);
// The pet will not accept you as a master because it does not trust ~2_NAME~.~3_BLANK~
to.SendLocalizedMessage(1043251, args);
}
else if (accepted && to.Followers + m_Creature.ControlSlots > to.FollowersMax)
{
@ -2986,10 +2975,8 @@ namespace Server.Mobiles
var args = $"{from.Name}\t{m_Creature.Name}\t{to.Name}";
from.SendLocalizedMessage(1043253, args); // You have transferred your pet to ~3_GETTER~.
to.SendLocalizedMessage(
1043252,
args
); // ~1_NAME~ has transferred the allegiance of ~2_PET_NAME~ to you.
// ~1_NAME~ has transferred the allegiance of ~2_PET_NAME~ to you.
to.SendLocalizedMessage(1043252, args);
}
}
}
@ -3004,7 +2991,7 @@ namespace Server.Mobiles
public AITimer(BaseAI owner)
: base(
TimeSpan.FromSeconds(Utility.RandomDouble()),
TimeSpan.FromSeconds(Utility.Random(128) * 8),
TimeSpan.FromSeconds(Math.Max(0.0, owner.m_Mobile.CurrentSpeed))
)
{

View file

@ -1,228 +1,50 @@
using System;
using System.Collections.Generic;
using Server.Factions;
using Server.Mobiles;
namespace Server
namespace Server;
public static class SpeedInfo
{
public class SpeedInfo
public static double MinDelay { get; private set; }
public static double MaxDelay { get; private set; }
public static double MinMonsterDelay { get; private set; }
public static double MaxMonsterDelay { get; private set; }
// Determines the maximum dex for delay by dex
public static int MaxDex { get; private set; }
public static int MaxMonsterDex { get; private set; }
public static void Configure()
{
// Should we use the new method of speeds?
private static readonly bool Enabled = true;
// Default speed determined by dex (0 -> 190) for non-monster NPCs including pets
MinDelay = ServerConfiguration.GetOrUpdateSetting("movement.delay.npcMinDelay", 0.1);
MaxDelay = ServerConfiguration.GetOrUpdateSetting("movement.delay.npcMaxDelay", 0.5);
MaxDex = ServerConfiguration.GetOrUpdateSetting("movement.delay.maxDex", 190);
private static Dictionary<Type, SpeedInfo> m_Table;
// Default speed determined by dex (0 -> 150) for monsters
MinMonsterDelay = ServerConfiguration.GetOrUpdateSetting("movement.delay.monsterMinDelay", 0.4);
MaxMonsterDelay = ServerConfiguration.GetOrUpdateSetting("movement.delay.monsterMaxDelay", 0.8);
MaxMonsterDex = ServerConfiguration.GetOrUpdateSetting("movement.delay.monsterMaxDex", 150);
}
private static readonly SpeedInfo[] m_Speeds =
public static void GetSpeeds(BaseCreature bc, out double activeSpeed, out double passiveSpeed)
{
var isMonster = bc.IsMonster;
var monsterDelay = isMonster || bc.InActivePVPCombat();
var maxDex = isMonster ? MaxMonsterDex : MaxDex;
var dex = Math.Clamp(bc.Dex, 25, maxDex);
double min = monsterDelay ? MinMonsterDelay : MinDelay;
double max = monsterDelay ? MaxMonsterDelay : MaxDelay;
if (bc.IsParagon)
{
/* Slow */
new(
0.3,
0.6,
new[]
{
typeof(AntLion), typeof(ArcticOgreLord), typeof(BogThing),
typeof(Bogle), typeof(BoneKnight), typeof(EarthElemental),
typeof(Ettin), typeof(FrostOoze), typeof(FrostTroll),
typeof(GazerLarva), typeof(Ghoul), typeof(Golem),
typeof(HeadlessOne), typeof(Jwilson), typeof(Mummy),
typeof(Ogre), typeof(OgreLord), typeof(PlagueBeast),
typeof(Quagmire), typeof(Rat), typeof(RottingCorpse),
typeof(SewerRat), typeof(Skeleton), typeof(Slime),
typeof(Zombie), typeof(Walrus), typeof(RestlessSoul),
typeof(CrystalElemental), typeof(DarknightCreeper), typeof(MoundOfMaggots),
typeof(Juggernaut), typeof(Yamandon), typeof(Serado)
}
),
/* Fast */
new(
0.2,
0.4,
new[]
{
typeof(LordOaks), typeof(Silvani), typeof(AirElemental),
typeof(AncientWyrm), typeof(Balron), typeof(BladeSpirits),
typeof(DreadSpider), typeof(Efreet), typeof(EtherealWarrior),
typeof(Lich), typeof(Nightmare), typeof(OphidianArchmage),
typeof(OphidianMage), typeof(OphidianWarrior), typeof(OphidianMatriarch),
typeof(OphidianKnight), typeof(PoisonElemental), typeof(Revenant),
typeof(SandVortex), typeof(SavageRider), typeof(SavageShaman),
typeof(SnowElemental), typeof(WhiteWyrm), typeof(Wisp),
typeof(DemonKnight), typeof(GiantBlackWidow), typeof(SummonedAirElemental),
typeof(LesserHiryu), typeof(Hiryu), typeof(LadyOfTheSnow),
typeof(RaiJu), typeof(Ronin), typeof(RuneBeetle),
typeof(Changeling), typeof(LadyJennifyr), typeof(LadyMarai), typeof(MasterJonath),
typeof(MasterMikael), typeof(MasterTheophilus), typeof(RedDeath),
typeof(SirPatrick), typeof(Miasma), typeof(Rend),
typeof(Grobu), typeof(Gnaw), typeof(Guile),
typeof(Irk), typeof(Spite), typeof(LadyLissith),
typeof(LadySabrix), typeof(Malefic), typeof(Silk),
typeof(Virulent)
// TODO: Where to put Lurg, Putrefier, Swoop and Pyre? They seem slower.
}
),
/* Very Fast */
new(
0.175,
0.350,
new[]
{
typeof(Barracoon), typeof(Mephitis), typeof(Neira),
typeof(Rikktor), typeof(Semidar), typeof(EnergyVortex),
typeof(EliteNinja), typeof(Pixie), typeof(SilverSerpent),
typeof(VorpalBunny), typeof(FleshRenderer), typeof(KhaldunRevenant),
typeof(FactionDragoon), typeof(FactionKnight), typeof(FactionPaladin),
typeof(FactionHenchman), typeof(FactionMercenary), typeof(FactionNecromancer),
typeof(FactionSorceress), typeof(FactionWizard), typeof(FactionBerserker),
typeof(FactionPaladin), typeof(Leviathan), typeof(FireBeetle),
typeof(FanDancer), typeof(FactionDeathKnight)
}
),
/* Medium */
new(
0.25,
0.5,
new[]
{
typeof(AcidElemental), typeof(AgapiteElemental), typeof(Alligator),
typeof(AncientLich), typeof(Betrayer), typeof(Bird),
typeof(BlackBear), typeof(BlackSolenInfiltratorQueen), typeof(BlackSolenInfiltratorWarrior),
typeof(BlackSolenQueen), typeof(BlackSolenWarrior), typeof(BlackSolenWorker),
typeof(BloodElemental), typeof(Boar), typeof(Bogling),
typeof(BoneMagi), typeof(Brigand), typeof(BronzeElemental),
typeof(BrownBear), typeof(Bull), typeof(BullFrog),
typeof(Cat), typeof(Centaur), typeof(ChaosDaemon),
typeof(Chicken), typeof(GolemController), typeof(CopperElemental),
typeof(CopperElemental), typeof(Cougar), typeof(Cow),
typeof(Cyclops), typeof(Daemon), typeof(DeepSeaSerpent),
typeof(DesertOstard), typeof(DireWolf), typeof(Dog),
typeof(Dolphin), typeof(Dragon), typeof(Drake),
typeof(DullCopperElemental), typeof(Eagle), typeof(ElderGazer),
typeof(EvilMage), typeof(EvilMageLord), typeof(Executioner),
typeof(Savage), typeof(FireElemental), typeof(FireGargoyle),
typeof(FireSteed), typeof(ForestOstard), typeof(FrenziedOstard),
typeof(FrostSpider), typeof(Gargoyle), typeof(Gazer),
typeof(IceSerpent), typeof(GiantRat), typeof(GiantSerpent),
typeof(GiantSpider), typeof(GiantToad), typeof(Goat),
typeof(GoldenElemental), typeof(Gorilla), typeof(GreatHart),
typeof(GreyWolf), typeof(GrizzlyBear), typeof(Guardian),
typeof(Harpy), typeof(Harrower), typeof(HellHound),
typeof(Hind), typeof(HordeMinion), typeof(Horse),
typeof(Horse), typeof(IceElemental), typeof(IceFiend),
typeof(IceSnake), typeof(Imp), typeof(JackRabbit),
typeof(Kirin), typeof(Kraken), typeof(PredatorHellCat),
typeof(LavaLizard), typeof(LavaSerpent), typeof(LavaSnake),
typeof(Lizardman), typeof(Llama), typeof(Mongbat),
typeof(StrongMongbat), typeof(MountainGoat), typeof(Orc),
typeof(OrcBomber), typeof(OrcBrute), typeof(OrcCaptain),
typeof(OrcishLord), typeof(OrcishMage), typeof(PackHorse),
typeof(PackLlama), typeof(Panther), typeof(Pig),
typeof(PlagueSpawn), typeof(PolarBear), typeof(Rabbit),
typeof(Ratman), typeof(RatmanArcher), typeof(RatmanMage),
typeof(RedSolenInfiltratorQueen), typeof(RedSolenInfiltratorWarrior), typeof(RedSolenQueen),
typeof(RedSolenWarrior), typeof(RedSolenWorker), typeof(RidableLlama),
typeof(Ridgeback), typeof(Scorpion), typeof(SeaSerpent),
typeof(SerpentineDragon), typeof(Shade), typeof(ShadowIronElemental),
typeof(ShadowWisp), typeof(ShadowWyrm), typeof(Sheep),
typeof(SilverSteed), typeof(SkeletalDragon), typeof(SkeletalMage),
typeof(SkeletalMount), typeof(HellCat), typeof(Snake),
typeof(SnowLeopard), typeof(SpectralArmour), typeof(Spectre),
typeof(StoneGargoyle), typeof(StoneHarpy), typeof(SwampDragon),
typeof(ScaledSwampDragon), typeof(SwampTentacle), typeof(TerathanAvenger),
typeof(TerathanDrone), typeof(TerathanMatriarch), typeof(TerathanWarrior),
typeof(TimberWolf), typeof(Titan), typeof(Troll),
typeof(Unicorn), typeof(ValoriteElemental), typeof(VeriteElemental),
typeof(CoMWarHorse), typeof(MinaxWarHorse), typeof(SLWarHorse),
typeof(TBWarHorse), typeof(WaterElemental), typeof(WhippingVine),
typeof(WhiteWolf), typeof(Wraith), typeof(Wyvern),
typeof(KhaldunZealot), typeof(KhaldunSummoner), typeof(SavageRidgeback),
typeof(LichLord), typeof(SkeletalKnight), typeof(SummonedDaemon),
typeof(SummonedEarthElemental), typeof(SummonedWaterElemental), typeof(SummonedFireElemental),
typeof(MeerWarrior), typeof(MeerEternal), typeof(MeerMage),
typeof(MeerCaptain), typeof(JukaLord), typeof(JukaMage),
typeof(JukaWarrior), typeof(AbysmalHorror), typeof(BoneDemon),
typeof(Devourer), typeof(FleshGolem), typeof(Gibberling),
typeof(GoreFiend), typeof(Impaler), typeof(PatchworkSkeleton),
typeof(Ravager), typeof(ShadowKnight), typeof(SkitteringHopper),
typeof(Treefellow), typeof(VampireBat), typeof(WailingBanshee),
typeof(WandererOfTheVoid), typeof(Cursed), typeof(GrimmochDrummel),
typeof(LysanderGathenwale), typeof(MorgBergen), typeof(ShadowFiend),
typeof(SpectralArmour), typeof(TavaraSewel), typeof(ArcaneDaemon),
typeof(Doppleganger), typeof(EnslavedGargoyle), typeof(ExodusMinion),
typeof(ExodusOverseer), typeof(GargoyleDestroyer), typeof(GargoyleEnforcer),
typeof(Moloch), typeof(BakeKitsune), typeof(DeathwatchBeetleHatchling),
typeof(Kappa), typeof(KazeKemono), typeof(DeathwatchBeetle),
typeof(TsukiWolf), typeof(YomotsuElder), typeof(YomotsuPriest),
typeof(YomotsuWarrior), typeof(RevenantLion), typeof(Oni),
typeof(Gaman), typeof(Crane), typeof(Beetle)
}
)
};
public SpeedInfo(double activeSpeed, double passiveSpeed, Type[] types)
{
ActiveSpeed = activeSpeed;
PassiveSpeed = passiveSpeed;
Types = types;
min /= 2;
max = min + 0.5;
}
public double ActiveSpeed { get; set; }
public double PassiveSpeed { get; set; }
public Type[] Types { get; set; }
public static bool Contains(object obj)
{
if (!Enabled)
{
return false;
}
if (m_Table == null)
{
LoadTable();
}
return m_Table!.ContainsKey(obj.GetType());
}
public static bool GetSpeeds(object obj, ref double activeSpeed, ref double passiveSpeed)
{
if (!Enabled)
{
return false;
}
if (m_Table == null)
{
LoadTable();
}
if (!m_Table!.TryGetValue(obj.GetType(), out var sp))
{
return false;
}
activeSpeed = sp.ActiveSpeed;
passiveSpeed = sp.PassiveSpeed;
return true;
}
private static void LoadTable()
{
m_Table = new Dictionary<Type, SpeedInfo>();
for (var i = 0; i < m_Speeds.Length; ++i)
{
var info = m_Speeds[i];
var types = info.Types;
for (var j = 0; j < types.Length; ++j)
{
m_Table[types[j]] = info;
}
}
}
activeSpeed = Math.Max(max - (max - min) * ((double)dex / maxDex), min);
passiveSpeed = activeSpeed * 2;
}
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
public class DireWolf : BaseCreature
{
[Constructible]
public DireWolf() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public DireWolf() : base(AIType.AI_Melee)
{
Body = 23;
BaseSoundID = 0xE5;

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
public class GreyWolf : BaseCreature
{
[Constructible]
public GreyWolf() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public GreyWolf() : base(AIType.AI_Animal, FightMode.Aggressor)
{
Body = Utility.RandomList(25, 27);
BaseSoundID = 0xE5;

View file

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

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
public class WhiteWolf : BaseCreature
{
[Constructible]
public WhiteWolf() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public WhiteWolf() : base(AIType.AI_Animal, FightMode.Aggressor)
{
Body = Utility.RandomList(34, 37);
BaseSoundID = 0xE5;

View file

@ -3,7 +3,7 @@ namespace Server.Mobiles
public class Bull : BaseCreature
{
[Constructible]
public Bull() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public Bull() : base(AIType.AI_Animal, FightMode.Aggressor)
{
Body = Utility.RandomList(0xE8, 0xE9);
BaseSoundID = 0x64;

View file

@ -5,7 +5,7 @@ namespace Server.Mobiles
public class Cow : BaseCreature
{
[Constructible]
public Cow() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public Cow() : base(AIType.AI_Animal, FightMode.Aggressor)
{
Body = Utility.RandomList(0xD8, 0xE7);
BaseSoundID = 0x78;

View file

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

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
public class HellCat : BaseCreature
{
[Constructible]
public HellCat() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public HellCat() : base(AIType.AI_Melee)
{
Body = 0xC9;
Hue = Utility.RandomList(0x647, 0x650, 0x659, 0x662, 0x66B, 0x674);

View file

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

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
public class PredatorHellCat : BaseCreature
{
[Constructible]
public PredatorHellCat() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public PredatorHellCat() : base(AIType.AI_Melee)
{
Body = 127;
BaseSoundID = 0xBA;

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
public class SnowLeopard : BaseCreature
{
[Constructible]
public SnowLeopard() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public SnowLeopard() : base(AIType.AI_Animal, FightMode.Aggressor)
{
Body = Utility.RandomList(64, 65);
BaseSoundID = 0x73;

View file

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

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
public class BullFrog : BaseCreature
{
[Constructible]
public BullFrog() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public BullFrog() : base(AIType.AI_Animal, FightMode.Aggressor)
{
Body = 81;
Hue = Utility.RandomList(0x5AC, 0x5A3, 0x59A, 0x591, 0x588, 0x57F);

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
{
[Constructible]
public Dolphin()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
: base(AIType.AI_Animal, FightMode.Aggressor)
{
Body = 0x97;
BaseSoundID = 0x8A;

View file

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

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
public class GiantToad : BaseCreature
{
[Constructible]
public GiantToad() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public GiantToad() : base(AIType.AI_Melee)
{
Body = 80;
BaseSoundID = 0x26B;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -9,7 +9,7 @@ namespace Server.Mobiles
private DateTime m_NextWoolTime;
[Constructible]
public Sheep() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public Sheep() : base(AIType.AI_Animal, FightMode.Aggressor)
{
Body = 0xCF;
BaseSoundID = 0xD6;

View file

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

View file

@ -12,7 +12,7 @@ namespace Server.Mobiles
public BaseMount(
string name, int bodyID, int itemID, AIType aiType, FightMode fightMode, int rangePerception,
int rangeFight, double activeSpeed, double passiveSpeed
int rangeFight, double activeSpeed = -1, double passiveSpeed = -1
) : base(
aiType,
fightMode,

View file

@ -11,7 +11,7 @@ namespace Server.Mobiles
[Constructible]
public Hiryu()
: base("a hiryu", 243, 0x3E94, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
: base("a hiryu", 243, 0x3E94, AIType.AI_Melee, FightMode.Closest, 10, 1)
{
Hue = GetHue();

View file

@ -7,7 +7,7 @@ namespace Server.Mobiles
public class Kirin : BaseMount
{
[Constructible]
public Kirin(string name = "a ki-rin") : base(name, 132, 0x3EAD, AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4)
public Kirin(string name = "a ki-rin") : base(name, 132, 0x3EAD, AIType.AI_Mage, FightMode.Evil, 10, 1)
{
BaseSoundID = 0x3C5;

View file

@ -11,7 +11,7 @@ namespace Server.Mobiles
[Constructible]
public LesserHiryu()
: base("a lesser hiryu", 243, 0x3E94, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
: base("a lesser hiryu", 243, 0x3E94, AIType.AI_Melee, FightMode.Closest, 10, 1)
{
Hue = GetHue();

View file

@ -7,7 +7,7 @@ namespace Server.Mobiles
public class Unicorn : BaseMount
{
[Constructible]
public Unicorn(string name = "a unicorn") : base(name, 0x7A, 0x3EB4, AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4)
public Unicorn(string name = "a unicorn") : base(name, 0x7A, 0x3EB4, AIType.AI_Mage, FightMode.Evil, 10, 1)
{
BaseSoundID = 0x4BC;

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
{
public BaseWarHorse(
int bodyID, int itemID, AIType aiType, FightMode fightMode, int rangePerception, int rangeFight,
double activeSpeed, double passiveSpeed
double activeSpeed = -1, double passiveSpeed = -1
) : base(
"a war horse",
bodyID,

View file

@ -3,7 +3,7 @@ namespace Server.Mobiles
public class CoMWarHorse : BaseWarHorse
{
[Constructible]
public CoMWarHorse() : base(0x77, 0x3EB1, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public CoMWarHorse() : base(0x77, 0x3EB1, AIType.AI_Melee, FightMode.Aggressor, 10, 1)
{
}

View file

@ -3,7 +3,7 @@ namespace Server.Mobiles
public class MinaxWarHorse : BaseWarHorse
{
[Constructible]
public MinaxWarHorse() : base(0x78, 0x3EAF, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public MinaxWarHorse() : base(0x78, 0x3EAF, AIType.AI_Melee, FightMode.Aggressor, 10, 1)
{
}

View file

@ -3,7 +3,7 @@ namespace Server.Mobiles
public class SLWarHorse : BaseWarHorse
{
[Constructible]
public SLWarHorse() : base(0x79, 0x3EB0, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public SLWarHorse() : base(0x79, 0x3EB0, AIType.AI_Melee, FightMode.Aggressor, 10, 1)
{
}

View file

@ -3,7 +3,7 @@ namespace Server.Mobiles
public class TBWarHorse : BaseWarHorse
{
[Constructible]
public TBWarHorse() : base(0x76, 0x3EB2, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public TBWarHorse() : base(0x76, 0x3EB2, AIType.AI_Melee, FightMode.Aggressor, 10, 1)
{
}

View file

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

View file

@ -6,7 +6,7 @@ namespace Server.Mobiles
public class GiantSerpent : BaseCreature
{
[Constructible]
public GiantSerpent() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public GiantSerpent() : base(AIType.AI_Melee)
{
Body = 0x15;
Hue = Utility.RandomSnakeHue();

View file

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

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
public class IceSnake : BaseCreature
{
[Constructible]
public IceSnake() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public IceSnake() : base(AIType.AI_Melee)
{
Body = 52;
Hue = 0x480;

View file

@ -6,7 +6,7 @@ namespace Server.Mobiles
public class LavaLizard : BaseCreature
{
[Constructible]
public LavaLizard() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public LavaLizard() : base(AIType.AI_Melee)
{
Body = 0xCE;
Hue = Utility.RandomList(0x647, 0x650, 0x659, 0x662, 0x66B, 0x674);

View file

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

View file

@ -6,7 +6,7 @@ namespace Server.Mobiles
public class LavaSnake : BaseCreature
{
[Constructible]
public LavaSnake() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public LavaSnake() : base(AIType.AI_Melee)
{
Body = 52;
Hue = Utility.RandomList(0x647, 0x650, 0x659, 0x662, 0x66B, 0x674);

View file

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

View file

@ -3,7 +3,7 @@ namespace Server.Mobiles
public class Snake : BaseCreature
{
[Constructible]
public Snake() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public Snake() : base(AIType.AI_Melee)
{
Body = 52;
Hue = Utility.RandomSnakeHue();

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
public class GiantRat : BaseCreature
{
[Constructible]
public GiantRat() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public GiantRat() : base(AIType.AI_Melee)
{
Body = 0xD7;
BaseSoundID = 0x188;

View file

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

View file

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

View file

@ -4,7 +4,7 @@ namespace Server.Mobiles
public class SewerRat : BaseCreature
{
[Constructible]
public SewerRat() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public SewerRat() : base(AIType.AI_Melee)
{
Body = 238;
BaseSoundID = 0xCC;

View file

@ -3,7 +3,7 @@ namespace Server.Mobiles
public class Jwilson : BaseCreature
{
[Constructible]
public Jwilson() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
public Jwilson() : base(AIType.AI_Melee)
{
Hue = Utility.RandomList(0x89C, 0x8A2, 0x8A8, 0x8AE);
Body = 0x33;

View file

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

View file

@ -3,7 +3,7 @@ namespace Server.Mobiles
public class Bird : BaseCreature
{
[Constructible]
public Bird() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public Bird() : base(AIType.AI_Animal, FightMode.Aggressor)
{
if (Utility.RandomBool())
{
@ -82,7 +82,7 @@ namespace Server.Mobiles
public class TropicalBird : BaseCreature
{
[Constructible]
public TropicalBird() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
public TropicalBird() : base(AIType.AI_Animal, FightMode.Aggressor)
{
Hue = Utility.RandomBirdHue();

Some files were not shown because too many files have changed in this diff Show more