summaryrefslogtreecommitdiff
path: root/src/being/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-03 12:26:54 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-03 12:26:54 +0300
commita75b710fbde53288d250d287eb61254e2adb3012 (patch)
treef7f1d63ebf54b576d503a7dbb56e80213145bb24 /src/being/localplayer.cpp
parent6b15e62c1fefe8838bbc56cb314f3ab24ccebbc4 (diff)
downloadmanaplus-a75b710fbde53288d250d287eb61254e2adb3012.tar.gz
manaplus-a75b710fbde53288d250d287eb61254e2adb3012.tar.bz2
manaplus-a75b710fbde53288d250d287eb61254e2adb3012.tar.xz
manaplus-a75b710fbde53288d250d287eb61254e2adb3012.zip
User full enum name in packets type.
Diffstat (limited to 'src/being/localplayer.cpp')
-rw-r--r--src/being/localplayer.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 7eea9c18a..6c590e82c 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -476,7 +476,7 @@ bool LocalPlayer::pickUp(FloorItem *const item)
if (!item)
return false;
- if (!PacketLimiter::limitPackets(PACKET_PICKUP))
+ if (!PacketLimiter::limitPackets(PacketType::PACKET_PICKUP))
return false;
const int dx = item->getTileX() - mX;
@@ -587,7 +587,7 @@ void LocalPlayer::setDestination(const int x, const int y)
playerHandler->setDestination(x, y, newDir);
-// if (PacketLimiter::limitPackets(PACKET_DIRECTION))
+// if (PacketLimiter::limitPackets(PacketType::PACKET_DIRECTION))
{
setDirection(newDir);
playerHandler->setDirection(newDir);
@@ -654,7 +654,7 @@ void LocalPlayer::startWalking(const unsigned char dir)
{
// If the being can't move, just change direction
-// if (PacketLimiter::limitPackets(PACKET_DIRECTION))
+// if (PacketLimiter::limitPackets(PacketType::PACKET_DIRECTION))
{
playerHandler->setDirection(dir);
setDirection(dir);
@@ -689,7 +689,7 @@ void LocalPlayer::stopWalking(const bool sendToServer)
bool LocalPlayer::toggleSit() const
{
- if (!PacketLimiter::limitPackets(PACKET_SIT))
+ if (!PacketLimiter::limitPackets(PacketType::PACKET_SIT))
return false;
BeingActionT newAction;
@@ -717,7 +717,7 @@ bool LocalPlayer::toggleSit() const
bool LocalPlayer::updateSit() const
{
- if (!PacketLimiter::limitPackets(PACKET_SIT))
+ if (!PacketLimiter::limitPackets(PacketType::PACKET_SIT))
return false;
playerHandler->changeAction(mAction);
@@ -726,7 +726,7 @@ bool LocalPlayer::updateSit() const
bool LocalPlayer::emote(const uint8_t emotion)
{
- if (!PacketLimiter::limitPackets(PACKET_EMOTE))
+ if (!PacketLimiter::limitPackets(PacketType::PACKET_EMOTE))
return false;
playerHandler->emote(emotion);
@@ -776,7 +776,7 @@ void LocalPlayer::attack(Being *const target, const bool keep,
{
setAction(BeingAction::ATTACK);
- if (!PacketLimiter::limitPackets(PACKET_ATTACK))
+ if (!PacketLimiter::limitPackets(PacketType::PACKET_ATTACK))
return;
if (!dontChangeEquipment)
@@ -795,7 +795,7 @@ void LocalPlayer::attack(Being *const target, const bool keep,
void LocalPlayer::stopAttack(const bool keepAttack)
{
- if (!PacketLimiter::limitPackets(PACKET_STOPATTACK))
+ if (!PacketLimiter::limitPackets(PacketType::PACKET_STOPATTACK))
return;
if (mServerAttack == Keep_true && mAction == BeingAction::ATTACK)
@@ -1628,7 +1628,7 @@ void LocalPlayer::tryMagic(const std::string &spell, const int baseMagic,
{
if (PlayerInfo::getAttribute(Attributes::MP) >= mana)
{
- if (!PacketLimiter::limitPackets(PACKET_CHAT))
+ if (!PacketLimiter::limitPackets(PacketType::PACKET_CHAT))
return;
chatWindow->localChatInput(spell);
@@ -2086,7 +2086,7 @@ void LocalPlayer::targetMoved() const
if (mTarget && mServerAttack == Keep_true)
{
logger->log("LocalPlayer::targetMoved0");
- if (!PacketLimiter::limitPackets(PACKET_ATTACK))
+ if (!PacketLimiter::limitPackets(PacketType::PACKET_ATTACK))
return;
logger->log("LocalPlayer::targetMoved");
playerHandler->attack(mTarget->getId(), mServerAttack);
@@ -2262,7 +2262,7 @@ void LocalPlayer::imitateDirection(const Being *const being,
if (!mPlayerImitated.empty() && being->getName() == mPlayerImitated)
{
- if (!PacketLimiter::limitPackets(PACKET_DIRECTION))
+ if (!PacketLimiter::limitPackets(PacketType::PACKET_DIRECTION))
return;
if (settings.followMode == 2)