1
0

Fixed type issues in CraftingRecipe.cpp

This commit is contained in:
Tycho 2014-08-13 12:14:55 +01:00
parent 8f7b9acb48
commit c3c3d3a72d
2 changed files with 5 additions and 5 deletions

View File

@ -83,7 +83,7 @@ cItem & cCraftingGrid::GetItem(int x, int y) const
void cCraftingGrid::SetItem(int x, int y, ENUM_ITEM_ID a_ItemType, int a_ItemCount, short a_ItemHealth) void cCraftingGrid::SetItem(int x, int y, ENUM_ITEM_ID a_ItemType, char a_ItemCount, short a_ItemHealth)
{ {
// Accessible through scripting, must verify parameters: // Accessible through scripting, must verify parameters:
if ((x < 0) || (x >= m_Width) || (y < 0) || (y >= m_Height)) if ((x < 0) || (x >= m_Width) || (y < 0) || (y >= m_Height))
@ -228,7 +228,7 @@ void cCraftingRecipe::Clear(void)
void cCraftingRecipe::SetResult(ENUM_ITEM_ID a_ItemType, int a_ItemCount, short a_ItemHealth) void cCraftingRecipe::SetResult(ENUM_ITEM_ID a_ItemType, char a_ItemCount, short a_ItemHealth)
{ {
m_Result = cItem(a_ItemType, a_ItemCount, a_ItemHealth); m_Result = cItem(a_ItemType, a_ItemCount, a_ItemHealth);
} }

View File

@ -33,7 +33,7 @@ public:
int GetWidth (void) const {return m_Width; } int GetWidth (void) const {return m_Width; }
int GetHeight(void) const {return m_Height; } int GetHeight(void) const {return m_Height; }
cItem & GetItem (int x, int y) const; cItem & GetItem (int x, int y) const;
void SetItem (int x, int y, ENUM_ITEM_ID a_ItemType, int a_ItemCount, short a_ItemHealth); void SetItem (int x, int y, ENUM_ITEM_ID a_ItemType, char a_ItemCount, short a_ItemHealth);
void SetItem (int x, int y, const cItem & a_Item); void SetItem (int x, int y, const cItem & a_Item);
void Clear (void); void Clear (void);
@ -72,13 +72,13 @@ public:
int GetIngredientsHeight(void) const {return m_Ingredients.GetHeight(); } int GetIngredientsHeight(void) const {return m_Ingredients.GetHeight(); }
cItem & GetIngredient (int x, int y) const {return m_Ingredients.GetItem(x, y); } cItem & GetIngredient (int x, int y) const {return m_Ingredients.GetItem(x, y); }
const cItem & GetResult (void) const {return m_Result; } const cItem & GetResult (void) const {return m_Result; }
void SetResult (ENUM_ITEM_ID a_ItemType, int a_ItemCount, short a_ItemHealth); void SetResult (ENUM_ITEM_ID a_ItemType, char a_ItemCount, short a_ItemHealth);
void SetResult (const cItem & a_Item) void SetResult (const cItem & a_Item)
{ {
m_Result = a_Item; m_Result = a_Item;
} }
void SetIngredient (int x, int y, ENUM_ITEM_ID a_ItemType, int a_ItemCount, short a_ItemHealth) void SetIngredient (int x, int y, ENUM_ITEM_ID a_ItemType, char a_ItemCount, short a_ItemHealth)
{ {
m_Ingredients.SetItem(x, y, a_ItemType, a_ItemCount, a_ItemHealth); m_Ingredients.SetItem(x, y, a_ItemType, a_ItemCount, a_ItemHealth);
} }