ModernUO/Scripts/Items/Special/Mutation Core/PlagueBeastVein.cs
daedalus 123af436f9 - Incognito spell won't change gender anymore
(http://www.uodemise.com/discussion/showthread.php?t=117148)
- Abyss Champion spawn has Greater Mongbats in tier 1 instead of Mongbats
(http://www.uodemise.com/discussion/showthread.php?t=125248)
- BOD books won't return to page 1 anymore when picking or dropping BODs
(http://www.uodemise.com/discussion/showthread.php?t=115354)
- Added Plague Beast Lords with relative puzzle; Plague Beasts release healty glands
(http://www.uodemise.com/discussion/showthread.php?t=116548)
- Arch Cure area effect will follow OSI rules in Felucca facet
(http://www.uodemise.com/discussion/showthread.php?t=115600)
- Solen Ants Holes can spawn randomly in forest
(http://www.uodemise.com/discussion/showthread.php?t=123899)
- Death Robes will decay after 60 seconds from dropping on the ground
(http://www.uodemise.com/discussion/showthread.php?t=121188)
- Weapon speeds are indicated in seconds of delay
(http://www.uodemise.com/discussion/showthread.php?t=123707)
2009-10-18 14:03:59 +00:00

87 lines
1.8 KiB
C#

using System;
using Server;
using Server.Mobiles;
using Server.Network;
namespace Server.Items
{
public class PlagueBeastVein : PlagueBeastComponent
{
private bool m_Cut;
public bool Cut
{
get { return m_Cut; }
}
private Timer m_Timer;
public PlagueBeastVein( int itemID, int hue ) : base( itemID, hue )
{
m_Cut = false;
}
public override bool Scissor( Mobile from, Scissors scissors )
{
if ( IsAccessibleTo( from ) )
{
if ( !m_Cut && m_Timer == null )
{
m_Timer = Timer.DelayCall<Mobile>( TimeSpan.FromSeconds( 3 ), new TimerStateCallback<Mobile>( CuttingDone ), from );
scissors.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071899 ); // You begin cutting through the vein.
return true;
}
else
scissors.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071900 ); // // This vein has already been cut.
}
return false;
}
public override void OnAfterDelete()
{
if ( m_Timer != null && m_Timer.Running )
m_Timer.Stop();
}
private void CuttingDone( Mobile from )
{
m_Cut = true;
if ( ItemID == 0x1B1C )
ItemID = 0x1B1B;
else
ItemID = 0x1B1C;
if ( Owner != null )
Owner.PlaySound( 0x199 );
PlagueBeastRubbleOrgan organ = Organ as PlagueBeastRubbleOrgan;
if ( organ != null )
organ.OnVeinCut( from, this );
}
public PlagueBeastVein( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
writer.Write( (bool) m_Cut );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
m_Cut = reader.ReadBool();
}
}
}