From b895630aa394f74e07dc0eb3f230ae943ba86d22 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 1 May 2005 20:17:43 +0000 Subject: Fixed width of item lists in shops and fixed hitting dead monsters. --- src/being.cpp | 10 +++++----- src/gui/buy.cpp | 2 +- src/gui/sell.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/being.cpp b/src/being.cpp index 90819f70..3ddbeac9 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -107,10 +107,9 @@ unsigned int findMonster(unsigned short x, unsigned short y) std::list::iterator i; for (i = beings.begin(); i != beings.end(); i++) { Being *being = (*i); - // Check if is a MONSTER - if (being->job > 200 && - being->x == x && - being->y == y) + // Check if is a MONSTER that is alive + if (being->job > 200 && being->x == x && being->y == y && + being->action != MONSTER_DEAD) { return being->id; } @@ -135,7 +134,8 @@ Being *findNode(unsigned short x, unsigned short y) std::list::iterator i; for (i = beings.begin(); i != beings.end(); i++) { Being *being = (*i); - if (being->x == x && being->y == y) { + // Return being if found and it is not a dead monster + if (being->x == x && being->y == y && being->action != MONSTER_DEAD) { return being; } } diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp index 6876fb02..296a45ad 100644 --- a/src/gui/buy.cpp +++ b/src/gui/buy.cpp @@ -46,7 +46,7 @@ BuyDialog::BuyDialog(): setContentSize(260, 175); scrollArea->setDimension(gcn::Rectangle(5, 5, 250, 110)); - itemList->setDimension(gcn::Rectangle(5, 5, 240, 110)); + itemList->setDimension(gcn::Rectangle(5, 5, 238, 110)); slider->setDimension(gcn::Rectangle(5, 120, 200, 10)); quantityLabel->setPosition(215, 120); moneyLabel->setPosition(5, 135); diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp index 711a417e..e12b61ed 100644 --- a/src/gui/sell.cpp +++ b/src/gui/sell.cpp @@ -46,7 +46,7 @@ SellDialog::SellDialog(): setContentSize(260, 175); scrollArea->setDimension(gcn::Rectangle(5, 5, 250, 110)); - itemList->setDimension(gcn::Rectangle(5, 5, 240, 110)); + itemList->setDimension(gcn::Rectangle(5, 5, 238, 110)); slider->setDimension(gcn::Rectangle(5, 120, 200, 10)); quantityLabel->setPosition(215, 120); okButton->setPosition(180, 145); -- cgit v1.2.3-70-g09d2