Fixes bad expressions, bad bool checks in loops, a few null pointer exceptions, and optimizes constructors.
This commit is contained in:
parent
8da55d6043
commit
f93c3b992e
62 changed files with 318 additions and 634 deletions
|
|
@ -152,10 +152,10 @@ namespace Server.Engines.Plants
|
|||
if (firstPrimary && secondPrimary)
|
||||
return notBrightFirst | notBrightSecond;
|
||||
|
||||
if (firstPrimary && !secondPrimary)
|
||||
if (firstPrimary)
|
||||
return notBrightFirst;
|
||||
|
||||
if (!firstPrimary && secondPrimary)
|
||||
if (secondPrimary)
|
||||
return notBrightSecond;
|
||||
|
||||
return notBrightFirst & notBrightSecond;
|
||||
|
|
|
|||
|
|
@ -125,15 +125,8 @@ namespace Server.Engines.Plants
|
|||
private int m_SeedLabelPlural;
|
||||
|
||||
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)
|
||||
bool crossable, bool reproduces, PlantCategory plantCategory, int plantLabelSeed = -1, int plantLabelPlant = -1,
|
||||
int plantLabelFullGrown = -1, int plantLabelDecorative = -1, int seedLabel = -1, int seedLabelPlural = -1)
|
||||
{
|
||||
ItemID = itemID;
|
||||
OffsetX = offsetX;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue