- Fixed HelpInfo not displaying the availability of the Global modifier.

- The Most Knowledge Person, The Robe Of Britannia "Ari" and Embroidered Oak Leaf Cloak can now be repaired.
- Added TimeoutTeleporter.
- Fixed weapon attributes on elven glasses not being counted.
- Added Labyrinth to the ML regions list.
- Fixed a bug in Ilhenir's StainedOoze causing the effect to never stop.
- StainedOoze will now only damage equipment until the equipment's hitpoints reaches single digits.
- Added an overhead message to the corrosive effect of StainedOoze.
- Remaining StainedOoze will now decay properly after a server reboot.
- General rewriting of the StainedOoze code.
- Fixed Changeling sounds.
- Fixed Irk, Guile and Spite morphing back into a paragon hue.
- Changeling cloned items are now deleted upon the Changeling's deletion, instead of being cleaned up at a server boot.
- Fixed talisman protection property.
This commit is contained in:
eos 2012-03-18 03:29:21 +00:00
parent 06975930b9
commit 9023acf7b4
9 changed files with 289 additions and 170 deletions

View file

@ -72,7 +72,6 @@ namespace Server.Items
set { m_Creatures = value; InvalidateProperties(); }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool CombatCheck
{
@ -702,4 +701,169 @@ namespace Server.Items
}
}
}
public class TimeoutTeleporter : Teleporter
{
private TimeSpan m_TimeoutDelay;
private Dictionary<Mobile, Timer> m_Teleporting;
[CommandProperty( AccessLevel.GameMaster )]
public TimeSpan TimeoutDelay
{
get { return m_TimeoutDelay; }
set { m_TimeoutDelay = value; }
}
[Constructable]
public TimeoutTeleporter()
: this( new Point3D( 0, 0, 0 ), null, false )
{
}
[Constructable]
public TimeoutTeleporter( Point3D pointDest, Map mapDest )
: this( pointDest, mapDest, false )
{
}
[Constructable]
public TimeoutTeleporter( Point3D pointDest, Map mapDest, bool creatures )
: base( pointDest, mapDest, creatures )
{
m_Teleporting = new Dictionary<Mobile, Timer>();
}
public void StartTimer( Mobile m )
{
StartTimer( m, m_TimeoutDelay );
}
private void StartTimer( Mobile m, TimeSpan delay )
{
Timer t;
if ( m_Teleporting.TryGetValue( m, out t ) )
t.Stop();
m_Teleporting[m] = Timer.DelayCall<Mobile>( delay, StartTeleport, m );
}
public void StopTimer( Mobile m )
{
Timer t;
if ( m_Teleporting.TryGetValue( m, out t ) )
{
t.Stop();
m_Teleporting.Remove( m );
}
}
public override bool OnMoveOver( Mobile m )
{
if ( Active && ( m.Player || Creatures ) )
StartTimer( m );
return true;
}
public TimeoutTeleporter( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( m_TimeoutDelay );
writer.Write( m_Teleporting.Count );
foreach ( KeyValuePair<Mobile, Timer> kvp in m_Teleporting )
{
writer.Write( kvp.Key );
writer.Write( kvp.Value.Next );
}
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_TimeoutDelay = reader.ReadTimeSpan();
m_Teleporting = new Dictionary<Mobile, Timer>();
int count = reader.ReadInt();
for ( int i = 0; i < count; ++i )
{
Mobile m = reader.ReadMobile();
DateTime end = reader.ReadDateTime();
StartTimer( m, end - DateTime.Now );
}
}
}
public class TimeoutGoal : Item
{
private TimeoutTeleporter m_Teleporter;
[CommandProperty( AccessLevel.GameMaster )]
public TimeoutTeleporter Teleporter
{
get { return m_Teleporter; }
set { m_Teleporter = value; }
}
[Constructable]
public TimeoutGoal()
: base( 0x1822 )
{
Movable = false;
Visible = false;
Hue = 1154;
}
public override bool OnMoveOver( Mobile m )
{
if ( m_Teleporter != null )
m_Teleporter.StopTimer( m );
return true;
}
public override string DefaultName
{
get { return "timeout teleporter goal"; }
}
public TimeoutGoal( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.WriteItem<TimeoutTeleporter>( m_Teleporter );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Teleporter = reader.ReadItem<TimeoutTeleporter>();
}
}
}

View file

@ -1584,13 +1584,13 @@ namespace Server.Items
int manaLeech = 0;
int wraithLeech = 0;
if ( (int)(m_AosWeaponAttributes.HitLeechHits * propertyBonus) > Utility.Random( 100 ) )
if ( (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitLeechHits ) * propertyBonus) > Utility.Random( 100 ) )
lifeLeech += 30; // HitLeechHits% chance to leech 30% of damage as hit points
if ( (int)(m_AosWeaponAttributes.HitLeechStam * propertyBonus) > Utility.Random( 100 ) )
if ( (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitLeechStam ) * propertyBonus) > Utility.Random( 100 ) )
stamLeech += 100; // HitLeechStam% chance to leech 100% of damage as stamina
if ( (int)(m_AosWeaponAttributes.HitLeechMana * propertyBonus) > Utility.Random( 100 ) )
if ( (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitLeechMana ) * propertyBonus) > Utility.Random( 100 ) )
manaLeech += 40; // HitLeechMana% chance to leech 40% of damage as mana
if ( m_Cursed )
@ -1669,11 +1669,11 @@ namespace Server.Items
if ( Core.AOS )
{
int physChance = (int)(m_AosWeaponAttributes.HitPhysicalArea * propertyBonus);
int fireChance = (int)(m_AosWeaponAttributes.HitFireArea * propertyBonus);
int coldChance = (int)(m_AosWeaponAttributes.HitColdArea * propertyBonus);
int poisChance = (int)(m_AosWeaponAttributes.HitPoisonArea * propertyBonus);
int nrgyChance = (int)(m_AosWeaponAttributes.HitEnergyArea * propertyBonus);
int physChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitPhysicalArea ) * propertyBonus);
int fireChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitFireArea ) * propertyBonus);
int coldChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitColdArea ) * propertyBonus);
int poisChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitPoisonArea ) * propertyBonus);
int nrgyChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitEnergyArea ) * propertyBonus);
if ( physChance != 0 && physChance > Utility.Random( 100 ) )
DoAreaAttack( attacker, defender, 0x10E, 50, 100, 0, 0, 0, 0 );
@ -1690,11 +1690,11 @@ namespace Server.Items
if ( nrgyChance != 0 && nrgyChance > Utility.Random( 100 ) )
DoAreaAttack( attacker, defender, 0x1F1, 120, 0, 0, 0, 0, 100 );
int maChance = (int)(m_AosWeaponAttributes.HitMagicArrow * propertyBonus);
int harmChance = (int)(m_AosWeaponAttributes.HitHarm * propertyBonus);
int fireballChance = (int)(m_AosWeaponAttributes.HitFireball * propertyBonus);
int lightningChance = (int)(m_AosWeaponAttributes.HitLightning * propertyBonus);
int dispelChance = (int)(m_AosWeaponAttributes.HitDispel * propertyBonus);
int maChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitMagicArrow ) * propertyBonus);
int harmChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitHarm ) * propertyBonus);
int fireballChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitFireball ) * propertyBonus);
int lightningChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitLightning ) * propertyBonus);
int dispelChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitDispel ) * propertyBonus);
if ( maChance != 0 && maChance > Utility.Random( 100 ) )
DoMagicArrow( attacker, defender );
@ -1711,8 +1711,8 @@ namespace Server.Items
if ( dispelChance != 0 && dispelChance > Utility.Random( 100 ) )
DoDispel( attacker, defender );
int laChance = (int)(m_AosWeaponAttributes.HitLowerAttack * propertyBonus);
int ldChance = (int)(m_AosWeaponAttributes.HitLowerDefend * propertyBonus);
int laChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitLowerAttack ) * propertyBonus);
int ldChance = (int)(AosWeaponAttributes.GetValue( attacker, AosWeaponAttribute.HitLowerDefend ) * propertyBonus);
if ( laChance != 0 && laChance > Utility.Random( 100 ) )
DoLowerAttack( attacker, defender );