1
0

Fixed a bug in crafting recipes - would consume multiple items of asterisked ingredients (FS #205)

git-svn-id: http://mc-server.googlecode.com/svn/trunk@593 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-06-09 18:52:30 +00:00
parent 6bf5fa0d88
commit 429ccb59b5

View File

@ -457,7 +457,9 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::MatchRecipe(const cItem * a_Crafti
EndY = itrS->y;
}
bool Found = false;
for (int x = StartX; x <= EndX; x++) for (int y = StartY; y <= EndY; y++)
for (int x = StartX; x <= EndX; x++)
{
for (int y = StartY; y <= EndY; y++)
{
if (HasMatched[x][y])
{
@ -480,7 +482,12 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::MatchRecipe(const cItem * a_Crafti
MatchedSlots.back().y = y;
break;
}
} // for y, for x - "anywhere"
} // for y
if (Found)
{
break;
}
} // for x
if (!Found)
{
return NULL;