#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
8eae46895e
7512 changed files with 416187 additions and 0 deletions
32
Scripts/Items/Skill Items/Tailor Items/Dressform.cs
Normal file
32
Scripts/Items/Skill Items/Tailor Items/Dressform.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute(0xec6, 0xec7)]
|
||||
public class Dressform : Item
|
||||
{
|
||||
[Constructable]
|
||||
public Dressform() : base(0xec6)
|
||||
{
|
||||
Weight = 10;
|
||||
}
|
||||
|
||||
public Dressform(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int) 0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
291
Scripts/Items/Skill Items/Tailor Items/DyeTub.cs
Normal file
291
Scripts/Items/Skill Items/Tailor Items/DyeTub.cs
Normal file
|
|
@ -0,0 +1,291 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Multis;
|
||||
using Server.Targeting;
|
||||
using Server.ContextMenus;
|
||||
using Server.Gumps;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public interface IDyable
|
||||
{
|
||||
bool Dye( Mobile from, DyeTub sender );
|
||||
}
|
||||
|
||||
public class DyeTub : Item, ISecurable
|
||||
{
|
||||
private bool m_Redyable;
|
||||
private int m_DyedHue;
|
||||
private SecureLevel m_SecureLevel;
|
||||
|
||||
public virtual bool AllowFurniture
|
||||
{
|
||||
get{ return false; }
|
||||
}
|
||||
|
||||
public virtual bool AllowLeather
|
||||
{
|
||||
get{ return false; }
|
||||
}
|
||||
|
||||
public virtual bool AllowMetal
|
||||
{
|
||||
get{ return false; }
|
||||
}
|
||||
|
||||
public virtual bool AllowWood
|
||||
{
|
||||
get{ return false; }
|
||||
}
|
||||
|
||||
public virtual bool AllowDyables
|
||||
{
|
||||
get{ return true; }
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int)m_SecureLevel );
|
||||
writer.Write( (bool) m_Redyable );
|
||||
writer.Write( (int) m_DyedHue );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_SecureLevel = (SecureLevel)reader.ReadInt();
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_Redyable = reader.ReadBool();
|
||||
m_DyedHue = reader.ReadInt();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Redyable
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Redyable;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Redyable = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int DyedHue
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_DyedHue;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ( m_Redyable )
|
||||
{
|
||||
m_DyedHue = value;
|
||||
Hue = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public SecureLevel Level
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SecureLevel;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SecureLevel = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DyeTub() : base( 0xFAB )
|
||||
{
|
||||
Weight = 10.0;
|
||||
m_Redyable = true;
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
SetSecureLevelEntry.AddTo( from, this, list );
|
||||
}
|
||||
|
||||
public DyeTub( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
// Select the clothing to dye.
|
||||
public virtual int TargetMessage{ get{ return 500859; } }
|
||||
|
||||
// You can not dye that.
|
||||
public virtual int FailMessage{ get{ return 1042083; } }
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from.InRange( this.GetWorldLocation(), 1 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( TargetMessage );
|
||||
from.Target = new InternalTarget( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
}
|
||||
}
|
||||
|
||||
public static bool alsoDyable( Item item )
|
||||
{
|
||||
if ( item is Lexicon ||
|
||||
item is Grimoire ||
|
||||
item is Journal ||
|
||||
item is Diary ||
|
||||
item is CandleShort ||
|
||||
item is CandleMedium ||
|
||||
item is CandleLong ||
|
||||
item is DyeTub )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private DyeTub m_Tub;
|
||||
|
||||
public InternalTarget( DyeTub tub ) : base( 1, false, TargetFlags.None )
|
||||
{
|
||||
m_Tub = tub;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( targeted is Item )
|
||||
{
|
||||
Item item = (Item)targeted;
|
||||
|
||||
if ( ( alsoDyable( item ) || item is IDyable ) && m_Tub.AllowDyables )
|
||||
{
|
||||
if ( !from.InRange( m_Tub.GetWorldLocation(), 1 ) || !from.InRange( item.GetWorldLocation(), 1 ) )
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
else if ( item.Parent is Mobile )
|
||||
from.SendLocalizedMessage( 500861 ); // Can't Dye clothing that is being worn.
|
||||
else if ( alsoDyable( item ) )
|
||||
{
|
||||
item.Hue = m_Tub.DyedHue;
|
||||
if ( item is DyeTub ){ ((DyeTub)item).DyedHue = item.Hue; }
|
||||
from.PlaySound( 0x23E );
|
||||
}
|
||||
else if ( ((IDyable)item).Dye( from, m_Tub ) )
|
||||
from.PlaySound( 0x23E );
|
||||
}
|
||||
else if ( (FurnitureAttribute.Check( item ) || (item is PotionKeg)) && m_Tub.AllowFurniture )
|
||||
{
|
||||
if ( !from.InRange( m_Tub.GetWorldLocation(), 1 ) || !from.InRange( item.GetWorldLocation(), 1 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
}
|
||||
else
|
||||
{
|
||||
bool okay = ( item.IsChildOf( from.Backpack ) );
|
||||
|
||||
if ( !okay )
|
||||
{
|
||||
if ( item.Parent == null )
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt( item );
|
||||
|
||||
if ( house == null || ( !house.IsLockedDown( item ) && !house.IsSecure( item ) ) )
|
||||
from.SendLocalizedMessage( 501022 ); // Furniture must be locked down to paint it.
|
||||
else if ( !house.IsCoOwner( from ) )
|
||||
from.SendLocalizedMessage( 501023 ); // You must be the owner to use this item.
|
||||
else
|
||||
okay = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1048135 ); // The furniture must be in your backpack to be painted.
|
||||
}
|
||||
}
|
||||
|
||||
if ( okay )
|
||||
{
|
||||
item.Hue = m_Tub.DyedHue;
|
||||
from.PlaySound( 0x23E );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( ( item is MyTentEastAddonDeed ) || ( item is MyTentSouthAddonDeed ) )
|
||||
{
|
||||
if ( !from.InRange( m_Tub.GetWorldLocation(), 1 ) || !from.InRange( item.GetWorldLocation(), 1 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
}
|
||||
else if ( !item.Movable )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042083 ); // You cannot dye that.
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Hue = m_Tub.DyedHue;
|
||||
if ( item is MyTentEastAddonDeed ) { MyTentEastAddonDeed tent = (MyTentEastAddonDeed)item; tent.TentColor = m_Tub.DyedHue; }
|
||||
else { MyTentSouthAddonDeed tent = (MyTentSouthAddonDeed)item; tent.TentColor = m_Tub.DyedHue; }
|
||||
from.PlaySound( 0x23E );
|
||||
}
|
||||
}
|
||||
else if ( item is BaseArmor && ( (((BaseArmor)item).Resource == CraftResource.Leathered && m_Tub.AllowLeather ) || (((BaseArmor)item).Resource == CraftResource.Iron && m_Tub.AllowMetal ) || (((BaseArmor)item).Resource == CraftResource.Wooden && m_Tub.AllowWood ) ) )
|
||||
{
|
||||
if ( !from.InRange( m_Tub.GetWorldLocation(), 1 ) || !from.InRange( item.GetWorldLocation(), 1 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
}
|
||||
else if ( !item.Movable )
|
||||
{
|
||||
from.SendLocalizedMessage( 1010093 ); // You may not dye items which are locked down.
|
||||
}
|
||||
else if ( item.Parent is Mobile )
|
||||
{
|
||||
from.SendLocalizedMessage( 1070753 ); // You cannot dye equipped items.
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Hue = m_Tub.DyedHue;
|
||||
from.PlaySound( 0x23E );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( m_Tub.FailMessage );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( m_Tub.FailMessage );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
97
Scripts/Items/Skill Items/Tailor Items/Dyes.cs
Normal file
97
Scripts/Items/Skill Items/Tailor Items/Dyes.cs
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
using System;
|
||||
using Server.Targeting;
|
||||
using Server.HuePickers;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Dyes : Item
|
||||
{
|
||||
[Constructable]
|
||||
public Dyes() : base( 0xFA9 )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public Dyes( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( Weight == 0.0 )
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
from.SendLocalizedMessage( 500856 ); // Select the dye tub to use the dyes on.
|
||||
from.Target = new InternalTarget();
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
public InternalTarget() : base( 1, false, TargetFlags.None )
|
||||
{
|
||||
}
|
||||
|
||||
private class InternalPicker : HuePicker
|
||||
{
|
||||
private DyeTub m_Tub;
|
||||
|
||||
public InternalPicker( DyeTub tub ) : base( tub.ItemID )
|
||||
{
|
||||
m_Tub = tub;
|
||||
}
|
||||
|
||||
public override void OnResponse( int hue )
|
||||
{
|
||||
m_Tub.DyedHue = hue;
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetTubHue( Mobile from, object state, int hue )
|
||||
{
|
||||
((DyeTub)state).DyedHue = hue;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( targeted is PigmentTub )
|
||||
{
|
||||
PigmentTub tub = (PigmentTub)targeted;
|
||||
|
||||
from.CloseGump( typeof( PigmentTub.PigmentGump ) );
|
||||
from.SendGump( new PigmentTub.PigmentGump( from, tub ) );
|
||||
}
|
||||
else if ( targeted is DyeTub )
|
||||
{
|
||||
DyeTub tub = (DyeTub) targeted;
|
||||
|
||||
if ( tub.Redyable )
|
||||
{
|
||||
from.SendHuePicker( new InternalPicker( tub ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "That dye tub may not be redyed." );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 500857 ); // Use this on a dye tub.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Scripts/Items/Skill Items/Tailor Items/FurnitureDyeTub.cs
Normal file
36
Scripts/Items/Skill Items/Tailor Items/FurnitureDyeTub.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FurnitureDyeTub : DyeTub
|
||||
{
|
||||
public override bool AllowDyables{ get{ return false; } }
|
||||
public override bool AllowFurniture{ get{ return true; } }
|
||||
public override int TargetMessage{ get{ return 501019; } } // Select the furniture to dye.
|
||||
public override int FailMessage{ get{ return 501021; } } // That is not a piece of furniture.
|
||||
|
||||
[Constructable]
|
||||
public FurnitureDyeTub()
|
||||
{
|
||||
Name = "furniture paint tub";
|
||||
}
|
||||
|
||||
public FurnitureDyeTub( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
159
Scripts/Items/Skill Items/Tailor Items/PigmentTub.cs
Normal file
159
Scripts/Items/Skill Items/Tailor Items/PigmentTub.cs
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Multis;
|
||||
using Server.Targeting;
|
||||
using Server.ContextMenus;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
using Server.Misc;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PigmentTub : DyeTub
|
||||
{
|
||||
public override bool AllowLeather{ get{ return Settings.PigmentLeather(); } }
|
||||
public override bool AllowMetal{ get{ return Settings.PigmentMetal(); } }
|
||||
public override bool AllowWood{ get{ return Settings.PigmentWood(); } }
|
||||
|
||||
public int m_Color;
|
||||
public int m_Hue;
|
||||
public int m_Category;
|
||||
|
||||
[Constructable]
|
||||
public PigmentTub()
|
||||
{
|
||||
Name = "pigment tub";
|
||||
}
|
||||
|
||||
public PigmentTub( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public static int tubCost()
|
||||
{
|
||||
int value = 1000;
|
||||
if ( Settings.PigmentLeather() )
|
||||
value = value + 1000;
|
||||
if ( Settings.PigmentMetal() )
|
||||
value = value + 1000;
|
||||
if ( Settings.PigmentWood() )
|
||||
value = value + 500;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
public class PigmentGump : Gump
|
||||
{
|
||||
private PigmentTub m_Tub;
|
||||
|
||||
public PigmentGump( Mobile from, PigmentTub tub ) : base( 50, 50 )
|
||||
{
|
||||
m_Tub = tub;
|
||||
|
||||
if ( m_Tub.m_Color < 1 )
|
||||
{
|
||||
m_Tub.m_Color = 1200;
|
||||
m_Tub.m_Hue = m_Tub.m_Color+1;
|
||||
m_Tub.m_Category = 900;
|
||||
}
|
||||
|
||||
int color = m_Tub.m_Color;
|
||||
int c = 0;
|
||||
int d = 162;
|
||||
int n = 18;
|
||||
if ( m_Tub.m_Color == 1800 )
|
||||
d = 142;
|
||||
|
||||
this.Closable=true;
|
||||
this.Disposable=true;
|
||||
this.Dragable=true;
|
||||
this.Resizable=false;
|
||||
|
||||
AddPage(0);
|
||||
AddImage(0, 0, 1);
|
||||
|
||||
int x = 52;
|
||||
int y = 50;
|
||||
|
||||
while ( d > 0 )
|
||||
{
|
||||
c++;
|
||||
d--;
|
||||
if ( c >= n ){ c=1; y=y+12; x=52; }
|
||||
x=x+12;
|
||||
|
||||
if ( color == 1254 ){ color = 1300; }
|
||||
else if ( color == 1354 ){ color = 1400; }
|
||||
else if ( color == 1454 ){ color = 1500; }
|
||||
else if ( color == 1554 ){ color = 1600; }
|
||||
else if ( color == 1654 ){ color = 1700; }
|
||||
else if ( color == 1754 ){ color = 1800; }
|
||||
else if ( color == 1908 ){ color = 2400; }
|
||||
|
||||
AddButton(x, y, 2, 2, color, GumpButtonType.Reply, 0);
|
||||
AddImage(x, y, 2, color);
|
||||
|
||||
color++;
|
||||
}
|
||||
|
||||
AddItem(283, 43, 7939, m_Tub.m_Hue);
|
||||
if ( Settings.PigmentLeather() ){ AddItem(276, 71, 5075, m_Tub.m_Hue); }
|
||||
if ( Settings.PigmentMetal() ){ AddItem(291, 94, 5137, m_Tub.m_Hue); }
|
||||
if ( Settings.PigmentWood() ){ AddItem(280, 120, 7034, m_Tub.m_Hue); }
|
||||
AddItem(293, 149, 4011, m_Tub.m_Hue);
|
||||
|
||||
AddButton(280, 205, 247, 248, 0, GumpButtonType.Reply, 0);
|
||||
|
||||
int prev = m_Tub.m_Category-1; if ( prev == 899 ){ prev = 902; }
|
||||
int next = m_Tub.m_Category+1; if ( next == 903 ){ next = 900; }
|
||||
|
||||
AddButton(47, 213, 5603, 5603, prev, GumpButtonType.Reply, 0);
|
||||
AddButton(70, 213, 5601, 5601, next, GumpButtonType.Reply, 0);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
Mobile from = sender.Mobile;
|
||||
int button = info.ButtonID;
|
||||
|
||||
if ( button == 900 )
|
||||
{
|
||||
m_Tub.m_Color = 1200;
|
||||
m_Tub.m_Category = button;
|
||||
}
|
||||
else if ( button == 901 )
|
||||
{
|
||||
m_Tub.m_Color = 1500;
|
||||
m_Tub.m_Category = button;
|
||||
}
|
||||
else if ( button == 902 )
|
||||
{
|
||||
m_Tub.m_Color = 1800;
|
||||
m_Tub.m_Category = button;
|
||||
}
|
||||
else if ( button > 1000 )
|
||||
{
|
||||
m_Tub.m_Hue = button+1;
|
||||
m_Tub.Hue = m_Tub.m_Hue;
|
||||
m_Tub.DyedHue = m_Tub.Hue;
|
||||
}
|
||||
|
||||
if ( button > 0 )
|
||||
from.SendGump( new PigmentTub.PigmentGump( from, m_Tub ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
75
Scripts/Items/Skill Items/Tailor Items/Scissors.cs
Normal file
75
Scripts/Items/Skill Items/Tailor Items/Scissors.cs
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public interface IScissorable
|
||||
{
|
||||
bool Scissor( Mobile from, Scissors scissors );
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0xf9f, 0xf9e )]
|
||||
public class Scissors : Item
|
||||
{
|
||||
[Constructable]
|
||||
public Scissors() : base( 0xF9F )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Scissors( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
from.SendLocalizedMessage( 502434 ); // What should I use these scissors on?
|
||||
|
||||
from.Target = new InternalTarget( this );
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private Scissors m_Item;
|
||||
|
||||
public InternalTarget( Scissors item ) : base( 2, false, TargetFlags.None )
|
||||
{
|
||||
m_Item = item;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Item.Deleted )
|
||||
return;
|
||||
|
||||
if( targeted is IScissorable )
|
||||
{
|
||||
IScissorable obj = (IScissorable)targeted;
|
||||
|
||||
if( obj.Scissor( from, m_Item ) )
|
||||
from.PlaySound( 0x248 );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue