notoriety fixes
http://www.uodemise.com/forum/showthread.php?t=135689 explosion pot timers and targeting http://www.uodemise.com/forum/showthread.php?t=158221 Potion bonuses http://www.uodemise.com/forum/showthread.php?t=150979
This commit is contained in:
parent
a603b2c82d
commit
6a221f4e10
4 changed files with 28 additions and 14 deletions
|
|
@ -151,13 +151,12 @@ namespace Server.Items
|
|||
public static int EnhancePotions( Mobile m )
|
||||
{
|
||||
int EP = AosAttributes.GetValue( m, AosAttribute.EnhancePotions );
|
||||
int skillBonus = m.Skills.Alchemy.Fixed / 330 * 10;
|
||||
|
||||
int cap = 50 + m.Skills.Alchemy.Fixed / 330 * 10;
|
||||
if ( Core.ML && EP > 50 && m.AccessLevel <= AccessLevel.Player )
|
||||
EP = 50;
|
||||
|
||||
if ( Core.ML && EP > cap && m.AccessLevel <= AccessLevel.Player )
|
||||
EP = cap;
|
||||
|
||||
return EP;
|
||||
return ( EP + skillBonus );
|
||||
}
|
||||
|
||||
public static TimeSpan Scale( Mobile m, TimeSpan v )
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ namespace Server.Items
|
|||
|
||||
private static bool LeveledExplosion = false; // Should explosion potions explode other nearby potions?
|
||||
private static bool InstantExplosion = false; // Should explosion potions explode on impact?
|
||||
private const int ExplosionRange = 2; // How long is the blast radius?
|
||||
private static bool RelativeLocation = false; // Is the explosion target location relative for mobiles?
|
||||
private const int ExplosionRange = 2; // How long is the blast radius?
|
||||
|
||||
public BaseExplosionPotion( PotionEffect effect ) : base( 0xF0D, effect )
|
||||
{
|
||||
|
|
@ -89,7 +90,11 @@ namespace Server.Items
|
|||
if ( m_Timer == null )
|
||||
{
|
||||
from.SendLocalizedMessage( 500236 ); // You should throw it now!
|
||||
m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 0.75 ), TimeSpan.FromSeconds( 1.0 ), 4, new TimerStateCallback( Detonate_OnTick ), new object[]{ from, 3 } );
|
||||
|
||||
if( Core.ML )
|
||||
m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), TimeSpan.FromSeconds( 1.25 ), 5, new TimerStateCallback( Detonate_OnTick ), new object[]{ from, 3 } ); // 3.6 seconds explosion delay
|
||||
else
|
||||
m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 0.75 ), TimeSpan.FromSeconds( 1.0 ), 4, new TimerStateCallback( Detonate_OnTick ), new object[]{ from, 3 } ); // 2.6 seconds explosion delay
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -195,10 +200,15 @@ namespace Server.Items
|
|||
|
||||
IEntity to;
|
||||
|
||||
if ( p is Mobile )
|
||||
to = (Mobile)p;
|
||||
else
|
||||
to = new Entity( Serial.Zero, new Point3D( p ), map );
|
||||
to = new Entity( Serial.Zero, new Point3D( p ), map );
|
||||
|
||||
if( p is Mobile )
|
||||
{
|
||||
if( !RelativeLocation ) // explosion location = current mob location.
|
||||
p = ((Mobile)p).Location;
|
||||
else
|
||||
to = (Mobile)p;
|
||||
}
|
||||
|
||||
Effects.SendMovingEffect( from, to, m_Potion.ItemID & 0x3FFF, 7, 0, false, false, m_Potion.Hue, 0 );
|
||||
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ namespace Server.Misc
|
|||
|
||||
if ( Core.ML && master != null )
|
||||
{
|
||||
if( source == master && CheckAggressor( target.Aggressors, source ) )
|
||||
if ( ( source == master && CheckAggressor( target.Aggressors, source ) ) || ( CheckAggressor( source.Aggressors, bc ) ) )
|
||||
return Notoriety.CanBeAttacked;
|
||||
else
|
||||
return MobileNotoriety( source, master );
|
||||
|
|
@ -352,8 +352,9 @@ namespace Server.Misc
|
|||
BaseCreature bc = (BaseCreature)source;
|
||||
|
||||
Mobile master = bc.GetMaster();
|
||||
if( master != null && CheckAggressor( master.Aggressors, target ) )
|
||||
return Notoriety.CanBeAttacked;
|
||||
if( master != null )
|
||||
if( CheckAggressor( master.Aggressors, target ) || MobileNotoriety( master, target ) == Notoriety.CanBeAttacked )
|
||||
return Notoriety.CanBeAttacked;
|
||||
}
|
||||
|
||||
return Notoriety.Innocent;
|
||||
|
|
|
|||
|
|
@ -3065,6 +3065,10 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.AggressiveAction( aggressor, criminal );
|
||||
|
||||
if ( this.ControlMaster != null )
|
||||
if ( NotorietyHandlers.CheckAggressor( this.ControlMaster.Aggressors, aggressor ) )
|
||||
aggressor.Aggressors.Add( AggressorInfo.Create( this, aggressor, true ) );
|
||||
|
||||
OrderType ct = m_ControlOrder;
|
||||
|
||||
if ( m_AI != null )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue