Jump to content
TrinityCore

item_template / Item sources


Acciderk
 Share

Recommended Posts

Hi there. I'm helping some friends with a sql project, trying to utilize the various tables within trinitycore 3.3.5a. I downloaded world database from TDB 335.21061 and have been working with that. 

I've read through the help pages on the confluence site, which were quite helpful in establishing relationships thus far. I've been able to transform most of what I was after, but I'm running into a snag with the creature_loot_template table. Either I'm misunderstanding the relationship with this table and creature_template, or the version of the table I have is missing some data. 

select cl.Entry, c.name, c.minlevel, c.rank, i.name, i.entry
from test.creature_loot_template cl
inner join test.creature_template c on cl.Entry=c.lootid
inner join test.item_template i on cl.Item=i.entry
where c.entry = 39168

^ Running this gives me The Lich King (3) 's loot, aka Heroic Lich King 25's loot.   But when I run it, I only see the "items" that drop from him, not the gear. The ultimate goal is to tie the gear in with the item_template table. I thought I was onto something with the creature_loot_table, but again only saw items. I'm wondering if maybe I didn't get the full table? Or maybe that info is somewhere else. Anyone have any suggestions? Thanks in advance!

Link to comment
Share on other sites

Hello and welcome Acciderk,

 

i can only suggest you to read over the Loot Article in the wiki, since what you are missing here is a loop through the loot reference table. 

The Lich King (c.e. 39168) has 5 directly attached items in his default loot template, one if them requires to be on a quest.

Every other loot comes from loot references (also part of said template). I attached a picture to make this more visible/clear:

 

image.thumb.png.edb8fe733bfed3ef7ecb78e3579d3f0f.png

  • Like 1
Link to comment
Share on other sites

4 hours ago, Jinnai said:

Hello and welcome Acciderk,

 

i can only suggest you to read over the Loot Article in the wiki, since what you are missing here is a loop through the loot reference table. 

The Lich King (c.e. 39168) has 5 directly attached items in his default loot template, one if them requires to be on a quest.

Every other loot comes from loot references (also part of said template). I attached a picture to make this more visible/clear:

 

image.thumb.png.edb8fe733bfed3ef7ecb78e3579d3f0f.png

Thank you for your response. I didn't quite understand the reference table when I was reading through originally but it's starting to make more sense now that you put it this way. And of course I'm losing those references with my join, so I'll have to rethink the approach.

This is quite helpful, now I have something more to play with, thanks again!

Link to comment
Share on other sites

Quick follow up to this, @Jinnai if you're still around.  Can you tell me where you took that screenshot from?  I'm assuming it's a web/php version of a query to the database, looked around on this site and saw there were some old projects (2012-2014) for something like, but I couldn't find anything current.

Link to comment
Share on other sites

Hey Acciderk,

that Screenshot was taken from a my personal copy of AoWoW.

Jackpoz is also managing one for Trinitycore, you can find it here (link specified to your test npc).

This is a WoWHead style webdatabase, made for private servers like TC. You wont find the details from my screenshot in an public version, since this is taken from staff/admin view but the general idea of it is being a user-database.

The Code of this project is public accessible here.

Since i expect you to be interested in the loot generation, ill save you some time and also link you the respective code file.
 

Have a nice day!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...