summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/npcdialog.cpp20
-rw-r--r--src/gui/windows/whoisonline.cpp4
2 files changed, 17 insertions, 7 deletions
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index de485d6f1..adb59e09f 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -288,7 +288,7 @@ void NpcDialog::action(const ActionEvent &event)
{
if (mActionState == NPC_ACTION_NEXT)
{
- if (!PacketLimiter::limitPackets(PACKET_NPC_NEXT))
+ if (!PacketLimiter::limitPackets(PacketType::PACKET_NPC_NEXT))
return;
nextDialog();
@@ -313,7 +313,8 @@ void NpcDialog::action(const ActionEvent &event)
if (selectedIndex >= static_cast<int>(mItems.size())
|| selectedIndex < 0
- || !PacketLimiter::limitPackets(PACKET_NPC_INPUT))
+ || !PacketLimiter::limitPackets(
+ PacketType::PACKET_NPC_INPUT))
{
return;
}
@@ -326,16 +327,22 @@ void NpcDialog::action(const ActionEvent &event)
}
case NPC_INPUT_STRING:
{
- if (!PacketLimiter::limitPackets(PACKET_NPC_INPUT))
+ if (!PacketLimiter::limitPackets(
+ PacketType::PACKET_NPC_INPUT))
+ {
return;
+ }
printText = mTextField->getText();
npcHandler->stringInput(mNpcId, printText);
break;
}
case NPC_INPUT_INTEGER:
{
- if (!PacketLimiter::limitPackets(PACKET_NPC_INPUT))
+ if (!PacketLimiter::limitPackets(
+ PacketType::PACKET_NPC_INPUT))
+ {
return;
+ }
printText = strprintf("%d", mIntField->getValue());
npcHandler->integerInput(
mNpcId, mIntField->getValue());
@@ -343,8 +350,11 @@ void NpcDialog::action(const ActionEvent &event)
}
case NPC_INPUT_ITEM:
{
- if (!PacketLimiter::limitPackets(PACKET_NPC_INPUT))
+ if (!PacketLimiter::limitPackets(
+ PacketType::PACKET_NPC_INPUT))
+ {
return;
+ }
std::string str;
const int sz = mInventory->getNumberOfSlotsUsed();
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index 174b242dd..e285c2dd8 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -596,7 +596,7 @@ void WhoIsOnline::download()
{
if (mServerSideList)
{
- if (PacketLimiter::limitPackets(PACKET_ONLINELIST))
+ if (PacketLimiter::limitPackets(PacketType::PACKET_ONLINELIST))
playerHandler->requestOnlineList();
}
#ifdef TMWA_SUPPORT
@@ -712,7 +712,7 @@ void WhoIsOnline::action(const ActionEvent &event)
else
#endif
{
- if (PacketLimiter::limitPackets(PACKET_ONLINELIST))
+ if (PacketLimiter::limitPackets(PacketType::PACKET_ONLINELIST))
{
mUpdateTimer = cur_time;
playerHandler->requestOnlineList();