Change m_RepairCost to int.
This commit is contained in:
@@ -108,7 +108,7 @@ void cNBTChunkSerializer::AddItem(const cItem & a_Item, int a_Slot, const AStrin
|
||||
m_Writer.BeginCompound("tag");
|
||||
if (a_Item.m_RepairCost > 0)
|
||||
{
|
||||
m_Writer.AddInt("RepairCost", (Int32)a_Item.m_RepairCost);
|
||||
m_Writer.AddInt("RepairCost", a_Item.m_RepairCost);
|
||||
}
|
||||
|
||||
if ((a_Item.m_CustomName != "") || (a_Item.m_Lore != ""))
|
||||
|
||||
@@ -668,7 +668,7 @@ bool cWSSAnvil::LoadItemFromNBT(cItem & a_Item, const cParsedNBT & a_NBT, int a_
|
||||
int RepairCost = a_NBT.FindChildByName(TagTag, "RepairCost");
|
||||
if ((RepairCost > 0) && (a_NBT.GetType(RepairCost) == TAG_Int))
|
||||
{
|
||||
a_Item.m_RepairCost = (UInt16)a_NBT.GetInt(RepairCost);
|
||||
a_Item.m_RepairCost = a_NBT.GetInt(RepairCost);
|
||||
}
|
||||
|
||||
// Load display name:
|
||||
|
||||
Reference in New Issue
Block a user