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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Scripts/Engines/Plants/PlantHue.cs b/Scripts/Engines/Plants/PlantHue.cs
index 8e90745b9..3ff18f619 100644
--- a/Scripts/Engines/Plants/PlantHue.cs
+++ b/Scripts/Engines/Plants/PlantHue.cs
@@ -7,11 +7,11 @@ namespace Server.Engines.Plants
[Flags]
public enum PlantHue
{
- Plain = 0x1 | Crossable,
+ Plain = 0x1 | Crossable | Reproduces,
- Red = 0x2 | Crossable,
- Blue = 0x4 | Crossable,
- Yellow = 0x8 | Crossable,
+ Red = 0x2 | Crossable | Reproduces,
+ Blue = 0x4 | Crossable | Reproduces,
+ Yellow = 0x8 | Crossable | Reproduces,
BrightRed = Red | Bright,
BrightBlue = Blue | Bright,
@@ -33,6 +33,7 @@ namespace Server.Engines.Plants
FireRed = 0x200,
None = 0,
+ Reproduces = 0x2000000,
Crossable = 0x4000000,
Bright = 0x8000000
}
@@ -87,6 +88,11 @@ namespace Server.Engines.Plants
}
}
+ public static bool CanReproduce( PlantHue plantHue )
+ {
+ return (plantHue & PlantHue.Reproduces) != PlantHue.None;
+ }
+
public static bool IsCrossable( PlantHue plantHue )
{
return (plantHue & PlantHue.Crossable) != PlantHue.None;
diff --git a/Scripts/Engines/Plants/PlantItem.cs b/Scripts/Engines/Plants/PlantItem.cs
index a7fbee955..c94e61c20 100644
--- a/Scripts/Engines/Plants/PlantItem.cs
+++ b/Scripts/Engines/Plants/PlantItem.cs
@@ -33,6 +33,12 @@ namespace Server.Engines.Plants
public class PlantItem : Item, ISecurable
{
+ /*
+ * Clients 7.0.12.0+ expect a container type in the plant label.
+ * To support older (and only older) clients, change this to false.
+ */
+ private static readonly bool ShowContainerType = true;
+
private PlantSystem m_PlantSystem;
private PlantStatus m_PlantStatus;
@@ -53,22 +59,18 @@ namespace Server.Engines.Plants
public override bool ForceShowProperties{ get{ return ObjectPropertyList.Enabled; } }
- public override int LabelNumber
+ public override void OnSingleClick( Mobile from )
{
- get
- {
- if ( m_PlantStatus >= PlantStatus.DeadTwigs )
- return base.LabelNumber;
- else if ( m_PlantStatus >= PlantStatus.DecorativePlant )
- return 1061924; // a decorative plant
- else if ( m_PlantStatus >= PlantStatus.FullGrownPlant )
- return PlantTypeInfo.GetInfo( m_PlantType ).Name;
- else
- return 1029913; // plant bowl
- }
+ if ( m_PlantStatus >= PlantStatus.DeadTwigs )
+ LabelTo( from, LabelNumber );
+ else if ( m_PlantStatus >= PlantStatus.DecorativePlant )
+ LabelTo( from, 1061924 ); // a decorative plant
+ else if ( m_PlantStatus >= PlantStatus.FullGrownPlant )
+ LabelTo( from, PlantTypeInfo.GetInfo( m_PlantType ).Name );
+ else
+ LabelTo( from, 1029913 ); // plant bowl
}
-
[CommandProperty( AccessLevel.GameMaster )]
public PlantStatus PlantStatus
{
@@ -176,6 +178,12 @@ namespace Server.Engines.Plants
get { return PlantHueInfo.IsCrossable( this.PlantHue ) && PlantTypeInfo.IsCrossable( this.PlantType ); }
}
+ [CommandProperty( AccessLevel.GameMaster )]
+ public bool Reproduces
+ {
+ get { return PlantHueInfo.CanReproduce( this.PlantHue ) && PlantTypeInfo.CanReproduce( this.PlantType ); }
+ }
+
private static ArrayList m_Instances = new ArrayList();
public static ArrayList Plants{ get{ return m_Instances; } }
@@ -219,6 +227,11 @@ namespace Server.Engines.Plants
return 1026951; // dirt
}
+ public int GetLocalizedContainerType()
+ {
+ return 1150435; // bowl
+ }
+
private void Update()
{
if ( m_PlantStatus >= PlantStatus.DeadTwigs )
@@ -251,103 +264,55 @@ namespace Server.Engines.Plants
{
base.AddNameProperty( list );
}
- else if ( m_PlantStatus >= PlantStatus.FullGrownPlant )
+ else if ( m_PlantStatus < PlantStatus.Seed )
{
- PlantHueInfo hueInfo = PlantHueInfo.GetInfo( m_PlantHue );
- PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo( m_PlantType );
+ string args;
- int title = PlantTypeInfo.GetBonsaiTitle( m_PlantType );
- if ( title == 0 ) // Not a bonsai
- title = hueInfo.Name;
-
- if ( m_PlantStatus < PlantStatus.DecorativePlant )
- {
- if ( m_PlantType == PlantType.SugarCanes )
- {
- string args = string.Format( "#{0}", m_PlantSystem.GetLocalizedHealth() );
- list.Add ( 1094702, args ); // ~1_HEALTH~ Sugar Canes
- }
- else
- {
-
- string args = string.Format( "#{0}\t#{1}\t#{2}", m_PlantSystem.GetLocalizedHealth(), title, typeInfo.Name );
-
- if ( typeInfo.ContainsPlant )
- {
- // a ~1_HEALTH~ [bright] ~2_COLOR~ ~3_NAME~
- list.Add( hueInfo.IsBright() ? 1061891 : 1061889, args );
- }
- else
- {
- // a ~1_HEALTH~ [bright] ~2_COLOR~ ~3_NAME~ plant
- list.Add( hueInfo.IsBright() ? 1061892 : 1061890, args );
- }
- }
- }
+ if ( ShowContainerType )
+ args = String.Format( "#{0}\t#{1}", GetLocalizedContainerType(), m_PlantSystem.GetLocalizedDirtStatus() );
else
- {
- if ( title == 1080528 ) // peculiar
- {
- if ( m_PlantHue != PlantHue.None )
- // a decorative [bright] ~1_COLOR~ ~2_TYPE~
- list.Add( hueInfo.IsBright() ? 1074267 : 1070973, string.Format( "#{0}\t{1}", hueInfo.Name, ( m_PlantType == PlantType.SugarCanes ) ? "Sugar Canes" : string.Format( "#{0}", typeInfo.Name ) ) );
- else if ( m_PlantType == PlantType.SugarCanes )
- // Decorative Sugar Canes
- list.Add( 1094703 );
- else
- // a decorative ~2_TYPE~
- list.Add( 1080539, string.Format( "#{0}\t#{1}", title, typeInfo.Name ) );
- }
- else
- {
- // a decorative [bright] ~1_COLOR~ ~2_TYPE~
- list.Add( hueInfo.IsBright() ? 1074267 : 1070973, string.Format( "#{0}\t#{1}", title, typeInfo.Name ) );
- }
- }
- }
- else if ( m_PlantStatus >= PlantStatus.Seed )
- {
- PlantHueInfo hueInfo = PlantHueInfo.GetInfo( m_PlantHue );
+ args = String.Format( "#{0}", m_PlantSystem.GetLocalizedDirtStatus() );
- int title = PlantTypeInfo.GetBonsaiTitle( m_PlantType );
- if ( title == 0 ) // Not a bonsai
- title = hueInfo.Name;
-
- string args = string.Format( "#{0}\t#{1}\t#{2}", m_PlantSystem.GetLocalizedDirtStatus(), m_PlantSystem.GetLocalizedHealth(), title );
-
- // 7.0.12.0 cliloc change
- args = String.Concat( "#1150435\t", args ); // TODO: Change to plant container type when implemented
-
- if ( m_ShowType )
- {
- PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo( m_PlantType );
- args += "\t#" + typeInfo.Name.ToString();
-
- if ( typeInfo.ContainsPlant && m_PlantStatus == PlantStatus.Plant )
- {
- // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~
- list.Add( hueInfo.IsBright() ? 1060832 : 1060831, args );
- }
- else
- {
- // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~ ~6_val~
- list.Add( hueInfo.IsBright() ? 1061887 : 1061888, args + "\t#" + GetLocalizedPlantStatus().ToString() );
- }
- }
- else
- {
- // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~
- list.Add( hueInfo.IsBright() ? 1060832 : 1060831, args + "\t#" + GetLocalizedPlantStatus().ToString() );
- }
+ list.Add( 1060830, args ); // a ~1_val~ of ~2_val~ dirt
}
else
{
- string args = "#" + m_PlantSystem.GetLocalizedDirtStatus();
+ PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo( m_PlantType );
+ PlantHueInfo hueInfo = PlantHueInfo.GetInfo( m_PlantHue );
- // 7.0.12.0 cliloc change
- args = String.Concat( "#1150435\t", args ); // TODO: Change to plant container type when implemented
+ if ( m_PlantStatus >= PlantStatus.DecorativePlant )
+ {
+ list.Add( typeInfo.GetPlantLabelDecorative( hueInfo ), String.Format( "#{0}\t#{1}", hueInfo.Name, typeInfo.Name ) );
+ }
+ else if ( m_PlantStatus >= PlantStatus.FullGrownPlant )
+ {
+ list.Add( typeInfo.GetPlantLabelFullGrown( hueInfo ), String.Format( "#{0}\t#{1}\t#{2}", m_PlantSystem.GetLocalizedHealth(), hueInfo.Name, typeInfo.Name ) );
+ }
+ else
+ {
+ string args;
- list.Add( 1060830, args ); // a ~1_val~ of ~2_val~ dirt
+ if ( ShowContainerType )
+ args = String.Format( "#{0}\t#{1}\t#{2}", GetLocalizedContainerType(), m_PlantSystem.GetLocalizedDirtStatus(), m_PlantSystem.GetLocalizedHealth() );
+ else
+ args = String.Format( "#{0}\t#{1}", m_PlantSystem.GetLocalizedDirtStatus(), m_PlantSystem.GetLocalizedHealth() );
+
+ if ( m_ShowType )
+ {
+ args += String.Format( "\t#{0}\t#{1}\t#{2}", hueInfo.Name, typeInfo.Name, GetLocalizedPlantStatus() );
+
+ if ( m_PlantStatus == PlantStatus.Plant )
+ list.Add( typeInfo.GetPlantLabelPlant( hueInfo ), args );
+ else
+ list.Add( typeInfo.GetPlantLabelSeed( hueInfo ), args );
+ }
+ else
+ {
+ args += String.Format( "\t#{0}\t#{1}", ( typeInfo.PlantCategory == PlantCategory.Default ) ? hueInfo.Name : (int)typeInfo.PlantCategory, GetLocalizedPlantStatus() );
+
+ list.Add( hueInfo.IsBright() ? 1060832 : 1060831, args ); // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~
+ }
+ }
}
}
@@ -361,9 +326,9 @@ namespace Server.Engines.Plants
{
if ( m_PlantStatus >= PlantStatus.DecorativePlant )
return;
-
- Point3D loc = this.GetWorldLocation();
-
+
+ Point3D loc = this.GetWorldLocation();
+
if ( !from.InLOS( loc ) || !from.InRange( loc, 2 ) )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3E9, 1019045 ); // I can't reach that.
@@ -571,7 +536,7 @@ namespace Server.Engines.Plants
{
base.Serialize( writer );
- writer.Write( (int) 1 ); // version
+ writer.Write( (int) 2 ); // version
writer.Write( (int) m_Level );
@@ -592,6 +557,7 @@ namespace Server.Engines.Plants
switch ( version )
{
+ case 2:
case 1:
{
m_Level = (SecureLevel)reader.ReadInt();
@@ -610,6 +576,9 @@ namespace Server.Engines.Plants
if ( m_PlantStatus < PlantStatus.DecorativePlant )
m_PlantSystem = new PlantSystem( this, reader );
+ if ( version < 2 && PlantHueInfo.IsCrossable( m_PlantHue ) )
+ m_PlantHue |= PlantHue.Reproduces;
+
break;
}
}
diff --git a/Scripts/Engines/Plants/PlantResources.cs b/Scripts/Engines/Plants/PlantResources.cs
index cc0b9a11b..cd4dbae06 100644
--- a/Scripts/Engines/Plants/PlantResources.cs
+++ b/Scripts/Engines/Plants/PlantResources.cs
@@ -15,7 +15,8 @@ namespace Server.Engines.Plants
new PlantResourceInfo( PlantType.Bulrushes, PlantHue.BrightOrange, typeof( OrangePetals ) ),
new PlantResourceInfo( PlantType.PampasGrass, PlantHue.BrightOrange, typeof( OrangePetals ) ),
new PlantResourceInfo( PlantType.SnakePlant, PlantHue.BrightGreen, typeof( GreenThorns ) ),
- new PlantResourceInfo( PlantType.BarrelCactus, PlantHue.BrightGreen, typeof( GreenThorns ) )
+ new PlantResourceInfo( PlantType.BarrelCactus, PlantHue.BrightGreen, typeof( GreenThorns ) ),
+ new PlantResourceInfo( PlantType.CocoaTree, PlantHue.Plain, typeof( CocoaPulp ) )
};
public static PlantResourceInfo GetInfo( PlantType plantType, PlantHue plantHue )
diff --git a/Scripts/Engines/Plants/PlantSystem.cs b/Scripts/Engines/Plants/PlantSystem.cs
index 27da22781..7c06adcb3 100644
--- a/Scripts/Engines/Plants/PlantSystem.cs
+++ b/Scripts/Engines/Plants/PlantSystem.cs
@@ -580,7 +580,7 @@ namespace Server.Engines.Plants
}
else
{
- if ( Pollinated && LeftSeeds > 0 && m_Plant.IsCrossable )
+ if ( Pollinated && LeftSeeds > 0 && m_Plant.Reproduces )
{
LeftSeeds--;
AvailableSeeds++;
@@ -643,7 +643,7 @@ namespace Server.Engines.Plants
public void Save( GenericWriter writer )
{
- writer.Write( (int) 1 ); // version
+ writer.Write( (int) 2 ); // version
writer.Write( (bool) m_FertileDirt );
@@ -707,6 +707,9 @@ namespace Server.Engines.Plants
m_AvailableResources = reader.ReadInt();
m_LeftResources = reader.ReadInt();
+
+ if ( version < 2 && PlantHueInfo.IsCrossable( m_SeedHue ) )
+ m_SeedHue |= PlantHue.Reproduces;
}
}
}
\ No newline at end of file
diff --git a/Scripts/Engines/Plants/PlantType.cs b/Scripts/Engines/Plants/PlantType.cs
index 62febda49..379921cc0 100644
--- a/Scripts/Engines/Plants/PlantType.cs
+++ b/Scripts/Engines/Plants/PlantType.cs
@@ -46,56 +46,70 @@ namespace Server.Engines.Plants
CypressStraight,
HedgeTall,
HopsSouth,
- SugarCanes
+ SugarCanes,
+ CocoaTree
+ }
+
+ public enum PlantCategory
+ {
+ Default,
+ Common = 1063335, //
+ Uncommon = 1063336, //
+ Rare = 1063337, // Bonsai
+ Exceptional = 1063341, //
+ Exotic = 1063342, //
+ Peculiar = 1080528,
+ Fragrant = 1080529
}
public class PlantTypeInfo
{
private static PlantTypeInfo[] m_Table = new PlantTypeInfo[]
- {
- new PlantTypeInfo( 0xC83, 0, 0, PlantType.CampionFlowers, false, true, true ),
- new PlantTypeInfo( 0xC86, 0, 0, PlantType.Poppies, false, true, true ),
- new PlantTypeInfo( 0xC88, 0, 10, PlantType.Snowdrops, false, true, true ),
- new PlantTypeInfo( 0xC94, -15, 0, PlantType.Bulrushes, false, true, true ),
- new PlantTypeInfo( 0xC8B, 0, 0, PlantType.Lilies, false, true, true ),
- new PlantTypeInfo( 0xCA5, -8, 0, PlantType.PampasGrass, false, true, true ),
- new PlantTypeInfo( 0xCA7, -10, 0, PlantType.Rushes, false, true, true ),
- new PlantTypeInfo( 0xC97, -20, 0, PlantType.ElephantEarPlant, true, false, true ),
- new PlantTypeInfo( 0xC9F, -20, 0, PlantType.Fern, false, false, true ),
- new PlantTypeInfo( 0xCA6, -16, -5, PlantType.PonytailPalm, false, false, true ),
- new PlantTypeInfo( 0xC9C, -5, -10, PlantType.SmallPalm, false, false, true ),
- new PlantTypeInfo( 0xD31, 0, -27, PlantType.CenturyPlant, true, false, true ),
- new PlantTypeInfo( 0xD04, 0, 10, PlantType.WaterPlant, true, false, true ),
- new PlantTypeInfo( 0xCA9, 0, 0, PlantType.SnakePlant, true, false, true ),
- new PlantTypeInfo( 0xD2C, 0, 10, PlantType.PricklyPearCactus, false, false, true ),
- new PlantTypeInfo( 0xD26, 0, 10, PlantType.BarrelCactus, false, false, true ),
- new PlantTypeInfo( 0xD27, 0, 10, PlantType.TribarrelCactus, false, false, true ),
- new PlantTypeInfo( 0x28DC, -5, 5, PlantType.CommonGreenBonsai, true, false, false ),
- new PlantTypeInfo( 0x28DF, -5, 5, PlantType.CommonPinkBonsai, true, false, false ),
- new PlantTypeInfo( 0x28DD, -5, 5, PlantType.UncommonGreenBonsai, true, false, false ),
- new PlantTypeInfo( 0x28E0, -5, 5, PlantType.UncommonPinkBonsai, true, false, false ),
- new PlantTypeInfo( 0x28DE, -5, 5, PlantType.RareGreenBonsai, true, false, false ),
- new PlantTypeInfo( 0x28E1, -5, 5, PlantType.RarePinkBonsai, true, false, false ),
- new PlantTypeInfo( 0x28E2, -5, 5, PlantType.ExceptionalBonsai, true, false, false ),
- new PlantTypeInfo( 0x28E3, -5, 5, PlantType.ExoticBonsai, true, false, false ),
- new PlantTypeInfo( 0x0D25, 0, 0, PlantType.Cactus, false, false, false ),
- new PlantTypeInfo( 0x1A9A, 5, 10, PlantType.FlaxFlowers, false, true, false ),
- new PlantTypeInfo( 0x0C84, 0, 0, PlantType.FoxgloveFlowers, false, true, false ),
- new PlantTypeInfo( 0x1A9F, 5, -25, PlantType.HopsEast, false, false, false ),
- new PlantTypeInfo( 0x0CC1, 0, 0, PlantType.OrfluerFlowers, false, true, false ),
- new PlantTypeInfo( 0x0CFE, -45, -30, PlantType.CypressTwisted, false, false, false ),
- new PlantTypeInfo( 0x0C8F, 0, 0, PlantType.HedgeShort, false, false, false ),
- new PlantTypeInfo( 0x0CC8, 0, 0, PlantType.JuniperBush, true, false, false ),
- new PlantTypeInfo( 0x0C8E, -20, 0, PlantType.SnowdropPatch, false, true, false ),
- new PlantTypeInfo( 0x0CB7, 0, 0, PlantType.Cattails, false, false, false ),
- new PlantTypeInfo( 0x0CBE, -20, 0, PlantType.PoppyPatch, false, true, false ),
- new PlantTypeInfo( 0x0CC9, 0, 0, PlantType.SpiderTree, false, false, false ),
- new PlantTypeInfo( 0x0DC1, -5, 15, PlantType.WaterLily, false, true, false ),
- new PlantTypeInfo( 0x0CFB, -45, -30, PlantType.CypressStraight, false, false, false ),
- new PlantTypeInfo( 0x0DB8, 0, -20, PlantType.HedgeTall, false, false, false ),
- new PlantTypeInfo( 0x1AA1, 10, -25, PlantType.HopsSouth, false, false, false ),
- new PlantTypeInfo( 0x246C, -25, -20, PlantType.SugarCanes, false, false, false )
- };
+ {
+ new PlantTypeInfo( 0xC83, 0, 0, PlantType.CampionFlowers, false, true, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xC86, 0, 0, PlantType.Poppies, false, true, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xC88, 0, 10, PlantType.Snowdrops, false, true, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xC94, -15, 0, PlantType.Bulrushes, false, true, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xC8B, 0, 0, PlantType.Lilies, false, true, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xCA5, -8, 0, PlantType.PampasGrass, false, true, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xCA7, -10, 0, PlantType.Rushes, false, true, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xC97, -20, 0, PlantType.ElephantEarPlant, true, false, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xC9F, -20, 0, PlantType.Fern, false, false, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xCA6, -16, -5, PlantType.PonytailPalm, false, false, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xC9C, -5, -10, PlantType.SmallPalm, false, false, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xD31, 0, -27, PlantType.CenturyPlant, true, false, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xD04, 0, 10, PlantType.WaterPlant, true, false, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xCA9, 0, 0, PlantType.SnakePlant, true, false, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xD2C, 0, 10, PlantType.PricklyPearCactus, false, false, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xD26, 0, 10, PlantType.BarrelCactus, false, false, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0xD27, 0, 10, PlantType.TribarrelCactus, false, false, true, true, PlantCategory.Default ),
+ new PlantTypeInfo( 0x28DC, -5, 5, PlantType.CommonGreenBonsai, true, false, false, false, PlantCategory.Common ),
+ new PlantTypeInfo( 0x28DF, -5, 5, PlantType.CommonPinkBonsai, true, false, false, false, PlantCategory.Common ),
+ new PlantTypeInfo( 0x28DD, -5, 5, PlantType.UncommonGreenBonsai, true, false, false, false, PlantCategory.Uncommon ),
+ new PlantTypeInfo( 0x28E0, -5, 5, PlantType.UncommonPinkBonsai, true, false, false, false, PlantCategory.Uncommon ),
+ new PlantTypeInfo( 0x28DE, -5, 5, PlantType.RareGreenBonsai, true, false, false, false, PlantCategory.Rare ),
+ new PlantTypeInfo( 0x28E1, -5, 5, PlantType.RarePinkBonsai, true, false, false, false, PlantCategory.Rare ),
+ new PlantTypeInfo( 0x28E2, -5, 5, PlantType.ExceptionalBonsai, true, false, false, false, PlantCategory.Exceptional ),
+ new PlantTypeInfo( 0x28E3, -5, 5, PlantType.ExoticBonsai, true, false, false, false, PlantCategory.Exotic ),
+ new PlantTypeInfo( 0x0D25, 0, 0, PlantType.Cactus, false, false, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x1A9A, 5, 10, PlantType.FlaxFlowers, false, true, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x0C84, 0, 0, PlantType.FoxgloveFlowers, false, true, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x1A9F, 5, -25, PlantType.HopsEast, false, false, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x0CC1, 0, 0, PlantType.OrfluerFlowers, false, true, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x0CFE, -45, -30, PlantType.CypressTwisted, false, false, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x0C8F, 0, 0, PlantType.HedgeShort, false, false, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x0CC8, 0, 0, PlantType.JuniperBush, true, false, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x0C8E, -20, 0, PlantType.SnowdropPatch, false, true, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x0CB7, 0, 0, PlantType.Cattails, false, false, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x0CBE, -20, 0, PlantType.PoppyPatch, false, true, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x0CC9, 0, 0, PlantType.SpiderTree, false, false, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x0DC1, -5, 15, PlantType.WaterLily, false, true, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x0CFB, -45, -30, PlantType.CypressStraight, false, false, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x0DB8, 0, -20, PlantType.HedgeTall, false, false, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x1AA1, 10, -25, PlantType.HopsSouth, false, false, false, false, PlantCategory.Peculiar ),
+ new PlantTypeInfo( 0x246C, -25, -20, PlantType.SugarCanes, false, false, false, false, PlantCategory.Peculiar, 1114898, 1114898, 1094702, 1094703, 1095221, 1113715 ),
+ new PlantTypeInfo( 0xC9E, -40, -30, PlantType.CocoaTree, false, false, false, true, PlantCategory.Fragrant, 1080536, 1080536, 1080534, 1080531, 1080533, 1113716 )
+ };
public static PlantTypeInfo GetInfo( PlantType plantType )
{
@@ -119,45 +133,49 @@ namespace Server.Engines.Plants
public static PlantType RandomPeculiarGroupOne()
{
- switch ( Utility.Random( 5 ) )
+ switch ( Utility.Random( 6 ) )
{
case 0: return PlantType.Cactus;
case 1: return PlantType.FlaxFlowers;
case 2: return PlantType.FoxgloveFlowers;
case 3: return PlantType.HopsEast;
+ case 4: return PlantType.CocoaTree;
default: return PlantType.OrfluerFlowers;
}
}
public static PlantType RandomPeculiarGroupTwo()
{
- switch ( Utility.Random( 4 ) )
+ switch ( Utility.Random( 5 ) )
{
- case 0: return PlantType.CypressTwisted;
+ case 0: return PlantType.CypressTwisted;
case 1: return PlantType.HedgeShort;
case 2: return PlantType.JuniperBush;
+ case 3: return PlantType.CocoaTree;
default: return PlantType.SnowdropPatch;
}
}
public static PlantType RandomPeculiarGroupThree()
{
- switch ( Utility.Random( 4 ) )
+ switch ( Utility.Random( 5 ) )
{
case 0: return PlantType.Cattails;
case 1: return PlantType.PoppyPatch;
case 2: return PlantType.SpiderTree;
+ case 3: return PlantType.CocoaTree;
default: return PlantType.WaterLily;
}
}
public static PlantType RandomPeculiarGroupFour()
{
- switch ( Utility.Random( 4 ) )
+ switch ( Utility.Random( 5 ) )
{
case 0: return PlantType.CypressStraight;
case 1: return PlantType.HedgeTall;
case 2: return PlantType.HopsSouth;
+ case 3: return PlantType.CocoaTree;
default: return PlantType.SugarCanes;
}
}
@@ -169,10 +187,10 @@ namespace Server.Engines.Plants
* chances_of_uncommon = chances_of_common * increaseRatio
* chances_of_rare = chances_of_uncommon * increaseRatio
* ...
- *
+ *
* If increaseRatio < 1 -> rare plants are actually rarer than the others
* If increaseRatio > 1 -> rare plants are actually more common than the others (it might be the case with certain monsters)
- *
+ *
* If a plant type (common, uncommon, ...) has 2 different colors, they have the same chances:
* chances_of_green_common = chances_of_pink_common = chances_of_common / 2
* ...
@@ -227,50 +245,63 @@ namespace Server.Engines.Plants
return (PlantType)( (firstIndex + secondIndex) / 2 );
}
- public static int GetBonsaiTitle( PlantType plantType )
+ public static bool CanReproduce( PlantType plantType )
{
- switch ( plantType )
- {
- case PlantType.Cactus:
- case PlantType.FlaxFlowers:
- case PlantType.FoxgloveFlowers:
- case PlantType.HopsEast:
- case PlantType.OrfluerFlowers:
- case PlantType.CypressTwisted:
- case PlantType.HedgeShort:
- case PlantType.JuniperBush:
- case PlantType.SnowdropPatch:
- case PlantType.Cattails:
- case PlantType.PoppyPatch:
- case PlantType.SpiderTree:
- case PlantType.WaterLily:
- case PlantType.CypressStraight:
- case PlantType.HedgeTall:
- case PlantType.HopsSouth:
- case PlantType.SugarCanes:
- return 1080528; // peculiar
+ return GetInfo( plantType ).Reproduces;
+ }
- case PlantType.CommonGreenBonsai:
- case PlantType.CommonPinkBonsai:
- return 1063335; // common
+ public int GetPlantLabelSeed( PlantHueInfo hueInfo )
+ {
+ if ( m_PlantLabelSeed != -1 )
+ return m_PlantLabelSeed;
- case PlantType.UncommonGreenBonsai:
- case PlantType.UncommonPinkBonsai:
- return 1063336; // uncommon
+ return hueInfo.IsBright() ? 1061887 : 1061888; // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~ ~6_val~
+ }
- case PlantType.RareGreenBonsai:
- case PlantType.RarePinkBonsai:
- return 1063337; // rare
+ public int GetPlantLabelPlant( PlantHueInfo hueInfo )
+ {
+ if ( m_PlantLabelPlant != -1 )
+ return m_PlantLabelPlant;
- case PlantType.ExceptionalBonsai:
- return 1063341; // exceptional
+ if ( m_ContainsPlant )
+ return hueInfo.IsBright() ? 1060832 : 1060831; // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~
+ else
+ return hueInfo.IsBright() ? 1061887 : 1061888; // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~ ~6_val~
+ }
- case PlantType.ExoticBonsai:
- return 1063342; // exotic
+ public int GetPlantLabelFullGrown( PlantHueInfo hueInfo )
+ {
+ if ( m_PlantLabelFullGrown != -1 )
+ return m_PlantLabelFullGrown;
- default:
- return 0;
- }
+ if ( m_ContainsPlant )
+ return hueInfo.IsBright() ? 1061891 : 1061889; // a ~1_HEALTH~ [bright] ~2_COLOR~ ~3_NAME~
+ else
+ return hueInfo.IsBright() ? 1061892 : 1061890; // a ~1_HEALTH~ [bright] ~2_COLOR~ ~3_NAME~ plant
+ }
+
+ public int GetPlantLabelDecorative( PlantHueInfo hueInfo )
+ {
+ if ( m_PlantLabelDecorative != -1 )
+ return m_PlantLabelDecorative;
+
+ return hueInfo.IsBright() ? 1074267 : 1070973; // a decorative [bright] ~1_COLOR~ ~2_TYPE~
+ }
+
+ public int GetSeedLabel( PlantHueInfo hueInfo )
+ {
+ if ( m_SeedLabel != -1 )
+ return m_SeedLabel;
+
+ return hueInfo.IsBright() ? 1061918 : 1061917; // [bright] ~1_COLOR~ ~2_TYPE~ seed
+ }
+
+ public int GetSeedLabelPlural( PlantHueInfo hueInfo )
+ {
+ if ( m_SeedLabelPlural != -1 )
+ return m_SeedLabelPlural;
+
+ return hueInfo.IsBright() ? 1113493 : 1113492; // ~1_amount~ [bright] ~2_color~ ~3_type~ seeds
}
private int m_ItemID;
@@ -280,17 +311,35 @@ namespace Server.Engines.Plants
private bool m_ContainsPlant;
private bool m_Flowery;
private bool m_Crossable;
+ private bool m_Reproduces;
+ private PlantCategory m_PlantCategory;
+
+ // Cliloc overrides
+ private int m_PlantLabelSeed;
+ private int m_PlantLabelPlant;
+ private int m_PlantLabelFullGrown;
+ private int m_PlantLabelDecorative;
+ private int m_SeedLabel;
+ private int m_SeedLabelPlural;
public int ItemID { get { return m_ItemID; } }
public int OffsetX { get { return m_OffsetX; } }
public int OffsetY { get { return m_OffsetY; } }
public PlantType PlantType { get { return m_PlantType; } }
- public int Name { get { return m_ItemID < 0x4000 ? 1020000 + m_ItemID : 1078872 + m_ItemID; } }
+ public PlantCategory PlantCategory { get { return m_PlantCategory; } }
+ public int Name { get { return ( m_ItemID < 0x4000 ) ? 1020000 + m_ItemID : 1078872 + m_ItemID; } }
+
public bool ContainsPlant { get { return m_ContainsPlant; } }
public bool Flowery { get { return m_Flowery; } }
public bool Crossable { get { return m_Crossable; } }
+ public bool Reproduces { get { return m_Reproduces; } }
- private PlantTypeInfo( int itemID, int offsetX, int offsetY, PlantType plantType, bool containsPlant, bool flowery, bool crossable )
+ private PlantTypeInfo( int itemID, int offsetX, int offsetY, PlantType plantType, bool containsPlant, bool flowery, bool crossable, bool reproduces, PlantCategory plantCategory )
+ : this( itemID, offsetX, offsetY, plantType, containsPlant, flowery, crossable, reproduces, plantCategory, -1, -1, -1, -1, -1, -1 )
+ {
+ }
+
+ private PlantTypeInfo( int itemID, int offsetX, int offsetY, PlantType plantType, bool containsPlant, bool flowery, bool crossable, bool reproduces, PlantCategory plantCategory, int plantLabelSeed, int plantLabelPlant, int plantLabelFullGrown, int plantLabelDecorative, int seedLabel, int seedLabelPlural )
{
m_ItemID = itemID;
m_OffsetX = offsetX;
@@ -299,6 +348,14 @@ namespace Server.Engines.Plants
m_ContainsPlant = containsPlant;
m_Flowery = flowery;
m_Crossable = crossable;
+ m_Reproduces = reproduces;
+ m_PlantCategory = plantCategory;
+ m_PlantLabelSeed = plantLabelSeed;
+ m_PlantLabelPlant = plantLabelPlant;
+ m_PlantLabelFullGrown = plantLabelFullGrown;
+ m_PlantLabelDecorative = plantLabelDecorative;
+ m_SeedLabel = seedLabel;
+ m_SeedLabelPlural = seedLabelPlural;
}
}
}
\ No newline at end of file
diff --git a/Scripts/Engines/Plants/ReproductionGump.cs b/Scripts/Engines/Plants/ReproductionGump.cs
index 9672532c4..a0662c825 100644
--- a/Scripts/Engines/Plants/ReproductionGump.cs
+++ b/Scripts/Engines/Plants/ReproductionGump.cs
@@ -101,7 +101,7 @@ namespace Server.Engines.Plants
PlantSystem system = m_Plant.PlantSystem;
int totalSeeds = system.AvailableSeeds + system.LeftSeeds;
- if ( !m_Plant.IsCrossable || totalSeeds == 0 )
+ if ( !m_Plant.Reproduces || totalSeeds == 0 )
{
AddLabel( x + 5, y, 0x21, "X" );
}
@@ -238,7 +238,7 @@ namespace Server.Engines.Plants
{
PlantSystem system = m_Plant.PlantSystem;
- if ( !m_Plant.IsCrossable )
+ if ( !m_Plant.Reproduces )
{
m_Plant.LabelTo( from, 1053060 ); // Mutated plants do not produce seeds!
}
diff --git a/Scripts/Engines/Plants/Seed.cs b/Scripts/Engines/Plants/Seed.cs
index f05e3615e..0b30e8d41 100644
--- a/Scripts/Engines/Plants/Seed.cs
+++ b/Scripts/Engines/Plants/Seed.cs
@@ -94,44 +94,42 @@ namespace Server.Engines.Plants
private int GetLabel( out string args )
{
+ PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo( m_PlantType );
PlantHueInfo hueInfo = PlantHueInfo.GetInfo( m_PlantHue );
- int title = PlantTypeInfo.GetBonsaiTitle( m_PlantType );
- if ( title == 0 ) // Not a bonsai
- title = hueInfo.Name;
+ int title;
- int label;
+ if ( m_ShowType || typeInfo.PlantCategory == PlantCategory.Default )
+ title = hueInfo.Name;
+ else
+ title = (int)typeInfo.PlantCategory;
if ( Amount == 1 )
- label = m_ShowType ? 1061917 : 1060838; // ~1_COLOR~ ~2_TYPE~ seed : ~1_val~ seed
+ {
+ if ( m_ShowType )
+ {
+ args = String.Format( "#{0}\t#{1}", title, typeInfo.Name );
+ return typeInfo.GetSeedLabel( hueInfo );
+ }
+ else
+ {
+ args = String.Format( "#{0}", title );
+ return hueInfo.IsBright() ? 1060839 : 1060838; // [bright] ~1_val~ seed
+ }
+ }
else
- label = m_ShowType ? 1113492 : 1113490; // ~1_amount~ ~2_color~ ~3_type~ seeds : ~1_amount~ ~2_val~ seeds
-
- if ( hueInfo.IsBright() )
- ++label;
-
- StringBuilder ab = new StringBuilder();
-
- if ( Amount != 1 )
{
- ab.Append( Amount );
- ab.Append( '\t' );
+ if ( m_ShowType )
+ {
+ args = String.Format( "{0}\t#{1}\t#{2}", Amount, title, typeInfo.Name );
+ return typeInfo.GetSeedLabelPlural( hueInfo );
+ }
+ else
+ {
+ args = String.Format( "{0}\t#{1}", Amount, title );
+ return hueInfo.IsBright() ? 1113491 : 1113490; // ~1_amount~ [bright] ~2_val~ seeds
+ }
}
-
- ab.Append( '#' );
- ab.Append( title );
-
- if ( m_ShowType )
- {
- PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo( m_PlantType );
-
- ab.Append( "\t#" );
- ab.Append( typeInfo.Name );
- }
-
- args = ab.ToString();
-
- return label;
}
public override void AddNameProperty( ObjectPropertyList list )
@@ -225,7 +223,7 @@ namespace Server.Engines.Plants
{
base.Serialize( writer );
- writer.Write( (int) 1 ); // version
+ writer.Write( (int) 2 ); // version
writer.Write( (int) m_PlantType );
writer.Write( (int) m_PlantHue );
@@ -247,6 +245,9 @@ namespace Server.Engines.Plants
if ( version < 1 )
Stackable = Core.SA;
+
+ if ( version < 2 && PlantHueInfo.IsCrossable( m_PlantHue ) )
+ m_PlantHue |= PlantHue.Reproduces;
}
}
}
\ No newline at end of file
diff --git a/Scripts/Gumps/Guilds/New Guild System/GuildRosterGump.cs b/Scripts/Gumps/Guilds/New Guild System/GuildRosterGump.cs
index 3ce7e6fdb..738b83603 100644
--- a/Scripts/Gumps/Guilds/New Guild System/GuildRosterGump.cs
+++ b/Scripts/Gumps/Guilds/New Guild System/GuildRosterGump.cs
@@ -57,9 +57,9 @@ namespace Server.Guilds
if ( aState == null && bState == null )
return x.LastOnline.CompareTo( y.LastOnline );
else if ( aState == null )
- return 1;
- else if ( bState == null )
return -1;
+ else if ( bState == null )
+ return 1;
else
return 0;
}
@@ -117,7 +117,7 @@ namespace Server.Guilds
new InfoField( 1062953, 150, GuildRosterGump.TitleComparer.Instance ) //Guild Title
};
- public GuildRosterGump( PlayerMobile pm, Guild g ) : this( pm, g, GuildRosterGump.LastOnComparer.Instance, true, "", 0 )
+ public GuildRosterGump( PlayerMobile pm, Guild g ) : this( pm, g, GuildRosterGump.LastOnComparer.Instance, false, "", 0 )
{
}
diff --git a/Scripts/Multis/Boats/BaseBoat.cs b/Scripts/Multis/Boats/BaseBoat.cs
index db2ba79a1..c0a2691cf 100644
--- a/Scripts/Multis/Boats/BaseBoat.cs
+++ b/Scripts/Multis/Boats/BaseBoat.cs
@@ -1743,6 +1743,11 @@ namespace Server.Multis
#region High Seas
+ public override bool AllowsRelativeDrop
+ {
+ get { return true; }
+ }
+
/*
* OSI sends the 0xF7 packet instead, holding 0xF3 packets
* for every entity on the boat. Though, the regular 0xF3
diff --git a/Server/Items/BaseMulti.cs b/Server/Items/BaseMulti.cs
index 650796f77..3b9f5543e 100644
--- a/Server/Items/BaseMulti.cs
+++ b/Server/Items/BaseMulti.cs
@@ -88,6 +88,11 @@ namespace Server.Items
}
}
+ public virtual bool AllowsRelativeDrop
+ {
+ get { return false; }
+ }
+
public override int GetMaxUpdateRange()
{
return 22;
diff --git a/Server/Main.cs b/Server/Main.cs
index bcd0bec18..9692a9623 100644
--- a/Server/Main.cs
+++ b/Server/Main.cs
@@ -509,10 +509,8 @@ namespace Server
long sample = 0;
- while( !m_Closing )
+ while( m_Signal.WaitOne() )
{
- m_Signal.WaitOne( 10, false );
-
Mobile.ProcessDeltaQueue();
Item.ProcessDeltaQueue();
diff --git a/Server/Network/PacketHandlers.cs b/Server/Network/PacketHandlers.cs
index bb0c99cde..ab3a35993 100644
--- a/Server/Network/PacketHandlers.cs
+++ b/Server/Network/PacketHandlers.cs
@@ -1012,11 +1012,28 @@ namespace Server.Network
Mobile from = state.Mobile;
if ( dest.IsMobile )
+ {
from.Drop( World.FindMobile( dest ), loc );
+ }
else if ( dest.IsItem )
- from.Drop( World.FindItem( dest ), loc );
+ {
+ Item item = World.FindItem( dest );
+
+ if ( item is BaseMulti && ((BaseMulti)item).AllowsRelativeDrop )
+ {
+ loc.m_X += item.X;
+ loc.m_Y += item.Y;
+ from.Drop( loc );
+ }
+ else
+ {
+ from.Drop( item, loc );
+ }
+ }
else
+ {
from.Drop( loc );
+ }
}
public static void DropReq6017( NetState state, PacketReader pvSrc )
@@ -1033,11 +1050,28 @@ namespace Server.Network
Mobile from = state.Mobile;
if ( dest.IsMobile )
+ {
from.Drop( World.FindMobile( dest ), loc );
+ }
else if ( dest.IsItem )
- from.Drop( World.FindItem( dest ), loc );
+ {
+ Item item = World.FindItem( dest );
+
+ if ( item is BaseMulti && ((BaseMulti)item).AllowsRelativeDrop )
+ {
+ loc.m_X += item.X;
+ loc.m_Y += item.Y;
+ from.Drop( loc );
+ }
+ else
+ {
+ from.Drop( item, loc );
+ }
+ }
else
+ {
from.Drop( loc );
+ }
}
public static void ConfigurationFile( NetState state, PacketReader pvSrc )
diff --git a/Server/Network/Packets.cs b/Server/Network/Packets.cs
index 195e6a3b1..2e7c1d837 100644
--- a/Server/Network/Packets.cs
+++ b/Server/Network/Packets.cs
@@ -4389,6 +4389,8 @@ namespace Server.Network
public void OnSend()
{
+ Core.Set();
+
if ( (m_State & (State.Acquired | State.Static)) == 0 )
Free();
}