From 35dff83d93c36cd294f1899b1530da88a80b8917 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 15 Feb 2015 13:22:40 +0300 Subject: Allow to shop buy board name on beings. --- src/being/being.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/being/being.cpp') 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; -- cgit v1.2.3-70-g09d2