aboutsummaryrefslogtreecommitdiff
path: root/src/game/Level1.cpp
diff options
context:
space:
mode:
authorAnubisss <none@none>2009-07-05 01:19:49 +0200
committerAnubisss <none@none>2009-07-05 01:19:49 +0200
commitbf697be6f30ef196f40fc053212ba9d86e8f969a (patch)
tree634756b4fa56c5ef012221b42015174366195b25 /src/game/Level1.cpp
parentd78c917effceb3a5624ce5410a6b396511efb444 (diff)
*Change uint32 counter to bool found in lookup commands.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Level1.cpp')
-rw-r--r--src/game/Level1.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp
index be86e9dd78f..4bccd8c7ffd 100644
--- a/src/game/Level1.cpp
+++ b/src/game/Level1.cpp
@@ -2262,7 +2262,7 @@ bool ChatHandler::HandleLookupAreaCommand(const char* args)
if (!Utf8toWStr (namepart,wnamepart))
return false;
- uint32 counter = 0; // Counter for figure out that we found smth.
+ bool found = false;
// converting string that we try to find to lower case
wstrToLower (wnamepart);
@@ -2306,12 +2306,13 @@ bool ChatHandler::HandleLookupAreaCommand(const char* args)
SendSysMessage (ss.str ().c_str());
- ++counter;
+ if(!found)
+ found = true;
}
}
}
- if (counter == 0) // if counter == 0 then we found nth
+ if (!found)
SendSysMessage (LANG_COMMAND_NOAREAFOUND);
return true;