Lua接口/服务端/LuaFnSendSystemMail:修订间差异
来自天龙知识库
跳到导航跳到搜索
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
||
| (未显示2个用户的3个中间版本) | |||
| 第1行: | 第1行: | ||
__NOTOC__ | __NOTOC__ | ||
<div class="lua-reference | <div class="lua-reference"> | ||
[[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端函数索引/场景与副本|场景与副本]] · [[Lua接口/服务端调用约定|调用约定]] | [[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端函数索引/场景与副本|场景与副本]] · [[Lua接口/服务端调用约定|调用约定]] | ||
<div | <div class="lua-lead lua-rule">发送系统邮件</div> | ||
== Lua 调用 == | == Lua 调用 == | ||
<pre | <pre>LuaFnSendSystemMail(sceneId, szName, szMail)</pre> | ||
服务端脚本中共出现 79 处调用,实参个数出现过:3 个(79 处)。 | 服务端脚本中共出现 79 处调用,实参个数出现过:3 个(79 处)。 | ||
实现位于 <code>LuaFnTbl_Scene.h</code>。 | |||
== 参数 == | == 参数 == | ||
{| class="wikitable | {| class="wikitable" | ||
! scope="col" | ! scope="col" class="lua-w11" | 序号 | ||
! scope="col" | ! scope="col" class="lua-w36" | 参数 / 类型 | ||
! scope="col | ! scope="col" | 说明 | ||
|- | |- | ||
| 1 | |||
| <code>sceneId</code><br /><span class="lua-muted"><code>number</code></span> | |||
| 当前调用所在的场景 ID。<br /><span class="lua-muted">脚本中的实参:<code>sceneId</code>(79 处)</span> | |||
|- | |- | ||
| 2 | |||
| <code>szName</code><br /><span class="lua-muted"><code>string</code></span> | |||
| 收件人姓名<br /><span class="lua-muted">脚本中的实参:<code>GetName(sceneId,selfId)</code>(37 处)、<code>GetName( sceneId, selfId )</code>(11 处)、<code>GetName(sceneId, selfId)</code>(6 处)</span> | |||
|- | |- | ||
| 3 | |||
| <code>szMail</code><br /><span class="lua-muted"><code>string</code></span> | |||
| 邮件内容<br /><span class="lua-muted">脚本中的实参:<code>mailStr</code>(10 处)、<code>strText1</code>(6 处)、<code>strText</code>(4 处)</span> | |||
|} | |} | ||
| 第36行: | 第36行: | ||
== 脚本中的调用 == | == 脚本中的调用 == | ||
以下是服务端脚本里的真实调用点,按实参形态去重后列出 8 条。这些调用取自随包发布的脚本,可用于确认参数顺序与实际传入的值;它们不代表该写法在当前版本仍然有效。 | 以下是服务端脚本里的真实调用点,按实参形态去重后列出 8 条。这些调用取自随包发布的脚本,可用于确认参数顺序与实际传入的值;它们不代表该写法在当前版本仍然有效。 | ||
<pre | <pre>-- event/dali/dianhuamibao.lua | ||
LuaFnSendSystemMail(sceneId, GetName(sceneId, selfId), "#{DHMB_08820_01}") | LuaFnSendSystemMail(sceneId, GetName(sceneId, selfId), "#{DHMB_08820_01}") | ||
| 第59行: | 第59行: | ||
-- event/dali/edali_0287.lua | -- event/dali/edali_0287.lua | ||
LuaFnSendSystemMail(sceneId, GetName(sceneId,selfId), "#{LevelMail_menpai_5}")</pre> | LuaFnSendSystemMail(sceneId, GetName(sceneId,selfId), "#{LevelMail_menpai_5}")</pre> | ||
</div> | </div> | ||
2026年9月20日 (日) 00:14的最新版本
发送系统邮件
Lua 调用
LuaFnSendSystemMail(sceneId, szName, szMail)
服务端脚本中共出现 79 处调用,实参个数出现过:3 个(79 处)。
实现位于 LuaFnTbl_Scene.h。
参数
| 序号 | 参数 / 类型 | 说明 |
|---|---|---|
| 1 | sceneIdnumber
|
当前调用所在的场景 ID。 脚本中的实参: sceneId(79 处)
|
| 2 | szNamestring
|
收件人姓名 脚本中的实参: GetName(sceneId,selfId)(37 处)、GetName( sceneId, selfId )(11 处)、GetName(sceneId, selfId)(6 处)
|
| 3 | szMailstring
|
邮件内容 脚本中的实参: mailStr(10 处)、strText1(6 处)、strText(4 处)
|
返回值
无返回值。赋值接收时得到 nil;这与返回数字 0 不同。
脚本中的调用
以下是服务端脚本里的真实调用点,按实参形态去重后列出 8 条。这些调用取自随包发布的脚本,可用于确认参数顺序与实际传入的值;它们不代表该写法在当前版本仍然有效。
-- event/dali/dianhuamibao.lua
LuaFnSendSystemMail(sceneId, GetName(sceneId, selfId), "#{DHMB_08820_01}")
-- event/dali/edali_0287.lua
LuaFnSendSystemMail(sceneId, GetName(sceneId,selfId), "#{LevelMail_menpai_3}")
-- event/dali/edali_0287.lua
LuaFnSendSystemMail(sceneId, GetName(sceneId,selfId), "#{LevelMail_menpai_2}")
-- event/dali/edali_0287.lua
LuaFnSendSystemMail(sceneId, GetName(sceneId,selfId), "#{LevelMail_menpai_6}")
-- event/dali/edali_0287.lua
LuaFnSendSystemMail(sceneId, GetName(sceneId,selfId), "#{LevelMail_menpai_9}")
-- event/dali/edali_0287.lua
LuaFnSendSystemMail(sceneId, GetName(sceneId,selfId), "#{LevelMail_menpai_4}")
-- event/dali/edali_0287.lua
LuaFnSendSystemMail(sceneId, GetName(sceneId,selfId), "#{LevelMail_menpai_1}")
-- event/dali/edali_0287.lua
LuaFnSendSystemMail(sceneId, GetName(sceneId,selfId), "#{LevelMail_menpai_5}")