summaryrefslogtreecommitdiff
path: root/src/dropshortcut.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-29 19:32:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-29 19:32:58 +0300
commite55ed9a138e97f6fba5e3b6858a755f8a50197d2 (patch)
tree90b5337d62f42b2060328905776748f32c6e4eb6 /src/dropshortcut.cpp
parent88f71d6a8673932d178408e7632a6eea08623294 (diff)
downloadmanaverse-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.cpp6
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++;