azerothcore / azerothcore-wotlk

Complete Open Source and Modular solution for MMO
http://www.azerothcore.org
GNU Affero General Public License v3.0
6.41k stars 2.57k forks source link

Identifying Overlevelled Item Drops in DB #6000

Open Azcobu opened 3 years ago

Azcobu commented 3 years ago

CURRENT BEHAVIOUR:

There have been a number of reports of item drops with levels that are significantly higher than the NPCs who drop them recently. This is an attempt to identify such drops.

Updated the query with @T1ti 's query and tweaked to sort by level disparity and exclude various quest items like the Pendant of Myzrael.

Updated to only check open world mobs, i.e. those in world maps 0 and 1, as dungeon/raid NPCs seem to have different limits on permissible item levels.

SELECT DISTINCT ct.entry, ct.name, ct.maxlevel, it.entry, it.name, it.ItemLevel
 FROM `creature_template` ct
 LEFT JOIN `creature_loot_template` clt ON ct.lootid = clt.entry
 JOIN `item_template` it ON clt.item = it.entry
 JOIN `creature` c ON ct.entry = c.id
 WHERE ct.maxlevel +4 <= it.ItemLevel AND clt.Reference = 0 AND it.class IN (2, 4)
 AND ct.maxlevel < 61 AND ct.rank = 0 AND it.Quality > 0 AND it.startquest = 0 
 AND it.inventorytype NOT IN (0, 4, 19, 20, 23) AND c.map IN (0,1)
 ORDER BY it.ItemLevel - ct.maxlevel DESC;
+-------+----------------------------+----------+-------+--------------------------------+-----------+
| entry | name                       | maxlevel | entry | name                           | ItemLevel |
+-------+----------------------------+----------+-------+--------------------------------+-----------+
|  4802 | Blackfathom Tide Priestess |       21 |  2143 | Cuirboulli Boots               |        27 |
|  4803 | Blackfathom Oracle         |       21 |  2143 | Cuirboulli Boots               |        27 |
| 11726 | Hive'Zora Tunneler         |       59 | 23198 | Idol of Brutality              |        65 |
| 11882 | Twilight Stonecaller       |       60 | 23198 | Idol of Brutality              |        65 |
|  3204 | Gazz'uz                    |       10 |  3311 | Ceremonial Leather Ankleguards |        15 |
|  1162 | Stonesplinter Scout        |       12 |  5109 | Stonesplinter Rags             |        17 |
|  1161 | Stonesplinter Trogg        |       12 |  5109 | Stonesplinter Rags             |        17 |
|   626 | Foreman Thistlenettle      |       18 |  6588 | Scouting Spaulders             |        23 |
|  8529 | Scourge Champion           |       60 | 23198 | Idol of Brutality              |        65 |
| 11729 | Hive'Zora Hive Sister      |       60 | 23198 | Idol of Brutality              |        65 |
| 11730 | Hive'Regal Ambusher        |       60 | 23198 | Idol of Brutality              |        65 |
| 11732 | Hive'Regal Spitfire        |       60 | 23198 | Idol of Brutality              |        65 |
|  3204 | Gazz'uz                    |       10 |  3304 | Brackwater Gauntlets           |        14 |
|  3715 | Wrathtail Sea Witch        |       20 |  6566 | Shimmering Amice               |        24 |
|  4789 | Fallenroot Rogue           |       21 |  3413 | Doomspike                      |        25 |
|  4789 | Fallenroot Rogue           |       21 |  1491 | Ring of Precision              |        25 |
|  4789 | Fallenroot Rogue           |       21 |  1481 | Grimclaw                       |        25 |
|  3715 | Wrathtail Sea Witch        |       20 |  6579 | Defender Spaulders             |        24 |
|  4803 | Blackfathom Oracle         |       21 |  3413 | Doomspike                      |        25 |
|  4803 | Blackfathom Oracle         |       21 |  1491 | Ring of Precision              |        25 |
|  4803 | Blackfathom Oracle         |       21 |  1481 | Grimclaw                       |        25 |
|  4845 | Shadowforge Ruffian        |       36 |  9392 | Annealed Blade                 |        40 |
|  4845 | Shadowforge Ruffian        |       36 |  9383 | Obsidian Cleaver               |        40 |
|  5261 | Enthralled Atal'ai         |       45 | 10632 | Slimescale Bracers             |        49 |
|  7449 | Chillwind Ravager          |       59 | 20697 | Crystalline Threaded Cape      |        63 |
|  3204 | Gazz'uz                    |       10 | 15490 | Bloodspattered Cloak           |        14 |
|   445 | Redridge Alpha             |       20 |  6566 | Shimmering Amice               |        24 |
|   446 | Redridge Basher            |       19 |  6588 | Scouting Spaulders             |        23 |
|   475 | Kobold Tunneler            |        6 |  7350 | Disciple's Bracers             |        10 |
|   475 | Kobold Tunneler            |        6 |  6514 | Disciple's Cloak               |        10 |
|   475 | Kobold Tunneler            |        6 |  6509 | Infantry Belt                  |        10 |
|   518 | Yowler                     |       20 |  6566 | Shimmering Amice               |        24 |
|   626 | Foreman Thistlenettle      |       18 | 10405 | Bandit Shoulders               |        22 |
|   626 | Foreman Thistlenettle      |       18 |  4694 | Burnished Pauldrons            |        22 |
|  1947 | Thule Ravenclaw            |       20 |  6566 | Shimmering Amice               |        24 |
|  3105 | Makrura Snapclaw           |        8 |  3303 | Brackwater Bracers             |        12 |
|  3655 | Mad Magglish               |       17 | 15019 | Lupine Mantle                  |        21 |
|  3204 | Gazz'uz                    |       10 | 15300 | Grizzly Gloves                 |        14 |
|  3204 | Gazz'uz                    |       10 | 15013 | Lupine Cuffs                   |        14 |
|  3204 | Gazz'uz                    |       10 | 14116 | Aboriginal Cape                |        14 |
|  3204 | Gazz'uz                    |       10 | 14115 | Aboriginal Bands               |        14 |
|  3204 | Gazz'uz                    |       10 |  4693 | Ceremonial Leather Belt        |        14 |
|  3204 | Gazz'uz                    |       10 |  4687 | Barbaric Cloth Belt            |        14 |
|  3204 | Gazz'uz                    |       10 |  4681 | Brackwater Girdle              |        14 |
|   445 | Redridge Alpha             |       20 |  6579 | Defender Spaulders             |        24 |
|  3655 | Mad Magglish               |       17 | 15496 | Bloodspattered Shoulder Pads   |        21 |
+-------+----------------------------+----------+-------+--------------------------------+-----------+
46 rows in set 

