http://www.runuo.com/community/threads/ready-missing-system-message-your-pet-looks-happier.450209/ Not all powerscrolls do drop - Ninjitsu, Bushido etc. http://www.runuo.com/community/threads/ready-not-all-powerscrolls-do-drop.459974/ Savage Kin Paint Wrong Skill Requirement + Wrong Success Chance http://www.runuo.com/community/threads/ready-savage-kin-paint-wrong-skill-requirement-wrong-success-chance.455360/ Hag Quest - Stew, can't eat it http://www.runuo.com/community/threads/ready-hag-quest-stew.454406/ Giant Blue Beetles shouldn't need beating into submission after being tamed once http://www.runuo.com/community/threads/ready-giant-blue-beetles.450205/ Greater Dragon Fame/Karma Doesn't Match OSI http://www.runuo.com/community/threads/ready-greater-dragon-fame-karma-doesnt-match-osi.472206/ Resizing Houses, you can resize a house by using a command under the house sign http://www.runuo.com/community/threads/ready-resizing-houses.414762/ Crafted Shield Resists are wrong on RunUO http://www.runuo.com/community/threads/ready-crafted-shield-resists.454186/ Yomotsu Mines, you should not be able to recall out of there. http://www.runuo.com/community/threads/ready-yomotsu-mines.445486/ Missing Necro Icons in the Buff/Debuff Bar http://www.runuo.com/community/threads/ready-missing-necro-icons-in-the-buff-debuff-bar.450872/ Chivalry Spells, you are allowed to attempt casting of spells outside of your skill range without a system message http://www.runuo.com/community/threads/ready-chivalry-spells.450757/ Tinker tools use a different graphic on OSI http://www.runuo.com/community/threads/ready-tinker-tools.460690/ Tinkering should not be required when crafted a Tetsubo http://www.runuo.com/community/threads/ready-wrong-skill-requirement-carpentry-wrong-success-chances.455342/ Carpentry-Small+Large Beds -Wrong Success Chance http://www.runuo.com/community/threads/ready-carpentry-small-large-beds-wrong-success-chance.455794/ Telekinesis, various changes to behaviour with items http://www.runuo.com/community/threads/ready-telekinesis.455250/ Forensic Evaluation Various issues http://www.runuo.com/community/threads/ready-forensic-evaluation-various-issues-merged.458700/ Animate Dead Corpses, you cannot carve the corpse after it's used http://www.runuo.com/community/threads/ready-animate-dead-corpses.453823/ You should be able to use begging skill while riding http://www.runuo.com/community/threads/ready-begging-while-riding.466174/ Crafting Mod Lower Requirements should only appear on shields http://www.runuo.com/community/threads/ready-crafting-mod-lower-requirements.452112/ You should be revealed While Taking Poison/Strangle Damage http://www.runuo.com/community/threads/ready-you-never-reveal-while-taking-poison-strangle-damage.456946/ Insurance messages don't do the math! http://www.runuo.com/community/threads/ready-insurance-messages-dont-do-the-math.454928/ Slayers should work on area of effect spells http://www.runuo.com/community/threads/ready-slayers-should-work-on-area-of-effect-spells.448774/ You should not be able to use any travel spell in Heartwood http://www.runuo.com/community/threads/ready-heartwood.457379/ Welcome Back To The House Friend message does not show post-AoS http://www.runuo.com/community/threads/ready-welcome-back-to-the-house-friend.415924/ Giant Beetle speed should be very fast when magery spells are cast on it http://www.runuo.com/community/threads/ready-giant-beetle.417848/
213 lines
No EOL
9.6 KiB
C#
213 lines
No EOL
9.6 KiB
C#
using System;
|
|
using System.Collections;
|
|
using Server;
|
|
using Server.Mobiles;
|
|
using Server.Factions;
|
|
|
|
namespace Server
|
|
{
|
|
public class SpeedInfo
|
|
{
|
|
// Should we use the new method of speeds?
|
|
private static bool Enabled = true;
|
|
|
|
private double m_ActiveSpeed;
|
|
private double m_PassiveSpeed;
|
|
private Type[] m_Types;
|
|
|
|
public double ActiveSpeed
|
|
{
|
|
get{ return m_ActiveSpeed; }
|
|
set{ m_ActiveSpeed = value; }
|
|
}
|
|
|
|
public double PassiveSpeed
|
|
{
|
|
get{ return m_PassiveSpeed; }
|
|
set{ m_PassiveSpeed = value; }
|
|
}
|
|
|
|
public Type[] Types
|
|
{
|
|
get{ return m_Types; }
|
|
set{ m_Types = value; }
|
|
}
|
|
|
|
public SpeedInfo( double activeSpeed, double passiveSpeed, Type[] types )
|
|
{
|
|
m_ActiveSpeed = activeSpeed;
|
|
m_PassiveSpeed = passiveSpeed;
|
|
m_Types = types;
|
|
}
|
|
|
|
public static bool Contains( object obj )
|
|
{
|
|
if ( !Enabled )
|
|
return false;
|
|
|
|
if ( m_Table == null )
|
|
LoadTable();
|
|
|
|
SpeedInfo sp = (SpeedInfo)m_Table[obj.GetType()];
|
|
|
|
return ( sp != null );
|
|
}
|
|
|
|
public static bool GetSpeeds( object obj, ref double activeSpeed, ref double passiveSpeed )
|
|
{
|
|
if ( !Enabled )
|
|
return false;
|
|
|
|
if ( m_Table == null )
|
|
LoadTable();
|
|
|
|
SpeedInfo sp = (SpeedInfo)m_Table[obj.GetType()];
|
|
|
|
if ( sp == null )
|
|
return false;
|
|
|
|
activeSpeed = sp.ActiveSpeed;
|
|
passiveSpeed = sp.PassiveSpeed;
|
|
|
|
return true;
|
|
}
|
|
|
|
private static void LoadTable()
|
|
{
|
|
m_Table = new Hashtable();
|
|
|
|
for ( int i = 0; i < m_Speeds.Length; ++i )
|
|
{
|
|
SpeedInfo info = m_Speeds[i];
|
|
Type[] types = info.Types;
|
|
|
|
for ( int j = 0; j < types.Length; ++j )
|
|
m_Table[types[j]] = info;
|
|
}
|
|
}
|
|
|
|
private static Hashtable m_Table;
|
|
|
|
private static SpeedInfo[] m_Speeds = new SpeedInfo[]
|
|
{
|
|
/* Slow */
|
|
new SpeedInfo( 0.3, 0.6, new Type[]
|
|
{
|
|
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 SpeedInfo( 0.2, 0.4, new Type[]
|
|
{
|
|
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 )
|
|
} ),
|
|
/* Very Fast */
|
|
new SpeedInfo( 0.175, 0.350, new Type[]
|
|
{
|
|
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 )
|
|
} ),
|
|
/* Medium */
|
|
new SpeedInfo( 0.25, 0.5, new Type[]
|
|
{
|
|
typeof( ToxicElemental ), 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 )
|
|
} )
|
|
};
|
|
}
|
|
} |