This commit is contained in:
commit
47711d616e
2644 changed files with 479454 additions and 0 deletions
61
Scripts/Items/Clothing/Artifacts/DivineCountenance.cs
Normal file
61
Scripts/Items/Clothing/Artifacts/DivineCountenance.cs
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DivineCountenance : HornedTribalMask
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1061289; } } // Divine Countenance
|
||||
|
||||
public override int ArtifactRarity{ get{ return 11; } }
|
||||
|
||||
public override int BasePhysicalResistance{ get{ return 8; } }
|
||||
public override int BaseFireResistance{ get{ return 6; } }
|
||||
public override int BaseColdResistance{ get{ return 9; } }
|
||||
public override int BaseEnergyResistance{ get{ return 25; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
|
||||
[Constructable]
|
||||
public DivineCountenance()
|
||||
{
|
||||
Hue = 0x482;
|
||||
|
||||
Attributes.BonusInt = 8;
|
||||
Attributes.RegenMana = 2;
|
||||
Attributes.ReflectPhysical = 15;
|
||||
Attributes.LowerManaCost = 8;
|
||||
}
|
||||
|
||||
public DivineCountenance( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 );
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
Resistances.Physical = 0;
|
||||
Resistances.Fire = 0;
|
||||
Resistances.Cold = 0;
|
||||
Resistances.Energy = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Scripts/Items/Clothing/Artifacts/HatOfTheMagi.cs
Normal file
56
Scripts/Items/Clothing/Artifacts/HatOfTheMagi.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HatOfTheMagi : WizardsHat
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1061597; } } // Hat of the Magi
|
||||
|
||||
public override int ArtifactRarity{ get{ return 11; } }
|
||||
|
||||
public override int BasePoisonResistance{ get{ return 20; } }
|
||||
public override int BaseEnergyResistance{ get{ return 20; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
|
||||
[Constructable]
|
||||
public HatOfTheMagi()
|
||||
{
|
||||
Hue = 0x481;
|
||||
|
||||
Attributes.BonusInt = 8;
|
||||
Attributes.RegenMana = 4;
|
||||
Attributes.SpellDamage = 10;
|
||||
}
|
||||
|
||||
public HatOfTheMagi( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 );
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
Resistances.Poison = 0;
|
||||
Resistances.Energy = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Scripts/Items/Clothing/Artifacts/HuntersHeaddress.cs
Normal file
56
Scripts/Items/Clothing/Artifacts/HuntersHeaddress.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HuntersHeaddress : DeerMask
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1061595; } } // Hunter's Headdress
|
||||
|
||||
public override int ArtifactRarity{ get{ return 11; } }
|
||||
|
||||
public override int BaseColdResistance{ get{ return 23; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
|
||||
[Constructable]
|
||||
public HuntersHeaddress()
|
||||
{
|
||||
Hue = 0x594;
|
||||
|
||||
SkillBonuses.SetValues( 0, SkillName.Archery, 20 );
|
||||
|
||||
Attributes.BonusDex = 8;
|
||||
Attributes.NightSight = 1;
|
||||
Attributes.AttackChance = 15;
|
||||
|
||||
}
|
||||
|
||||
public HuntersHeaddress( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 );
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
Resistances.Cold = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
54
Scripts/Items/Clothing/Artifacts/SpiritOfTheTotem.cs
Normal file
54
Scripts/Items/Clothing/Artifacts/SpiritOfTheTotem.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SpiritOfTheTotem : BearMask
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1061599; } } // Spirit of the Totem
|
||||
|
||||
public override int ArtifactRarity{ get{ return 11; } }
|
||||
|
||||
public override int BasePhysicalResistance{ get{ return 20; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
|
||||
[Constructable]
|
||||
public SpiritOfTheTotem()
|
||||
{
|
||||
Hue = 0x455;
|
||||
|
||||
Attributes.BonusStr = 20;
|
||||
Attributes.ReflectPhysical = 15;
|
||||
Attributes.AttackChance = 15;
|
||||
}
|
||||
|
||||
public SpiritOfTheTotem( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 );
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
Resistances.Physical = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
998
Scripts/Items/Clothing/BaseClothing.cs
Normal file
998
Scripts/Items/Clothing/BaseClothing.cs
Normal file
|
|
@ -0,0 +1,998 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Engines.Craft;
|
||||
using Server.Factions;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public enum ClothingQuality
|
||||
{
|
||||
Low,
|
||||
Regular,
|
||||
Exceptional
|
||||
}
|
||||
|
||||
public interface IArcaneEquip
|
||||
{
|
||||
bool IsArcane{ get; }
|
||||
int CurArcaneCharges{ get; set; }
|
||||
int MaxArcaneCharges{ get; set; }
|
||||
}
|
||||
|
||||
public abstract class BaseClothing : Item, IDyable, IScissorable, IFactionItem, ICraftable, IWearableDurability
|
||||
{
|
||||
#region Factions
|
||||
private FactionItem m_FactionState;
|
||||
|
||||
public FactionItem FactionItemState
|
||||
{
|
||||
get{ return m_FactionState; }
|
||||
set
|
||||
{
|
||||
m_FactionState = value;
|
||||
|
||||
if ( m_FactionState == null )
|
||||
Hue = 0;
|
||||
|
||||
LootType = ( m_FactionState == null ? LootType.Regular : LootType.Blessed );
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
private int m_MaxHitPoints;
|
||||
private int m_HitPoints;
|
||||
private Mobile m_Crafter;
|
||||
private ClothingQuality m_Quality;
|
||||
private bool m_PlayerConstructed;
|
||||
protected CraftResource m_Resource;
|
||||
private int m_StrReq = -1;
|
||||
|
||||
private AosAttributes m_AosAttributes;
|
||||
private AosArmorAttributes m_AosClothingAttributes;
|
||||
private AosSkillBonuses m_AosSkillBonuses;
|
||||
private AosElementAttributes m_AosResistances;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int MaxHitPoints
|
||||
{
|
||||
get{ return m_MaxHitPoints; }
|
||||
set{ m_MaxHitPoints = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int HitPoints
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_HitPoints;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ( value != m_HitPoints && MaxHitPoints > 0 )
|
||||
{
|
||||
m_HitPoints = value;
|
||||
|
||||
if ( m_HitPoints < 0 )
|
||||
Delete();
|
||||
else if ( m_HitPoints > MaxHitPoints )
|
||||
m_HitPoints = MaxHitPoints;
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Crafter
|
||||
{
|
||||
get{ return m_Crafter; }
|
||||
set{ m_Crafter = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int StrRequirement
|
||||
{
|
||||
get{ return ( m_StrReq == -1 ? (Core.AOS ? AosStrReq : OldStrReq) : m_StrReq ); }
|
||||
set{ m_StrReq = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public ClothingQuality Quality
|
||||
{
|
||||
get{ return m_Quality; }
|
||||
set{ m_Quality = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool PlayerConstructed
|
||||
{
|
||||
get{ return m_PlayerConstructed; }
|
||||
set{ m_PlayerConstructed = value; }
|
||||
}
|
||||
|
||||
public virtual CraftResource DefaultResource{ get{ return CraftResource.None; } }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get{ return m_Resource; }
|
||||
set{ m_Resource = value; Hue = CraftResources.GetHue( m_Resource ); InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public AosAttributes Attributes
|
||||
{
|
||||
get{ return m_AosAttributes; }
|
||||
set{}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public AosArmorAttributes ClothingAttributes
|
||||
{
|
||||
get{ return m_AosClothingAttributes; }
|
||||
set{}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public AosSkillBonuses SkillBonuses
|
||||
{
|
||||
get{ return m_AosSkillBonuses; }
|
||||
set{}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public AosElementAttributes Resistances
|
||||
{
|
||||
get{ return m_AosResistances; }
|
||||
set{}
|
||||
}
|
||||
|
||||
public virtual int BasePhysicalResistance{ get{ return 0; } }
|
||||
public virtual int BaseFireResistance{ get{ return 0; } }
|
||||
public virtual int BaseColdResistance{ get{ return 0; } }
|
||||
public virtual int BasePoisonResistance{ get{ return 0; } }
|
||||
public virtual int BaseEnergyResistance{ get{ return 0; } }
|
||||
|
||||
public override int PhysicalResistance{ get{ return BasePhysicalResistance + m_AosResistances.Physical; } }
|
||||
public override int FireResistance{ get{ return BaseFireResistance + m_AosResistances.Fire; } }
|
||||
public override int ColdResistance{ get{ return BaseColdResistance + m_AosResistances.Cold; } }
|
||||
public override int PoisonResistance{ get{ return BasePoisonResistance + m_AosResistances.Poison; } }
|
||||
public override int EnergyResistance{ get{ return BaseEnergyResistance + m_AosResistances.Energy; } }
|
||||
|
||||
public virtual int ArtifactRarity{ get{ return 0; } }
|
||||
|
||||
public virtual int BaseStrBonus{ get{ return 0; } }
|
||||
public virtual int BaseDexBonus{ get{ return 0; } }
|
||||
public virtual int BaseIntBonus { get { return 0; } }
|
||||
|
||||
public override bool AllowSecureTrade( Mobile from, Mobile to, Mobile newOwner, bool accepted )
|
||||
{
|
||||
if ( !Ethics.Ethic.CheckTrade( from, to, newOwner, this ) )
|
||||
return false;
|
||||
|
||||
return base.AllowSecureTrade( from, to, newOwner, accepted );
|
||||
}
|
||||
|
||||
public virtual Race RequiredRace { get { return null; } }
|
||||
|
||||
public override bool CanEquip( Mobile from )
|
||||
{
|
||||
if ( !Ethics.Ethic.CheckEquip( from, this ) )
|
||||
return false;
|
||||
|
||||
if( from.AccessLevel < AccessLevel.GameMaster )
|
||||
{
|
||||
if( RequiredRace != null && from.Race != RequiredRace )
|
||||
{
|
||||
if( RequiredRace == Race.Elf )
|
||||
from.SendLocalizedMessage( 1072203 ); // Only Elves may use this.
|
||||
else
|
||||
from.SendMessage( "Only {0} may use this.", RequiredRace.PluralName );
|
||||
|
||||
return false;
|
||||
}
|
||||
else if( !AllowMaleWearer && !from.Female )
|
||||
{
|
||||
if( AllowFemaleWearer )
|
||||
from.SendLocalizedMessage( 1010388 ); // Only females can wear this.
|
||||
else
|
||||
from.SendMessage( "You may not wear this." );
|
||||
|
||||
return false;
|
||||
}
|
||||
else if( !AllowFemaleWearer && from.Female )
|
||||
{
|
||||
if( AllowMaleWearer )
|
||||
from.SendLocalizedMessage( 1063343 ); // Only males can wear this.
|
||||
else
|
||||
from.SendMessage( "You may not wear this." );
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
int strBonus = ComputeStatBonus( StatType.Str );
|
||||
int strReq = ComputeStatReq( StatType.Str );
|
||||
|
||||
if( from.Str < strReq || (from.Str + strBonus) < 1 )
|
||||
{
|
||||
from.SendLocalizedMessage( 500213 ); // You are not strong enough to equip that.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return base.CanEquip( from );
|
||||
}
|
||||
|
||||
public virtual int AosStrReq{ get{ return 10; } }
|
||||
public virtual int OldStrReq{ get{ return 0; } }
|
||||
|
||||
public virtual int InitMinHits{ get{ return 0; } }
|
||||
public virtual int InitMaxHits{ get{ return 0; } }
|
||||
|
||||
public virtual bool AllowMaleWearer{ get{ return true; } }
|
||||
public virtual bool AllowFemaleWearer{ get{ return true; } }
|
||||
public virtual bool CanBeBlessed{ get{ return true; } }
|
||||
|
||||
public int ComputeStatReq( StatType type )
|
||||
{
|
||||
int v;
|
||||
|
||||
//if ( type == StatType.Str )
|
||||
v = StrRequirement;
|
||||
|
||||
return AOS.Scale( v, 100 - GetLowerStatReq() );
|
||||
}
|
||||
|
||||
public int ComputeStatBonus( StatType type )
|
||||
{
|
||||
if ( type == StatType.Str )
|
||||
return BaseStrBonus + Attributes.BonusStr;
|
||||
else if ( type == StatType.Dex )
|
||||
return BaseDexBonus + Attributes.BonusDex;
|
||||
else
|
||||
return BaseIntBonus + Attributes.BonusInt;
|
||||
}
|
||||
|
||||
public virtual void AddStatBonuses( Mobile parent )
|
||||
{
|
||||
if ( parent == null )
|
||||
return;
|
||||
|
||||
int strBonus = ComputeStatBonus( StatType.Str );
|
||||
int dexBonus = ComputeStatBonus( StatType.Dex );
|
||||
int intBonus = ComputeStatBonus( StatType.Int );
|
||||
|
||||
if ( strBonus == 0 && dexBonus == 0 && intBonus == 0 )
|
||||
return;
|
||||
|
||||
string modName = this.Serial.ToString();
|
||||
|
||||
if ( strBonus != 0 )
|
||||
parent.AddStatMod( new StatMod( StatType.Str, modName + "Str", strBonus, TimeSpan.Zero ) );
|
||||
|
||||
if ( dexBonus != 0 )
|
||||
parent.AddStatMod( new StatMod( StatType.Dex, modName + "Dex", dexBonus, TimeSpan.Zero ) );
|
||||
|
||||
if ( intBonus != 0 )
|
||||
parent.AddStatMod( new StatMod( StatType.Int, modName + "Int", intBonus, TimeSpan.Zero ) );
|
||||
}
|
||||
|
||||
public static void ValidateMobile( Mobile m )
|
||||
{
|
||||
for ( int i = m.Items.Count - 1; i >= 0; --i )
|
||||
{
|
||||
if ( i >= m.Items.Count )
|
||||
continue;
|
||||
|
||||
Item item = m.Items[i];
|
||||
|
||||
if ( item is BaseClothing )
|
||||
{
|
||||
BaseClothing clothing = (BaseClothing)item;
|
||||
|
||||
if( clothing.RequiredRace != null && m.Race != clothing.RequiredRace )
|
||||
{
|
||||
if( clothing.RequiredRace == Race.Elf )
|
||||
m.SendLocalizedMessage( 1072203 ); // Only Elves may use this.
|
||||
else
|
||||
m.SendMessage( "Only {0} may use this.", clothing.RequiredRace.PluralName );
|
||||
|
||||
m.AddToBackpack( clothing );
|
||||
}
|
||||
else if ( !clothing.AllowMaleWearer && !m.Female && m.AccessLevel < AccessLevel.GameMaster )
|
||||
{
|
||||
if ( clothing.AllowFemaleWearer )
|
||||
m.SendLocalizedMessage( 1010388 ); // Only females can wear this.
|
||||
else
|
||||
m.SendMessage( "You may not wear this." );
|
||||
|
||||
m.AddToBackpack( clothing );
|
||||
}
|
||||
else if ( !clothing.AllowFemaleWearer && m.Female && m.AccessLevel < AccessLevel.GameMaster )
|
||||
{
|
||||
if ( clothing.AllowMaleWearer )
|
||||
m.SendLocalizedMessage( 1063343 ); // Only males can wear this.
|
||||
else
|
||||
m.SendMessage( "You may not wear this." );
|
||||
|
||||
m.AddToBackpack( clothing );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int GetLowerStatReq()
|
||||
{
|
||||
if ( !Core.AOS )
|
||||
return 0;
|
||||
|
||||
return m_AosClothingAttributes.LowerStatReq;
|
||||
}
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
{
|
||||
Mobile mob = parent as Mobile;
|
||||
|
||||
if ( mob != null )
|
||||
{
|
||||
if ( Core.AOS )
|
||||
m_AosSkillBonuses.AddTo( mob );
|
||||
|
||||
AddStatBonuses( mob );
|
||||
mob.CheckStatTimers();
|
||||
}
|
||||
|
||||
base.OnAdded( parent );
|
||||
}
|
||||
|
||||
public override void OnRemoved( object parent )
|
||||
{
|
||||
Mobile mob = parent as Mobile;
|
||||
|
||||
if ( mob != null )
|
||||
{
|
||||
if ( Core.AOS )
|
||||
m_AosSkillBonuses.Remove();
|
||||
|
||||
string modName = this.Serial.ToString();
|
||||
|
||||
mob.RemoveStatMod( modName + "Str" );
|
||||
mob.RemoveStatMod( modName + "Dex" );
|
||||
mob.RemoveStatMod( modName + "Int" );
|
||||
|
||||
mob.CheckStatTimers();
|
||||
}
|
||||
|
||||
base.OnRemoved( parent );
|
||||
}
|
||||
|
||||
public virtual int OnHit( BaseWeapon weapon, int damageTaken )
|
||||
{
|
||||
int Absorbed = Utility.RandomMinMax( 1, 4 );
|
||||
|
||||
damageTaken -= Absorbed;
|
||||
|
||||
if ( damageTaken < 0 )
|
||||
damageTaken = 0;
|
||||
|
||||
if ( 25 > Utility.Random( 100 ) ) // 25% chance to lower durability
|
||||
{
|
||||
if ( Core.AOS && m_AosClothingAttributes.SelfRepair > Utility.Random( 10 ) )
|
||||
{
|
||||
HitPoints += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
int wear;
|
||||
|
||||
if ( weapon.Type == WeaponType.Bashing )
|
||||
wear = Absorbed / 2;
|
||||
else
|
||||
wear = Utility.Random( 2 );
|
||||
|
||||
if ( wear > 0 && m_MaxHitPoints > 0 )
|
||||
{
|
||||
if ( m_HitPoints >= wear )
|
||||
{
|
||||
HitPoints -= wear;
|
||||
wear = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
wear -= HitPoints;
|
||||
HitPoints = 0;
|
||||
}
|
||||
|
||||
if ( wear > 0 )
|
||||
{
|
||||
if ( m_MaxHitPoints > wear )
|
||||
{
|
||||
MaxHitPoints -= wear;
|
||||
|
||||
if ( Parent is Mobile )
|
||||
((Mobile)Parent).LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061121 ); // Your equipment is severely damaged.
|
||||
}
|
||||
else
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return damageTaken;
|
||||
}
|
||||
|
||||
public BaseClothing( int itemID, Layer layer ) : this( itemID, layer, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseClothing( int itemID, Layer layer, int hue ) : base( itemID )
|
||||
{
|
||||
Layer = layer;
|
||||
Hue = hue;
|
||||
|
||||
m_Resource = DefaultResource;
|
||||
m_Quality = ClothingQuality.Regular;
|
||||
|
||||
m_HitPoints = m_MaxHitPoints = Utility.RandomMinMax( InitMinHits, InitMaxHits );
|
||||
|
||||
m_AosAttributes = new AosAttributes( this );
|
||||
m_AosClothingAttributes = new AosArmorAttributes( this );
|
||||
m_AosSkillBonuses = new AosSkillBonuses( this );
|
||||
m_AosResistances = new AosElementAttributes( this );
|
||||
}
|
||||
|
||||
public BaseClothing( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool AllowEquipedCast( Mobile from )
|
||||
{
|
||||
if ( base.AllowEquipedCast( from ) )
|
||||
return true;
|
||||
|
||||
return ( m_AosAttributes.SpellChanneling != 0 );
|
||||
}
|
||||
|
||||
public override bool CheckPropertyConfliction( Mobile m )
|
||||
{
|
||||
if ( base.CheckPropertyConfliction( m ) )
|
||||
return true;
|
||||
|
||||
if ( Layer == Layer.Pants )
|
||||
return ( m.FindItemOnLayer( Layer.InnerLegs ) != null );
|
||||
|
||||
if ( Layer == Layer.Shirt )
|
||||
return ( m.FindItemOnLayer( Layer.InnerTorso ) != null );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private string GetNameString()
|
||||
{
|
||||
string name = this.Name;
|
||||
|
||||
if ( name == null )
|
||||
name = String.Format( "#{0}", LabelNumber );
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
int oreType;
|
||||
|
||||
switch ( m_Resource )
|
||||
{
|
||||
case CraftResource.DullCopper: oreType = 1053108; break; // dull copper
|
||||
case CraftResource.ShadowIron: oreType = 1053107; break; // shadow iron
|
||||
case CraftResource.Copper: oreType = 1053106; break; // copper
|
||||
case CraftResource.Bronze: oreType = 1053105; break; // bronze
|
||||
case CraftResource.Gold: oreType = 1053104; break; // golden
|
||||
case CraftResource.Agapite: oreType = 1053103; break; // agapite
|
||||
case CraftResource.Verite: oreType = 1053102; break; // verite
|
||||
case CraftResource.Valorite: oreType = 1053101; break; // valorite
|
||||
case CraftResource.SpinedLeather: oreType = 1061118; break; // spined
|
||||
case CraftResource.HornedLeather: oreType = 1061117; break; // horned
|
||||
case CraftResource.BarbedLeather: oreType = 1061116; break; // barbed
|
||||
case CraftResource.RedScales: oreType = 1060814; break; // red
|
||||
case CraftResource.YellowScales: oreType = 1060818; break; // yellow
|
||||
case CraftResource.BlackScales: oreType = 1060820; break; // black
|
||||
case CraftResource.GreenScales: oreType = 1060819; break; // green
|
||||
case CraftResource.WhiteScales: oreType = 1060821; break; // white
|
||||
case CraftResource.BlueScales: oreType = 1060815; break; // blue
|
||||
default: oreType = 0; break;
|
||||
}
|
||||
|
||||
if ( oreType != 0 )
|
||||
list.Add( 1053099, "#{0}\t{1}", oreType, GetNameString() ); // ~1_oretype~ ~2_armortype~
|
||||
else if ( Name == null )
|
||||
list.Add( LabelNumber );
|
||||
else
|
||||
list.Add( Name );
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( m_Crafter != null )
|
||||
list.Add( 1050043, m_Crafter.Name ); // crafted by ~1_NAME~
|
||||
|
||||
#region Factions
|
||||
if ( m_FactionState != null )
|
||||
list.Add( 1041350 ); // faction item
|
||||
#endregion
|
||||
|
||||
if ( m_Quality == ClothingQuality.Exceptional )
|
||||
list.Add( 1060636 ); // exceptional
|
||||
|
||||
if( RequiredRace == Race.Elf )
|
||||
list.Add( 1075086 ); // Elves Only
|
||||
|
||||
if ( m_AosSkillBonuses != null )
|
||||
m_AosSkillBonuses.GetProperties( list );
|
||||
|
||||
int prop;
|
||||
|
||||
if ( (prop = ArtifactRarity) > 0 )
|
||||
list.Add( 1061078, prop.ToString() ); // artifact rarity ~1_val~
|
||||
|
||||
if ( (prop = m_AosAttributes.WeaponDamage) != 0 )
|
||||
list.Add( 1060401, prop.ToString() ); // damage increase ~1_val~%
|
||||
|
||||
if ( (prop = m_AosAttributes.DefendChance) != 0 )
|
||||
list.Add( 1060408, prop.ToString() ); // defense chance increase ~1_val~%
|
||||
|
||||
if ( (prop = m_AosAttributes.BonusDex) != 0 )
|
||||
list.Add( 1060409, prop.ToString() ); // dexterity bonus ~1_val~
|
||||
|
||||
if ( (prop = m_AosAttributes.EnhancePotions) != 0 )
|
||||
list.Add( 1060411, prop.ToString() ); // enhance potions ~1_val~%
|
||||
|
||||
if ( (prop = m_AosAttributes.CastRecovery) != 0 )
|
||||
list.Add( 1060412, prop.ToString() ); // faster cast recovery ~1_val~
|
||||
|
||||
if ( (prop = m_AosAttributes.CastSpeed) != 0 )
|
||||
list.Add( 1060413, prop.ToString() ); // faster casting ~1_val~
|
||||
|
||||
if ( (prop = m_AosAttributes.AttackChance) != 0 )
|
||||
list.Add( 1060415, prop.ToString() ); // hit chance increase ~1_val~%
|
||||
|
||||
if ( (prop = m_AosAttributes.BonusHits) != 0 )
|
||||
list.Add( 1060431, prop.ToString() ); // hit point increase ~1_val~
|
||||
|
||||
if ( (prop = m_AosAttributes.BonusInt) != 0 )
|
||||
list.Add( 1060432, prop.ToString() ); // intelligence bonus ~1_val~
|
||||
|
||||
if ( (prop = m_AosAttributes.LowerManaCost) != 0 )
|
||||
list.Add( 1060433, prop.ToString() ); // lower mana cost ~1_val~%
|
||||
|
||||
if ( (prop = m_AosAttributes.LowerRegCost) != 0 )
|
||||
list.Add( 1060434, prop.ToString() ); // lower reagent cost ~1_val~%
|
||||
|
||||
if ( (prop = m_AosClothingAttributes.LowerStatReq) != 0 )
|
||||
list.Add( 1060435, prop.ToString() ); // lower requirements ~1_val~%
|
||||
|
||||
if ( (prop = m_AosAttributes.Luck) != 0 )
|
||||
list.Add( 1060436, prop.ToString() ); // luck ~1_val~
|
||||
|
||||
if ( (prop = m_AosClothingAttributes.MageArmor) != 0 )
|
||||
list.Add( 1060437 ); // mage armor
|
||||
|
||||
if ( (prop = m_AosAttributes.BonusMana) != 0 )
|
||||
list.Add( 1060439, prop.ToString() ); // mana increase ~1_val~
|
||||
|
||||
if ( (prop = m_AosAttributes.RegenMana) != 0 )
|
||||
list.Add( 1060440, prop.ToString() ); // mana regeneration ~1_val~
|
||||
|
||||
if ( (prop = m_AosAttributes.NightSight) != 0 )
|
||||
list.Add( 1060441 ); // night sight
|
||||
|
||||
if ( (prop = m_AosAttributes.ReflectPhysical) != 0 )
|
||||
list.Add( 1060442, prop.ToString() ); // reflect physical damage ~1_val~%
|
||||
|
||||
if ( (prop = m_AosAttributes.RegenStam) != 0 )
|
||||
list.Add( 1060443, prop.ToString() ); // stamina regeneration ~1_val~
|
||||
|
||||
if ( (prop = m_AosAttributes.RegenHits) != 0 )
|
||||
list.Add( 1060444, prop.ToString() ); // hit point regeneration ~1_val~
|
||||
|
||||
if ( (prop = m_AosClothingAttributes.SelfRepair) != 0 )
|
||||
list.Add( 1060450, prop.ToString() ); // self repair ~1_val~
|
||||
|
||||
if ( (prop = m_AosAttributes.SpellChanneling) != 0 )
|
||||
list.Add( 1060482 ); // spell channeling
|
||||
|
||||
if ( (prop = m_AosAttributes.SpellDamage) != 0 )
|
||||
list.Add( 1060483, prop.ToString() ); // spell damage increase ~1_val~%
|
||||
|
||||
if ( (prop = m_AosAttributes.BonusStam) != 0 )
|
||||
list.Add( 1060484, prop.ToString() ); // stamina increase ~1_val~
|
||||
|
||||
if ( (prop = m_AosAttributes.BonusStr) != 0 )
|
||||
list.Add( 1060485, prop.ToString() ); // strength bonus ~1_val~
|
||||
|
||||
if ( (prop = m_AosAttributes.WeaponSpeed) != 0 )
|
||||
list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~%
|
||||
|
||||
base.AddResistanceProperties( list );
|
||||
|
||||
if ( (prop = m_AosClothingAttributes.DurabilityBonus) > 0 )
|
||||
list.Add( 1060410, prop.ToString() ); // durability ~1_val~%
|
||||
|
||||
if ( (prop = ComputeStatReq( StatType.Str )) > 0 )
|
||||
list.Add( 1061170, prop.ToString() ); // strength requirement ~1_val~
|
||||
|
||||
if ( m_HitPoints >= 0 && m_MaxHitPoints > 0 )
|
||||
list.Add( 1060639, "{0}\t{1}", m_HitPoints, m_MaxHitPoints ); // durability ~1_val~ / ~2_val~
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
ArrayList attrs = new ArrayList();
|
||||
|
||||
if ( DisplayLootType )
|
||||
{
|
||||
if ( LootType == LootType.Blessed )
|
||||
attrs.Add( new EquipInfoAttribute( 1038021 ) ); // blessed
|
||||
else if ( LootType == LootType.Cursed )
|
||||
attrs.Add( new EquipInfoAttribute( 1049643 ) ); // cursed
|
||||
}
|
||||
|
||||
#region Factions
|
||||
if ( m_FactionState != null )
|
||||
attrs.Add( new EquipInfoAttribute( 1041350 ) ); // faction item
|
||||
#endregion
|
||||
|
||||
if ( m_Quality == ClothingQuality.Exceptional )
|
||||
attrs.Add( new EquipInfoAttribute( 1018305 - (int)m_Quality ) );
|
||||
|
||||
int number;
|
||||
|
||||
if ( Name == null )
|
||||
{
|
||||
number = LabelNumber;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.LabelTo( from, Name );
|
||||
number = 1041000;
|
||||
}
|
||||
|
||||
if ( attrs.Count == 0 && Crafter == null && Name != null )
|
||||
return;
|
||||
|
||||
EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );
|
||||
|
||||
from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
|
||||
}
|
||||
|
||||
#region Serialization
|
||||
private static void SetSaveFlag( ref SaveFlag flags, SaveFlag toSet, bool setIf )
|
||||
{
|
||||
if ( setIf )
|
||||
flags |= toSet;
|
||||
}
|
||||
|
||||
private static bool GetSaveFlag( SaveFlag flags, SaveFlag toGet )
|
||||
{
|
||||
return ( (flags & toGet) != 0 );
|
||||
}
|
||||
|
||||
[Flags]
|
||||
private enum SaveFlag
|
||||
{
|
||||
None = 0x00000000,
|
||||
Resource = 0x00000001,
|
||||
Attributes = 0x00000002,
|
||||
ClothingAttributes = 0x00000004,
|
||||
SkillBonuses = 0x00000008,
|
||||
Resistances = 0x00000010,
|
||||
MaxHitPoints = 0x00000020,
|
||||
HitPoints = 0x00000040,
|
||||
PlayerConstructed = 0x00000080,
|
||||
Crafter = 0x00000100,
|
||||
Quality = 0x00000200,
|
||||
StrReq = 0x00000400
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 5 ); // version
|
||||
|
||||
SaveFlag flags = SaveFlag.None;
|
||||
|
||||
SetSaveFlag( ref flags, SaveFlag.Resource, m_Resource != DefaultResource );
|
||||
SetSaveFlag( ref flags, SaveFlag.Attributes, !m_AosAttributes.IsEmpty );
|
||||
SetSaveFlag( ref flags, SaveFlag.ClothingAttributes,!m_AosClothingAttributes.IsEmpty );
|
||||
SetSaveFlag( ref flags, SaveFlag.SkillBonuses, !m_AosSkillBonuses.IsEmpty );
|
||||
SetSaveFlag( ref flags, SaveFlag.Resistances, !m_AosResistances.IsEmpty );
|
||||
SetSaveFlag( ref flags, SaveFlag.MaxHitPoints, m_MaxHitPoints != 0 );
|
||||
SetSaveFlag( ref flags, SaveFlag.HitPoints, m_HitPoints != 0 );
|
||||
SetSaveFlag( ref flags, SaveFlag.PlayerConstructed, m_PlayerConstructed != false );
|
||||
SetSaveFlag( ref flags, SaveFlag.Crafter, m_Crafter != null );
|
||||
SetSaveFlag( ref flags, SaveFlag.Quality, m_Quality != ClothingQuality.Regular );
|
||||
SetSaveFlag( ref flags, SaveFlag.StrReq, m_StrReq != -1 );
|
||||
|
||||
writer.WriteEncodedInt( (int) flags );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.Resource ) )
|
||||
writer.WriteEncodedInt( (int) m_Resource );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.Attributes ) )
|
||||
m_AosAttributes.Serialize( writer );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.ClothingAttributes ) )
|
||||
m_AosClothingAttributes.Serialize( writer );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.SkillBonuses ) )
|
||||
m_AosSkillBonuses.Serialize( writer );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.Resistances ) )
|
||||
m_AosResistances.Serialize( writer );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.MaxHitPoints ) )
|
||||
writer.WriteEncodedInt( (int) m_MaxHitPoints );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.HitPoints ) )
|
||||
writer.WriteEncodedInt( (int) m_HitPoints );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.Crafter ) )
|
||||
writer.Write( (Mobile) m_Crafter );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.Quality ) )
|
||||
writer.WriteEncodedInt( (int) m_Quality );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.StrReq ) )
|
||||
writer.WriteEncodedInt( (int) m_StrReq );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 5:
|
||||
{
|
||||
SaveFlag flags = (SaveFlag)reader.ReadEncodedInt();
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.Resource ) )
|
||||
m_Resource = (CraftResource)reader.ReadEncodedInt();
|
||||
else
|
||||
m_Resource = DefaultResource;
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.Attributes ) )
|
||||
m_AosAttributes = new AosAttributes( this, reader );
|
||||
else
|
||||
m_AosAttributes = new AosAttributes( this );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.ClothingAttributes ) )
|
||||
m_AosClothingAttributes = new AosArmorAttributes( this, reader );
|
||||
else
|
||||
m_AosClothingAttributes = new AosArmorAttributes( this );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.SkillBonuses ) )
|
||||
m_AosSkillBonuses = new AosSkillBonuses( this, reader );
|
||||
else
|
||||
m_AosSkillBonuses = new AosSkillBonuses( this );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.Resistances ) )
|
||||
m_AosResistances = new AosElementAttributes( this, reader );
|
||||
else
|
||||
m_AosResistances = new AosElementAttributes( this );
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.MaxHitPoints ) )
|
||||
m_MaxHitPoints = reader.ReadEncodedInt();
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.HitPoints ) )
|
||||
m_HitPoints = reader.ReadEncodedInt();
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.Crafter ) )
|
||||
m_Crafter = reader.ReadMobile();
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.Quality ) )
|
||||
m_Quality = (ClothingQuality)reader.ReadEncodedInt();
|
||||
else
|
||||
m_Quality = ClothingQuality.Regular;
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.StrReq ) )
|
||||
m_StrReq = reader.ReadEncodedInt();
|
||||
else
|
||||
m_StrReq = -1;
|
||||
|
||||
if ( GetSaveFlag( flags, SaveFlag.PlayerConstructed ) )
|
||||
m_PlayerConstructed = true;
|
||||
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
|
||||
goto case 3;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
m_AosAttributes = new AosAttributes( this, reader );
|
||||
m_AosClothingAttributes = new AosArmorAttributes( this, reader );
|
||||
m_AosSkillBonuses = new AosSkillBonuses( this, reader );
|
||||
m_AosResistances = new AosElementAttributes( this, reader );
|
||||
|
||||
goto case 2;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
m_PlayerConstructed = reader.ReadBool();
|
||||
goto case 1;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
m_Crafter = reader.ReadMobile();
|
||||
m_Quality = (ClothingQuality)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_Crafter = null;
|
||||
m_Quality = ClothingQuality.Regular;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( version < 2 )
|
||||
m_PlayerConstructed = true; // we don't know, so, assume it's crafted
|
||||
|
||||
if ( version < 3 )
|
||||
{
|
||||
m_AosAttributes = new AosAttributes( this );
|
||||
m_AosClothingAttributes = new AosArmorAttributes( this );
|
||||
m_AosSkillBonuses = new AosSkillBonuses( this );
|
||||
m_AosResistances = new AosElementAttributes( this );
|
||||
}
|
||||
|
||||
if ( version < 4 )
|
||||
m_Resource = DefaultResource;
|
||||
|
||||
if ( m_MaxHitPoints == 0 && m_HitPoints == 0 )
|
||||
m_HitPoints = m_MaxHitPoints = Utility.RandomMinMax( InitMinHits, InitMaxHits );
|
||||
|
||||
Mobile parent = Parent as Mobile;
|
||||
|
||||
if ( parent != null )
|
||||
{
|
||||
if ( Core.AOS )
|
||||
m_AosSkillBonuses.AddTo( parent );
|
||||
|
||||
AddStatBonuses( parent );
|
||||
parent.CheckStatTimers();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public virtual bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
else if ( RootParent is Mobile && from != RootParent )
|
||||
return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 502437 ); // Items you wish to cut must be in your backpack.
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( Ethics.Ethic.IsImbued( this ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
|
||||
return false;
|
||||
}
|
||||
|
||||
CraftSystem system = DefTailoring.CraftSystem;
|
||||
|
||||
CraftItem item = system.CraftItems.SearchFor( GetType() );
|
||||
|
||||
if ( item != null && item.Ressources.Count == 1 && item.Ressources.GetAt( 0 ).Amount >= 2 )
|
||||
{
|
||||
try
|
||||
{
|
||||
Type resourceType = null;
|
||||
|
||||
CraftResourceInfo info = CraftResources.GetInfo( m_Resource );
|
||||
|
||||
if ( info != null && info.ResourceTypes.Length > 0 )
|
||||
resourceType = info.ResourceTypes[0];
|
||||
|
||||
if ( resourceType == null )
|
||||
resourceType = item.Ressources.GetAt( 0 ).ItemType;
|
||||
|
||||
Item res = (Item)Activator.CreateInstance( resourceType );
|
||||
|
||||
ScissorHelper( from, res, m_PlayerConstructed ? (item.Ressources.GetAt( 0 ).Amount / 2) : 1 );
|
||||
|
||||
res.LootType = LootType.Regular;
|
||||
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
|
||||
return false;
|
||||
}
|
||||
|
||||
public void DistributeBonuses( int amount )
|
||||
{
|
||||
for ( int i = 0; i < amount; ++i )
|
||||
{
|
||||
switch ( Utility.Random( 5 ) )
|
||||
{
|
||||
case 0: ++m_AosResistances.Physical; break;
|
||||
case 1: ++m_AosResistances.Fire; break;
|
||||
case 2: ++m_AosResistances.Cold; break;
|
||||
case 3: ++m_AosResistances.Poison; break;
|
||||
case 4: ++m_AosResistances.Energy; break;
|
||||
}
|
||||
}
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
|
||||
#region ICraftable Members
|
||||
|
||||
public virtual int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
|
||||
{
|
||||
Quality = (ClothingQuality)quality;
|
||||
|
||||
if ( makersMark )
|
||||
Crafter = from;
|
||||
|
||||
if ( DefaultResource != CraftResource.None )
|
||||
{
|
||||
Type resourceType = typeRes;
|
||||
|
||||
if ( resourceType == null )
|
||||
resourceType = craftItem.Ressources.GetAt( 0 ).ItemType;
|
||||
|
||||
Resource = CraftResources.GetFromType( resourceType );
|
||||
}
|
||||
else
|
||||
{
|
||||
Hue = resHue;
|
||||
}
|
||||
|
||||
PlayerConstructed = true;
|
||||
|
||||
CraftContext context = craftSystem.GetContext( from );
|
||||
|
||||
if ( context != null && context.DoNotColor )
|
||||
Hue = 0;
|
||||
|
||||
return quality;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
306
Scripts/Items/Clothing/Cloaks.cs
Normal file
306
Scripts/Items/Clothing/Cloaks.cs
Normal file
|
|
@ -0,0 +1,306 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseCloak : BaseClothing
|
||||
{
|
||||
public BaseCloak( int itemID ) : this( itemID, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseCloak( int itemID, int hue ) : base( itemID, Layer.Cloak, hue )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseCloak( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable]
|
||||
public class Cloak : BaseCloak, IArcaneEquip
|
||||
{
|
||||
#region Arcane Impl
|
||||
private int m_MaxArcaneCharges, m_CurArcaneCharges;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int MaxArcaneCharges
|
||||
{
|
||||
get{ return m_MaxArcaneCharges; }
|
||||
set{ m_MaxArcaneCharges = value; InvalidateProperties(); Update(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int CurArcaneCharges
|
||||
{
|
||||
get{ return m_CurArcaneCharges; }
|
||||
set{ m_CurArcaneCharges = value; InvalidateProperties(); Update(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsArcane
|
||||
{
|
||||
get{ return ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); }
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if ( IsArcane )
|
||||
ItemID = 0x26AD;
|
||||
else if ( ItemID == 0x26AD )
|
||||
ItemID = 0x1515;
|
||||
|
||||
if ( IsArcane && CurArcaneCharges == 0 )
|
||||
Hue = 0;
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( IsArcane )
|
||||
list.Add( 1061837, "{0}\t{1}", m_CurArcaneCharges, m_MaxArcaneCharges ); // arcane charges: ~1_val~ / ~2_val~
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
base.OnSingleClick( from );
|
||||
|
||||
if ( IsArcane )
|
||||
LabelTo( from, 1061837, String.Format( "{0}\t{1}", m_CurArcaneCharges, m_MaxArcaneCharges ) );
|
||||
}
|
||||
|
||||
public void Flip()
|
||||
{
|
||||
if ( ItemID == 0x1515 )
|
||||
ItemID = 0x1530;
|
||||
else if ( ItemID == 0x1530 )
|
||||
ItemID = 0x1515;
|
||||
}
|
||||
#endregion
|
||||
|
||||
[Constructable]
|
||||
public Cloak() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Cloak( int hue ) : base( 0x1515, hue )
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
public Cloak( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
if ( IsArcane )
|
||||
{
|
||||
writer.Write( true );
|
||||
writer.Write( (int) m_CurArcaneCharges );
|
||||
writer.Write( (int) m_MaxArcaneCharges );
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.Write( false );
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
if ( reader.ReadBool() )
|
||||
{
|
||||
m_CurArcaneCharges = reader.ReadInt();
|
||||
m_MaxArcaneCharges = reader.ReadInt();
|
||||
|
||||
if ( Hue == 2118 )
|
||||
Hue = ArcaneGem.DefaultArcaneHue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( Weight == 4.0 )
|
||||
Weight = 5.0;
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable]
|
||||
public class RewardCloak : BaseCloak, Engines.VeteranRewards.IRewardItem
|
||||
{
|
||||
private int m_LabelNumber;
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsRewardItem
|
||||
{
|
||||
get{ return m_IsRewardItem; }
|
||||
set{ m_IsRewardItem = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Number
|
||||
{
|
||||
get{ return m_LabelNumber; }
|
||||
set{ m_LabelNumber = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_LabelNumber > 0 )
|
||||
return m_LabelNumber;
|
||||
|
||||
return base.LabelNumber;
|
||||
}
|
||||
}
|
||||
|
||||
public override int BasePhysicalResistance{ get{ return 3; } }
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
if ( parent is Mobile )
|
||||
((Mobile)parent).VirtualArmorMod += 2;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved( parent );
|
||||
|
||||
if ( parent is Mobile )
|
||||
((Mobile)parent).VirtualArmorMod -= 2;
|
||||
}
|
||||
|
||||
public override bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
from.SendLocalizedMessage( sender.FailMessage );
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanEquip( Mobile m )
|
||||
{
|
||||
if ( !base.CanEquip( m ) )
|
||||
return false;
|
||||
|
||||
return !m_IsRewardItem || Engines.VeteranRewards.RewardSystem.CheckIsUsableBy( m, this, new object[]{ Hue, m_LabelNumber } );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RewardCloak() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RewardCloak( int hue ) : this( hue, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RewardCloak( int hue, int labelNumber ) : base( 0x1515, hue )
|
||||
{
|
||||
Weight = 5.0;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
m_LabelNumber = labelNumber;
|
||||
}
|
||||
|
||||
public RewardCloak( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( (int) m_LabelNumber );
|
||||
writer.Write( (bool) m_IsRewardItem );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_LabelNumber = reader.ReadInt();
|
||||
m_IsRewardItem = reader.ReadBool();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( Parent is Mobile )
|
||||
((Mobile)Parent).VirtualArmorMod += 2;
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x230A, 0x2309 )]
|
||||
public class FurCape : BaseCloak
|
||||
{
|
||||
[Constructable]
|
||||
public FurCape() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FurCape( int hue ) : base( 0x230A, hue )
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
||||
public FurCape( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
1034
Scripts/Items/Clothing/Hats.cs
Normal file
1034
Scripts/Items/Clothing/Hats.cs
Normal file
File diff suppressed because it is too large
Load diff
303
Scripts/Items/Clothing/MiddleTorso.cs
Normal file
303
Scripts/Items/Clothing/MiddleTorso.cs
Normal file
|
|
@ -0,0 +1,303 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseMiddleTorso : BaseClothing
|
||||
{
|
||||
public BaseMiddleTorso( int itemID ) : this( itemID, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseMiddleTorso( int itemID, int hue ) : base( itemID, Layer.MiddleTorso, hue )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseMiddleTorso( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x1541, 0x1542 )]
|
||||
public class BodySash : BaseMiddleTorso
|
||||
{
|
||||
[Constructable]
|
||||
public BodySash() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BodySash( int hue ) : base( 0x1541, hue )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public BodySash( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x153d, 0x153e )]
|
||||
public class FullApron : BaseMiddleTorso
|
||||
{
|
||||
[Constructable]
|
||||
public FullApron() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FullApron( int hue ) : base( 0x153d, hue )
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
||||
public FullApron( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x1f7b, 0x1f7c )]
|
||||
public class Doublet : BaseMiddleTorso
|
||||
{
|
||||
[Constructable]
|
||||
public Doublet() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Doublet( int hue ) : base( 0x1F7B, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public Doublet( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x1ffd, 0x1ffe )]
|
||||
public class Surcoat : BaseMiddleTorso
|
||||
{
|
||||
[Constructable]
|
||||
public Surcoat() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Surcoat( int hue ) : base( 0x1FFD, hue )
|
||||
{
|
||||
Weight = 6.0;
|
||||
}
|
||||
|
||||
public Surcoat( 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 == 3.0 )
|
||||
Weight = 6.0;
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x1fa1, 0x1fa2 )]
|
||||
public class Tunic : BaseMiddleTorso
|
||||
{
|
||||
[Constructable]
|
||||
public Tunic() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Tunic( int hue ) : base( 0x1FA1, hue )
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
public Tunic( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x2310, 0x230F )]
|
||||
public class FormalShirt : BaseMiddleTorso
|
||||
{
|
||||
[Constructable]
|
||||
public FormalShirt() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FormalShirt( int hue ) : base( 0x2310, hue )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public FormalShirt( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
if ( Weight == 2.0 )
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x1f9f, 0x1fa0 )]
|
||||
public class JesterSuit : BaseMiddleTorso
|
||||
{
|
||||
[Constructable]
|
||||
public JesterSuit() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public JesterSuit( int hue ) : base( 0x1F9F, hue )
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
||||
public JesterSuit( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x27A1, 0x27EC )]
|
||||
public class JinBaori : BaseMiddleTorso
|
||||
{
|
||||
[Constructable]
|
||||
public JinBaori() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public JinBaori( int hue ) : base( 0x27A1, hue )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public JinBaori( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
168
Scripts/Items/Clothing/OuterLegs.cs
Normal file
168
Scripts/Items/Clothing/OuterLegs.cs
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseOuterLegs : BaseClothing
|
||||
{
|
||||
public BaseOuterLegs( int itemID ) : this( itemID, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseOuterLegs( int itemID, int hue ) : base( itemID, Layer.OuterLegs, hue )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseOuterLegs( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x230C, 0x230B )]
|
||||
public class FurSarong : BaseOuterLegs
|
||||
{
|
||||
[Constructable]
|
||||
public FurSarong() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FurSarong( int hue ) : base( 0x230C, hue )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public FurSarong( 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 == 4.0 )
|
||||
Weight = 3.0;
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x1516, 0x1531 )]
|
||||
public class Skirt : BaseOuterLegs
|
||||
{
|
||||
[Constructable]
|
||||
public Skirt() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Skirt( int hue ) : base( 0x1516, hue )
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
||||
public Skirt( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x1537, 0x1538 )]
|
||||
public class Kilt : BaseOuterLegs
|
||||
{
|
||||
[Constructable]
|
||||
public Kilt() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Kilt( int hue ) : base( 0x1537, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public Kilt( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x279A, 0x27E5 )]
|
||||
public class Hakama : BaseOuterLegs
|
||||
{
|
||||
[Constructable]
|
||||
public Hakama() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Hakama( int hue ) : base( 0x279A, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public Hakama( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
665
Scripts/Items/Clothing/OuterTorso.cs
Normal file
665
Scripts/Items/Clothing/OuterTorso.cs
Normal file
|
|
@ -0,0 +1,665 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseOuterTorso : BaseClothing
|
||||
{
|
||||
public BaseOuterTorso( int itemID ) : this( itemID, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseOuterTorso( int itemID, int hue ) : base( itemID, Layer.OuterTorso, hue )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseOuterTorso( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x230E, 0x230D )]
|
||||
public class GildedDress : BaseOuterTorso
|
||||
{
|
||||
[Constructable]
|
||||
public GildedDress() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public GildedDress( int hue ) : base( 0x230E, hue )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public GildedDress( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x1F00, 0x1EFF )]
|
||||
public class FancyDress : BaseOuterTorso
|
||||
{
|
||||
[Constructable]
|
||||
public FancyDress() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FancyDress( int hue ) : base( 0x1F00, hue )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public FancyDress( 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 class DeathRobe : Robe
|
||||
{
|
||||
public override bool DisplayLootType
|
||||
{
|
||||
get{ return false; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DeathRobe()
|
||||
{
|
||||
LootType = LootType.Newbied;
|
||||
Hue = 2301;
|
||||
}
|
||||
|
||||
public new bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
|
||||
return false;
|
||||
}
|
||||
|
||||
public DeathRobe( 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();
|
||||
|
||||
if ( version < 1 && Hue == 0 )
|
||||
Hue = 2301;
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable]
|
||||
public class RewardRobe : BaseOuterTorso, Engines.VeteranRewards.IRewardItem
|
||||
{
|
||||
private int m_LabelNumber;
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsRewardItem
|
||||
{
|
||||
get{ return m_IsRewardItem; }
|
||||
set{ m_IsRewardItem = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Number
|
||||
{
|
||||
get{ return m_LabelNumber; }
|
||||
set{ m_LabelNumber = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_LabelNumber > 0 )
|
||||
return m_LabelNumber;
|
||||
|
||||
return base.LabelNumber;
|
||||
}
|
||||
}
|
||||
|
||||
public override int BasePhysicalResistance{ get{ return 3; } }
|
||||
|
||||
public override void OnAdded( object parent )
|
||||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
if ( parent is Mobile )
|
||||
((Mobile)parent).VirtualArmorMod += 2;
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved( parent );
|
||||
|
||||
if ( parent is Mobile )
|
||||
((Mobile)parent).VirtualArmorMod -= 2;
|
||||
}
|
||||
|
||||
public override bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
from.SendLocalizedMessage( sender.FailMessage );
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanEquip( Mobile m )
|
||||
{
|
||||
if ( !base.CanEquip( m ) )
|
||||
return false;
|
||||
|
||||
return !m_IsRewardItem || Engines.VeteranRewards.RewardSystem.CheckIsUsableBy( m, this, new object[]{ Hue, m_LabelNumber } );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RewardRobe() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RewardRobe( int hue ) : this( hue, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RewardRobe( int hue, int labelNumber ) : base( 0x1F03, hue )
|
||||
{
|
||||
Weight = 3.0;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
m_LabelNumber = labelNumber;
|
||||
}
|
||||
|
||||
public RewardRobe( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( (int) m_LabelNumber );
|
||||
writer.Write( (bool) m_IsRewardItem );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_LabelNumber = reader.ReadInt();
|
||||
m_IsRewardItem = reader.ReadBool();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( Parent is Mobile )
|
||||
((Mobile)Parent).VirtualArmorMod += 2;
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable]
|
||||
public class Robe : BaseOuterTorso, IArcaneEquip
|
||||
{
|
||||
#region Arcane Impl
|
||||
private int m_MaxArcaneCharges, m_CurArcaneCharges;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int MaxArcaneCharges
|
||||
{
|
||||
get{ return m_MaxArcaneCharges; }
|
||||
set{ m_MaxArcaneCharges = value; InvalidateProperties(); Update(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int CurArcaneCharges
|
||||
{
|
||||
get{ return m_CurArcaneCharges; }
|
||||
set{ m_CurArcaneCharges = value; InvalidateProperties(); Update(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsArcane
|
||||
{
|
||||
get{ return ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); }
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if ( IsArcane )
|
||||
ItemID = 0x26AE;
|
||||
else if ( ItemID == 0x26AE )
|
||||
ItemID = 0x1F04;
|
||||
|
||||
if ( IsArcane && CurArcaneCharges == 0 )
|
||||
Hue = 0;
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( IsArcane )
|
||||
list.Add( 1061837, "{0}\t{1}", m_CurArcaneCharges, m_MaxArcaneCharges ); // arcane charges: ~1_val~ / ~2_val~
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
base.OnSingleClick( from );
|
||||
|
||||
if ( IsArcane )
|
||||
LabelTo( from, 1061837, String.Format( "{0}\t{1}", m_CurArcaneCharges, m_MaxArcaneCharges ) );
|
||||
}
|
||||
|
||||
public void Flip()
|
||||
{
|
||||
if ( ItemID == 0x1F03 )
|
||||
ItemID = 0x1F04;
|
||||
else if ( ItemID == 0x1F04 )
|
||||
ItemID = 0x1F03;
|
||||
}
|
||||
#endregion
|
||||
|
||||
[Constructable]
|
||||
public Robe() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Robe( int hue ) : base( 0x1F03, hue )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public Robe( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
if ( IsArcane )
|
||||
{
|
||||
writer.Write( true );
|
||||
writer.Write( (int) m_CurArcaneCharges );
|
||||
writer.Write( (int) m_MaxArcaneCharges );
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.Write( false );
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
if ( reader.ReadBool() )
|
||||
{
|
||||
m_CurArcaneCharges = reader.ReadInt();
|
||||
m_MaxArcaneCharges = reader.ReadInt();
|
||||
|
||||
if ( Hue == 2118 )
|
||||
Hue = ArcaneGem.DefaultArcaneHue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x2684, 0x2683 )]
|
||||
public class HoodedShroudOfShadows : BaseOuterTorso
|
||||
{
|
||||
[Constructable]
|
||||
public HoodedShroudOfShadows() : this( 0x455 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HoodedShroudOfShadows( int hue ) : base( 0x2684, hue )
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public override bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
from.SendLocalizedMessage( sender.FailMessage );
|
||||
return false;
|
||||
}
|
||||
|
||||
public HoodedShroudOfShadows( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x1f01, 0x1f02 )]
|
||||
public class PlainDress : BaseOuterTorso
|
||||
{
|
||||
[Constructable]
|
||||
public PlainDress() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public PlainDress( int hue ) : base( 0x1F01, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public PlainDress( 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 == 3.0 )
|
||||
Weight = 2.0;
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x2799, 0x27E4 )]
|
||||
public class Kamishimo : BaseOuterTorso
|
||||
{
|
||||
[Constructable]
|
||||
public Kamishimo() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Kamishimo( int hue ) : base( 0x2799, hue )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public Kamishimo( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x279C, 0x27E7 )]
|
||||
public class HakamaShita : BaseOuterTorso
|
||||
{
|
||||
[Constructable]
|
||||
public HakamaShita() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HakamaShita( int hue ) : base( 0x279C, hue )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public HakamaShita( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x2782, 0x27CD )]
|
||||
public class MaleKimono : BaseOuterTorso
|
||||
{
|
||||
[Constructable]
|
||||
public MaleKimono() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MaleKimono( int hue ) : base( 0x2782, hue )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public override bool AllowFemaleWearer{ get{ return false; } }
|
||||
|
||||
public MaleKimono( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x2783, 0x27CE )]
|
||||
public class FemaleKimono : BaseOuterTorso
|
||||
{
|
||||
[Constructable]
|
||||
public FemaleKimono() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FemaleKimono( int hue ) : base( 0x2783, hue )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public override bool AllowMaleWearer{ get{ return false; } }
|
||||
|
||||
public FemaleKimono( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x2FB9, 0x3173 )]
|
||||
public class MaleElvenRobe : BaseOuterTorso
|
||||
{
|
||||
// TODO: Supports arcane?
|
||||
public override Race RequiredRace { get { return Race.Elf; } }
|
||||
|
||||
[Constructable]
|
||||
public MaleElvenRobe() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MaleElvenRobe( int hue ) : base( 0x2FB9, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public override bool AllowFemaleWearer{ get{ return false; } }
|
||||
|
||||
public MaleElvenRobe( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x2FBA, 0x3174 )]
|
||||
public class FemaleElvenRobe : BaseOuterTorso
|
||||
{
|
||||
// TODO: Supports arcane?
|
||||
public override Race RequiredRace { get { return Race.Elf; } }
|
||||
[Constructable]
|
||||
public FemaleElvenRobe() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FemaleElvenRobe( int hue ) : base( 0x2FBA, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public override bool AllowMaleWearer{ get{ return false; } }
|
||||
|
||||
public FemaleElvenRobe( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
167
Scripts/Items/Clothing/Pants.cs
Normal file
167
Scripts/Items/Clothing/Pants.cs
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BasePants : BaseClothing
|
||||
{
|
||||
public BasePants( int itemID ) : this( itemID, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
public BasePants( int itemID, int hue ) : base( itemID, Layer.Pants, hue )
|
||||
{
|
||||
}
|
||||
|
||||
public BasePants( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x152e, 0x152f )]
|
||||
public class ShortPants : BasePants
|
||||
{
|
||||
[Constructable]
|
||||
public ShortPants() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ShortPants( int hue ) : base( 0x152E, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public ShortPants( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1539, 0x153a )]
|
||||
public class LongPants : BasePants
|
||||
{
|
||||
[Constructable]
|
||||
public LongPants() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LongPants( int hue ) : base( 0x1539, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public LongPants( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x279B, 0x27E6 )]
|
||||
public class TattsukeHakama : BasePants
|
||||
{
|
||||
[Constructable]
|
||||
public TattsukeHakama() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public TattsukeHakama( int hue ) : base( 0x279B, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public TattsukeHakama( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x2FC3, 0x3179 )]
|
||||
public class ElvenPants : BasePants
|
||||
{
|
||||
public override Race RequiredRace { get { return Race.Elf; } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenPants() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenPants( int hue ) : base( 0x2FC3, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public ElvenPants( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
204
Scripts/Items/Clothing/Shirts.cs
Normal file
204
Scripts/Items/Clothing/Shirts.cs
Normal file
|
|
@ -0,0 +1,204 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseShirt : BaseClothing
|
||||
{
|
||||
public BaseShirt( int itemID ) : this( itemID, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseShirt( int itemID, int hue ) : base( itemID, Layer.Shirt, hue )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseShirt( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1efd, 0x1efe )]
|
||||
public class FancyShirt : BaseShirt
|
||||
{
|
||||
[Constructable]
|
||||
public FancyShirt() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FancyShirt( int hue ) : base( 0x1EFD, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public FancyShirt( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1517, 0x1518 )]
|
||||
public class Shirt : BaseShirt
|
||||
{
|
||||
[Constructable]
|
||||
public Shirt() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Shirt( int hue ) : base( 0x1517, hue )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Shirt( 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 == 2.0 )
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x2794, 0x27DF )]
|
||||
public class ClothNinjaJacket : BaseShirt
|
||||
{
|
||||
[Constructable]
|
||||
public ClothNinjaJacket() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ClothNinjaJacket( int hue ) : base( 0x2794, hue )
|
||||
{
|
||||
Weight = 5.0;
|
||||
Layer = Layer.InnerTorso;
|
||||
}
|
||||
|
||||
public ClothNinjaJacket( 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 class ElvenShirt : BaseShirt
|
||||
{
|
||||
public override Race RequiredRace { get { return Race.Elf; } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenShirt() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenShirt( int hue ) : base( 0x3175, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public ElvenShirt(Serial serial)
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class ElvenDarkShirt : BaseShirt
|
||||
{
|
||||
public override Race RequiredRace { get { return Race.Elf; } }
|
||||
[Constructable]
|
||||
public ElvenDarkShirt() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenDarkShirt( int hue ) : base( 0x3176, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public ElvenDarkShirt( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
450
Scripts/Items/Clothing/Shoes.cs
Normal file
450
Scripts/Items/Clothing/Shoes.cs
Normal file
|
|
@ -0,0 +1,450 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseShoes : BaseClothing
|
||||
{
|
||||
public BaseShoes( int itemID ) : this( itemID, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseShoes( int itemID, int hue ) : base( itemID, Layer.Shoes, hue )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseShoes( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 2 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 2: break; // empty, resource removed
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_Resource = DefaultResource;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x2307, 0x2308 )]
|
||||
public class FurBoots : BaseShoes
|
||||
{
|
||||
[Constructable]
|
||||
public FurBoots() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FurBoots( int hue ) : base( 0x2307, hue )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public FurBoots( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x170b, 0x170c )]
|
||||
public class Boots : BaseShoes
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.RegularLeather; } }
|
||||
|
||||
[Constructable]
|
||||
public Boots() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Boots( int hue ) : base( 0x170B, hue )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public Boots( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable]
|
||||
public class ThighBoots : BaseShoes, IArcaneEquip
|
||||
{
|
||||
#region Arcane Impl
|
||||
private int m_MaxArcaneCharges, m_CurArcaneCharges;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int MaxArcaneCharges
|
||||
{
|
||||
get{ return m_MaxArcaneCharges; }
|
||||
set{ m_MaxArcaneCharges = value; InvalidateProperties(); Update(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int CurArcaneCharges
|
||||
{
|
||||
get{ return m_CurArcaneCharges; }
|
||||
set{ m_CurArcaneCharges = value; InvalidateProperties(); Update(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsArcane
|
||||
{
|
||||
get{ return ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); }
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
base.OnSingleClick( from );
|
||||
|
||||
if ( IsArcane )
|
||||
LabelTo( from, 1061837, String.Format( "{0}\t{1}", m_CurArcaneCharges, m_MaxArcaneCharges ) );
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if ( IsArcane )
|
||||
ItemID = 0x26AF;
|
||||
else if ( ItemID == 0x26AF )
|
||||
ItemID = 0x1711;
|
||||
|
||||
if ( IsArcane && CurArcaneCharges == 0 )
|
||||
Hue = 0;
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( IsArcane )
|
||||
list.Add( 1061837, "{0}\t{1}", m_CurArcaneCharges, m_MaxArcaneCharges ); // arcane charges: ~1_val~ / ~2_val~
|
||||
}
|
||||
|
||||
public void Flip()
|
||||
{
|
||||
if ( ItemID == 0x1711 )
|
||||
ItemID = 0x1712;
|
||||
else if ( ItemID == 0x1712 )
|
||||
ItemID = 0x1711;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.RegularLeather; } }
|
||||
|
||||
[Constructable]
|
||||
public ThighBoots() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ThighBoots( int hue ) : base( 0x1711, hue )
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
||||
public ThighBoots( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
if ( IsArcane )
|
||||
{
|
||||
writer.Write( true );
|
||||
writer.Write( (int) m_CurArcaneCharges );
|
||||
writer.Write( (int) m_MaxArcaneCharges );
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.Write( false );
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
if ( reader.ReadBool() )
|
||||
{
|
||||
m_CurArcaneCharges = reader.ReadInt();
|
||||
m_MaxArcaneCharges = reader.ReadInt();
|
||||
|
||||
if ( Hue == 2118 )
|
||||
Hue = ArcaneGem.DefaultArcaneHue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x170f, 0x1710 )]
|
||||
public class Shoes : BaseShoes
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.RegularLeather; } }
|
||||
|
||||
[Constructable]
|
||||
public Shoes() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Shoes( int hue ) : base( 0x170F, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public Shoes( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x170d, 0x170e )]
|
||||
public class Sandals : BaseShoes
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.RegularLeather; } }
|
||||
|
||||
[Constructable]
|
||||
public Sandals() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Sandals( int hue ) : base( 0x170D, hue )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Sandals( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
from.SendLocalizedMessage( sender.FailMessage );
|
||||
return false;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x2797, 0x27E2 )]
|
||||
public class NinjaTabi : BaseShoes
|
||||
{
|
||||
[Constructable]
|
||||
public NinjaTabi() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public NinjaTabi( int hue ) : base( 0x2797, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public NinjaTabi( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x2796, 0x27E1 )]
|
||||
public class SamuraiTabi : BaseShoes
|
||||
{
|
||||
[Constructable]
|
||||
public SamuraiTabi() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SamuraiTabi( int hue ) : base( 0x2796, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public SamuraiTabi( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x2796, 0x27E1 )]
|
||||
public class Waraji : BaseShoes
|
||||
{
|
||||
[Constructable]
|
||||
public Waraji() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Waraji( int hue ) : base( 0x2796, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public Waraji( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x2FC4, 0x317A )]
|
||||
public class ElvenBoots : BaseShoes
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.RegularLeather; } }
|
||||
|
||||
public override Race RequiredRace { get { return Race.Elf; } }
|
||||
|
||||
[Constructable]
|
||||
public ElvenBoots() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenBoots( int hue ) : base( 0x2FC4, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public ElvenBoots( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
133
Scripts/Items/Clothing/Waist.cs
Normal file
133
Scripts/Items/Clothing/Waist.cs
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
||||
public abstract class BaseWaist : BaseClothing
|
||||
{
|
||||
public BaseWaist( int itemID ) : this( itemID, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseWaist( int itemID, int hue ) : base( itemID, Layer.Waist, hue )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseWaist( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x153b, 0x153c )]
|
||||
public class HalfApron : BaseWaist
|
||||
{
|
||||
[Constructable]
|
||||
public HalfApron() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HalfApron( int hue ) : base( 0x153b, hue )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public HalfApron( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flipable( 0x27A0, 0x27EB )]
|
||||
public class Obi : BaseWaist
|
||||
{
|
||||
[Constructable]
|
||||
public Obi() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Obi( int hue ) : base( 0x27A0, hue )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Obi( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x2B68, 0x315F )]
|
||||
public class WoodlandBelt : BaseWaist
|
||||
{
|
||||
[Constructable]
|
||||
public WoodlandBelt() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public WoodlandBelt( int hue ) : base( 0x2B68, hue )
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
||||
public WoodlandBelt( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue