From f2617d06830c649c5d13d1daf4f3e70e7ee487b0 Mon Sep 17 00:00:00 2001 From: Howaner Date: Mon, 5 May 2014 15:49:56 +0200 Subject: [PATCH] Add comments to CanTakeResultItem() --- src/UI/SlotArea.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 7b9f4e628..0f5e292d0 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -828,11 +828,11 @@ bool cSlotAreaAnvil::CanTakeResultItem(cPlayer & a_Player) { return ( ( - a_Player.IsGameModeCreative() - || a_Player.GetXpLevel() >= m_MaximumCost - ) - && !GetSlot(2, a_Player)->IsEmpty() - && m_MaximumCost > 0 + a_Player.IsGameModeCreative() || // Is the player in gamemode? + (a_Player.GetXpLevel() >= m_MaximumCost) // or the player have enough exp? + ) && + (!GetSlot(2, a_Player)->IsEmpty()) && // Is a item in the result slot? + (m_MaximumCost > 0) // And: Is m_MaximumCost higher than 0? ); }