📖 表说明
偷窃掉落模板表定义了盗贼使用偷窃技能对生物进行偷窃时可能获得的物品及其概率。这个表控制着盗贼偷窃系统的核心机制,决定了玩家对各种生物进行偷窃时能够获得什么物品。
数据来源: 本文档基于AzerothCore官方Wiki和官方数据表借鉴.sql编写,确保字段定义的准确性和权威性。
📊 表结构
| 字段名 | 数据类型 | 属性 | 键 | 默认值 | 描述 |
|---|---|---|---|---|---|
| Entry | int UNSIGNED | 不为空 | 主键 | 0 | 偷窃ID,对应creature_template.pickpocketloot |
| Item | int UNSIGNED | 不为空 | 主键 | 0 | 物品ID,对应item_template.entry |
| Reference | int | 不为空 | 0 | 引用ID,如果不为0则引用reference_loot_template | |
| Chance | float | 不为空 | 100 | 掉落几率(百分比) | |
| QuestRequired | tinyint | 不为空 | 0 | 是否需要任务(0=否,1=是) | |
| LootMode | smallint UNSIGNED | 不为空 | 1 | 掉落模式(位掩码) | |
| GroupId | tinyint UNSIGNED | 不为空 | 0 | 组ID,同一组中只会掉落一个物品 | |
| MinCount | tinyint UNSIGNED | 不为空 | 1 | 最小掉落数量 | |
| MaxCount | tinyint UNSIGNED | 不为空 | 1 | 最大掉落数量 | |
| Comment | varchar(255) | 可为空 | NULL | 注释说明 |
主键: (Entry, Item)
注意: pickpocketing_loot_template的GroupId不是主键
🔑 核心字段详解
🆔 Entry - 偷窃ID
详细说明:偷窃掉落模板的唯一标识ID,对应creature_template表中的pickpocketloot字段。
取值范围:对应creature_template.pickpocketloot
- 主键字段,标识偷窃掉落模板
- 对应creature_template.pickpocketloot字段
- 只有设置了偷窃ID的生物才能被盗贼偷窃
- 用于关联生物和其偷窃产物
示例:
- Entry=1 - 低级生物的偷窃配置
- Entry=10 - 高级生物的偷窃配置
📦 Item - 物品ID
详细说明:偷窃获得的物品ID,对应item_template表中的entry字段。
取值范围:对应item_template.entry
- 主键字段,标识偷窃获得的物品
- 必须对应item_template表中存在的entry
- 通常是钱币、垃圾物品、任务物品等
- 用于定义偷窃产出的具体物品
示例:
- Item=117 - 硬面包(偷窃获得的食物)
- Item=159 - refreshing water(偷窃获得的水)
其他字段说明
注意: 其他字段(Reference、Chance、QuestRequired、LootMode、GroupId、MinCount、MaxCount、Comment)的详细说明与creature_loot_template完全相同,请参考 creature_loot_template 的字段详解。
💡 实际案例
偷窃 Entry 1 - 低级生物偷窃
低级生物的偷窃掉落配置示例
-- Entry 1:低级生物偷窃
DELETE FROM pickpocketing_loot_template WHERE Entry = 1;
INSERT INTO pickpocketing_loot_template VALUES
(1, 117, 0, 50, 0, 1, 0, 1, 1, '硬面包'),
(1, 159, 0, 30, 0, 1, 0, 1, 1, ' refreshing water'),
(1, 1205, 0, 20, 0, 1, 0, 1, 1, '铜矿石');
效果: 对低级生物进行偷窃有50%几率获得1个硬面包,30%几率获得1个 refreshing water,20%几率获得1个铜矿石。
偷窃 Entry 10 - 高级生物偷窃
高级生物的偷窃掉落配置示例
-- Entry 10:高级生物偷窃
DELETE FROM pickpocketing_loot_template WHERE Entry = 10;
INSERT INTO pickpocketing_loot_template VALUES
(10, 117, 0, 100, 0, 1, 0, 1, 3, '硬面包'),
(10, 159, 0, 100, 0, 1, 0, 1, 2, ' refreshing water');
效果: 对高级生物进行偷窃必定获得1-3个硬面包和1-2个 refreshing water。
⚡ 快速参考
偷窃产物类型
| 生物等级 | 常见Entry | 主要产物 | 说明 |
|---|---|---|---|
| 低级生物 | 1-10 | 食物、水、钱币等 | 低级生物的偷窃配置 |
| 中级生物 | 11-20 | 食物、水、材料等 | 中级生物的偷窃配置 |
| 高级生物 | 21+ | 高级物品等 | 高级生物的偷窃配置 |
表关系
- 主表: creature_template - 生物模板表
- 关联字段: Entry → creature_template.pickpocketloot
- 物品表: item_template - 物品模板表
- 关联字段: Item → item_template.entry
- 引用表: reference_loot_template - 引用掉落模板表
- 关联字段: Reference → reference_loot_template.entry
🔗 相关表格
- creature_template - 生物模板表
- item_template - 物品模板表
- creature_loot_template - 生物掉落模板表
- reference_loot_template - 引用掉落模板表
❓ 常见问题
Q1: 如何配置生物的偷窃产物?
在creature_template表中设置pickpocketloot字段,然后在pickpocketing_loot_template表中添加对应的偷窃配置。例如:pickpocketloot=1的生物会使用Entry=1的偷窃配置。
Q2: 偷窃产物可以设置多个物品吗?
可以。在pickpocketing_loot_template表中添加多个条目,每个条目对应一个可能的偷窃产物。使用Chance字段控制各物品的出现几率。
Q3: 如何配置必定获得的偷窃产物?
设置Chance=100,表示该物品必定获得。可以配合MinCount和MaxCount字段控制物品的数量范围。