diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-29 19:32:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-29 19:32:58 +0300 |
commit | e55ed9a138e97f6fba5e3b6858a755f8a50197d2 (patch) | |
tree | 90b5337d62f42b2060328905776748f32c6e4eb6 /src/dropshortcut.cpp | |
parent | 88f71d6a8673932d178408e7632a6eea08623294 (diff) | |
download | manaverse-e55ed9a138e97f6fba5e3b6858a755f8a50197d2.tar.gz manaverse-e55ed9a138e97f6fba5e3b6858a755f8a50197d2.tar.bz2 manaverse-e55ed9a138e97f6fba5e3b6858a755f8a50197d2.tar.xz manaverse-e55ed9a138e97f6fba5e3b6858a755f8a50197d2.zip |
Move from client packets limiter related code into separate file.
Diffstat (limited to 'src/dropshortcut.cpp')
-rw-r--r-- | src/dropshortcut.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dropshortcut.cpp b/src/dropshortcut.cpp index 90245d5af..9283294e1 100644 --- a/src/dropshortcut.cpp +++ b/src/dropshortcut.cpp @@ -30,6 +30,8 @@ #include "being/localplayer.h" #include "being/playerinfo.h" +#include "net/packetlimiter.h" + #include "debug.h" DropShortcut *dropShortcut = nullptr; @@ -94,7 +96,7 @@ void DropShortcut::dropFirst() const if (!player_node) return; - if (!client->limitPackets(PACKET_DROP)) + if (!PacketLimiter::limitPackets(PACKET_DROP)) return; const int itemId = getItem(0); @@ -139,7 +141,7 @@ void DropShortcut::dropItems(const int cnt) { for (int i = 0; i < sz; i++) { - if (!client->limitPackets(PACKET_DROP)) + if (!PacketLimiter::limitPackets(PACKET_DROP)) return; if (dropItem()) n++; |