- Hit Life Leech now works in PvP

(http://www.uodemise.com/discussion/showthread.php?t=121298)

- Summoned Daemon now has the proper bodyvalue (AoS+) and effect
(http://www.uodemise.com/discussion/showthread.php?t=127404)

- Two new house signs are added
(http://www.uodemise.com/discussion/showthread.php?t=125409)

- Changes to Satyrs and Dryads:
--> Dryads:
----> they do area peace
----> can partially undress males
----> have chance to drop peculiar or fragrant (not yet implemented) seeds
--> Satyrs:
----> their karma is neutral
----> can peace combatants
----> can provoke nearby creatures to the combatant
----> can undress females
----> can discord combatants
--> Both: can drop spellweaving scrolls
(http://www.uodemise.com/discussion/showthread.php?t=125444)

- Added Auto Arrow Recovery feature (SE+)
(http://www.uodemise.com/discussion/showthread.php?t=114807)
This commit is contained in:
daedalus 2009-12-14 19:01:59 +00:00
parent 37043076e0
commit cd7c2becf7
14 changed files with 511 additions and 98 deletions

View file

@ -313,6 +313,62 @@ namespace Server.Mobiles
}
#endregion
#region Auto Arrow Recovery
private Dictionary<Type, int> m_RecoverableAmmo = new Dictionary<Type,int>();
public Dictionary<Type, int> RecoverableAmmo
{
get { return m_RecoverableAmmo; }
}
public void RecoverAmmo()
{
if ( Core.SE && Alive )
{
foreach ( KeyValuePair<Type, int> kvp in m_RecoverableAmmo )
{
if ( kvp.Value > 0 )
{
Item ammo = null;
try
{
ammo = Activator.CreateInstance( kvp.Key ) as Item;
}
catch
{
}
if ( ammo != null )
{
string name = ammo.Name;
ammo.Amount = kvp.Value;
if ( name == null )
{
if ( ammo is Arrow )
name = "arrow";
else if ( ammo is Bolt )
name = "bolt";
}
if ( name != null && ammo.Amount > 1 )
name = String.Format( "{0}s", name );
if ( name == null )
name = String.Format( "#{0}", ammo.LabelNumber );
PlaceInBackpack( ammo );
SendLocalizedMessage( 1073504, String.Format( "{0}\t{1}", ammo.Amount, name ) ); // You recover ~1_NUM~ ~2_AMMO~.
}
}
}
m_RecoverableAmmo.Clear();
}
}
#endregion
private DateTime m_AnkhNextUse;
[CommandProperty( AccessLevel.GameMaster )]
@ -322,6 +378,15 @@ namespace Server.Mobiles
set{ m_AnkhNextUse = value; }
}
private DateTime m_PeacedUntil;
[CommandProperty( AccessLevel.GameMaster )]
public DateTime PeacedUntil
{
get { return m_PeacedUntil; }
set { m_PeacedUntil = value; }
}
#region Scroll of Alacrity
private DateTime m_AcceleratedStart;
@ -342,7 +407,6 @@ namespace Server.Mobiles
}
#endregion
public static Direction GetDirection4( Point3D from, Point3D to )
{
int dx = from.X - to.X;
@ -1833,6 +1897,9 @@ namespace Server.Mobiles
if ( m_SentHonorContext != null )
m_SentHonorContext.OnSourceDamaged( from, amount );
if ( willKill && from is PlayerMobile )
Timer.DelayCall( TimeSpan.FromSeconds( 10 ), new TimerCallback( ((PlayerMobile) from).RecoverAmmo ) );
base.OnDamage( amount, from, willKill );
}
@ -1862,6 +1929,12 @@ namespace Server.Mobiles
}
}
public override void OnWarmodeChanged()
{
if ( !Warmode )
Timer.DelayCall( TimeSpan.FromSeconds( 10 ), new TimerCallback( RecoverAmmo ) );
}
private Mobile m_InsuranceAward;
private int m_InsuranceCost;
private int m_InsuranceBonus;
@ -1890,6 +1963,8 @@ namespace Server.Mobiles
if ( m_SentHonorContext != null )
m_SentHonorContext.OnSourceKilled();
RecoverAmmo();
return base.OnBeforeDeath();
}
@ -2417,6 +2492,12 @@ namespace Server.Mobiles
switch ( version )
{
case 28:
{
m_PeacedUntil = reader.ReadDateTime();
goto case 27;
}
case 27:
{
m_AnkhNextUse = reader.ReadDateTime();
@ -2710,8 +2791,9 @@ namespace Server.Mobiles
base.Serialize( writer );
writer.Write( (int) 27 ); // version
writer.Write( (int) 28 ); // version
writer.Write( (DateTime) m_PeacedUntil );
writer.Write( (DateTime) m_AnkhNextUse );
writer.Write( m_AutoStabled, true );