summaryrefslogtreecommitdiff
path: root/src/net/eathena/vendinghandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/vendinghandler.cpp')
-rw-r--r--src/net/eathena/vendinghandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp
index f53a7b861..48b301a77 100644
--- a/src/net/eathena/vendinghandler.cpp
+++ b/src/net/eathena/vendinghandler.cpp
@@ -28,6 +28,8 @@
#include "gui/windows/buydialog.h"
+#include "gui/widgets/createwidget.h"
+
#include "listeners/vendingmodelistener.h"
#include "listeners/vendingslotslistener.h"
@@ -140,8 +142,7 @@ void VendingHandler::processItemsList(Net::MessageIn &msg)
Being *const being = actorManager->findBeing(id);
if (!being)
return;
- mBuyDialog = new BuyDialog(being->getName());
- mBuyDialog->postInit();
+ CREATEWIDGETV(mBuyDialog, BuyDialog, being->getName());
mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY));
msg.readInt32("vender id");
for (int f = 0; f < count; f ++)