summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/buysellhandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp
index c10978b3d..00895f7d9 100644
--- a/src/net/eathena/buysellhandler.cpp
+++ b/src/net/eathena/buysellhandler.cpp
@@ -28,6 +28,8 @@
#include "gui/windows/buydialog.h"
+#include "gui/widgets/createwidget.h"
+
#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
@@ -92,8 +94,7 @@ void BuySellHandler::processNpcBuy(Net::MessageIn &msg)
msg.readInt16("len");
const int sz = 11;
const int n_items = (msg.getLength() - 4) / sz;
- mBuyDialog = new BuyDialog(mNpcId);
- mBuyDialog->postInit();
+ CREATEWIDGETV(mBuyDialog, BuyDialog, mNpcId);
mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY));
for (int k = 0; k < n_items; k++)