表概述

battlemaster_entry表定义了哪些NPC可以作为战场军官(Battlemaster),以及每个军官负责排队的战场类型。玩家与这些NPC对话时,只能看到该NPC关联的战场类型。

主键为 entry(生物模板entry),bg_template对应BattlemasterList.dbc中定义的战场模板ID。

表结构

字段名数据类型默认值说明
entryINT UNSIGNED0生物entry(主键)
bg_templateINT UNSIGNED0战场模板ID

重要字段详解

entry (军官NPC)

creature_template中战场军官NPC的entry。一个军官可以关联多个战场类型(多条记录,不同bg_template)。常见军官NPC:

  • 2804 - 库尔森(部落-奥格瑞玛)
  • 5118 - 布洛坎·钢眉(联盟-暴风城)
  • 7410 - 塞尔曼·岩拳(奥特兰克山谷军官)
bg_template (战场类型)

对应BattlemasterList.dbc的ID。主要战场类型:

  • 1 - 奥特兰克山谷(Alterac Valley)
  • 2 - 战歌峡谷(Warsong Gulch)
  • 3 - 阿拉希盆地(Arathi Basin)
  • 7 - 风暴之眼(Eye of the Storm)
  • 9 - 冬拥湖(Wintergrasp)

实战案例

让一个军官NPC同时负责所有战场
INSERT INTO battlemaster_entry (entry, bg_template) VALUES
(19906, 1),  -- 奥特兰克山谷
(19906, 2),  -- 战歌峡谷
(19906, 3),  -- 阿拉希盆地
(19906, 7);  -- 风暴之眼
查询某个军官负责的战场类型
SELECT be.entry, ct.name AS npc_name, be.bg_template,
       bml.Name_Lang_zhCN AS bg_name
FROM battlemaster_entry be
JOIN creature_template ct ON be.entry = ct.entry
LEFT JOIN battlemasterlist_dbc bml ON be.bg_template = bml.ID
WHERE be.entry = 19906;

常见问题

Q: 对话军官后没有战场选项?

A: 检查三点:(1) NPC的npcflag是否设置了BATTLEMASTER标志(bit 17/值131072);(2) battlemaster_entry表中是否有关联该NPC的战场;(3) battleground_template表中对应战场是否已正确配置。

Q: 如何让军官只负责特定战场?

A: 在battlemaster_entry中只添加该entry和特定bg_template的记录。例如奥特兰克山谷军官只配置bg_template=1即可。