diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-05-01 20:17:43 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-05-01 20:17:43 +0000 |
commit | b895630aa394f74e07dc0eb3f230ae943ba86d22 (patch) | |
tree | 8d6480857f0c369f67974b208bfb7efe54f582c1 /src | |
parent | 328bd58d13177368a17bcf486c0aba63184bf478 (diff) | |
download | mana-b895630aa394f74e07dc0eb3f230ae943ba86d22.tar.gz mana-b895630aa394f74e07dc0eb3f230ae943ba86d22.tar.bz2 mana-b895630aa394f74e07dc0eb3f230ae943ba86d22.tar.xz mana-b895630aa394f74e07dc0eb3f230ae943ba86d22.zip |
Fixed width of item lists in shops and fixed hitting dead monsters.
Diffstat (limited to 'src')
-rw-r--r-- | src/being.cpp | 10 | ||||
-rw-r--r-- | src/gui/buy.cpp | 2 | ||||
-rw-r--r-- | 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<Being*>::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<Being*>::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); |