📊 表结构
| 字段名 | 数据类型 | 默认值 | 说明 |
|---|---|---|---|
| ID | int UNSIGNED | 0 | NPC或游戏对象ID (主键之一) |
| type | tinyint UNSIGNED | 0 | 类型:0=生物, 1=游戏对象 (主键之一) |
| GreetEmoteType | smallint UNSIGNED | 0 | 问候表情类型,对应Emotes.dbc |
| GreetEmoteDelay | int UNSIGNED | 0 | 问候表情延迟(毫秒) |
| Greeting | text | NULL | 问候文本 |
| VerifiedBuild | int | NULL | 验证版本号 |
🔑 核心字段详解
🆔 ID - NPC/游戏对象ID
详细说明:NPC或游戏对象的唯一ID。
- type=0时:对应creature_template.entry
- type=1时:对应gameobject_template.entry
- 与type组成复合主键
📋 type - 类型
详细说明:定义问候对象的类型。
取值范围:0-1
- 0 - 生物(Creature),ID对应creature_template.entry
- 1 - 游戏对象(GameObject),ID对应gameobject_template.entry
- 与ID组成复合主键
🎭 GreetEmoteType - 问候表情
详细说明:NPC或游戏对象问候时播放的表情。
取值范围:对应Emotes.dbc
- 对应Emotes.dbc中的表情ID
- 玩家与NPC对话时播放
- 常见表情:1=说话, 2=问候, 3=挥手, 6=点头
⏱️ GreetEmoteDelay - 表情延迟
详细说明:问候表情的延迟时间(毫秒)。
- 单位:毫秒
- 控制表情播放的延迟
- 0表示立即播放
📝 Greeting - 问候文本
详细说明:NPC或游戏对象显示的问候文本。
- 玩家与NPC对话时显示
- 为任务交互提供对话文本
- 可以包含任务相关信息
🔢 VerifiedBuild - 验证版本
详细说明:游戏客户端版本号。
- 0: 未解析
- 正数: 已从WDB文件解析
- -1: 占位符
- 负数: 已解析但手动编辑
💡 实际案例
NPC NPC ID 356 - 问候示例
NPC问候时播放说话表情,延迟0毫秒
-- type=0(生物), GreetEmoteType=1(说话), GreetEmoteDelay=0(立即)
DELETE FROM quest_greeting WHERE ID = 356 AND type = 0;
INSERT INTO quest_greeting VALUES
(356,0,1,0,'Greetings, traveler. How may I assist you today?',0);NPC NPC ID 797 - 带延迟问候
NPC问候时播放问候表情,延迟500毫秒
-- type=0(生物), GreetEmoteType=2(问候), GreetEmoteDelay=500(延迟500ms)
DELETE FROM quest_greeting WHERE ID = 797 AND type = 0;
INSERT INTO quest_greeting VALUES
(797,0,2,500,'Welcome to my humble establishment, friend.',0);对象 GameObject ID 1234 - 游戏对象问候
游戏对象问候时播放表情
-- type=1(游戏对象), GreetEmoteType=0(无表情), GreetEmoteDelay=0
DELETE FROM quest_greeting WHERE ID = 1234 AND type = 1;
INSERT INTO quest_greeting VALUES
(1234,1,0,0,'This ancient tome contains valuable knowledge.',0);NPC NPC ID 5544 - 复合主键示例
同一NPC可以有不同type的问候配置
-- type=0(生物), GreetEmoteType=6(点头), GreetEmoteDelay=0
DELETE FROM quest_greeting WHERE ID = 5544 AND type = 0;
INSERT INTO quest_greeting VALUES
(5544,0,6,0,'Well met, adventurer. Your deeds have earned you renown.',0);⚡ 快速参考
类型字段
| type=0 | 生物(Creature) |
| type=1 | 游戏对象(GameObject) |
表情字段
| GreetEmoteType | 问候表情 |
| GreetEmoteDelay | 延迟(毫秒) |
常用表情
| 1 | 说话 |
| 2 | 问候 |
| 3 | 挥手 |
| 6 | 点头 |
文本字段
| Greeting | 问候文本 |
🔗 相关表格
- creature_template - NPC模板表
- gameobject_template - 游戏对象模板表
- quest_template - 任务模板表
- quest_greeting_locale - 任务问候本地化表
❓ 常见问题
Q1: quest_greeting的作用?
为NPC或游戏对象添加问候行为,定义玩家与其对话时显示的问候表情和文本。
Q2: type字段的意义?
type=0表示生物(Creature),ID对应creature_template.entry;type=1表示游戏对象(GameObject),ID对应gameobject_template.entry。
Q3: GreetEmoteType和GreetEmoteDelay的关系?
GreetEmoteType定义问候表情,GreetEmoteDelay定义表情延迟(毫秒),玩家与NPC对话时播放问候表情。
Q4: quest_greeting的主键是什么?
主键是ID和type的组合,同一个ID可以有不同的type配置(生物和游戏对象)。