diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-29 14:30:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-29 14:30:20 +0300 |
commit | 0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 (patch) | |
tree | 6259593b8436178ad8d981a96a8fd71eab9e04cc /src/gui/windows/buyselldialog.cpp | |
parent | 01773c71a4698c6f01fe70d864f922bda65506cb (diff) | |
download | plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2 plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip |
Add strong typed int type BeingId.
Diffstat (limited to 'src/gui/windows/buyselldialog.cpp')
-rw-r--r-- | src/gui/windows/buyselldialog.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/windows/buyselldialog.cpp b/src/gui/windows/buyselldialog.cpp index 15d4165f3..bdd28b000 100644 --- a/src/gui/windows/buyselldialog.cpp +++ b/src/gui/windows/buyselldialog.cpp @@ -35,7 +35,7 @@ BuySellDialog::DialogList BuySellDialog::dialogInstances; -BuySellDialog::BuySellDialog(const int npcId) : +BuySellDialog::BuySellDialog(const BeingId npcId) : // TRANSLATORS: shop window name Window(_("Shop"), Modal_false, nullptr, "buysell.xml"), ActionListener(), @@ -50,7 +50,7 @@ BuySellDialog::BuySellDialog(const std::string &nick) : // TRANSLATORS: shop window name Window(_("Shop"), Modal_false, nullptr, "buysell.xml"), ActionListener(), - mNpcId(-1), + mNpcId(BeingId_negOne), mNick(nick), mBuyButton(nullptr) { @@ -128,14 +128,14 @@ void BuySellDialog::action(const ActionEvent &event) const std::string &eventId = event.getId(); if (eventId == "Buy") { - if (mNpcId != -1) + if (mNpcId != BeingId_negOne) npcHandler->buy(mNpcId); else buySellHandler->requestSellList(mNick); } else if (eventId == "Sell") { - if (mNpcId != -1) + if (mNpcId != BeingId_negOne) npcHandler->sell(mNpcId); else buySellHandler->requestBuyList(mNick); |