剥皮掉落模板表存储了玩家使用剥皮技能对生物尸体进行剥皮时可能获得的物品信息。这个表定义了物品的掉落几率、数量范围和掉落条件等属性。
skinning_loot_template表的结构与其他掉落模板表(如creature_loot_template、gameobject_loot_template等)完全相同。
字段名 | 类型 | 属性 | 描述 |
---|---|---|---|
Entry | mediumint(8) unsigned | 主键,不为空,默认0 | 生物模板ID,对应creature_template表中的entry字段 |
Item | mediumint(8) unsigned | 主键,不为空,默认0 | 物品ID,对应item_template表中的entry字段 |
Reference | mediumint(8) unsigned | 不为空,默认0 | 引用ID,如果不为0,则引用另一个掉落模板 |
Chance | float | 不为空,默认100 | 掉落几率(百分比) |
QuestRequired | tinyint(1) unsigned | 不为空,默认0 | 是否需要任务(0=否,1=是) |
LootMode | smallint(5) unsigned | 不为空,默认1 | 掉落模式 |
GroupId | tinyint(3) unsigned | 不为空,默认0 | 组ID,同一组中只会掉落一个物品 |
MinCount | tinyint(3) unsigned | 不为空,默认1 | 最小数量 |
MaxCount | tinyint(3) unsigned | 不为空,默认1 | 最大数量 |
Comment | varchar(255) | 不为空,默认'' | 注释 |
剥皮是一种专业技能,允许玩家从某些生物的尸体上获取皮革、毛皮、鳞片等材料。剥皮系统的工作原理如下:
注意: 生物是否可剥皮由creature_template表中的skinloot字段决定。如果skinloot大于0,则该生物可以剥皮,且skinloot的值作为skinning_loot_template表中的Entry。
以下SQL语句将为狼(ID为1)添加基础剥皮掉落:
INSERT INTO skinning_loot_template (Entry, Item, Chance, MinCount, MaxCount, Comment)
VALUES
(1, 2318, 80, 1, 2, '轻皮'),
(1, 2934, 20, 1, 1, '破烂的皮革');
注意: 还需要确保creature_template表中对应生物的skinloot字段设置为1:
UPDATE creature_template SET skinloot = 1 WHERE entry = 狼的ID;
以下SQL语句将为不同等级的熊添加不同的剥皮掉落:
-- 低级熊(ID=100)
INSERT INTO skinning_loot_template (Entry, Item, Chance, MinCount, MaxCount, Comment)
VALUES
(100, 2318, 90, 1, 3, '轻皮'),
(100, 2934, 10, 1, 1, '破烂的皮革');
-- 中级熊(ID=101)
INSERT INTO skinning_loot_template (Entry, Item, Chance, MinCount, MaxCount, Comment)
VALUES
(101, 4232, 80, 1, 2, '中皮'),
(101, 4235, 20, 1, 1, '重皮');
-- 高级熊(ID=102)
INSERT INTO skinning_loot_template (Entry, Item, Chance, MinCount, MaxCount, Comment)
VALUES
(102, 4235, 70, 1, 2, '重皮'),
(102, 8169, 25, 1, 1, '厚皮'),
(102, 8171, 5, 1, 1, '硬化皮革');
以下SQL语句将为龙(ID=200)添加稀有剥皮掉落:
INSERT INTO skinning_loot_template (Entry, Item, Chance, MinCount, MaxCount, Comment)
VALUES
(200, 8165, 60, 1, 3, '磨损的龙鳞'),
(200, 8167, 30, 1, 2, '龙鳞'),
(200, 8168, 10, 1, 1, '硬化龙鳞');
以下SQL语句将为特定生物(ID=300)添加一个任务物品剥皮掉落,只有有相关任务的玩家才能看到和拾取:
INSERT INTO skinning_loot_template (Entry, Item, Chance, QuestRequired, MinCount, MaxCount, Comment)
VALUES (300, 5082, 100, 1, 1, 1, '完整的蜥蜴皮');
以下SQL语句将为特定生物(ID=400)添加引用掉落,引用ID为10002的掉落模板:
INSERT INTO skinning_loot_template (Entry, Item, Reference, Chance, Comment)
VALUES (400, 10002, 10002, 10, '稀有皮革掉落组');
使用以下SQL语句查询特定生物的剥皮掉落:
SELECT ct.entry, ct.name, ct.skinloot, sl.Item, it.name, sl.Chance, sl.MinCount, sl.MaxCount
FROM creature_template ct
JOIN skinning_loot_template sl ON ct.skinloot = sl.Entry
JOIN item_template it ON sl.Item = it.entry
WHERE ct.entry = 生物ID;
使用以下SQL语句查询特定物品在哪些生物上可以剥皮获得:
SELECT ct.entry, ct.name, sl.Chance, sl.MinCount, sl.MaxCount
FROM skinning_loot_template sl
JOIN creature_template ct ON sl.Entry = ct.skinloot
WHERE sl.Item = 物品ID AND ct.skinloot > 0;
不需要完全重启服务器,但需要重新加载掉落模板数据:
.reload all_loot
或者只重新加载剥皮掉落模板:
.reload skinning_loot_template
可能的原因包括:
剥皮所需的技能等级通常基于生物的等级,遵循以下规则:
这个规则是由游戏核心代码控制的,不能通过数据库直接修改。