Underlevelled items - not the full list, but selected rows:

+-------+--------------------------------+----------+-------+-----------------------------+-----------+
| entry | name                           | minlevel | entry | name                        | ItemLevel |
+-------+--------------------------------+----------+-------+-----------------------------+-----------+
| 11040 | Watcher Brownell               |       30 | 17184 | Small Shield                |         3 |
| 11040 | Watcher Brownell               |       30 |  2385 | Tarnished Chain Gloves      |         5 |
| 11040 | Watcher Brownell               |       30 |  2384 | Tarnished Chain Bracers     |         5 |
| 11040 | Watcher Brownell               |       30 |  2383 | Tarnished Chain Boots       |         5 |
| 11040 | Watcher Brownell               |       30 |  2381 | Tarnished Chain Leggings    |         5 |
| 11040 | Watcher Brownell               |       30 |  2380 | Tarnished Chain Belt        |         5 |
| 11040 | Watcher Brownell               |       30 |  2379 | Tarnished Chain Vest        |         5 |
| 11040 | Watcher Brownell               |       30 |  2129 | Large Round Shield          |         5 |
| 11053 | High Priestess MacDonnell      |       60 |  3841 | Golden Scale Shoulders      |        35 |
|  2404 | Blacksmith Verringtan          |       26 |  2492 | Cudgel                      |         7 |
|  2404 | Blacksmith Verringtan          |       26 |  2489 | Two-handed Sword            |         7 |
|  2404 | Blacksmith Verringtan          |       26 |  2495 | Walking Stick               |         8 |
|  2404 | Blacksmith Verringtan          |       26 |  2494 | Stiletto                    |         8 |
|  2404 | Blacksmith Verringtan          |       26 |  2491 | Large Axe                   |         8 |
|  2404 | Blacksmith Verringtan          |       26 |  2493 | Wooden Mallet               |         9 |
|  2404 | Blacksmith Verringtan          |       26 |  2490 | Tomahawk                    |         9 |
|  2404 | Blacksmith Verringtan          |       26 |  2488 | Gladius                     |         9 |
|   687 | Jungle Stalker                 |       40 |  6566 | Shimmering Amice            |        24 |
| 28559 | Citizen of New Avalon          |       45 |  6386 | Glimmering Mail Legguards   |        30 |
| 28559 | Citizen of New Avalon          |       45 |  4073 | Glimmering Mail Greaves     |        31 |
| 11317 | Jinar'Zillen                   |       40 |  2143 | Cuirboulli Boots            |        27 |
| 28559 | Citizen of New Avalon          |       45 | 12019 | Cerulean Talisman           |        32 |
| 28559 | Citizen of New Avalon          |       45 |  7412 | Infiltrator Gloves          |        32 |
|   877 | Saltscale Forager              |       35 |  2143 | Cuirboulli Boots            |        27 |
| 12340 | Drulzegar Skraghook            |       35 |  2143 | Cuirboulli Boots            |        27 |
|  2377 | Torn Fin Tidehunter            |       31 |  6579 | Defender Spaulders          |        24 |
| 11563 | Drysnap Pincer                 |       34 |  2143 | Cuirboulli Boots            |        27 |
|  2408 | Snapjaw                        |       30 |  6579 | Defender Spaulders          |        24 |
|  3203 | Fizzle Darkstorm               |       12 |  8179 | Cadet's Bow                 |         6 |
|  4095 | Galak Mauler                   |       27 |  4700 | Inscribed Leather Spaulders |        21 |
| 11562 | Drysnap Crawler                |       33 |  2143 | Cuirboulli Boots            |        27 |
|   547 | Great Goretusk                 |       16 |  6521 | Pioneer Gloves              |        11 |
|   589 | Defias Pillager                |       14 |  7109 | Pioneer Buckler             |         9 |
|  2169 | Blackwood Totemic              |       17 |  9744 | Simple Bands                |        12 |
|  3203 | Fizzle Darkstorm               |       12 |  8182 | Pellet Rifle                |         7 |
|  3203 | Fizzle Darkstorm               |       12 |  8177 | Practice Sword              |         7 |
|  3378 | Bael'dun Officer               |       26 |  4700 | Inscribed Leather Spaulders |        21 |
|  4052 | Cenarion Druid                 |       26 |  4700 | Inscribed Leather Spaulders |        21 |
+-------+--------------------------------+----------+-------+-----------------------------+-----------+

