1
0

Make sure m_StackSizeToBeUsedInRepair Always has a valid value

This commit is contained in:
worktycho 2014-06-04 11:12:06 +01:00
parent 85be62a8cd
commit 98c575ebc2

View File

@ -625,7 +625,8 @@ void cSlotAreaCrafting::HandleCraftItem(const cItem & a_Result, cPlayer & a_Play
cSlotAreaAnvil::cSlotAreaAnvil(cAnvilWindow & a_ParentWindow) : cSlotAreaAnvil::cSlotAreaAnvil(cAnvilWindow & a_ParentWindow) :
cSlotAreaTemporary(3, a_ParentWindow), cSlotAreaTemporary(3, a_ParentWindow),
m_MaximumCost(0) m_MaximumCost(0),
m_StackSizeToBeUsedInRepair(0);
{ {
} }
@ -796,6 +797,7 @@ void cSlotAreaAnvil::OnTakeResult(cPlayer & a_Player)
{ {
cItem NewSecondItem(*Item); cItem NewSecondItem(*Item);
NewSecondItem.m_ItemCount -= m_StackSizeToBeUsedInRepair; NewSecondItem.m_ItemCount -= m_StackSizeToBeUsedInRepair;
m_StackSizeToBeUsedInRepair = 0;
SetSlot(1, a_Player, NewSecondItem); SetSlot(1, a_Player, NewSecondItem);
} }
else else