summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/buysellhandler.cpp3
-rw-r--r--src/net/ea/charserverhandler.cpp8
-rw-r--r--src/net/ea/gamehandler.cpp4
-rw-r--r--src/net/eathena/buysellhandler.cpp1
-rw-r--r--src/net/eathena/cashshophandler.cpp1
-rw-r--r--src/net/eathena/charserverhandler.cpp16
-rw-r--r--src/net/eathena/markethandler.cpp1
-rw-r--r--src/net/eathena/vendinghandler.cpp1
-rw-r--r--src/net/tmwa/buysellhandler.cpp1
-rw-r--r--src/net/tmwa/charserverhandler.cpp4
10 files changed, 23 insertions, 17 deletions
diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp
index 8af3cb4f0..e0f686cad 100644
--- a/src/net/ea/buysellhandler.cpp
+++ b/src/net/ea/buysellhandler.cpp
@@ -56,7 +56,8 @@ void BuySellHandler::processNpcBuySellChoice(Net::MessageIn &msg)
if (!BuySellDialog::isActive())
{
mNpcId = msg.readInt32("npc id");
- new BuySellDialog(mNpcId);
+ BuySellDialog *const dialog = new BuySellDialog(mNpcId);
+ dialog->postInit();
}
}
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp
index 6348b5dc5..42c704933 100644
--- a/src/net/ea/charserverhandler.cpp
+++ b/src/net/ea/charserverhandler.cpp
@@ -138,14 +138,14 @@ void CharServerHandler::processCharCreateFailed(Net::MessageIn &msg)
break;
}
// TRANSLATORS: error message header
- new OkDialog(_("Error"), errorMessage,
+ (new OkDialog(_("Error"), errorMessage,
// TRANSLATORS: ok dialog button
_("OK"),
DialogType::ERROR,
Modal_true,
ShowCenter_true,
nullptr,
- 260);
+ 260))->postInit();
if (mCharCreateDialog)
mCharCreateDialog->unlock();
BLOCK_END("CharServerHandler::processCharCreateFailed")
@@ -160,14 +160,14 @@ void CharServerHandler::processCharDelete(Net::MessageIn &msg A_UNUSED)
updateCharSelectDialog();
unlockCharSelectDialog();
// TRANSLATORS: info message
- new OkDialog(_("Info"), _("Character deleted."),
+ (new OkDialog(_("Info"), _("Character deleted."),
// TRANSLATORS: ok dialog button
_("OK"),
DialogType::OK,
Modal_true,
ShowCenter_true,
nullptr,
- 260);
+ 260))->postInit();
BLOCK_END("CharServerHandler::processCharDelete")
}
diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp
index 9c100de00..31c487921 100644
--- a/src/net/ea/gamehandler.cpp
+++ b/src/net/ea/gamehandler.cpp
@@ -76,7 +76,7 @@ void GameHandler::processMapQuitResponse(Net::MessageIn &msg)
{
if (msg.readUInt8("response"))
{
- new OkDialog(_("Game"),
+ (new OkDialog(_("Game"),
// TRANSLATORS: error message
_("Request to quit denied!"),
// TRANSLATORS: ok dialog button
@@ -85,7 +85,7 @@ void GameHandler::processMapQuitResponse(Net::MessageIn &msg)
Modal_true,
ShowCenter_true,
nullptr,
- 260);
+ 260))->postInit();
}
}
diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp
index a810feac7..26a5a538b 100644
--- a/src/net/eathena/buysellhandler.cpp
+++ b/src/net/eathena/buysellhandler.cpp
@@ -95,6 +95,7 @@ void BuySellHandler::processNpcBuy(Net::MessageIn &msg)
const int sz = 11;
const int n_items = (msg.getLength() - 4) / sz;
mBuyDialog = new BuyDialog(mNpcId);
+ mBuyDialog->postInit();
mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY));
for (int k = 0; k < n_items; k++)
diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp
index 3ddbe9444..90eb1b2af 100644
--- a/src/net/eathena/cashshophandler.cpp
+++ b/src/net/eathena/cashshophandler.cpp
@@ -96,6 +96,7 @@ void CashShopHandler::processCashShopOpen(Net::MessageIn &msg)
const int count = (msg.readInt16("len") - 12) / 11;
mBuyDialog = new BuyDialog(BuyDialog::Cash);
+ mBuyDialog->postInit();
mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY));
msg.readInt32("cash points");
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp
index f3ce778cf..0a634c80f 100644
--- a/src/net/eathena/charserverhandler.cpp
+++ b/src/net/eathena/charserverhandler.cpp
@@ -574,14 +574,14 @@ void CharServerHandler::processCharCheckRename(Net::MessageIn &msg)
else
{
// TRANSLATORS: info message
- new OkDialog(_("Error"), _("Character rename error."),
+ (new OkDialog(_("Error"), _("Character rename error."),
// TRANSLATORS: ok dialog button
_("Error"),
DialogType::ERROR,
Modal_true,
ShowCenter_true,
nullptr,
- 260);
+ 260))->postInit();
}
}
@@ -592,14 +592,14 @@ void CharServerHandler::processCharRename(Net::MessageIn &msg)
{
mCharSelectDialog->setName(mRenameId, mNewName);
// TRANSLATORS: info message
- new OkDialog(_("Info"), _("Character renamed."),
+ (new OkDialog(_("Info"), _("Character renamed."),
// TRANSLATORS: ok dialog button
_("OK"),
DialogType::OK,
Modal_true,
ShowCenter_true,
nullptr,
- 260);
+ 260))->postInit();
}
else
{
@@ -625,14 +625,14 @@ void CharServerHandler::processCharRename(Net::MessageIn &msg)
break;
}
// TRANSLATORS: info message
- new OkDialog(_("Info"), message,
+ (new OkDialog(_("Info"), message,
// TRANSLATORS: ok dialog button
_("OK"),
DialogType::OK,
Modal_true,
ShowCenter_true,
nullptr,
- 260);
+ 260))->postInit();
}
}
@@ -658,14 +658,14 @@ void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg)
unlockCharSelectDialog();
msg.readUInt8("error");
// TRANSLATORS: error message
- new OkDialog(_("Error"), _("Failed to delete character."),
+ (new OkDialog(_("Error"), _("Failed to delete character."),
// TRANSLATORS: ok dialog button
_("OK"),
DialogType::ERROR,
Modal_true,
ShowCenter_true,
nullptr,
- 260);
+ 260))->postInit();
BLOCK_END("CharServerHandler::processCharDeleteFailed")
}
diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp
index f57b3ec2d..175429cda 100644
--- a/src/net/eathena/markethandler.cpp
+++ b/src/net/eathena/markethandler.cpp
@@ -78,6 +78,7 @@ void MarketHandler::processMarketOpen(Net::MessageIn &msg)
const int len = (msg.readInt16("len") - 4) / 13;
mBuyDialog = new BuyDialog(BuyDialog::Market);
+ mBuyDialog->postInit();
mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY));
for (int f = 0; f < len; f ++)
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp
index 27a43200f..9ba6bfc7b 100644
--- a/src/net/eathena/vendinghandler.cpp
+++ b/src/net/eathena/vendinghandler.cpp
@@ -144,6 +144,7 @@ void VendingHandler::processItemsList(Net::MessageIn &msg)
if (!being)
return;
mBuyDialog = new BuyDialog(being->getName());
+ mBuyDialog->postInit();
mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY));
msg.readInt32("vender id");
for (int f = 0; f < count; f ++)
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index e63559d20..28261579e 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -107,6 +107,7 @@ void BuySellHandler::processNpcBuy(Net::MessageIn &msg)
sz += 1;
const unsigned int n_items = (msg.getLength() - 4U) / sz;
mBuyDialog = new BuyDialog(mNpcId);
+ mBuyDialog->postInit();
mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY));
for (unsigned int k = 0; k < n_items; k++)
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index b33e0e4e2..970d6a9c6 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -518,14 +518,14 @@ void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg)
unlockCharSelectDialog();
msg.readUInt8("error");
// TRANSLATORS: error message
- new OkDialog(_("Error"), _("Failed to delete character."),
+ (new OkDialog(_("Error"), _("Failed to delete character."),
// TRANSLATORS: ok dialog button
_("OK"),
DialogType::ERROR,
Modal_true,
ShowCenter_true,
nullptr,
- 260);
+ 260))->postInit();
BLOCK_END("CharServerHandler::processCharDeleteFailed")
}