diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-14 21:06:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-14 21:06:46 +0300 |
commit | 21eb6aa0cc168de4e90b74e4d917df5abd81d9bb (patch) | |
tree | bf4717822eb609378db12f18deea980797077b22 /src/net/tmwa | |
parent | 308f903d2de25ddd99b70e9d8c8ae28f05f3694d (diff) | |
download | manaplus-21eb6aa0cc168de4e90b74e4d917df5abd81d9bb.tar.gz manaplus-21eb6aa0cc168de4e90b74e4d917df5abd81d9bb.tar.bz2 manaplus-21eb6aa0cc168de4e90b74e4d917df5abd81d9bb.tar.xz manaplus-21eb6aa0cc168de4e90b74e4d917df5abd81d9bb.zip |
Use CREATEWIDGET macro in buysellhandler.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/buysellhandler.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp index 7ee35c689..a85da12b2 100644 --- a/src/net/tmwa/buysellhandler.cpp +++ b/src/net/tmwa/buysellhandler.cpp @@ -31,6 +31,8 @@ #include "gui/windows/chatwindow.h" #include "gui/windows/shopwindow.h" +#include "gui/widgets/createwidget.h" + #include "net/chathandler.h" #include "net/serverfeatures.h" @@ -103,8 +105,7 @@ void BuySellHandler::processNpcBuy(Net::MessageIn &msg) if (serverFeatures->haveItemColors()) sz += 1; const unsigned int n_items = (msg.getLength() - 4U) / sz; - mBuyDialog = new BuyDialog(mNpcId); - mBuyDialog->postInit(); + CREATEWIDGETV(mBuyDialog, BuyDialog, mNpcId); mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY)); for (unsigned int k = 0; k < n_items; k++) |