|
|
| 第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> |
|
| |
|
| == Lua 调用 == | | == Lua 调用 == |
| <pre style="white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.7;padding:12px;background:#f5f7f8;border:1px solid #dbe3e6;">IssuePetPlacardByIndex(sceneId, selfId, targetId, nPetIndex, pszMessage)</pre> | | <pre>IssuePetPlacardByIndex(sceneId, selfId, targetId, nPetIndex, pszMessage)</pre> |
|
| |
|
| 服务端脚本中未检索到该接口的调用点(已检索 4244 个随包脚本)。 | | 服务端脚本中未检索到该接口的调用点(已检索 4244 个随包脚本)。 |
|
| |
|
| 实现位于 <code style="white-space:normal;overflow-wrap:anywhere;">LuaFnTbl_PetPlacard.h</code> 第 41 行,注册表第 892 行。 | | 实现位于 <code>LuaFnTbl_PetPlacard.h</code> 第 41 行,注册表第 892 行。 |
|
| |
|
| == 参数 == | | == 参数 == |
| {| 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;">selfId</code><br /><span style="color:#657078;"><code style="white-space:normal;overflow-wrap:anywhere;">number</code></span>
| | | <code>selfId</code><br /><span class="lua-muted"><code>number</code></span> |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 当前场景内的对象 ID。玩家接口需传入有效玩家对象;不是角色 GUID。
| | | 当前场景内的对象 ID。玩家接口需传入有效玩家对象;不是角色 GUID。 |
| |- | | |- |
| | 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;">targetId</code><br /><span style="color:#657078;"><code style="white-space:normal;overflow-wrap:anywhere;">number</code></span>
| | | <code>targetId</code><br /><span class="lua-muted"><code>number</code></span> |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | Npc编号
| | | Npc编号 |
| |- | | |- |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 4
| | | 4 |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | <code style="white-space:normal;overflow-wrap:anywhere;">nPetIndex</code><br /><span style="color:#657078;"><code style="white-space:normal;overflow-wrap:anywhere;">number</code></span>
| | | <code>nPetIndex</code><br /><span class="lua-muted"><code>number</code></span> |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 珍兽索引。
| | | 珍兽索引。 |
| |- | | |- |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 5
| | | 5 |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | <code style="white-space:normal;overflow-wrap:anywhere;">pszMessage</code><br /><span style="color:#657078;"><code style="white-space:normal;overflow-wrap:anywhere;">string</code></span>
| | | <code>pszMessage</code><br /><span class="lua-muted"><code>string</code></span> |
| | style="padding:8px;vertical-align:top;overflow-wrap:anywhere;" | 宠主的留言
| | | 宠主的留言 |
| |} | | |} |
|
| |
|
| == 返回值 == | | == 返回值 == |
| 返回 1 个值。返回类型包括 <code style="white-space:normal;overflow-wrap:anywhere;">number</code>。明确的固定返回组合包括 <code style="white-space:normal;overflow-wrap:anywhere;">1</code>;<code style="white-space:normal;overflow-wrap:anywhere;">0</code>。 | | 返回 1 个值。返回类型包括 <code>number</code>。明确的固定返回组合包括 <code>1</code>;<code>0</code>。 |
|
| |
|
| == 注意事项 == | | == 注意事项 == |
| * 调用对象必须是当前场景中的有效玩家。 | | * 调用对象必须是当前场景中的有效玩家。 |
| * 调用前要求玩家处于可执行逻辑的状态(实现体断言 <code style="white-space:normal;overflow-wrap:anywhere;">pHuman->IsCanLogic()</code>);不满足时会记录断言,应先确认玩家当前状态。 | | * 调用前要求玩家处于可执行逻辑的状态(实现体断言 <code>pHuman->IsCanLogic()</code>);不满足时会记录断言,应先确认玩家当前状态。 |
|
| |
|
| </div> | | </div> |
首页 · 服务端接口 · 珍兽繁殖公告 · 调用约定
发布宠物公告
Lua 调用
IssuePetPlacardByIndex(sceneId, selfId, targetId, nPetIndex, pszMessage)
服务端脚本中未检索到该接口的调用点(已检索 4244 个随包脚本)。
实现位于 LuaFnTbl_PetPlacard.h 第 41 行,注册表第 892 行。
参数
| 序号
|
参数 / 类型
|
说明
|
| 1
|
sceneId
number
|
当前调用所在的场景 ID。
|
| 2
|
selfId
number
|
当前场景内的对象 ID。玩家接口需传入有效玩家对象;不是角色 GUID。
|
| 3
|
targetId
number
|
Npc编号
|
| 4
|
nPetIndex
number
|
珍兽索引。
|
| 5
|
pszMessage
string
|
宠主的留言
|
返回值
返回 1 个值。返回类型包括 number。明确的固定返回组合包括 1;0。
注意事项
- 调用对象必须是当前场景中的有效玩家。
- 调用前要求玩家处于可执行逻辑的状态(实现体断言
pHuman->IsCanLogic());不满足时会记录断言,应先确认玩家当前状态。