这是本文档旧的修订版!
*_loot_template 表
常规
Well, according to vocabulary the meaning of the word “loot” is good for corpse loot and may be for some gameobjects like chests but quite unfit for fishing “loot”. Nevermind. We will use term “loot” here as “a set of items generated on an event for a player” and “loot definition” as “a set of rules for loot generation”. And forget about vocabulary for a while.
This table format is used for 12 different tables to generate different loot items for different things. The 12 tables are creature_loot_template, disenchant_loot_template, fishing_loot_template, gameobject_loot_template, item_loot_template, pickpocketing_loot_template, prospecting_loot_template, skinning_loot_template, quest_mail_loot_template, reference_loot_template, milling_loot_template, spell_loot_template. The general description here is valid for all 12 because the loot system is the same for all eleven.
Loot templates define only items in the loot. See comments about money drop in corpse, pickpocketing and luggage loot in creature_template and item_template.
表结构
关系
Loot table | Field | Relation | Related table | Field | Comment |
---|---|---|---|---|---|
fishing_loot_template | no relation | entry is linked with ID of the fishing zone or area | |||
creature_loot_template | entry | many ← many | creature_template | lootid | |
gameobject_loot_template | entry | many ← many | gameobject_template | data1 | Only gameobject type 3 (GAMEOBJECT_TYPE_CHEST) or 25 (GAMEOBJECT_TYPE_FISHINGHOLE) use data1 as loot ID, for other types data1 is used in other ways |
item_loot_template | entry | many ← one | item_template | entry | |
disenchant_loot_template | entry | many ← many | item_template | DisenchantID | |
prospecting_loot_template | entry | many ← one | item_template | entry | |
milling_loot_template | entry | many ← one | item_template | entry | |
pickpocketing_loot_template | entry | many ← many | creature_template | pickpocketloot | |
player_loot_template | no relation | entry is linked with player TeamID | 0 = Horde, 1 = Alliance | ||
skinning_loot_template | entry | many ← many | creature_template | skinloot | Can also store minable/herbable items gathered from creatures |
quest_mail_loot_template | entry | quest_template | RewardMailTemplateId | ||
reference_loot_template | entry | many ← many | - _loot_template | -mincountOrRef | In case of negative mincountOrRef |
spell_loot_template | entry | many ← many | Spell (DBC) | SpellId |