Skip to content

Commit

Permalink
Merge 0846838 into 9c13f8f
Browse files Browse the repository at this point in the history
  • Loading branch information
SlySven committed Aug 16, 2019
2 parents 9c13f8f + 0846838 commit 722cb6b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/TLuaInterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4842,6 +4842,9 @@ int TLuaInterpreter::searchRoom(lua_State* L)
lua_newtable(L);
QList<int> roomIdsFound;
for (auto pR : roomList) {
if (!pR) {
continue;
}
if (exactMatch) {
if (pR->name.compare(room, caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive) == 0) {
roomIdsFound.append(pR->getId());
Expand All @@ -4855,10 +4858,6 @@ int TLuaInterpreter::searchRoom(lua_State* L)
if (!roomIdsFound.isEmpty()) {
for (int i : roomIdsFound) {
TRoom* pR = host.mpMap->mpRoomDB->getRoom(i);
if (!pR) {
continue;
}

QString name = pR->name;
int roomID = pR->getId();
lua_pushnumber(L, roomID);
Expand Down

0 comments on commit 722cb6b

Please sign in to comment.