skill_perfect_item_template 表
skill_perfect_item_template表定义专业技能制作时的"完美物品"暴击机制,通过专精技能触发替代产出。
表概述
skill_perfect_item_template表属于Crafting Perfection System,实现专业技能制作中的"完美暴击"机制。当玩家在制作物品且满足专精要求时,有概率产出优于普通的"完美"版本物品。
主键为 spellId,对应制造技能的法术ID。requiredSpecialization关联专精法术,perfectCreateChance定义暴击概率,perfectItemType定义暴击产出的替代物品。
表结构
| 字段名 | 数据类型 | 默认值 | 说明 |
|---|---|---|---|
| spellId | INT UNSIGNED | 0 | 制造法术ID(主键) |
| requiredSpecialization | INT UNSIGNED | 0 | 需要的专精法术ID |
| perfectCreateChance | FLOAT | 0 | 完美物品产出概率 |
| perfectItemType | INT UNSIGNED | 0 | 完美替代物品ID |
重要字段详解
requiredSpecialization (专精法术)
玩家必须已学会此专精法术,完美暴击才会生效。例如锻造的护甲专精、武器的剑专精等。对应Spell.dbc中的被动专精法术ID。
设为0表示不需要任何专精,所有制作该物品的玩家都适用。
perfectCreateChance (暴击概率)
浮点数百分比,表示制作时产出完美物品的概率。常见设置:
- 5.0 - 5%概率暴击
- 10.0 - 10%概率暴击
- 0 - 禁用暴击
该概率独立于普通暴击(skill_discovery_template),是额外的产出替代机制。
实战案例
设置锻造护甲专精制作时10%概率产出完美版
INSERT INTO skill_perfect_item_template (spellId, requiredSpecialization, perfectCreateChance, perfectItemType)
VALUES (34529, 9788, 10.0, 50001)
ON DUPLICATE KEY UPDATE perfectCreateChance=10.0, perfectItemType=50001;
-- spellId=34529: 制作某个护甲
-- requiredSpecialization=9788: 护甲锻造专精
-- perfectItemType=50001: 完美版护甲物品ID
查询所有配置了完美暴击的制造技能
SELECT spt.spellId, spt.requiredSpecialization,
spt.perfectCreateChance, spt.perfectItemType,
it1.name AS normal_item, it2.name AS perfect_item
FROM skill_perfect_item_template spt
LEFT JOIN spell_template st ON spt.spellId = st.Id
LEFT JOIN item_template it2 ON spt.perfectItemType = it2.entry;
常见问题
Q: 与skill_discovery_template有何区别?
A: skill_discovery_template是"发现"系统,制作时概率学会新配方(学到新技能);skill_perfect_item_template是"暴击"系统,概率产出更好的替代物品(物品质量升级)。两者机制独立可迭加。
Q: perfectCreateChance超过100会怎样?
A: 超过100仍然有效,但系统会将其作为概率因子处理,大于等于100时每次制作都会触发完美产出。