TrinityCore / TrinityCore

TrinityCore Open Source MMO Framework (master = 11.0.5.57534, 3.3.5 = 3.3.5a.12340, cata classic = 4.4.1.57564)
http://www.trinitycore.org
GNU General Public License v2.0
9.62k stars 6.06k forks source link

DB/Loot: Reference template 24078 corrections #21345

Closed Teppic1 closed 6 years ago

Teppic1 commented 6 years ago

Description:

Reference template 24078 should contain generic green gear at ilvls 18-19.

Current behaviour:

Several items that should only drop from specific NPCs are contained in the template and so drop from hundreds of NPCs.

The patch removes all of the unique items and adds them to the correct NPCs. The items in question are documented in the patch. (I'm slowly going through all of the templates in level order.)

Branch(es):

3.3.5 only

TC rev. hash/commit:

TrinityCore rev. 2119a5979d7c 2018-01-30 18:13:23 +0100 (3.3.5 branch) (Unix, RelWithDebInfo, Static)

TDB version: 335.63

-- Remove unique items from reference table 24078
DELETE FROM `reference_loot_template` WHERE `Entry`=24078 AND `Item` IN (899, 1391, 1440, 1446, 1469, 1473, 1929, 1930, 1936, 1943, 1944, 1945, 1951, 2020, 4290, 10400, 10401, 10402);

-- Add former items from reference table 24078 to their proper NPCs
DELETE FROM `creature_loot_template` WHERE `Item` IN (899, 1391, 1440, 1446, 1469, 1473, 1929, 1930, 1936, 1943, 1944, 1945, 1951, 2020, 4290, 10400, 10401, 10402);
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`, `Comment`) VALUES
(217, 899, 0.1, 0, "Venom Web Spider - Venom Web Fang"),
(453, 1391, 0.1, 0, "Riverpaw Mystic - Riverpaw Mystic Staff"),
(446, 1440, 0.1, 0, "Redridge Basher - Gnoll Skull Basher"),
(440, 1446, 0.1, 0, "Blackrock Grunt - Blackrock Boots"),
(578, 1469, 0.1, 0, "Murloc Scout - Scimitar of Atun"),
(14270, 1469, 1, 0, "Squiddic - Scimitar of Atun"),
(545, 1473, 0.1, 0, "Murloc Tidecaller - Riverside Staff"),
(1729, 1929, 0.1, 0, "Defias Evoker - Silk-threaded Trousers"),
(4418, 1929, 0.1, 0, "Defias Wizard - Silk-threaded Trousers"),
(598, 1930, 0.1, 0, "Defias Miner - Stonemason Cloak"),
(622, 1936, 0.1, 0, "Goblin Engineer - Goblin Screwdriver"),
(3947, 1943, 0.1, 0, "Goblin Shipbuilder - Goblin Mail Leggings"),
(1731, 1944, 0.1, 0, "Goblin Craftsman - Metalworking Gloves"),
(641, 1945, 0.1, 0, "Goblin Woodcarver - Woodworking Gloves"),
(657, 1951, 0.1, 0, "Defias Pirate - Blackwater Cutlass"),
(1732, 1951, 0.1, 0, "Defias Squallshaper - Blackwater Cutlass"),
(539, 2020, 0.1, 0, "Pygmy Venom Web Spider - Hollowfang Blade"),
(832, 4290, 0.5, 0, "Dust Devil - Dust Bowl"),
(634, 10400, 0.5, 2, "Defias Overseer - Blackened Defias Leggings"),
(4417, 10400, 0.5, 2, "Defias Taskmaster - Blackened Defias Leggings"),
(634, 10401, 0.5, 2, "Defias Overseer - Blackened Defias Gloves"),
(4417, 10401, 0.5, 2, "Defias Taskmaster - Blackened Defias Gloves"),
(4416, 10402, 0.5, 0, "Defias Strip Miner - Blackened Defias Boots");
ghost commented 6 years ago

Thank you for the contribution. I particularly appreciated the active use of the Comment field. 👍

offl commented 6 years ago

I particularly appreciated the active use of the Comment field.

Better to update all comments for all loot tables. And then filling the Comment field will be a codestyle standart for future devs. Because currently it looks strange when you or someone else ask for fill the Comment field. It's almost unused. The combination of CreatureName + ItemName looks better. More easier to update. Or the Comment can contain only the item name and nothing else.

ghost commented 6 years ago

I agree that there should be a standard. Until now, the standard used to be "Don't add data which can be accessed / queried from other tables" - maybe as an effort to keep the DB size low. If that is no longer the case, the comment standard could be anything from only the item name to describing every detail from the other columns (or anything in between).

offl commented 6 years ago

Don't add data which can be accessed / queried from other tables

Then the Comment field must be always empty :D Maybe such fields can be filled at server startup, if a config allows to fill them. But will never fill by common sql updates. So if you wanna check loot templates, change the config for more confortable work.

ghost commented 6 years ago

Very well. That looks like a practical solution, although I don't know (at the moment) exactly how it could be implemented for offline (local) updates in the DB. This is most likely outside the scope of the issue tracker, so I think a discussion in the TC forum pages would be more constructive to find a solution for the comment column. Feel free to link the page if you want to start the topic.

Teppic1 commented 6 years ago

Do you want me to continue adding the comments in the meantime?

ghost commented 6 years ago

Sure, I have absolutely no problem accepting the comments. Only remove them if requested to do so by one of the main TC members who regularly commits to the source.