Lots of fixes, changes, rewrites of various things, including but not limited to:

Logging of staff crafting items,
Fixes for the OSI client changes
The potion stacking stuff
BaseWeapon fix, so that damage increase things don't multiply themselves.
admin gump fixes for Firewall
Various display tweaks for weight
SoS no longer spawn in Tokuno
Hiryu hues happified to OSI standards
staff now see alliance chat correctly
Play barkeeper text increased per OSI
Various other OSI skill requirement changes
Various unimplemented features of the SE moves
EventSink for when the client version is received from client.
Client validation moved out of the core.
Client version validation now has options to ignore/kick/warn/annoy.  Automagically tries to detect current client.
Reverted the delayeddamagecontext back to OSI standards.
Can no longer use bags of sending in jail.

MagerySpell implemented. Now only Magery spells have a circle, and various other properties of 'em.
TransformationSpellHelper now implemented.  Things moved around for this.
Spells now need a Timespan for the cast delay, instead of arbitrarily based on Circle.  Circle doesn't make sense for non-Magery spells!
Alot of the spellweaving spells added to OSI standards.
This commit is contained in:
asayre 2007-05-26 03:12:41 +00:00
parent f12e9745c6
commit 2ad37d54aa
214 changed files with 4881 additions and 1243 deletions

View file

@ -6,11 +6,10 @@ using Server.Targeting;
namespace Server.Spells.Fourth
{
public class ArchCureSpell : Spell
public class ArchCureSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Arch Cure", "Vas An Nox",
SpellCircle.Fourth,
215,
9061,
Reagent.Garlic,
@ -18,6 +17,8 @@ namespace Server.Spells.Fourth
Reagent.MandrakeRoot
);
public override SpellCircle Circle { get { return SpellCircle.Fourth; } }
public ArchCureSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
@ -28,7 +29,7 @@ namespace Server.Spells.Fourth
}
// Archcure is now 1/4th of a second faster
public override int CastDelayBase{ get{ return base.CastDelayBase - 1; } }
public override TimeSpan CastDelayBase{ get{ return base.CastDelayBase - TimeSpan.FromSeconds( 0.25 ); } }
public void Target( IPoint3D p )
{

View file

@ -7,11 +7,10 @@ using Server.Engines.PartySystem;
namespace Server.Spells.Fourth
{
public class ArchProtectionSpell : Spell
public class ArchProtectionSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Arch Protection", "Vas Uus Sanct",
SpellCircle.Fourth,
Core.AOS ? 239 : 215,
9011,
Reagent.Garlic,
@ -20,6 +19,8 @@ namespace Server.Spells.Fourth
Reagent.SulfurousAsh
);
public override SpellCircle Circle { get { return SpellCircle.Fourth; } }
public ArchProtectionSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}

View file

@ -5,11 +5,10 @@ using Server.Network;
namespace Server.Spells.Fourth
{
public class CurseSpell : Spell
public class CurseSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Curse", "Des Sanct",
SpellCircle.Fourth,
227,
9031,
Reagent.Nightshade,
@ -17,6 +16,8 @@ namespace Server.Spells.Fourth
Reagent.SulfurousAsh
);
public override SpellCircle Circle { get { return SpellCircle.Fourth; } }
public CurseSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}

View file

