From a75b710fbde53288d250d287eb61254e2adb3012 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 3 Jun 2015 12:26:54 +0300 Subject: User full enum name in packets type. --- src/gui/windows/npcdialog.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'src/gui/windows/npcdialog.cpp') 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(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(); -- cgit v1.2.3-60-g2f50