summaryrefslogtreecommitdiffstats
path: root/src/UI/Window.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/UI/Window.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp
index 0cb501a65..8bb7607ff 100644
--- a/src/UI/Window.cpp
+++ b/src/UI/Window.cpp
@@ -391,31 +391,13 @@ bool cWindow::ForEachClient(cItemCallback<cClientHandle> & a_Callback)
-void cWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply)
-{
- cSlotAreas Areas;
- for (auto Area : m_SlotAreas)
- {
- if (Area != a_ClickedArea)
- {
- Areas.push_back(Area);
- }
- }
-
- DistributeStack(a_ItemStack, a_Player, Areas, a_ShouldApply, false);
-}
-
-
-
-
-
-void cWindow::DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, cSlotAreas & a_AreasInOrder, bool a_ShouldApply, bool a_BackFill)
+void cWindow::DistributeStackToAreas(cItem & a_ItemStack, cPlayer & a_Player, cSlotAreas & a_AreasInOrder, bool a_ShouldApply, bool a_BackFill)
{
for (size_t i = 0; i < 2; i++)
{
- for (cSlotAreas::iterator itr = a_AreasInOrder.begin(); itr != a_AreasInOrder.end(); ++itr)
+ for (auto SlotArea : a_AreasInOrder)
{
- (*itr)->DistributeStack(a_ItemStack, a_Player, a_ShouldApply, (i == 0), a_BackFill);
+ SlotArea->DistributeStack(a_ItemStack, a_Player, a_ShouldApply, (i == 0), a_BackFill);
if (a_ItemStack.IsEmpty())
{
// Distributed it all