From dd1f8fb1f5640d9f9d58098c8aefbc1c1ad308ab Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Sat, 12 Apr 2014 18:52:17 +0200 Subject: Fixed Bookshelves Checking (not completly) --- src/UI/SlotArea.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/UI') diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index f76b11380..d43b91700 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -658,17 +658,20 @@ void cSlotAreaEnchanting::ClickedResult(cPlayer & a_Player) cBlockArea Area; Area.Read(a_Player.GetWorld(), PosX - 2, PosX + 2, PosY, PosY + 1, PosZ - 2, PosZ + 2); - for (int x = 0; x < 7; x++) + for (int x = 0; x < 6; x++) { - for (int y = 0; y < 2; y++) + for (int y = 0; y < 3; y++) { - for (int z = 0; z < 7; z++) + for (int z = 0; z < 6; z++) { - LOG(Printf("%i", Area.GetBlockType(x, y, z)).c_str()); - - if (Area.GetBlockType(x, y, z) == E_BLOCK_BOOKCASE) + if ((((x == 0) || (x == 5)) || ((z == 0) || (z == 5))) && ((y == 0) || y == 1)) { - LOG("BookShelf"); + LOG("%i", Area.GetRelBlockType(x, y, z)); + + if (Area.GetRelBlockType(x, y, z) == E_BLOCK_BOOKCASE) + { + LOG("BookShelf"); + } } } } -- cgit v1.2.3