From 5849b9537cd81dfccfc283c20a18d905ea7bf982 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Jun 2015 22:37:53 +0300 Subject: Use CREATEWIDGET macro in cashshophandler. --- src/net/eathena/cashshophandler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/net') diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp index 785e3f62a..23d6ab66d 100644 --- a/src/net/eathena/cashshophandler.cpp +++ b/src/net/eathena/cashshophandler.cpp @@ -24,6 +24,8 @@ #include "gui/windows/buydialog.h" +#include "gui/widgets/createwidget.h" + #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" @@ -91,8 +93,7 @@ void CashShopHandler::processCashShopOpen(Net::MessageIn &msg) { const int count = (msg.readInt16("len") - 12) / 11; - mBuyDialog = new BuyDialog(fromInt(BuyDialog::Cash, BeingId)); - mBuyDialog->postInit(); + CREATEWIDGETV(mBuyDialog, BuyDialog, fromInt(BuyDialog::Cash, BeingId)); mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY)); msg.readInt32("cash points"); -- cgit v1.2.3-60-g2f50