From e55ed9a138e97f6fba5e3b6858a755f8a50197d2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 29 May 2014 19:32:58 +0300 Subject: Move from client packets limiter related code into separate file. --- src/dropshortcut.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/dropshortcut.cpp') 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++; -- cgit v1.2.3-60-g2f50