summaryrefslogtreecommitdiffstats
path: root/src/UI/SlotArea.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-10-02 15:22:17 +0200
committerpeterbell10 <peterbell10@live.co.uk>2020-10-03 17:54:14 +0200
commit21068011c6d8a4794eec86794d6b9612a265f03a (patch)
treef8c6bf1d8760a02945c0622ff2d237ff3b737030 /src/UI/SlotArea.cpp
parentFix instant mining of blocks not being recognised, tweak anti-cheat (#4938) (diff)
downloadcuberite-21068011c6d8a4794eec86794d6b9612a265f03a.tar
cuberite-21068011c6d8a4794eec86794d6b9612a265f03a.tar.gz
cuberite-21068011c6d8a4794eec86794d6b9612a265f03a.tar.bz2
cuberite-21068011c6d8a4794eec86794d6b9612a265f03a.tar.lz
cuberite-21068011c6d8a4794eec86794d6b9612a265f03a.tar.xz
cuberite-21068011c6d8a4794eec86794d6b9612a265f03a.tar.zst
cuberite-21068011c6d8a4794eec86794d6b9612a265f03a.zip
Diffstat (limited to '')
-rw-r--r--src/UI/SlotArea.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp
index bb597b2c9..53d406e65 100644
--- a/src/UI/SlotArea.cpp
+++ b/src/UI/SlotArea.cpp
@@ -1059,7 +1059,7 @@ void cSlotAreaAnvil::OnTakeResult(cPlayer & a_Player)
{
SetSlot(1, a_Player, cItem());
}
- m_ParentWindow.SetProperty(0, static_cast<short>(m_MaximumCost), a_Player);
+ m_ParentWindow.SetProperty(0, static_cast<short>(m_MaximumCost));
m_MaximumCost = 0;
static_cast<cAnvilWindow &>(m_ParentWindow).SetRepairedItemName("", nullptr);
@@ -1135,7 +1135,7 @@ void cSlotAreaAnvil::UpdateResult(cPlayer & a_Player)
{
Output.Empty();
SetSlot(2, a_Player, Output);
- m_ParentWindow.SetProperty(0, 0, a_Player);
+ m_ParentWindow.SetProperty(0, 0);
return;
}
@@ -1157,7 +1157,7 @@ void cSlotAreaAnvil::UpdateResult(cPlayer & a_Player)
// No enchantment
Output.Empty();
SetSlot(2, a_Player, Output);
- m_ParentWindow.SetProperty(0, 0, a_Player);
+ m_ParentWindow.SetProperty(0, 0);
return;
}
@@ -1180,7 +1180,7 @@ void cSlotAreaAnvil::UpdateResult(cPlayer & a_Player)
// No enchantment
Output.Empty();
SetSlot(2, a_Player, Output);
- m_ParentWindow.SetProperty(0, 0, a_Player);
+ m_ParentWindow.SetProperty(0, 0);
return;
}
@@ -1264,7 +1264,7 @@ void cSlotAreaAnvil::UpdateResult(cPlayer & a_Player)
}
SetSlot(2, a_Player, Input);
- m_ParentWindow.SetProperty(0, static_cast<Int16>(m_MaximumCost), a_Player);
+ m_ParentWindow.SetProperty(0, static_cast<Int16>(m_MaximumCost));
}
@@ -1700,10 +1700,10 @@ void cSlotAreaEnchanting::UpdateResult(cPlayer & a_Player)
// Properties set according to: https://wiki.vg/Protocol#Window_Property
// Fake a "seed" for the client to draw Standard Galactic Alphabet glyphs:
- m_ParentWindow.SetProperty(3, Random.RandInt<short>(), a_Player);
+ m_ParentWindow.SetProperty(3, Random.RandInt<short>());
// Calculate an enchanting possibility for each option (top, middle and bottom) and send details to window:
- for (short i = 0; i != OptionLevels.size(); i++)
+ for (size_t i = 0; i != OptionLevels.size(); i++)
{
// A copy of the item.
cItem EnchantedItem = Item.CopyOne();
@@ -1714,20 +1714,20 @@ void cSlotAreaEnchanting::UpdateResult(cPlayer & a_Player)
LOGD("Generated enchanted item %d with enchantments: %s", i, EnchantedItem.m_Enchantments.ToString());
// Send the level requirement for the enchantment option:
- m_ParentWindow.SetProperty(i, static_cast<short>(OptionLevels[i]), a_Player);
+ m_ParentWindow.SetProperty(i, static_cast<short>(OptionLevels[i]));
// Get the first enchantment ID, which must exist:
ASSERT(EnchantedItem.m_Enchantments.begin() != EnchantedItem.m_Enchantments.end());
const short EnchantmentID = static_cast<short>(EnchantedItem.m_Enchantments.begin()->first);
// Send the enchantment ID of the first enchantment on our item:
- m_ParentWindow.SetProperty(4 + i, EnchantmentID, a_Player);
+ m_ParentWindow.SetProperty(4 + i, EnchantmentID);
const short EnchantmentLevel = static_cast<short>(EnchantedItem.m_Enchantments.GetLevel(EnchantmentID));
ASSERT(EnchantmentLevel > 0);
// Send the level for the first enchantment on our item:
- m_ParentWindow.SetProperty(7 + i, EnchantmentLevel, a_Player);
+ m_ParentWindow.SetProperty(7 + i, EnchantmentLevel);
// Store the item we've enchanted as an option to be retrieved later:
m_EnchantedItemOptions[i] = std::move(EnchantedItem);