This commit is contained in:
parent
4ee6ca5951
commit
06e5c8b732
70 changed files with 2798 additions and 286 deletions
|
|
@ -129,7 +129,11 @@ namespace Server.Engines.Plants
|
|||
PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo( m_Plant.PlantType );
|
||||
PlantHueInfo hueInfo = PlantHueInfo.GetInfo( m_Plant.PlantHue );
|
||||
|
||||
AddItem( 130 + typeInfo.OffsetX, 96 + typeInfo.OffsetY, typeInfo.ItemID, hueInfo.Hue );
|
||||
// The large images for these trees trigger a client crash, so use a smaller, generic tree.
|
||||
if ( m_Plant.PlantType == PlantType.CypressTwisted || m_Plant.PlantType == PlantType.CypressStraight )
|
||||
AddItem( 130 + typeInfo.OffsetX, 96 + typeInfo.OffsetY, 0x0CCA, hueInfo.Hue );
|
||||
else
|
||||
AddItem( 130 + typeInfo.OffsetX, 96 + typeInfo.OffsetY, typeInfo.ItemID, hueInfo.Hue );
|
||||
}
|
||||
|
||||
if ( status != PlantStatus.BowlOfDirt )
|
||||
|
|
|
|||
|
|
@ -259,23 +259,38 @@ namespace Server.Engines.Plants
|
|||
|
||||
if ( m_PlantStatus < PlantStatus.DecorativePlant )
|
||||
{
|
||||
string args = string.Format( "#{0}\t#{1}\t#{2}", m_PlantSystem.GetLocalizedHealth(), title, typeInfo.Name );
|
||||
|
||||
if ( typeInfo.ContainsPlant )
|
||||
if ( m_PlantType == PlantType.SugarCanes )
|
||||
{
|
||||
// a ~1_HEALTH~ [bright] ~2_COLOR~ ~3_NAME~
|
||||
list.Add( hueInfo.IsBright() ? 1061891 : 1061889, args );
|
||||
string args = string.Format( "#{0}", m_PlantSystem.GetLocalizedHealth() );
|
||||
list.Add ( 1094702, args );
|
||||
}
|
||||
else
|
||||
{
|
||||
// a ~1_HEALTH~ [bright] ~2_COLOR~ ~3_NAME~ plant
|
||||
list.Add( hueInfo.IsBright() ? 1061892 : 1061890, args );
|
||||
|
||||
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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// a decorative ~1_COLOR~ ~2_TYPE~ plant
|
||||
list.Add( hueInfo.IsBright() ? 1074267 : 1070973, string.Format( "#{0}\t#{1}", title, typeInfo.Name ) );
|
||||
if ( m_PlantType == PlantType.SugarCanes )
|
||||
list.Add ( 1094703 );
|
||||
else if ( title == 1080528 )
|
||||
// a decorative ~2_TYPE~
|
||||
list.Add( 1080539, string.Format( "#{0}\t#{1}", title, typeInfo.Name ) );
|
||||
else
|
||||
// a decorative ~1_COLOR~ ~2_TYPE~ plant
|
||||
list.Add( hueInfo.IsBright() ? 1074267 : 1070973, string.Format( "#{0}\t#{1}", title, typeInfo.Name ) );
|
||||
}
|
||||
}
|
||||
else if ( m_PlantStatus >= PlantStatus.Seed )
|
||||
|
|
|
|||
|
|
@ -29,7 +29,24 @@ namespace Server.Engines.Plants
|
|||
RareGreenBonsai,
|
||||
RarePinkBonsai,
|
||||
ExceptionalBonsai,
|
||||
ExoticBonsai
|
||||
ExoticBonsai,
|
||||
Cactus,
|
||||
FlaxFlowers,
|
||||
FoxgloveFlowers,
|
||||
HopsEast,
|
||||
OrfluerFlowers,
|
||||
CypressTwisted,
|
||||
HedgeShort,
|
||||
JuniperBush,
|
||||
SnowdropPatch,
|
||||
Cattails,
|
||||
PoppyPatch,
|
||||
SpiderTree,
|
||||
WaterLily,
|
||||
CypressStraight,
|
||||
HedgeTall,
|
||||
HopsSouth,
|
||||
SugarCanes
|
||||
}
|
||||
|
||||
public class PlantTypeInfo
|
||||
|
|
@ -60,7 +77,24 @@ namespace Server.Engines.Plants
|
|||
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( 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 )
|
||||
};
|
||||
|
||||
public static PlantTypeInfo GetInfo( PlantType plantType )
|
||||
|
|
@ -83,6 +117,51 @@ namespace Server.Engines.Plants
|
|||
}
|
||||
}
|
||||
|
||||
public static PlantType RandomPeculiarGroupOne()
|
||||
{
|
||||
switch ( Utility.Random( 5 ) )
|
||||
{
|
||||
case 0: return PlantType.Cactus;
|
||||
case 1: return PlantType.FlaxFlowers;
|
||||
case 2: return PlantType.FoxgloveFlowers;
|
||||
case 3: return PlantType.HopsEast;
|
||||
default: return PlantType.OrfluerFlowers;
|
||||
}
|
||||
}
|
||||
|
||||
public static PlantType RandomPeculiarGroupTwo()
|
||||
{
|
||||
switch ( Utility.Random( 4 ) )
|
||||
{
|
||||
case 0: return PlantType.CypressTwisted;
|
||||
case 1: return PlantType.HedgeShort;
|
||||
case 2: return PlantType.JuniperBush;
|
||||
default: return PlantType.SnowdropPatch;
|
||||
}
|
||||
}
|
||||
|
||||
public static PlantType RandomPeculiarGroupThree()
|
||||
{
|
||||
switch ( Utility.Random( 4 ) )
|
||||
{
|
||||
case 0: return PlantType.Cattails;
|
||||
case 1: return PlantType.PoppyPatch;
|
||||
case 2: return PlantType.SpiderTree;
|
||||
default: return PlantType.WaterLily;
|
||||
}
|
||||
}
|
||||
|
||||
public static PlantType RandomPeculiarGroupFour()
|
||||
{
|
||||
switch ( Utility.Random( 4 ) )
|
||||
{
|
||||
case 0: return PlantType.CypressStraight;
|
||||
case 1: return PlantType.HedgeTall;
|
||||
case 2: return PlantType.HopsSouth;
|
||||
default: return PlantType.SugarCanes;
|
||||
}
|
||||
}
|
||||
|
||||
public static PlantType RandomBonsai( double increaseRatio )
|
||||
{
|
||||
/* Chances of each plant type are equal to the chances of the previous plant type * increaseRatio:
|
||||
|
|
@ -152,6 +231,25 @@ namespace Server.Engines.Plants
|
|||
{
|
||||
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
|
||||
|
||||
case PlantType.CommonGreenBonsai:
|
||||
case PlantType.CommonPinkBonsai:
|
||||
return 1063335; // common
|
||||
|
|
|
|||
|
|
@ -56,6 +56,17 @@ namespace Server.Engines.Plants
|
|||
return new Seed( PlantTypeInfo.RandomBonsai( increaseRatio ), PlantHue.Plain, false );
|
||||
}
|
||||
|
||||
public static Seed RandomPeculiarSeed( int group )
|
||||
{
|
||||
switch ( group )
|
||||
{
|
||||
case 1: return new Seed ( PlantTypeInfo.RandomPeculiarGroupOne(), PlantHue.Plain, false );
|
||||
case 2: return new Seed ( PlantTypeInfo.RandomPeculiarGroupTwo(), PlantHue.Plain, false );
|
||||
case 3: return new Seed ( PlantTypeInfo.RandomPeculiarGroupThree(), PlantHue.Plain, false );
|
||||
default: return new Seed ( PlantTypeInfo.RandomPeculiarGroupFour(), PlantHue.Plain, false );
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Seed() : this( PlantTypeInfo.RandomFirstGeneration(), PlantHueInfo.RandomFirstGeneration(), false )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue