mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-06 22:52:25 +00:00
Merge branch 'feature/multi-tenancy' of https://github.com/EQEmu/Server into feature/peq-expansions
This commit is contained in:
commit
33bf20a037
@ -11778,7 +11778,7 @@ void Client::Handle_OP_RecipesFavorite(const EQApplicationPacket *app)
|
|||||||
{
|
{
|
||||||
if (app->size != sizeof(TradeskillFavorites_Struct)) {
|
if (app->size != sizeof(TradeskillFavorites_Struct)) {
|
||||||
LogError("Invalid size for TradeskillFavorites_Struct: Expected: [{}], Got: [{}]",
|
LogError("Invalid size for TradeskillFavorites_Struct: Expected: [{}], Got: [{}]",
|
||||||
sizeof(TradeskillFavorites_Struct), app->size);
|
sizeof(TradeskillFavorites_Struct), app->size);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11828,6 +11828,7 @@ void Client::Handle_OP_RecipesFavorite(const EQApplicationPacket *app)
|
|||||||
if (first) //no favorites....
|
if (first) //no favorites....
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// TODO: Clean this up
|
||||||
const std::string query = StringFormat(
|
const std::string query = StringFormat(
|
||||||
SQL (
|
SQL (
|
||||||
SELECT
|
SELECT
|
||||||
@ -11844,11 +11845,11 @@ void Client::Handle_OP_RecipesFavorite(const EQApplicationPacket *app)
|
|||||||
AND tr.id IN (%s)
|
AND tr.id IN (%s)
|
||||||
AND tr.must_learn & 0x20 <> 0x20
|
AND tr.must_learn & 0x20 <> 0x20
|
||||||
AND (
|
AND (
|
||||||
(
|
(
|
||||||
tr.must_learn & 0x3 <> 0
|
tr.must_learn & 0x3 <> 0
|
||||||
)
|
)
|
||||||
OR (tr.must_learn & 0x3 = 0)
|
OR (tr.must_learn & 0x3 = 0)
|
||||||
)
|
)
|
||||||
GROUP BY
|
GROUP BY
|
||||||
tr.id
|
tr.id
|
||||||
HAVING
|
HAVING
|
||||||
@ -11924,6 +11925,7 @@ void Client::Handle_OP_RecipesSearch(const EQApplicationPacket *app)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//arbitrary limit of 200 recipes, makes sense to me.
|
//arbitrary limit of 200 recipes, makes sense to me.
|
||||||
|
// TODO: Clean this up
|
||||||
std::string query = fmt::format(
|
std::string query = fmt::format(
|
||||||
SQL(
|
SQL(
|
||||||
SELECT
|
SELECT
|
||||||
@ -11931,37 +11933,19 @@ void Client::Handle_OP_RecipesSearch(const EQApplicationPacket *app)
|
|||||||
tr.name,
|
tr.name,
|
||||||
tr.trivial,
|
tr.trivial,
|
||||||
SUM(tre.componentcount),
|
SUM(tre.componentcount),
|
||||||
crl.madecount,
|
|
||||||
tr.tradeskill
|
tr.tradeskill
|
||||||
FROM
|
FROM
|
||||||
tradeskill_recipe
|
tradeskill_recipe AS tr
|
||||||
AS tr
|
LEFT JOIN tradeskill_recipe_entries AS tre ON tr.id = tre.recipe_id
|
||||||
LEFT
|
|
||||||
JOIN
|
|
||||||
tradeskill_recipe_entries
|
|
||||||
AS
|
|
||||||
tre
|
|
||||||
ON
|
|
||||||
tr.id = tre.recipe_id
|
|
||||||
LEFT JOIN(
|
|
||||||
SELECT
|
|
||||||
recipe_id,
|
|
||||||
madecount
|
|
||||||
FROM
|
|
||||||
char_recipe_list
|
|
||||||
WHERE
|
|
||||||
char_id = {}
|
|
||||||
) AS crl ON tr.id = crl.recipe_id
|
|
||||||
WHERE
|
WHERE
|
||||||
{} tr.trivial >= {}
|
{} tr.trivial >= {}
|
||||||
AND tr.trivial <= {}
|
AND tr.trivial <= {}
|
||||||
AND tr.enabled <> 0
|
AND tr.enabled <> 0
|
||||||
AND tr.must_learn & 0x20 <> 0x20
|
AND tr.must_learn & 0x20 <> 0x20
|
||||||
AND (
|
AND (
|
||||||
(
|
(
|
||||||
tr.must_learn & 0x3 <> 0
|
tr.must_learn & 0x3 <> 0
|
||||||
AND crl.madecount IS NOT NULL
|
)
|
||||||
)
|
|
||||||
OR (tr.must_learn & 0x3 = 0)
|
OR (tr.must_learn & 0x3 = 0)
|
||||||
)
|
)
|
||||||
GROUP BY
|
GROUP BY
|
||||||
@ -11979,7 +11963,6 @@ void Client::Handle_OP_RecipesSearch(const EQApplicationPacket *app)
|
|||||||
LIMIT
|
LIMIT
|
||||||
200
|
200
|
||||||
),
|
),
|
||||||
CharacterID(),
|
|
||||||
search_clause,
|
search_clause,
|
||||||
p_recipes_search_struct->mintrivial,
|
p_recipes_search_struct->mintrivial,
|
||||||
p_recipes_search_struct->maxtrivial,
|
p_recipes_search_struct->maxtrivial,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user