diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-15 13:22:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-15 13:22:40 +0300 |
commit | 35dff83d93c36cd294f1899b1530da88a80b8917 (patch) | |
tree | c33b40350d3e45a201402982db7925b6c988328e /src/being/being.cpp | |
parent | 8ef332195f82d30f70435b69ba485640a19d80ed (diff) | |
download | plus-35dff83d93c36cd294f1899b1530da88a80b8917.tar.gz plus-35dff83d93c36cd294f1899b1530da88a80b8917.tar.bz2 plus-35dff83d93c36cd294f1899b1530da88a80b8917.tar.xz plus-35dff83d93c36cd294f1899b1530da88a80b8917.zip |
Allow to shop buy board name on beings.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 60b87914c..97fad3c59 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -175,6 +175,7 @@ Being::Being(const int id, mSpriteHide(new int[20]), mSpriteDraw(new int[20]), mComment(), + mBuyBoard(), mSellBoard(), mPets(), mOwner(nullptr), @@ -3533,11 +3534,18 @@ void Being::setChat(ChatObject *const obj) void Being::setSellBoard(const std::string &text) { - mShop = !text.empty(); + mShop = !text.empty() || !mBuyBoard.empty(); mSellBoard = text; updateName(); } +void Being::setBuyBoard(const std::string &text) +{ + mShop = !text.empty() || !mSellBoard.empty(); + mBuyBoard = text; + updateName(); +} + void Being::enableShop(const bool b) { mShop = b; |