summaryrefslogtreecommitdiff
path: root/src/gui/windows/npcdialog.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/gui/windows/npcdialog.cpp
parent6b15e62c1fefe8838bbc56cb314f3ab24ccebbc4 (diff)
downloadmv-a75b710fbde53288d250d287eb61254e2adb3012.tar.gz
mv-a75b710fbde53288d250d287eb61254e2adb3012.tar.bz2
mv-a75b710fbde53288d250d287eb61254e2adb3012.tar.xz
mv-a75b710fbde53288d250d287eb61254e2adb3012.zip
User full enum name in packets type.
Diffstat (limited to 'src/gui/windows/npcdialog.cpp')
-rw-r--r--src/gui/windows/npcdialog.cpp20
1 files changed, 15 insertions, 5 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();