diff options
Diffstat (limited to 'src/game-server')
-rw-r--r-- | src/game-server/being.cpp | 5 | ||||
-rw-r--r-- | src/game-server/buysell.cpp | 2 | ||||
-rw-r--r-- | src/game-server/trade.cpp | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/game-server/being.cpp b/src/game-server/being.cpp index c2228dcc..a01126f0 100644 --- a/src/game-server/being.cpp +++ b/src/game-server/being.cpp @@ -528,6 +528,11 @@ bool Being::recalculateBaseAttribute(unsigned int attr) // Provisional newBase = 2000.0 + getModifiedAttribute(ATTR_STR) * 180.0; break; + case ATTR_MONEY: + // Set the money to 0 if it was never set before. + if (getModifiedAttribute(ATTR_MONEY) < 0) + newBase = 0.0; + break; } if (newBase != getAttribute(attr)) { diff --git a/src/game-server/buysell.cpp b/src/game-server/buysell.cpp index b3abb3e2..4c083f5c 100644 --- a/src/game-server/buysell.cpp +++ b/src/game-server/buysell.cpp @@ -32,7 +32,7 @@ #include <algorithm> BuySell::BuySell(Character *c, bool sell): - mCurrencyId(ATTR_GP), mChar(c), mSell(sell) + mCurrencyId(ATTR_MONEY), mChar(c), mSell(sell) { c->setBuySell(this); } diff --git a/src/game-server/trade.cpp b/src/game-server/trade.cpp index 51509307..bcdc9974 100644 --- a/src/game-server/trade.cpp +++ b/src/game-server/trade.cpp @@ -38,7 +38,8 @@ */ Trade::Trade(Character *c1, Character *c2): - mChar1(c1), mChar2(c2), mMoney1(0), mMoney2(0), mState(TRADE_INIT), mCurrencyId(ATTR_GP) + mChar1(c1), mChar2(c2), mMoney1(0), mMoney2(0), mState(TRADE_INIT), + mCurrencyId(ATTR_MONEY) { MessageOut msg(GPMSG_TRADE_REQUEST); msg.writeInt16(c1->getPublicID()); |