游戏传送表包含了可以通过 .tele 命令在游戏中使用的传送位置列表。此表中的条目可以手动添加/删除,也可以通过 .tele add 和 .tele delete 命令进行管理。
| 字段名 | 类型 | 属性 | 键 | 默认值 | 描述 |
|---|---|---|---|---|---|
| id | mediumint(8) unsigned | 不为空 | 主键 | 自增 | 传送位置的唯一标识符 |
| position_x | float | 不为空 | 0 | 传送位置的X坐标 | |
| position_y | float | 不为空 | 0 | 传送位置的Y坐标 | |
| position_z | float | 不为空 | 0 | 传送位置的Z坐标 | |
| orientation | float | 不为空 | 0 | 传送后玩家面向的方向 | |
| map | smallint(5) unsigned | 不为空 | 0 | 地图ID | |
| name | varchar(100) | 不为空 | 传送位置的描述性名称 |
传送位置的唯一标识符,自动递增。每个添加的位置都有一个唯一的ID。
示例值: 10, 11, 12, 13, 14
传送位置的三维坐标。这些坐标可以通过游戏中的 .gps 命令获取。
示例坐标:
获取坐标: 在游戏中使用 .gps 命令可以获取当前位置的精确坐标。
玩家传送到目标位置后面向的方向,以弧度为单位。
方向对照:
注意: orientation值也可以通过 .gps 命令获取。
传送位置所在的地图ID,对应Map.dbc文件中的地图定义。
常见地图ID:
传送位置的描述性名称,用于 .tele 命令中识别位置。
示例名称: AgamandMills, AgmondsEnd, AgolWatha, AlcazIsland
命名规则:
使用传送位置名称进行传送:
.tele AgamandMills
在当前位置添加新的传送点:
.tele add 新位置名称
删除指定名称的传送位置:
.tele delete 位置名称
显示所有可用的传送位置:
.tele
搜索包含特定关键词的传送位置:
.tele 关键词
INSERT INTO game_tele (position_x, position_y, position_z, orientation, map, name)
VALUES (1234.56, -2345.67, 123.45, 1.57, 0, 'MyCustomLocation');
SELECT id, name, position_x, position_y, position_z
FROM game_tele
WHERE map = 0
ORDER BY name;
UPDATE game_tele
SET position_x = 1000.0, position_y = 2000.0, position_z = 50.0
WHERE name = 'AgamandMills';
DELETE FROM game_tele
WHERE name = 'OldLocation';
-- 暴风城
INSERT INTO game_tele (position_x, position_y, position_z, orientation, map, name)
VALUES (-8833.38, 628.628, 94.0066, 1.06465, 0, 'Stormwind');
-- 奥格瑞玛
INSERT INTO game_tele (position_x, position_y, position_z, orientation, map, name)
VALUES (1676.21, -4315.29, 61.5292, 1.54462, 1, 'Orgrimmar');
-- 死亡矿井入口
INSERT INTO game_tele (position_x, position_y, position_z, orientation, map, name)
VALUES (-11208.5, 1685.34, 25.7612, 0, 0, 'DeadminesEntrance');
-- 血色修道院入口
INSERT INTO game_tele (position_x, position_y, position_z, orientation, map, name)
VALUES (2924.38, -798.429, 161.611, 0.509892, 0, 'ScarletMonastery');
检查以下几点:
可以使用SQL脚本批量插入:
INSERT INTO game_tele (position_x, position_y, position_z, orientation, map, name) VALUES
(1000.0, 2000.0, 50.0, 0, 0, 'Location1'),
(1100.0, 2100.0, 55.0, 1.57, 0, 'Location2'),
(1200.0, 2200.0, 60.0, 3.14, 1, 'Location3');