game_tele - 游戏传送表

游戏传送表包含了可以通过 .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

传送位置的唯一标识符,自动递增。每个添加的位置都有一个唯一的ID。

示例值: 10, 11, 12, 13, 14

position_x, position_y, position_z

传送位置的三维坐标。这些坐标可以通过游戏中的 .gps 命令获取。

示例坐标:

获取坐标: 在游戏中使用 .gps 命令可以获取当前位置的精确坐标。

orientation

玩家传送到目标位置后面向的方向,以弧度为单位。

方向对照:

注意: orientation值也可以通过 .gps 命令获取。

map

传送位置所在的地图ID,对应Map.dbc文件中的地图定义。

常见地图ID:

name

传送位置的描述性名称,用于 .tele 命令中识别位置。

示例名称: AgamandMills, AgmondsEnd, AgolWatha, AlcazIsland

命名规则:

GM命令使用

传送到指定位置

使用传送位置名称进行传送:

.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');

传送位置命名有什么建议?

注意事项