找回密码
 register
搜索
查看: 52|回复: 0

[源端函数] LuaFnSetSectPoint 设置武道领悟点 (X64函数)

[复制链接]
  • 打卡等级:本地老炮
  • 打卡总天数:533
  • 打卡月天数:22
  • 打卡总奖励:530
  • 最近打卡:2026-06-24 01:45:59
Waylee 发表于 2026-2-11 11:03 | 显示全部楼层 |阅读模式 | Google Chrome | Windows 10

马上注册,查看网站隐藏内容!!

您需要 登录 才可以下载或查看,没有账号?register

×

Lua层用法:

LuaFnSetSectPoint(sceneId,selfId,nPoint + nUsedPoint)

C++伪代码:

    /** -----------------------------------------------------------------------
    *     开发人员 :
    *     编写时间 :
    *     函数名称 : LuaFnSetSectPoint
    *     参数说明 :
    *               L
    *                   LuaState执行环境指针
    *               sceneId
    *                   调用该函数场景ID,short
    *               selfId
    *                   调用者ID,无符号整型
    *               point
    *                   门派修炼点数,INT
    *     功能说明 :
    *               设置玩家的门派修炼点数
    *               并发送GCSectDetail同步包通知客户端
    */
    INT LuaFnSetSectPoint(Lua_State* L)
    {
        LUA_ENTER_FUNCTION

        SceneID_t sceneId = Lua_ValueToNumber(L,1);
        ObjID_t selfId = Lua_ValueToNumber(L,2);
        INT point = Lua_ValueToNumber(L,3);

        BEGINHUMANDEFINE("LuaFnSetSectPoint")

        pHuman->SetSectPoint(point);

        GCSectDetail msg;
        msg.SetType(CYCLOPEDIA_TYPE_SECTPOINT);   // type = 3, 修炼点数同步
        msg.SetObjID(pHuman->GetID());
        msg.SetSectPoint(pHuman->GetSectPoint());
        pHuman->GetPlayer()->SendPacket(&msg);

        return 0;
        ENDHUMANDEFINE

        LUA_LEAVE_FUNCTION
        RETURNFALSE
    }
您需要登录后才可以回帖 登录 | register

本版积分规则

QQ|雪舞知识库 ( 浙ICP备15015590号-1 | 萌ICP备20232229号|浙公网安备33048102000118号 )|天天打卡

GMT+8, 2026-6-24 15:22 , Processed in 0.079145 second(s), 25 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表