Lua接口/服务端/LuaFnBusAddPassenger:修订间差异

来自天龙知识库
跳到导航跳到搜索
雪舞​(留言 | 贡献)
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例
Waylee​(留言 | 贡献)
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例
 
(未显示2个用户的3个中间版本)
第1行: 第1行:
__NOTOC__
__NOTOC__
<div class="lua-reference" style="max-width:1200px;margin:0 auto;line-height:1.8;color:#29343a;font-family:Arial,'Microsoft YaHei',sans-serif;letter-spacing:0;overflow-wrap:anywhere;">
<div class="lua-reference">
[[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端函数索引/载具与乘客|载具与乘客]] · [[Lua接口/服务端调用约定|调用约定]]
[[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端函数索引/载具与乘客|载具与乘客]] · [[Lua接口/服务端调用约定|调用约定]]


<div style="padding:14px 0;border-top:3px solid #287568;border-bottom:1px solid #dbe3e6;">把指定乘客加入载具。</div>
<div class="lua-lead lua-rule">把指定乘客加入载具。</div>


<div style="margin:10px 0;padding:10px 12px;border-left:3px solid #9a7940;background:#faf7f0;font-size:13px;color:#5f5136;">本页由服务端绑定源码与随包脚本自动整理:用途、参数位置与返回数量取实现体,<b>未在游戏内执行验证</b>。在 4244 个服务端脚本中未检索到该接口的调用点。</div>
== Lua 调用 ==
<pre>LuaFnBusAddPassenger(sceneId, nBusObjID, nPassengerID)</pre>
 
服务端脚本中未检索到该接口的调用点(已检索 4245 个随包脚本)。


== Lua 调用 ==
实现位于 <code>LuaFnTbl_Bus.h</code>。
<pre style="white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.7;padding:12px;background:#f5f7f8;border:1px solid #dbe3e6;">LuaFnBusAddPassenger(sceneId, nBusObjID, nPassengerID)</pre>


== 参数 ==
== 参数 ==
{| class="wikitable" style="width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px;"
{| class="wikitable"
! scope="col" style="text-align:left;background:#edf3f2;padding:8px;width:11%;" | 序号
! scope="col" class="lua-w11" | 序号
! scope="col" style="text-align:left;background:#edf3f2;padding:8px;width:36%;" | 参数 / 类型
! scope="col" class="lua-w36" | 参数 / 类型
! scope="col" style="text-align:left;background:#edf3f2;padding:8px;" | 说明
! scope="col" | 说明
|-
|-
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 1
| 1
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | <code style="white-space:normal;overflow-wrap:anywhere;">sceneId</code><br /><span style="color:#657078;"><code style="white-space:normal;overflow-wrap:anywhere;">number</code></span>
| <code>sceneId</code><br /><span class="lua-muted"><code>number</code></span>
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 当前调用所在的场景 ID。
| 当前调用所在的场景 ID。
|-
|-
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 2
| 2
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | <code style="white-space:normal;overflow-wrap:anywhere;">nBusObjID</code><br /><span style="color:#657078;"><code style="white-space:normal;overflow-wrap:anywhere;">number</code></span>
| <code>nBusObjID</code><br /><span class="lua-muted"><code>number</code></span>
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 载具的场景对象 ID。
| 载具的场景对象 ID。
|-
|-
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 3
| 3
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | <code style="white-space:normal;overflow-wrap:anywhere;">nPassengerID</code><br /><span style="color:#657078;"><code style="white-space:normal;overflow-wrap:anywhere;">number</code></span>
| <code>nPassengerID</code><br /><span class="lua-muted"><code>number</code></span>
| style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 乘客的场景对象 ID。
| 乘客的场景对象 ID。
|}
|}


== 返回值 ==
== 返回值 ==
根据执行分支,返回数量可能为 0、1 个(0 个表示无返回值)。返回类型包括 <code style="white-space:normal;overflow-wrap:anywhere;">number</code>。
根据执行分支,返回数量可能为 0、1 个(0 个表示无返回值)。返回类型包括 <code>number</code>。
 
<div style="margin-top:20px;padding-top:10px;border-top:1px solid #dbe3e6;color:#657078;font-size:12px;">核对依据:<code style="white-space:normal;overflow-wrap:anywhere;">LuaFnTbl_Bus.h</code> 第 74 行,服务端注册表第 1197 行。调用格式与返回数量依据当前实现整理;脚本调用点取自 4244 个随包脚本(共 535888 行、命中 85384 处调用),未经运行验证。游戏内效果、边界行为及未注明的业务枚举仍需实测。</div>


</div>
</div>

2026年9月20日 (日) 00:16的最新版本

首页 · 服务端接口 · 载具与乘客 · 调用约定

把指定乘客加入载具。

Lua 调用

LuaFnBusAddPassenger(sceneId, nBusObjID, nPassengerID)

服务端脚本中未检索到该接口的调用点(已检索 4245 个随包脚本)。

实现位于 LuaFnTbl_Bus.h。

参数

序号 参数 / 类型 说明
1 sceneId
number
当前调用所在的场景 ID。
2 nBusObjID
number
载具的场景对象 ID。
3 nPassengerID
number
乘客的场景对象 ID。

返回值

根据执行分支,返回数量可能为 0、1 个(0 个表示无返回值)。返回类型包括 number。