Fixes code according to modern code style. Fixes a few expression bugs.

This commit is contained in:
Kamron Batman 2018-09-15 09:58:51 -07:00
parent 89eea25e5f
commit 970fd563b2
3324 changed files with 441118 additions and 433755 deletions

View file

@ -1,193 +1,207 @@
using System;
using Server.Spells.Bushido;
using Server.Spells.Chivalry;
using Server.Spells.Eighth;
using Server.Spells.Fifth;
using Server.Spells.First;
using Server.Spells.Fourth;
using Server.Spells.Mysticism;
using Server.Spells.Necromancy;
using Server.Spells.Ninjitsu;
using Server.Spells.Second;
using Server.Spells.Seventh;
using Server.Spells.Sixth;
using Server.Spells.Spellweaving;
using Server.Spells.Third;
namespace Server.Spells
{
public class Initializer
{
public static void Initialize()
{
// First circle
Register( 00, typeof( First.ClumsySpell ) );
Register( 01, typeof( First.CreateFoodSpell ) );
Register( 02, typeof( First.FeeblemindSpell ) );
Register( 03, typeof( First.HealSpell ) );
Register( 04, typeof( First.MagicArrowSpell ) );
Register( 05, typeof( First.NightSightSpell ) );
Register( 06, typeof( First.ReactiveArmorSpell ) );
Register( 07, typeof( First.WeakenSpell ) );
public class Initializer
{
public static void Initialize()
{
// First circle
Register(00, typeof(ClumsySpell));
Register(01, typeof(CreateFoodSpell));
Register(02, typeof(FeeblemindSpell));
Register(03, typeof(HealSpell));
Register(04, typeof(MagicArrowSpell));
Register(05, typeof(NightSightSpell));
Register(06, typeof(ReactiveArmorSpell));
Register(07, typeof(WeakenSpell));
// Second circle
Register( 08, typeof( Second.AgilitySpell ) );
Register( 09, typeof( Second.CunningSpell ) );
Register( 10, typeof( Second.CureSpell ) );
Register( 11, typeof( Second.HarmSpell ) );
Register( 12, typeof( Second.MagicTrapSpell ) );
Register( 13, typeof( Second.RemoveTrapSpell ) );
Register( 14, typeof( Second.ProtectionSpell ) );
Register( 15, typeof( Second.StrengthSpell ) );
// Second circle
Register(08, typeof(AgilitySpell));
Register(09, typeof(CunningSpell));
Register(10, typeof(CureSpell));
Register(11, typeof(HarmSpell));
Register(12, typeof(MagicTrapSpell));
Register(13, typeof(RemoveTrapSpell));
Register(14, typeof(ProtectionSpell));
Register(15, typeof(StrengthSpell));
// Third circle
Register( 16, typeof( Third.BlessSpell ) );
Register( 17, typeof( Third.FireballSpell ) );
Register( 18, typeof( Third.MagicLockSpell ) );
Register( 19, typeof( Third.PoisonSpell ) );
Register( 20, typeof( Third.TelekinesisSpell ) );
Register( 21, typeof( Third.TeleportSpell ) );
Register( 22, typeof( Third.UnlockSpell ) );
Register( 23, typeof( Third.WallOfStoneSpell ) );
// Third circle
Register(16, typeof(BlessSpell));
Register(17, typeof(FireballSpell));
Register(18, typeof(MagicLockSpell));
Register(19, typeof(PoisonSpell));
Register(20, typeof(TelekinesisSpell));
Register(21, typeof(TeleportSpell));
Register(22, typeof(UnlockSpell));
Register(23, typeof(WallOfStoneSpell));
// Fourth circle
Register( 24, typeof( Fourth.ArchCureSpell ) );
Register( 25, typeof( Fourth.ArchProtectionSpell ) );
Register( 26, typeof( Fourth.CurseSpell ) );
Register( 27, typeof( Fourth.FireFieldSpell ) );
Register( 28, typeof( Fourth.GreaterHealSpell ) );
Register( 29, typeof( Fourth.LightningSpell ) );
Register( 30, typeof( Fourth.ManaDrainSpell ) );
Register( 31, typeof( Fourth.RecallSpell ) );
// Fourth circle
Register(24, typeof(ArchCureSpell));
Register(25, typeof(ArchProtectionSpell));
Register(26, typeof(CurseSpell));
Register(27, typeof(FireFieldSpell));
Register(28, typeof(GreaterHealSpell));
Register(29, typeof(LightningSpell));
Register(30, typeof(ManaDrainSpell));
Register(31, typeof(RecallSpell));
// Fifth circle
Register( 32, typeof( Fifth.BladeSpiritsSpell ) );
Register( 33, typeof( Fifth.DispelFieldSpell ) );
Register( 34, typeof( Fifth.IncognitoSpell ) );
Register( 35, typeof( Fifth.MagicReflectSpell ) );
Register( 36, typeof( Fifth.MindBlastSpell ) );
Register( 37, typeof( Fifth.ParalyzeSpell ) );
Register( 38, typeof( Fifth.PoisonFieldSpell ) );
Register( 39, typeof( Fifth.SummonCreatureSpell ) );
// Fifth circle
Register(32, typeof(BladeSpiritsSpell));
Register(33, typeof(DispelFieldSpell));
Register(34, typeof(IncognitoSpell));
Register(35, typeof(MagicReflectSpell));
Register(36, typeof(MindBlastSpell));
Register(37, typeof(ParalyzeSpell));
Register(38, typeof(PoisonFieldSpell));
Register(39, typeof(SummonCreatureSpell));
// Sixth circle
Register( 40, typeof( Sixth.DispelSpell ) );
Register( 41, typeof( Sixth.EnergyBoltSpell ) );
Register( 42, typeof( Sixth.ExplosionSpell ) );
Register( 43, typeof( Sixth.InvisibilitySpell ) );
Register( 44, typeof( Sixth.MarkSpell ) );
Register( 45, typeof( Sixth.MassCurseSpell ) );
Register( 46, typeof( Sixth.ParalyzeFieldSpell ) );
Register( 47, typeof( Sixth.RevealSpell ) );
// Sixth circle
Register(40, typeof(DispelSpell));
Register(41, typeof(EnergyBoltSpell));
Register(42, typeof(ExplosionSpell));
Register(43, typeof(InvisibilitySpell));
Register(44, typeof(MarkSpell));
Register(45, typeof(MassCurseSpell));
Register(46, typeof(ParalyzeFieldSpell));
Register(47, typeof(RevealSpell));
// Seventh circle
Register( 48, typeof( Seventh.ChainLightningSpell ) );
Register( 49, typeof( Seventh.EnergyFieldSpell ) );
Register( 50, typeof( Seventh.FlameStrikeSpell ) );
Register( 51, typeof( Seventh.GateTravelSpell ) );
Register( 52, typeof( Seventh.ManaVampireSpell ) );
Register( 53, typeof( Seventh.MassDispelSpell ) );
Register( 54, typeof( Seventh.MeteorSwarmSpell ) );
Register( 55, typeof( Seventh.PolymorphSpell ) );
// Seventh circle
Register(48, typeof(ChainLightningSpell));
Register(49, typeof(EnergyFieldSpell));
Register(50, typeof(FlameStrikeSpell));
Register(51, typeof(GateTravelSpell));
Register(52, typeof(ManaVampireSpell));
Register(53, typeof(MassDispelSpell));
Register(54, typeof(MeteorSwarmSpell));
Register(55, typeof(PolymorphSpell));
// Eighth circle
Register( 56, typeof( Eighth.EarthquakeSpell ) );
Register( 57, typeof( Eighth.EnergyVortexSpell ) );
Register( 58, typeof( Eighth.ResurrectionSpell ) );
Register( 59, typeof( Eighth.AirElementalSpell ) );
Register( 60, typeof( Eighth.SummonDaemonSpell ) );
Register( 61, typeof( Eighth.EarthElementalSpell ) );
Register( 62, typeof( Eighth.FireElementalSpell ) );
Register( 63, typeof( Eighth.WaterElementalSpell ) );
// Eighth circle
Register(56, typeof(EarthquakeSpell));
Register(57, typeof(EnergyVortexSpell));
Register(58, typeof(ResurrectionSpell));
Register(59, typeof(AirElementalSpell));
Register(60, typeof(SummonDaemonSpell));
Register(61, typeof(EarthElementalSpell));
Register(62, typeof(FireElementalSpell));
Register(63, typeof(WaterElementalSpell));
if ( Core.AOS )
{
// Necromancy spells
Register( 100, typeof( Necromancy.AnimateDeadSpell ) );
Register( 101, typeof( Necromancy.BloodOathSpell ) );
Register( 102, typeof( Necromancy.CorpseSkinSpell ) );
Register( 103, typeof( Necromancy.CurseWeaponSpell ) );
Register( 104, typeof( Necromancy.EvilOmenSpell ) );
Register( 105, typeof( Necromancy.HorrificBeastSpell ) );
Register( 106, typeof( Necromancy.LichFormSpell ) );
Register( 107, typeof( Necromancy.MindRotSpell ) );
Register( 108, typeof( Necromancy.PainSpikeSpell ) );
Register( 109, typeof( Necromancy.PoisonStrikeSpell ) );
Register( 110, typeof( Necromancy.StrangleSpell ) );
Register( 111, typeof( Necromancy.SummonFamiliarSpell ) );
Register( 112, typeof( Necromancy.VampiricEmbraceSpell ) );
Register( 113, typeof( Necromancy.VengefulSpiritSpell ) );
Register( 114, typeof( Necromancy.WitherSpell ) );
Register( 115, typeof( Necromancy.WraithFormSpell ) );
if (Core.AOS)
{
// Necromancy spells
Register(100, typeof(AnimateDeadSpell));
Register(101, typeof(BloodOathSpell));
Register(102, typeof(CorpseSkinSpell));
Register(103, typeof(CurseWeaponSpell));
Register(104, typeof(EvilOmenSpell));
Register(105, typeof(HorrificBeastSpell));
Register(106, typeof(LichFormSpell));
Register(107, typeof(MindRotSpell));
Register(108, typeof(PainSpikeSpell));
Register(109, typeof(PoisonStrikeSpell));
Register(110, typeof(StrangleSpell));
Register(111, typeof(SummonFamiliarSpell));
Register(112, typeof(VampiricEmbraceSpell));
Register(113, typeof(VengefulSpiritSpell));
Register(114, typeof(WitherSpell));
Register(115, typeof(WraithFormSpell));
if ( Core.SE )
Register( 116, typeof( Necromancy.ExorcismSpell ) );
if (Core.SE)
Register(116, typeof(ExorcismSpell));
// Paladin abilities
Register( 200, typeof( Chivalry.CleanseByFireSpell ) );
Register( 201, typeof( Chivalry.CloseWoundsSpell ) );
Register( 202, typeof( Chivalry.ConsecrateWeaponSpell ) );
Register( 203, typeof( Chivalry.DispelEvilSpell ) );
Register( 204, typeof( Chivalry.DivineFurySpell ) );
Register( 205, typeof( Chivalry.EnemyOfOneSpell ) );
Register( 206, typeof( Chivalry.HolyLightSpell ) );
Register( 207, typeof( Chivalry.NobleSacrificeSpell ) );
Register( 208, typeof( Chivalry.RemoveCurseSpell ) );
Register( 209, typeof( Chivalry.SacredJourneySpell ) );
// Paladin abilities
Register(200, typeof(CleanseByFireSpell));
Register(201, typeof(CloseWoundsSpell));
Register(202, typeof(ConsecrateWeaponSpell));
Register(203, typeof(DispelEvilSpell));
Register(204, typeof(DivineFurySpell));
Register(205, typeof(EnemyOfOneSpell));
Register(206, typeof(HolyLightSpell));
Register(207, typeof(NobleSacrificeSpell));
Register(208, typeof(RemoveCurseSpell));
Register(209, typeof(SacredJourneySpell));
if ( Core.SE )
{
// Samurai abilities
Register( 400, typeof( Bushido.HonorableExecution ) );
Register( 401, typeof( Bushido.Confidence ) );
Register( 402, typeof( Bushido.Evasion ) );
Register( 403, typeof( Bushido.CounterAttack ) );
Register( 404, typeof( Bushido.LightningStrike ) );
Register( 405, typeof( Bushido.MomentumStrike ) );
if (Core.SE)
{
// Samurai abilities
Register(400, typeof(HonorableExecution));
Register(401, typeof(Confidence));
Register(402, typeof(Evasion));
Register(403, typeof(CounterAttack));
Register(404, typeof(LightningStrike));
Register(405, typeof(MomentumStrike));
// Ninja abilities
Register( 500, typeof( Ninjitsu.FocusAttack ) );
Register( 501, typeof( Ninjitsu.DeathStrike ) );
Register( 502, typeof( Ninjitsu.AnimalForm ) );
Register( 503, typeof( Ninjitsu.KiAttack ) );
Register( 504, typeof( Ninjitsu.SurpriseAttack ) );
Register( 505, typeof( Ninjitsu.Backstab ) );
Register( 506, typeof( Ninjitsu.Shadowjump ) );
Register( 507, typeof( Ninjitsu.MirrorImage ) );
}
// Ninja abilities
Register(500, typeof(FocusAttack));
Register(501, typeof(DeathStrike));
Register(502, typeof(AnimalForm));
Register(503, typeof(KiAttack));
Register(504, typeof(SurpriseAttack));
Register(505, typeof(Backstab));
Register(506, typeof(Shadowjump));
Register(507, typeof(MirrorImage));
}
if ( Core.ML )
{
Register( 600, typeof( Spellweaving.ArcaneCircleSpell ) );
Register( 601, typeof( Spellweaving.GiftOfRenewalSpell ) );
Register( 602, typeof( Spellweaving.ImmolatingWeaponSpell ) );
Register( 603, typeof( Spellweaving.AttuneWeaponSpell ) );
Register( 604, typeof( Spellweaving.ThunderstormSpell ) );
Register( 605, typeof( Spellweaving.NatureFurySpell ) );
Register( 606, typeof( Spellweaving.SummonFeySpell ) );
Register( 607, typeof( Spellweaving.SummonFiendSpell ) );
Register( 608, typeof( Spellweaving.ReaperFormSpell ) );
//Register( 609, typeof( Spellweaving.WildfireSpell ) );
Register( 610, typeof( Spellweaving.EssenceOfWindSpell ) );
//Register( 611, typeof( Spellweaving.DryadAllureSpell ) );
Register( 612, typeof( Spellweaving.EtherealVoyageSpell ) );
Register( 613, typeof( Spellweaving.WordOfDeathSpell ) );
Register( 614, typeof( Spellweaving.GiftOfLifeSpell ) );
//Register( 615, typeof( Spellweaving.ArcaneEmpowermentSpell ) );
}
if (Core.ML)
{
Register(600, typeof(ArcaneCircleSpell));
Register(601, typeof(GiftOfRenewalSpell));
Register(602, typeof(ImmolatingWeaponSpell));
Register(603, typeof(AttuneWeaponSpell));
Register(604, typeof(ThunderstormSpell));
Register(605, typeof(NatureFurySpell));
Register(606, typeof(SummonFeySpell));
Register(607, typeof(SummonFiendSpell));
Register(608, typeof(ReaperFormSpell));
//Register( 609, typeof( Spellweaving.WildfireSpell ) );
Register(610, typeof(EssenceOfWindSpell));
//Register( 611, typeof( Spellweaving.DryadAllureSpell ) );
Register(612, typeof(EtherealVoyageSpell));
Register(613, typeof(WordOfDeathSpell));
Register(614, typeof(GiftOfLifeSpell));
//Register( 615, typeof( Spellweaving.ArcaneEmpowermentSpell ) );
}
if ( Core.SA )
{
// Mysticism spells
//Register( 677, typeof( Mysticism.NetherBoltSpell ) );
//Register( 678, typeof( Mysticism.HealingStoneSpell ) );
//Register( 679, typeof( Mysticism.PurgeMagicSpell ) );
//Register( 680, typeof( Mysticism.EnchantSpell ) );
//Register( 681, typeof( Mysticism.SleepSpell ) );
Register( 682, typeof( Mysticism.EagleStrikeSpell ) );
Register( 683, typeof( Mysticism.AnimatedWeaponSpell ) );
Register( 684, typeof( Mysticism.StoneFormSpell ) );
//Register( 685, typeof( Mysticism.SpellTriggerSpell ) );
//Register( 686, typeof( Mysticism.MassSleepSpell ) );
//Register( 687, typeof( Mysticism.CleansingWindsSpell ) );
//Register( 688, typeof( Mysticism.BombardSpell ) );
Register( 689, typeof( Mysticism.SpellPlagueSpell ) );
Register( 690, typeof( Mysticism.HailStormSpell ) );
Register( 691, typeof( Mysticism.NetherCycloneSpell ) );
//Register( 692, typeof( Mysticism.RisingColossusSpell ) );
}
}
}
if (Core.SA)
{
// Mysticism spells
//Register( 677, typeof( Mysticism.NetherBoltSpell ) );
//Register( 678, typeof( Mysticism.HealingStoneSpell ) );
//Register( 679, typeof( Mysticism.PurgeMagicSpell ) );
//Register( 680, typeof( Mysticism.EnchantSpell ) );
//Register( 681, typeof( Mysticism.SleepSpell ) );
Register(682, typeof(EagleStrikeSpell));
Register(683, typeof(AnimatedWeaponSpell));
Register(684, typeof(StoneFormSpell));
//Register( 685, typeof( Mysticism.SpellTriggerSpell ) );
//Register( 686, typeof( Mysticism.MassSleepSpell ) );
//Register( 687, typeof( Mysticism.CleansingWindsSpell ) );
//Register( 688, typeof( Mysticism.BombardSpell ) );
Register(689, typeof(SpellPlagueSpell));
Register(690, typeof(HailStormSpell));
Register(691, typeof(NetherCycloneSpell));
//Register( 692, typeof( Mysticism.RisingColossusSpell ) );
}
}
}
public static void Register( int spellId, Type type )
{
SpellRegistry.Register( spellId, type );
}
}
}
public static void Register(int spellId, Type type)
{
SpellRegistry.Register(spellId, type);
}
}
}