1
0

C++11 and function rename.

This commit is contained in:
Howaner
2014-12-17 19:14:01 +01:00
parent 6ee7fd3c67
commit 8277e1ec4e
16 changed files with 71 additions and 50 deletions

View File

@@ -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