EXPECTED BLIZZLIKE BEHAVIOUR:

NPCs should drop level-appropriate items.

EXTRA NOTES:

AC HASH/COMMIT:

rev. 63a273507c75 2021-05-22 00:10:46 +0200 --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/98614244-identifying-overlevelled-item-drops-in-db?utm_campaign=plugin&utm_content=tracker%2F40032087&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F40032087&utm_medium=issues&utm_source=github).
T1ti commented 3 years ago

how it should work : If Item level is lower than 60 : (no idea how it works for BC/wotlk items) Min level of the creature = Itemlevel -1, Max = Itemlevel +3

Which means a lvl 40 mob can drop items from lvl 39 to 43.

So a lvl 40 item can be obtained from mobs lvl 37 to 41.

This formula seems to only apply to non elite creatures and colored and white items(white/green/blue/purple). Grey items seem to be lvl min +4/+10(based on lvl), max is always -1 from monster.

So it's not just "10 levles higher", the querry should be, any item that has ilevel (not req level), 4 higher than creature's max level and also, any item 2 levels lower than min level.

here's a querrry for this(only vanilla non elites) :

SELECT ct.name, ct.maxlevel, it.name, it.ItemLevel
FROM `creature_template` ct
LEFT JOIN `creature_loot_template` clt ON ct.lootid = clt.entry
JOIN `item_template` it ON clt.item = it.entry
WHERE ct.maxlevel + 4 <= it.ItemLevel AND clt.Reference = 0 AND it.class IN (2, 4) AND ct.maxlevel < 61 AND ct.rank=0 AND it.Quality>0;
Azcobu commented 3 years ago

Thanks for the info, that's very useful. I hadn't even thought to check for items lower level than they should be, and the info on ilevel vs NPC level opens up all items, not just the relative few with a RequiredLevel set.

UltraNix commented 3 years ago

@Azcobu What is the status?

Azcobu commented 3 years ago

Rerunning the query shows another 35 overlevelled items left, although all but 1 are only 4 levels higher than the NPC that drops them. Of the 35, 10 are dropped from one NPC, Gazz'uz, who probably deserves a PR of his own.

The vast majority of overlevelled items turn out to be in RLTs in any case, rather than direct drops.

UltraNix commented 3 years ago

So can be closed?

Azcobu commented 3 years ago

No.