mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[0064] Fix some unintended custom literals.
This commit is contained in:
parent
aacb838e60
commit
fdde26e77b
9 changed files with 38 additions and 38 deletions
|
|
@ -584,7 +584,7 @@ bool ChatHandler::HandleGoCreatureCommand(char* args)
|
|||
{
|
||||
std::string name = pParam1;
|
||||
WorldDatabase.escape_string(name);
|
||||
QueryResult* result = WorldDatabase.PQuery("SELECT guid FROM creature, creature_template WHERE creature.id = creature_template.entry AND creature_template.name "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), name.c_str());
|
||||
QueryResult* result = WorldDatabase.PQuery("SELECT guid FROM creature, creature_template WHERE creature.id = creature_template.entry AND creature_template.name " _LIKE_ " " _CONCAT3_("'%%'", "'%s'", "'%%'"), name.c_str());
|
||||
if (!result)
|
||||
{
|
||||
SendSysMessage(LANG_COMMAND_GOCREATNOTFOUND);
|
||||
|
|
@ -733,7 +733,7 @@ bool ChatHandler::HandleGoObjectCommand(char* args)
|
|||
{
|
||||
std::string name = pParam1;
|
||||
WorldDatabase.escape_string(name);
|
||||
QueryResult* result = WorldDatabase.PQuery("SELECT guid FROM gameobject, gameobject_template WHERE gameobject.id = gameobject_template.entry AND gameobject_template.name "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), name.c_str());
|
||||
QueryResult* result = WorldDatabase.PQuery("SELECT guid FROM gameobject, gameobject_template WHERE gameobject.id = gameobject_template.entry AND gameobject_template.name " _LIKE_ " " _CONCAT3_("'%%'", "'%s'", "'%%'"), name.c_str());
|
||||
if (!result)
|
||||
{
|
||||
SendSysMessage(LANG_COMMAND_GOOBJNOTFOUND);
|
||||
|
|
@ -800,7 +800,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(char* args)
|
|||
WorldDatabase.escape_string(name);
|
||||
result = WorldDatabase.PQuery(
|
||||
"SELECT guid, id, position_x, position_y, position_z, orientation, map, (POW(position_x - %f, 2) + POW(position_y - %f, 2) + POW(position_z - %f, 2)) AS order_ "
|
||||
"FROM gameobject,gameobject_template WHERE gameobject_template.entry = gameobject.id AND map = %i AND name "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'")" ORDER BY order_ ASC LIMIT 1",
|
||||
"FROM gameobject,gameobject_template WHERE gameobject_template.entry = gameobject.id AND map = %i AND name " _LIKE_ " " _CONCAT3_("'%%'", "'%s'", "'%%'")" ORDER BY order_ ASC LIMIT 1",
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), pl->GetMapId(), name.c_str());
|
||||
}
|
||||
}
|
||||
|
|
@ -4460,7 +4460,7 @@ bool ChatHandler::HandleLookupAccountEmailCommand(char* args)
|
|||
std::string email = emailStr;
|
||||
LoginDatabase.escape_string(email);
|
||||
// 0 1 2 3 4
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT a.id, a.username, a.last_ip, aa.gmlevel, a.expansion FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE email "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), email.c_str());
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT a.id, a.username, a.last_ip, aa.gmlevel, a.expansion FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE email " _LIKE_ " " _LIKE_ " " _CONCAT3_("'%%'", "'%s'", "'%%'"), email.c_str());
|
||||
|
||||
return ShowAccountListHelper(result, &limit);
|
||||
}
|
||||
|
|
@ -4479,7 +4479,7 @@ bool ChatHandler::HandleLookupAccountIpCommand(char* args)
|
|||
LoginDatabase.escape_string(ip);
|
||||
|
||||
// 0 1 2 3 4
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT a.id, a.username, a.last_ip, aa.gmlevel, a.expansion FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE last_ip "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), ip.c_str());
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT a.id, a.username, a.last_ip, aa.gmlevel, a.expansion FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE last_ip " _LIKE_ " " _CONCAT3_("'%%'", "'%s'", "'%%'"), ip.c_str());
|
||||
|
||||
return ShowAccountListHelper(result, &limit);
|
||||
}
|
||||
|
|
@ -4500,7 +4500,7 @@ bool ChatHandler::HandleLookupAccountNameCommand(char* args)
|
|||
|
||||
LoginDatabase.escape_string(account);
|
||||
// 0 1 2 3 4
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT a.id, a.username, a.last_ip, aa.gmlevel, a.expansion FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE username "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), account.c_str());
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT a.id, a.username, a.last_ip, aa.gmlevel, a.expansion FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE username " _LIKE_ " " _CONCAT3_("'%%'", "'%s'", "'%%'"), account.c_str());
|
||||
|
||||
return ShowAccountListHelper(result, &limit);
|
||||
}
|
||||
|
|
@ -4571,7 +4571,7 @@ bool ChatHandler::HandleLookupPlayerIpCommand(char* args)
|
|||
std::string ip = ipStr;
|
||||
LoginDatabase.escape_string(ip);
|
||||
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id,username FROM account WHERE last_ip "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), ip.c_str());
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id,username FROM account WHERE last_ip " _LIKE_ " " _CONCAT3_("'%%'", "'%s'", "'%%'"), ip.c_str());
|
||||
|
||||
return LookupPlayerSearchCommand(result, &limit);
|
||||
}
|
||||
|
|
@ -4592,7 +4592,7 @@ bool ChatHandler::HandleLookupPlayerAccountCommand(char* args)
|
|||
|
||||
LoginDatabase.escape_string(account);
|
||||
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id,username FROM account WHERE username "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), account.c_str());
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id,username FROM account WHERE username " _LIKE_ " " _CONCAT3_("'%%'", "'%s'", "'%%'"), account.c_str());
|
||||
|
||||
return LookupPlayerSearchCommand(result, &limit);
|
||||
}
|
||||
|
|
@ -4610,7 +4610,7 @@ bool ChatHandler::HandleLookupPlayerEmailCommand(char* args)
|
|||
std::string email = emailStr;
|
||||
LoginDatabase.escape_string(email);
|
||||
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id,username FROM account WHERE email "_LIKE_" "_CONCAT3_("'%%'", "'%s'", "'%%'"), email.c_str());
|
||||
QueryResult* result = LoginDatabase.PQuery("SELECT id,username FROM account WHERE email " _LIKE_ " " _CONCAT3_("'%%'", "'%s'", "'%%'"), email.c_str());
|
||||
|
||||
return LookupPlayerSearchCommand(result, &limit);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue