1
0

Change m_RepairCost to int.

This commit is contained in:
Howaner
2014-05-07 20:43:37 +02:00
parent e86bf64867
commit fbb6404cc8
6 changed files with 10 additions and 16 deletions

View File

@@ -866,7 +866,7 @@ void cSlotAreaAnvil::UpdateResult(cPlayer & a_Player)
m_MaximumCost = 0;
m_StackSizeToBeUsedInRepair = 0;
UInt16 RepairCost = Input.m_RepairCost;
int RepairCost = Input.m_RepairCost;
int NeedExp = 0;
bool IsEnchantBook = false;
if (!SecondInput.IsEmpty())
@@ -982,15 +982,9 @@ void cSlotAreaAnvil::UpdateResult(cPlayer & a_Player)
RepairCost = std::max(Input.m_RepairCost, SecondInput.m_RepairCost);
if (!Input.m_CustomName.empty())
{
if (RepairCost < 9)
{
RepairCost = 0;
}
else
{
RepairCost -= 9;
}
RepairCost -= 9;
}
RepairCost = std::max(RepairCost, 0);
RepairCost += 2;
Input.m_RepairCost = RepairCost;
}