1
0

Recipes match zero DamageValue strictly.

To match any DamageValue for the ingredient, an explicit "-1" as the DamageValue must be specified.
Fixes #1859.
This commit is contained in:
Mattes D
2015-04-16 21:33:42 +02:00
parent ffe7dae4fc
commit 0b3fd73f90
2 changed files with 58 additions and 55 deletions

View File

@@ -673,10 +673,10 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::MatchRecipe(const cItem * a_Crafti
if (
(itrS->x >= a_GridWidth) ||
(itrS->y >= a_GridHeight) ||
(Item.m_ItemType != a_CraftingGrid[GridID].m_ItemType) || // same item type?
(Item.m_ItemType != a_CraftingGrid[GridID].m_ItemType) || // same item type?
(Item.m_ItemCount > a_CraftingGrid[GridID].m_ItemCount) || // not enough items
(
(Item.m_ItemDamage > 0) && // should compare damage values?
(Item.m_ItemDamage >= 0) && // should compare damage values?
(Item.m_ItemDamage != a_CraftingGrid[GridID].m_ItemDamage)
)
)