From 1e59c7e61474e89e08dcb40134d8be5f5ae76bf4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Jun 2015 23:26:19 +0300 Subject: Use CREATEWIDGET macro in markethandler. --- src/net/eathena/markethandler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp index ec9e3c095..3157878ea 100644 --- a/src/net/eathena/markethandler.cpp +++ b/src/net/eathena/markethandler.cpp @@ -26,6 +26,8 @@ #include "gui/windows/buydialog.h" +#include "gui/widgets/createwidget.h" + #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" @@ -75,8 +77,7 @@ void MarketHandler::processMarketOpen(Net::MessageIn &msg) { const int len = (msg.readInt16("len") - 4) / 13; - mBuyDialog = new BuyDialog(fromInt(BuyDialog::Market, BeingId)); - mBuyDialog->postInit(); + CREATEWIDGETV(mBuyDialog, BuyDialog, fromInt(BuyDialog::Market, BeingId)); mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY)); for (int f = 0; f < len; f ++) -- cgit v1.2.3-70-g09d2