-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpotiondb.sql
More file actions
39 lines (38 loc) · 1.31 KB
/
Copy pathpotiondb.sql
File metadata and controls
39 lines (38 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
-- HealthPotionDB
SELECT
CAST(itemsparse.id AS INT64) AS itemid,
CAST(itemsparse.requiredlevel AS INT64) AS level,
IF(
CAST(itemsparse.flags_0_ AS INT64) & 2 > 0,
CAST(iz.spellid AS INT64),
NULL
) AS spellid
FROM itemsparse
INNER JOIN itemeffect ON itemsparse.id = itemeffect.parentitemid
INNER JOIN spelleffect AS ez ON itemeffect.spellid = ez.spellid
LEFT OUTER JOIN spelleffect AS iz ON itemsparse.id = iz.effectitemtype
WHERE
itemeffect.spellid != "41620" -- Bottled Nethergon Vapor
AND itemeffect.spellcategoryid IN ("4", "1153")
AND ez.effect = "10"
ORDER BY
CAST(itemsparse.itemlevel AS INT64) DESC, level DESC, itemid ASC, spellid ASC;
-- ManaPotionDB
SELECT
CAST(itemsparse.id AS INT64) AS itemid,
CAST(itemsparse.requiredlevel AS INT64) AS level,
IF(
CAST(itemsparse.flags_0_ AS INT64) & 2 > 0,
CAST(iz.spellid AS INT64),
NULL
) AS spellid
FROM itemsparse
INNER JOIN itemeffect ON itemsparse.id = itemeffect.parentitemid
INNER JOIN spelleffect AS ez ON itemeffect.spellid = ez.spellid
LEFT OUTER JOIN spelleffect AS iz ON itemsparse.id = iz.effectitemtype
WHERE
itemeffect.spellid != "41618" -- Bottled Nethergon Vapor
AND itemeffect.spellcategoryid IN ("4", "1153")
AND ez.effect = "30"
ORDER BY
CAST(itemsparse.itemlevel AS INT64) DESC, level DESC, itemid ASC, spellid ASC;