View Single Post
  #17  
Old 07-07-2006, 03:49 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quote:
Originally Posted by sesmar
I am not exactly sure on how the PEQ does their numbering but I do not think an NPC can belong to a zone based on the npc_types.id because a given NPC can appear in any number of zones. Such as a Gnoll Pup can be in North Qeynos and Qeynos Hills.

In order to get Loot Table information for the mob in a particular zone you will have to start with Spawn2 to get all the Spawn Groups in that zone as any NPC that spawns in the zone will be an entry in a spawn group. Then you link to npc_types using the ID and from there to LootTable information which is spread out over multiple tables.

I used one query to display some of the information you need but my suggestion would be to write the query in stages pull out all the information from each table you need so you can reinsert the loot information with new ID's to fit your DB.
Actually, the data I pulled from Cavedude's was what had the zoneID in the npc_types.id number - which is a very good idea . Maybe it was done for some other reason, but very effective in isolating the data by zone. It wouldn't be a bad idea to reserve the first three digits in the npc_types.id for the zone number - it also would be a good idea to include zone name in places like loottable.name and lootdrop.name; I'm going back through what I have done and adding this.
Reply With Quote