Skip to content

Commit

Permalink
Merge pull request LandSandBoat#5593 from CatsAndBoats/getfirstid_order
Browse files Browse the repository at this point in the history
[cpp] Ensure sequential order for getfirstID etc
  • Loading branch information
zach2good authored May 3, 2024
2 parents 3a14022 + 51c1689 commit 8cae00c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/map/lua/luautils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ namespace luautils
// Mobs
{
auto query = fmt::sprintf("SELECT mobname, mobid FROM mob_spawn_points "
"WHERE ((mobid >> 12) & 0xFFF) = %i",
"WHERE ((mobid >> 12) & 0xFFF) = %i ORDER BY mobid ASC",
zoneId);
auto ret = _sql->Query(query.c_str());
while (ret != SQL_ERROR && _sql->NumRows() != 0 && _sql->NextRow() == SQL_SUCCESS)
Expand All @@ -887,7 +887,7 @@ namespace luautils
// NPCs
{
auto query = fmt::sprintf("SELECT name, npcid FROM npc_list "
"WHERE ((npcid >> 12) & 0xFFF) = %i",
"WHERE ((npcid >> 12) & 0xFFF) = %i ORDER BY npcid ASC",
zoneId);
auto ret = _sql->Query(query.c_str());
while (ret != SQL_ERROR && _sql->NumRows() != 0 && _sql->NextRow() == SQL_SUCCESS)
Expand Down

0 comments on commit 8cae00c

Please sign in to comment.