creature_summon_groups表是AzerothCore中定义生物召唤组的表格。它用于配置哪些生物可以被特定的召唤法术或脚本召唤出来,支持随机召唤、组合召唤等复杂的召唤机制。
字段名 | 数据类型 | 默认值 | 说明 |
---|---|---|---|
summonerId | MEDIUMINT UNSIGNED | 0 | 召唤者ID,对应creature_template.entry |
详细说明:召唤者的生物模板ID,指定哪个生物可以进行召唤。这是复合主键的一部分。
取值范围:1 - 16777215 召唤者类型:
|
|||
summonerType | TINYINT UNSIGNED | 0 | 召唤者类型 (0=生物, 1=游戏对象) |
详细说明:召唤者的类型,决定summonerId字段引用的表格。这是复合主键的一部分。
类型定义:
应用场景:
|
|||
groupId | TINYINT UNSIGNED | 0 | 召唤组ID |
详细说明:召唤组的ID,用于区分同一召唤者的不同召唤组合。这是复合主键的一部分。
取值范围:0 - 255 组织方式:
使用示例:
|
|||
entry | MEDIUMINT UNSIGNED | 0 | 被召唤生物ID,对应creature_template.entry |
详细说明:被召唤生物的模板ID,指定召唤出来的具体生物类型。
取值范围:1 - 16777215 生物选择:
召唤生物特点:
|
|||
position_x | FLOAT | 0 | 召唤位置X坐标 |
详细说明:被召唤生物相对于召唤者的X坐标偏移量。
坐标系统:
|
|||
position_y | FLOAT | 0 | 召唤位置Y坐标 |
详细说明:被召唤生物相对于召唤者的Y坐标偏移量。
坐标系统:
|
|||
position_z | FLOAT | 0 | 召唤位置Z坐标 |
详细说明:被召唤生物相对于召唤者的Z坐标偏移量。
坐标系统:
使用建议:
|
|||
orientation | FLOAT | 0 | 召唤朝向 |
详细说明:被召唤生物的朝向角度,以弧度为单位。
角度系统:
特殊值:
|
|||
summonType | TINYINT UNSIGNED | 0 | 召唤类型 |
详细说明:召唤的类型,决定被召唤生物的行为和属性。
召唤类型:
行为差异:
|
|||
summonTime | INT UNSIGNED | 0 | 召唤持续时间(毫秒) |
详细说明:被召唤生物的存在时间,以毫秒为单位。时间到后生物会自动消失。
时间设置:
设计考虑:
|
INSERT INTO creature_summon_groups
(summonerId, summonerType, groupId, entry, position_x, position_y, position_z, orientation, summonType, summonTime)
VALUES (12345, 0, 1, 12346, 5.0, 0.0, 0.0, 0.0, 1, 60000);
INSERT INTO creature_summon_groups
(summonerId, summonerType, groupId, entry, position_x, position_y, position_z, orientation, summonType, summonTime)
VALUES
(12345, 0, 2, 12347, 3.0, 3.0, 0.0, 1.57, 0, 30000),
(12345, 0, 2, 12348, -3.0, 3.0, 0.0, 4.71, 0, 30000),
(12345, 0, 2, 12349, 0.0, -5.0, 0.0, 3.14, 0, 30000);
-- 在creature_template的AIName中使用SmartAI
-- 在smart_scripts表中添加召唤事件
INSERT INTO smart_scripts
(entryorguid, source_type, id, link, event_type, event_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, target_type, target_param1, target_param2, target_param3, target_x, target_y, target_z, target_o, comment)
VALUES (12345, 0, 1, 0, 4, 0, 100, 0, 0, 0, 0, 0, 32, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Boss - On Aggro - Call Summon Group 1');
召唤数量由脚本控制,同一组中的所有记录都会被召唤。可以通过不同的groupId来控制不同的召唤组合。
召唤位置是相对于召唤者的偏移量。最终位置 = 召唤者位置 + 偏移量。