Skip to content

Commit

Permalink
Update DB query methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Niam5 committed Jun 15, 2024
1 parent 7e1febd commit 3048c8b
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions methods/VMangos/GlobalMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -1227,11 +1227,10 @@ namespace LuaGlobalFunctions
{
const char* query = E->CHECKVAL<const char*>(1);

QueryNamedResult* result = WorldDatabase.QueryNamed(query);
ElunaQuery result = WorldDatabase.QueryNamed(query);
if (result)
{
ElunaQuery elunaQuery(result);
E->Push(&elunaQuery);
E->Push(&result);
}
else
E->Push();
Expand Down Expand Up @@ -1273,11 +1272,10 @@ namespace LuaGlobalFunctions
{
const char* query = E->CHECKVAL<const char*>(1);

QueryNamedResult* result = CharacterDatabase.QueryNamed(query);
ElunaQuery result = CharacterDatabase.QueryNamed(query);
if (result)
{
ElunaQuery elunaQuery(result);
E->Push(&elunaQuery);
E->Push(&result);
}
else
E->Push();
Expand Down Expand Up @@ -1319,11 +1317,10 @@ namespace LuaGlobalFunctions
{
const char* query = E->CHECKVAL<const char*>(1);

QueryNamedResult* result = LoginDatabase.QueryNamed(query);
ElunaQuery result = LoginDatabase.QueryNamed(query);
if (result)
{
ElunaQuery elunaQuery(result);
E->Push(&elunaQuery);
E->Push(&result);
}
else
E->Push();
Expand Down

0 comments on commit 3048c8b

Please sign in to comment.