Fixes to bola: thrower+target dismount time is equal, Core.ML is 10s, 4 sec delay from throw to hit victim, dismount info moved to playermobile rather than mount, to prevent exploit.

This commit is contained in:
xavier 2013-01-12 23:56:40 +00:00
parent 48e08198fe
commit 2120f4fb5b
5 changed files with 208 additions and 176 deletions

View file

@ -31,8 +31,7 @@ namespace Server.Items
return true;
}
public static readonly TimeSpan DefenderRemountDelay = TimeSpan.FromSeconds( 10.0 ); // TODO: Taken from bola script, needs to be verified
public static readonly TimeSpan AttackerRemountDelay = TimeSpan.FromSeconds( 3.0 );
public static readonly TimeSpan RemountDelay = TimeSpan.FromSeconds( 10.0 );
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
@ -73,16 +72,26 @@ namespace Server.Items
defender.PlaySound( 0x140 );
defender.FixedParticles( 0x3728, 10, 15, 9955, EffectLayer.Waist );
mount.Rider = null;
BaseMount.SetMountPrevention( defender, BlockMountType.Dazed, DefenderRemountDelay );
if( Core.ML && attacker is BaseCreature && ((BaseCreature)attacker).ControlMaster != null )
if( defender is PlayerMobile )
{
BaseMount.SetMountPrevention( ((BaseCreature)attacker).ControlMaster, BlockMountType.DismountRecovery, AttackerRemountDelay );
( defender as PlayerMobile ).AddMountBlock( BlockMountType.Dazed, RemountDelay );
}
else
if( attacker is PlayerMobile )
{
BaseMount.SetMountPrevention( attacker, BlockMountType.DismountRecovery, AttackerRemountDelay );
( attacker as PlayerMobile ).AddMountBlock( BlockMountType.DismountRecovery, RemountDelay );
}
else if( Core.ML && attacker is BaseCreature )
{
BaseCreature bc = attacker as BaseCreature;
if( bc.ControlMaster is PlayerMobile )
{
PlayerMobile pm = bc.ControlMaster as PlayerMobile;
pm.AddMountBlock( BlockMountType.DismountRecovery, RemountDelay );
}
}
if ( !attacker.Mounted )