@ -7,11 +7,10 @@ using Server.Items;
namespace Server.Spells.Fourth
{
public class FireFieldSpell : Spell
public class FireFieldSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Fire Field", "In Flam Grav",
SpellCircle.Fourth,
215,
9041,
false,
@ -20,6 +19,8 @@ namespace Server.Spells.Fourth
Reagent.SulfurousAsh
);
public override SpellCircle Circle { get { return SpellCircle.Fourth; } }
public FireFieldSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
@ -80,7 +81,7 @@ namespace Server.Spells.Fourth
{
Point3D loc = new Point3D( eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z );
new InternalItem( itemID, loc, Caster, Caster.Map, duration, i );
new FireFieldItem( itemID, loc, Caster, Caster.Map, duration, i );
}
}
@ -88,15 +89,21 @@ namespace Server.Spells.Fourth
}
[DispellableField]
private class InternalItem : Item
public class FireFieldItem : Item
{
private Timer m_Timer;
private DateTime m_End;
private Mobile m_Caster;
private int m_Damage;
public override bool BlocksFit{ get{ return true; } }
public InternalItem( int itemID, Point3D loc, Mobile caster, Map map, TimeSpan duration, int val ) : base( itemID )
public FireFieldItem( int itemID, Point3D loc, Mobile caster, Map map, TimeSpan duration, int val )
: this( itemID, loc, caster, map, duration, val, 2 )
{
}
public FireFieldItem( int itemID, Point3D loc, Mobile caster, Map map, TimeSpan duration, int val, int damage ) : base( itemID )
{
bool canFit = SpellHelper.AdjustField( ref loc, map, 12, false );
@ -108,6 +115,8 @@ namespace Server.Spells.Fourth
m_Caster = caster;
m_Damage = damage;
m_End = DateTime.Now + duration;
m_Timer = new InternalTimer( this, TimeSpan.FromSeconds( Math.Abs( val ) * 0.2 ), caster.InLOS( this ), canFit );
@ -122,7 +131,7 @@ namespace Server.Spells.Fourth
m_Timer.Stop();
}
public InternalItem( Serial serial ) : base( serial )
public FireFieldItem( Serial serial ) : base( serial )
{
}
@ -130,8 +139,9 @@ namespace Server.Spells.Fourth
{
base.Serialize( writer );
writer.Write( (int) 1 ); // version
writer.Write( (int) 2 ); // version
writer.Write( m_Damage );
writer.Write( m_Caster );
writer.WriteDeltaTime( m_End );
}
@ -144,6 +154,11 @@ namespace Server.Spells.Fourth
switch ( version )
{
case 2:
{
m_Damage = reader.ReadInt();
goto case 1;
}
case 1:
{
m_Caster = reader.ReadMobile();
@ -160,6 +175,9 @@ namespace Server.Spells.Fourth
break;
}
}
if( version < 2 )
m_Damage = 2;
}
public override bool OnMoveOver( Mobile m )
@ -168,7 +186,7 @@ namespace Server.Spells.Fourth
{
m_Caster.DoHarmful( m );
int damage = 2;
int damage = m_Damage;
if ( !Core.AOS && m.CheckSkill( SkillName.MagicResist, 0.0, 30.0 ) )
{
@ -186,12 +204,12 @@ namespace Server.Spells.Fourth
private class InternalTimer : Timer
{
private InternalItem m_Item;
private FireFieldItem m_Item;
private bool m_InLOS, m_CanFit;
private static Queue m_Queue = new Queue();
public InternalTimer( InternalItem item, TimeSpan delay, bool inLOS, bool canFit ) : base( delay, TimeSpan.FromSeconds( 1.0 ) )
public InternalTimer( FireFieldItem item, TimeSpan delay, bool inLOS, bool canFit ) : base( delay, TimeSpan.FromSeconds( 1.0 ) )
{
m_Item = item;
m_InLOS = inLOS;
@ -242,7 +260,7 @@ namespace Server.Spells.Fourth
caster.DoHarmful( m );
int damage = 2;
int damage = m_Item.m_Damage;
if ( !Core.AOS && m.CheckSkill( SkillName.MagicResist, 0.0, 30.0 ) )
{

View file

@ -6,11 +6,10 @@ using Server.Mobiles;
namespace Server.Spells.Fourth
{
public class GreaterHealSpell : Spell
public class GreaterHealSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Greater Heal", "In Vas Mani",
SpellCircle.Fourth,
204,
9061,
Reagent.Garlic,
@ -19,6 +18,8 @@ namespace Server.Spells.Fourth
Reagent.SpidersSilk
);
public override SpellCircle Circle { get { return SpellCircle.Fourth; } }
public GreaterHealSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
@ -59,7 +60,8 @@ namespace Server.Spells.Fourth
int toHeal = (int)(Caster.Skills[SkillName.Magery].Value * 0.4);
toHeal += Utility.Random( 1, 10 );
m.Heal( toHeal );
//m.Heal( toHeal, Caster );
SpellHelper.Heal( toHeal, m, Caster );
m.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );
m.PlaySound( 0x202 );

View file

@ -4,17 +4,18 @@ using Server.Network;
namespace Server.Spells.Fourth
{
public class LightningSpell : Spell
public class LightningSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Lightning", "Por Ort Grav",
SpellCircle.Fourth,
239,
9021,
Reagent.MandrakeRoot,
Reagent.SulfurousAsh
);
public override SpellCircle Circle { get { return SpellCircle.Fourth; } }
public LightningSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}

View file

@ -5,11 +5,10 @@ using Server.Targeting;
namespace Server.Spells.Fourth
{
public class ManaDrainSpell : Spell
public class ManaDrainSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Mana Drain", "Ort Rel",
SpellCircle.Fourth,
215,
9031,
Reagent.BlackPearl,
@ -17,6 +16,8 @@ namespace Server.Spells.Fourth
Reagent.SpidersSilk
);
public override SpellCircle Circle { get { return SpellCircle.Fourth; } }
public ManaDrainSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}

View file

@ -9,11 +9,10 @@ using Server.Spells.Necromancy;
namespace Server.Spells.Fourth
{
public class RecallSpell : Spell
public class RecallSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Recall", "Kal Ort Por",
SpellCircle.Fourth,
239,
9031,
Reagent.BlackPearl,
@ -21,6 +20,8 @@ namespace Server.Spells.Fourth
Reagent.MandrakeRoot
);
public override SpellCircle Circle { get { return SpellCircle.Fourth; } }
private RunebookEntry m_Entry;
private Runebook m_Book;
@ -36,7 +37,7 @@ namespace Server.Spells.Fourth
public override void GetCastSkills( out double min, out double max )
{
if ( TransformationSpell.UnderTransformation( Caster, typeof( WraithFormSpell ) ) )
if ( TransformationSpellHelper.UnderTransformation( Caster, typeof( WraithFormSpell ) ) )
min = max = 0;
else if( Core.SE && m_Book != null ) //recall using Runebook charge
min = max = 0;