diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-03 12:26:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-03 12:26:54 +0300 |
commit | a75b710fbde53288d250d287eb61254e2adb3012 (patch) | |
tree | f7f1d63ebf54b576d503a7dbb56e80213145bb24 /src/gui/windows | |
parent | 6b15e62c1fefe8838bbc56cb314f3ab24ccebbc4 (diff) | |
download | plus-a75b710fbde53288d250d287eb61254e2adb3012.tar.gz plus-a75b710fbde53288d250d287eb61254e2adb3012.tar.bz2 plus-a75b710fbde53288d250d287eb61254e2adb3012.tar.xz plus-a75b710fbde53288d250d287eb61254e2adb3012.zip |
User full enum name in packets type.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/npcdialog.cpp | 20 | ||||
-rw-r--r-- | src/gui/windows/whoisonline.cpp | 4 |
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(); |