Lua接口/服务端/LuaFnGetFriendPoint
来自天龙知识库
得到和 ID 为 friendID 的好友的友好度
本页由服务端绑定源码与随包脚本自动整理:用途、参数位置与返回数量取实现体,未在游戏内执行验证。调用点取自 4244 个服务端脚本中的 16 处真实调用。
Lua 调用
LuaFnGetFriendPoint(sceneId, selfId, friendID)
服务端脚本中共出现 16 处调用,实参个数出现过:3 个(16 处)。
参数
| 序号 | 参数 / 类型 | 说明 |
|---|---|---|
| 1 | sceneIdnumber
|
当前调用所在的场景 ID。 脚本中的实参: sceneId(16 处)
|
| 2 | selfIdnumber
|
当前场景内的对象 ID。玩家接口需传入有效玩家对象;不是角色 GUID。 脚本中的实参: selfId(6 处)、femaleId(2 处)、maleId(2 处)
|
| 3 | friendIDnumber
|
好友的 ID 脚本中的实参: selfId(3 处)、targetId(3 处)、femaleId(2 处)
|
返回值
返回 1 个值。返回类型包括 number。明确的固定返回组合包括 -1。
脚本中的调用
以下是服务端脚本里的真实调用点,按实参形态去重后列出 8 条。这些调用取自随包发布的脚本,可用于确认参数顺序与实际传入的值;它们不代表该写法在当前版本仍然有效。
-- event/EventScript/client_GiveRose.lua LuaFnGetFriendPoint(sceneId, selfId, targetId) -- event/misc/couplequestion.lua LuaFnGetFriendPoint(sceneId, tid1, tid2) -- event/relation/b_swear.lua LuaFnGetFriendPoint(sceneId, selfId, theID) -- event/relation/b_swear.lua LuaFnGetFriendPoint(sceneId, theID, selfId) -- event/relation/b_swear.lua LuaFnGetFriendPoint(sceneId, theID, otherID) -- event/relation/b_swear.lua LuaFnGetFriendPoint(sceneId, otherID, theID) -- event/relation/eshituzongdongyuan.lua LuaFnGetFriendPoint(sceneId, selfId, otherId) -- event/relation/eshituzongdongyuan.lua LuaFnGetFriendPoint(sceneId, otherId, selfId)
注意事项
- 调用对象必须是当前场景中的有效玩家。
核对依据:
LuaFnTbl_Relation.h 第 245 行,服务端注册表第 761 行。调用格式与返回数量依据当前实现整理;脚本调用点取自 4244 个随包脚本(共 535888 行、命中 85384 处调用),未经运行验证。游戏内效果、边界行为及未注明的业务枚举仍需实测。