Lua接口/服务端/DelXinFa:修订间差异
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
||
| (未显示同一用户的2个中间版本) | |||
| 第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>DelXinFa(sceneId, selfId, xinfaId)</pre> | ||
服务端脚本中未检索到该接口的调用点(已检索 | 服务端脚本中未检索到该接口的调用点(已检索 4245 个随包脚本)。 | ||
实现位于 <code | 实现位于 <code>LuaFnTbl_Attr.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。 | |||
|- | |- | ||
| 2 | |||
| <code>selfId</code><br /><span class="lua-muted"><code>number</code></span> | |||
| 当前场景内的对象 ID。玩家接口需传入有效玩家对象;不是角色 GUID。 | |||
|- | |- | ||
| 3 | |||
| <code>xinfaId</code><br /><span class="lua-muted"><code>number</code></span> | |||
| 心法编号 | |||
|} | |} | ||
== 返回值 == | == 返回值 == | ||
返回 1 个值。返回类型包括 <code | 返回 1 个值。返回类型包括 <code>number</code>。明确的固定返回组合包括 <code>-1</code>。 | ||
== 用法补充 == | == 用法补充 == | ||
2026年9月20日 (日) 00:11的最新版本
Lua 调用
DelXinFa(sceneId, selfId, xinfaId)
服务端脚本中未检索到该接口的调用点(已检索 4245 个随包脚本)。
实现位于 LuaFnTbl_Attr.h。
参数
| 序号 | 参数 / 类型 | 说明 |
|---|---|---|
| 1 | sceneIdnumber
|
当前调用所在的场景 ID。 |
| 2 | selfIdnumber
|
当前场景内的对象 ID。玩家接口需传入有效玩家对象;不是角色 GUID。 |
| 3 | xinfaIdnumber
|
心法编号 |
返回值
返回 1 个值。返回类型包括 number。明确的固定返回组合包括 -1。
用法补充
删除当前玩家的某个心法
没有测试
//INT LuaFnDelXinFa(Lua_State* L)
//{
// ;
//
// SceneID_t sceneId = Lua_ValueToNumber(L,1);
// ObjID_t selfId = Lua_ValueToNumber(L,2);
// INT xinfaId = Lua_ValueToNumber(L,3);
// if (true) {
// Lua_PushNumber(L,bRet);
// if(bRet)
// {
// Assert(pHuman);
// XINFA_LOG_PARAM XinFaLogParam;
// XinFaLogParam.CharGUID = pHuman->GetGUID();
// XinFaLogParam.SceneID = pHuman->getScene()->SceneID();
// XinFaLogParam.XPos = pHuman->getWorldPos()->m_fX;
// XinFaLogParam.ZPos = pHuman->getWorldPos()->m_fZ;
// XinFaLogParam.OPType = XINFA_OP_SCRIPT_ABANDON;
// XinFaLogParam.Count = pHuman->Skill_GetXinFaList().m_Count;
// XinFaLogParam.XinFaID = xinfaId;
// XinFaLogParam.Level = -1;
// SaveXinFaLog(&XinFaLogParam);
// }
// }
// ;
//}
注意事项
- 调用对象必须是当前场景中的有效玩家。