Plant gump issues
http://jira.runuo.com/browse/RUNUO-12 House decay stages should pass at random intervals http://jira.runuo.com/browse/RUNUO-113 Nature's Fury cast issues http://jira.runuo.com/browse/RUNUO-114 Animal Form inaccuracies and issue with Talisman of the Fey http://jira.runuo.com/browse/RUNUO-115 BaseWaterContainer fill messages and behavior http://jira.runuo.com/browse/RUNUO-116 AdminGump filter for accounts owning houses http://jira.runuo.com/browse/RUNUO-118 Seeds should be stackable http://jira.runuo.com/browse/RUNUO-119 Typo in case of a jailbreak http://jira.runuo.com/browse/RUNUO-120 Prevent creation of invalid account names http://jira.runuo.com/browse/RUNUO-121
This commit is contained in:
parent
d2f79e93ea
commit
4cba2c8d56
18 changed files with 440 additions and 137 deletions
|
|
@ -609,7 +609,7 @@ namespace Server.Spells
|
|||
|
||||
if( caster != null && caster.AccessLevel == AccessLevel.Player && caster.Region.IsPartOf( typeof( Regions.Jail ) ) )
|
||||
{
|
||||
caster.SendLocalizedMessage( 1042632 ); // You'll need a better jailbreak plan then that!
|
||||
caster.SendLocalizedMessage( 1114345 ); // You'll need a better jailbreak plan than that!
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,11 +69,19 @@ namespace Server.Spells.Ninjitsu
|
|||
return false;
|
||||
}
|
||||
|
||||
private bool CasterIsMoving()
|
||||
{
|
||||
return (DateTime.Now - Caster.LastMoveTime <= Caster.ComputeMovementSpeed(Caster.Direction));
|
||||
}
|
||||
|
||||
private bool m_WasMoving;
|
||||
|
||||
public override void OnBeginCast()
|
||||
{
|
||||
base.OnBeginCast();
|
||||
|
||||
Caster.FixedEffect(0x37C4, 10, 14, 4, 3);
|
||||
m_WasMoving = CasterIsMoving();
|
||||
}
|
||||
|
||||
public override bool CheckFizzle()
|
||||
|
|
@ -112,7 +120,9 @@ namespace Server.Spells.Ninjitsu
|
|||
}
|
||||
else if (Caster is PlayerMobile)
|
||||
{
|
||||
if (GetLastAnimalForm(Caster) == -1 || DateTime.Now - Caster.LastMoveTime > Caster.ComputeMovementSpeed(Caster.Direction))
|
||||
bool skipGump = (m_WasMoving || CasterIsMoving());
|
||||
|
||||
if (GetLastAnimalForm(Caster) == -1 || !skipGump)
|
||||
{
|
||||
Caster.CloseGump(typeof(AnimalFormGump));
|
||||
Caster.SendGump(new AnimalFormGump(Caster, m_Entries, this));
|
||||
|
|
@ -120,17 +130,27 @@ namespace Server.Spells.Ninjitsu
|
|||
else
|
||||
{
|
||||
if (Morph(Caster, GetLastAnimalForm(Caster)) == MorphResult.Fail)
|
||||
{
|
||||
DoFizzle();
|
||||
}
|
||||
else
|
||||
{
|
||||
Caster.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist);
|
||||
Caster.Mana -= mana;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Morph(Caster, GetLastAnimalForm(Caster)) == MorphResult.Fail)
|
||||
{
|
||||
DoFizzle();
|
||||
}
|
||||
else
|
||||
{
|
||||
Caster.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist);
|
||||
Caster.Mana -= mana;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -189,12 +209,13 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
m.CheckSkill(SkillName.Ninjitsu, 0.0, 37.5);
|
||||
|
||||
if (!BaseFormTalisman.EntryEnabled(m, entry.Type))
|
||||
return MorphResult.Success; // Still consumes mana, just no effect
|
||||
|
||||
BaseMount.Dismount(m);
|
||||
|
||||
m.BodyMod = entry.BodyMod;
|
||||
|
||||
if (entry.HueMod > 0)
|
||||
m.HueMod = entry.HueMod;
|
||||
m.HueMod = entry.HueMod;
|
||||
|
||||
if (entry.SpeedBoost)
|
||||
m.Send(SpeedControl.MountSpeed);
|
||||
|
|
@ -461,6 +482,7 @@ namespace Server.Spells.Ninjitsu
|
|||
}
|
||||
else
|
||||
{
|
||||
m_Caster.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist);
|
||||
m_Caster.Mana -= mana;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,23 +17,10 @@ namespace Server.Mobiles
|
|||
|
||||
public override bool AlwaysMurderer { get { return true; } }
|
||||
|
||||
private Mobile m_Target;
|
||||
|
||||
public override Mobile ConstantFocus { get { return m_Target; } }
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if( m_Target != null && (!m_Target.Alive || m_Target.Deleted || !InRange( m_Target, 24 ) || !CanSee( m_Target )) )
|
||||
m_Target = null; //Go kill other stuffs
|
||||
|
||||
base.OnThink();
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public NatureFury( Mobile target )
|
||||
public NatureFury()
|
||||
: base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
m_Target = target;
|
||||
Name = "a nature's fury";
|
||||
Body = 0x33;
|
||||
Hue = 0x4001;
|
||||
|
|
@ -62,12 +49,6 @@ namespace Server.Mobiles
|
|||
ControlSlots = 1;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public NatureFury()
|
||||
: this( null ) //Null makes it act like any other mob
|
||||
{
|
||||
}
|
||||
|
||||
public override void MoveToWorld( Point3D loc, Map map )
|
||||
{
|
||||
base.MoveToWorld( loc, map );
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
using Server.Multis;
|
||||
using Server.Regions;
|
||||
|
||||
namespace Server.Spells.Spellweaving
|
||||
{
|
||||
|
|
@ -23,26 +23,12 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
}
|
||||
|
||||
private bool m_MobileTarg;
|
||||
|
||||
public override int GetMana()
|
||||
{
|
||||
int mana = base.GetMana();
|
||||
|
||||
if( m_MobileTarg )
|
||||
mana *= 2;
|
||||
|
||||
return mana;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if( !base.CheckCast() )
|
||||
if ( !base.CheckCast() )
|
||||
return false;
|
||||
|
||||
if( (Caster.Followers + 1) > Caster.FollowersMax )
|
||||
if ( ( Caster.Followers + 1 ) > Caster.FollowersMax )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
|
||||
return false;
|
||||
|
|
@ -58,46 +44,29 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public void Target( IPoint3D point )
|
||||
{
|
||||
//What happens if you cast it on yourself? OSI ANSWER: You're an idiot for wasting the mana, and it'll just look for another target.
|
||||
Mobile m = point as Mobile;
|
||||
Point3D p = new Point3D( point );
|
||||
Map map = Caster.Map;
|
||||
|
||||
m_MobileTarg = (m != null);
|
||||
if ( map == null )
|
||||
return;
|
||||
|
||||
BaseHouse house = BaseHouse.FindHouseAt( p, map, 0 );
|
||||
if ( house != null)
|
||||
if ( !house.IsFriend ( Caster ) )
|
||||
return;
|
||||
if (m != null) //say "Target can not be seen" if you target directly a mobile, like in OSI
|
||||
{
|
||||
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
|
||||
}
|
||||
else if ( map == null || !map.CanSpawnMobile( p.X, p.Y, p.Z ) )
|
||||
HouseRegion r = Region.Find( p, map ).GetRegion( typeof( HouseRegion ) ) as HouseRegion;
|
||||
|
||||
if ( r != null && r.House != null && !r.House.IsFriend( Caster ) )
|
||||
return;
|
||||
|
||||
if ( !map.CanSpawnMobile( p.X, p.Y, p.Z ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
|
||||
}
|
||||
else if( SpellHelper.CheckTown( p, Caster ) && (m_MobileTarg ? CheckHSequence( m ) : CheckSequence()) )
|
||||
else if ( SpellHelper.CheckTown( p, Caster ) && CheckSequence() )
|
||||
{
|
||||
TimeSpan duration = TimeSpan.FromSeconds( Caster.Skills.Spellweaving.Value/24 + 25 + FocusLevel*2 );
|
||||
TimeSpan duration = TimeSpan.FromSeconds( Caster.Skills.Spellweaving.Value / 24 + 25 + FocusLevel * 2 );
|
||||
|
||||
if( m == Caster )
|
||||
m = null;
|
||||
NatureFury nf = new NatureFury();
|
||||
BaseCreature.Summon( nf, false, Caster, p, 0x5CB, duration );
|
||||
|
||||
NatureFury nf = new NatureFury( m );
|
||||
|
||||
BaseCreature.Summon( nf, false, Caster, p , 0x5CB, duration );
|
||||
|
||||
Timer t = null;
|
||||
|
||||
t = Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), TimeSpan.FromSeconds( 5.0 ), delegate
|
||||
{
|
||||
if( !nf.Alive || nf.Deleted || nf.DamageMin > 20 ) //sanity
|
||||
t.Stop();
|
||||
|
||||
nf.DamageMin++;
|
||||
nf.DamageMax++;
|
||||
} );
|
||||
new InternalTimer( nf ).Start();
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
|
|
@ -107,22 +76,47 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
private NatureFurySpell m_Owner;
|
||||
|
||||
public InternalTarget( NatureFurySpell owner ) : base( 10, true, TargetFlags.None )
|
||||
public InternalTarget( NatureFurySpell owner )
|
||||
: base( 10, true, TargetFlags.None )
|
||||
{
|
||||
m_Owner = owner;
|
||||
CheckLOS = true;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object o )
|
||||
{
|
||||
if( o is IPoint3D )
|
||||
if ( o is IPoint3D )
|
||||
m_Owner.Target( (IPoint3D)o );
|
||||
}
|
||||
|
||||
protected override void OnTargetFinish( Mobile from )
|
||||
{
|
||||
if( m_Owner != null )
|
||||
if ( m_Owner != null )
|
||||
m_Owner.FinishSequence();
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private NatureFury m_NatureFury;
|
||||
|
||||
public InternalTimer( NatureFury nf )
|
||||
: base( TimeSpan.FromSeconds( 5.0 ), TimeSpan.FromSeconds( 5.0 ) )
|
||||
{
|
||||
m_NatureFury = nf;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( m_NatureFury.Deleted || !m_NatureFury.Alive || m_NatureFury.DamageMin > 20 )
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
else
|
||||
{
|
||||
++m_NatureFury.DamageMin;
|
||||
++m_NatureFury.DamageMax;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue