Lua接口/服务端函数索引/好友与师徒:修订间差异
来自天龙知识库
跳到导航跳到搜索
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
维护服务端 Lua 接口:核对参数、返回值、边界条件与调用示例 |
||
| 第1行: | 第1行: | ||
__NOTOC__ | __NOTOC__ | ||
<div class="lua-reference | <div class="lua-reference"> | ||
[[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端调用约定|调用约定]] | [[首页|首页]] · [[Lua接口/服务端函数索引|服务端接口]] · [[Lua接口/服务端调用约定|调用约定]] | ||
<div | <div class="lua-lead">好友与师徒:43 个接口,43 个调用名称,其中 41 个在当前脚本中有调用。</div> | ||
{| class="wikitable | {| class="wikitable" | ||
! scope="col" | ! scope="col" class="lua-w36" | 函数 / 别名 | ||
! scope="col | ! scope="col" | 调用与用途 | ||
|- | |- | ||
| [[Lua接口/服务端/LuaAddPrenticeProExp|LuaAddPrenticeProExp]] | |||
| <code>LuaAddPrenticeProExp(sceneId, selfId, guidPrentice, nExp)</code><br />增加师傅可领取的徒弟贡献储备经验。<br /><span class="lua-muted">脚本中 3 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnAgreeSwear|LuaFnAgreeSwear]] | |||
| <code>LuaFnAgreeSwear(sceneId, selfId, targetId)</code><br />记录指定队友同意结拜。<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnAllTeamSwear|LuaFnAllTeamSwear]] | |||
| <code>LuaFnAllTeamSwear(sceneId, selfId)</code><br />为当前队伍执行结拜。<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnAprentice|LuaFnAprentice]] | |||
| <code>LuaFnAprentice(sceneId, selfId, targetId)</code><br />selfId 拜 targetId 为师<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnBetrayMaster|LuaFnBetrayMaster]] | |||
| <code>LuaFnBetrayMaster(sceneId, selfId)</code><br />叛师<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnChangeJieBaiName|LuaFnChangeJieBaiName]] | |||
| <code>LuaFnChangeJieBaiName(sceneId, selfId)</code><br />// 打开客户端结拜称号修改界面并返回现有称号。<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnChuShiMail|LuaFnChuShiMail]] | |||
| <code>LuaFnChuShiMail(sceneId, selfId)</code><br />向当前人物的师傅发送出师通知邮件。<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnDivorce|LuaFnDivorce]] | |||
| <code>LuaFnDivorce(sceneId, selfId)</code><br />单方面离婚<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnDrawJieBaiName|LuaFnDrawJieBaiName]] | |||
| <code>LuaFnDrawJieBaiName(sceneId, selfId, nTeamCount)</code><br />// 打开客户端结拜名称抽取界面,并告知当前队伍人数。<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnExpAssign|LuaFnExpAssign]] | |||
| <code>LuaFnExpAssign(sceneId, selfId, nOpType)</code><br />向客户端发送师徒储备经验领取界面的当前数据。<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnExpelPrentice|LuaFnExpelPrentice]] | |||
| <code>LuaFnExpelPrentice(sceneId, selfId, PrenticeGUID)</code><br />开除某个徒弟<br /><span class="lua-muted">脚本中 3 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnFinishAprentice|LuaFnFinishAprentice]] | |||
| <code>LuaFnFinishAprentice(sceneId, selfId, targetId)</code><br />selfId 离开 targetId 师们,正式出师<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnGetBrotherGuid|LuaFnGetBrotherGuid]] | |||
| <code>LuaFnGetBrotherGuid(sceneId, selfId, nIndex)</code><br />按索引取得结拜兄弟的 GUID。<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnGetFriendName|LuaFnGetFriendName]] | |||
| <code>LuaFnGetFriendName(sceneId, selfId, friendGUID)</code><br />得到 GUID 为 friendGUID 的好友的名字<br /><span class="lua-muted">脚本中 7 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnGetFriendPoint|LuaFnGetFriendPoint]] | |||
| <code>LuaFnGetFriendPoint(sceneId, selfId, friendID)</code><br />得到和 ID 为 friendID 的好友的友好度<br /><span class="lua-muted">脚本中 16 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnGetFriendPointByGUID|LuaFnGetFriendPointByGUID]] | |||
| <code>LuaFnGetFriendPointByGUID(sceneId, selfId, friendGUID)</code><br />按好友 GUID 取得友好度。<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnGetJieBaiName|LuaFnGetJieBaiName]] | |||
| <code>LuaFnGetJieBaiName(sceneId, selfId)</code><br />// 返回当前结拜称号;没有结拜称号时不压入返回值。<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnGetMasterGUID|LuaFnGetMasterGUID]] | |||
| <code>LuaFnGetMasterGUID(sceneId, selfId)</code><br />得到师傅的 GUID<br /><span class="lua-muted">脚本中 3 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnGetmasterLevel|LuaFnGetmasterLevel]] | |||
| <code>LuaFnGetmasterLevel(sceneId, selfId)</code><br />取得当前角色的师傅等级。<br /><span class="lua-muted">脚本中 7 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnGetPrenticeBetrayTime|LuaFnGetPrenticeBetrayTime]] | |||
| <code>LuaFnGetPrenticeBetrayTime(sceneId, selfId)</code><br />得到最后一次徒弟叛师的时间<br /><span class="lua-warn">脚本中未见调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnGetPrenticeCount|LuaFnGetPrenticeCount]] | |||
| <code>LuaFnGetPrenticeCount(sceneId, selfId)</code><br />得要徒弟数量<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnGetPrenticeGUID|LuaFnGetPrenticeGUID]] | |||
| <code>LuaFnGetPrenticeGUID(sceneId, selfId, nIndex)</code><br />按索引读取玩家徒弟的角色 GUID。<br /><span class="lua-muted">脚本中 3 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnGetSpouseGUID|LuaFnGetSpouseGUID]] | |||
| <code>LuaFnGetSpouseGUID(sceneId, selfId)</code><br />得到配偶的 GUID<br /><span class="lua-muted">脚本中 26 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnHaveMaster|LuaFnHaveMaster]] | |||
| <code>LuaFnHaveMaster(sceneId, selfId)</code><br />判断 selfId 是否有师傅<br /><span class="lua-muted">脚本中 8 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnIfAllTeamAgreeSwear|LuaFnIfAllTeamAgreeSwear]] | |||
| <code>LuaFnIfAllTeamAgreeSwear(sceneId, selfId)</code><br />判断当前队伍成员是否已经全部同意结拜。<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnIsBrother|LuaFnIsBrother]] | |||
| <code>LuaFnIsBrother(sceneId, selfId, targetId)</code><br />判断 targetId 是否是 selfId 的结拜兄弟<br /><span class="lua-muted">脚本中 8 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnIsFriend|LuaFnIsFriend]] | |||
| <code>LuaFnIsFriend(sceneId, selfId, friendID)</code><br />判断 selfId 和 friendID 是否为好友<br /><span class="lua-muted">脚本中 46 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnIsMarried|LuaFnIsMarried]] | |||
| <code>LuaFnIsMarried(sceneId, selfId)</code><br />判断调用者是否已婚<br /><span class="lua-muted">脚本中 26 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnIsMaster|LuaFnIsMaster]] | |||
| <code>LuaFnIsMaster(sceneId, selfId, targetId)</code><br />判断 targetId 是否是 selfId 的师傅<br /><span class="lua-muted">脚本中 14 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnIsMasterEver|LuaFnIsMasterEver]] | |||
| <code>LuaFnIsMasterEver(sceneId, selfId, targetId)</code><br />判断目标是否曾作为当前人物的师傅,不受出师任务标志影响。<br /><span class="lua-muted">脚本中 6 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnIsPrentice|LuaFnIsPrentice]] | |||
| <code>LuaFnIsPrentice(sceneId, selfId, targetId)</code><br />判断 targetId 是否是 selfId 的徒弟<br /><span class="lua-muted">脚本中 3 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnIsSpouses|LuaFnIsSpouses]] | |||
| <code>LuaFnIsSpouses(sceneId, selfId, targetId)</code><br />判断 selfId 和 targetId 是否是夫妻<br /><span class="lua-muted">脚本中 7 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnIsSweared|LuaFnIsSweared]] | |||
| <code>LuaFnIsSweared(sceneId, selfId)</code><br />判断当前人物是否已经结拜。<br /><span class="lua-muted">脚本中 7 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnMarry|LuaFnMarry]] | |||
| <code>LuaFnMarry(sceneId, selfId, spouseId, nWeddingType)</code><br />sceneId 和 spouseId 结为夫妻<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnSetFriendPoint|LuaFnSetFriendPoint]] | |||
| <code>LuaFnSetFriendPoint(sceneId, selfId, friendID, nFriendPoint)</code><br />设置 selfId 与 friendID 的友好度为 friendPoint<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnSetFriendPointByGUID|LuaFnSetFriendPointByGUID]] | |||
| <code>LuaFnSetFriendPointByGUID(sceneId, selfId, friendGUID, nFriendPoint)</code><br />设置 selfId 与 friendGUID 的友好度为 friendPoint<br /><span class="lua-muted">脚本中 4 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnSetmasterLevel|LuaFnSetmasterLevel]] | |||
| <code>LuaFnSetmasterLevel(sceneId, selfId, nMasterLevel)</code><br />设置当前角色的师傅等级并标记关系数据为脏。<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnTeamSnapshort|LuaFnTeamSnapshort]] | |||
| <code>LuaFnTeamSnapshort(sceneId, selfId)</code><br />// 保存队伍成员快照,供结拜确认阶段校验队伍是否发生变化。<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnUnMarry|LuaFnUnMarry]] | |||
| <code>LuaFnUnMarry(sceneId, selfId, spouseId)</code><br />sceneId 和 spouseId 离婚<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnUnswear|LuaFnUnswear]] | |||
| <code>LuaFnUnswear(sceneId, selfId, guid)</code><br />解除与指定 GUID 的结拜关系。<br /><span class="lua-muted">脚本中 2 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaFnVerifyTeamWithSnapshort|LuaFnVerifyTeamWithSnapshort]] | |||
| <code>LuaFnVerifyTeamWithSnapshort(sceneId, selfId)</code><br />// 核对当前队伍与之前保存的结拜队伍快照。<br /><span class="lua-muted">脚本中 1 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaGetPrenticeSupplyExp|LuaGetPrenticeSupplyExp]] | |||
| <code>LuaGetPrenticeSupplyExp(sceneId, selfId)</code><br />取得师傅当前可领取的徒弟贡献储备经验。<br /><span class="lua-muted">脚本中 3 处调用</span> | |||
|- | |- | ||
| [[Lua接口/服务端/LuaGetProfMasterExp|LuaGetProfMasterExp]] | |||
| <code>LuaGetProfMasterExp(sceneId, selfId)</code><br />取得徒弟尚未结算给师傅的职业师傅经验。<br /><span class="lua-warn">脚本中未见调用</span> | |||
|} | |} | ||
</div> | </div> | ||
2026年9月19日 (六) 16:59的版本
好友与师徒:43 个接口,43 个调用名称,其中 41 个在当前脚本中有调用。
| 函数 / 别名 | 调用与用途 |
|---|---|
| LuaAddPrenticeProExp | LuaAddPrenticeProExp(sceneId, selfId, guidPrentice, nExp)增加师傅可领取的徒弟贡献储备经验。 脚本中 3 处调用 |
| LuaFnAgreeSwear | LuaFnAgreeSwear(sceneId, selfId, targetId)记录指定队友同意结拜。 脚本中 2 处调用 |
| LuaFnAllTeamSwear | LuaFnAllTeamSwear(sceneId, selfId)为当前队伍执行结拜。 脚本中 2 处调用 |
| LuaFnAprentice | LuaFnAprentice(sceneId, selfId, targetId)selfId 拜 targetId 为师 脚本中 1 处调用 |
| LuaFnBetrayMaster | LuaFnBetrayMaster(sceneId, selfId)叛师 脚本中 2 处调用 |
| LuaFnChangeJieBaiName | LuaFnChangeJieBaiName(sceneId, selfId)// 打开客户端结拜称号修改界面并返回现有称号。 脚本中 1 处调用 |
| LuaFnChuShiMail | LuaFnChuShiMail(sceneId, selfId)向当前人物的师傅发送出师通知邮件。 脚本中 1 处调用 |
| LuaFnDivorce | LuaFnDivorce(sceneId, selfId)单方面离婚 脚本中 2 处调用 |
| LuaFnDrawJieBaiName | LuaFnDrawJieBaiName(sceneId, selfId, nTeamCount)// 打开客户端结拜名称抽取界面,并告知当前队伍人数。 脚本中 1 处调用 |
| LuaFnExpAssign | LuaFnExpAssign(sceneId, selfId, nOpType)向客户端发送师徒储备经验领取界面的当前数据。 脚本中 2 处调用 |
| LuaFnExpelPrentice | LuaFnExpelPrentice(sceneId, selfId, PrenticeGUID)开除某个徒弟 脚本中 3 处调用 |
| LuaFnFinishAprentice | LuaFnFinishAprentice(sceneId, selfId, targetId)selfId 离开 targetId 师们,正式出师 脚本中 1 处调用 |
| LuaFnGetBrotherGuid | LuaFnGetBrotherGuid(sceneId, selfId, nIndex)按索引取得结拜兄弟的 GUID。 脚本中 1 处调用 |
| LuaFnGetFriendName | LuaFnGetFriendName(sceneId, selfId, friendGUID)得到 GUID 为 friendGUID 的好友的名字 脚本中 7 处调用 |
| LuaFnGetFriendPoint | LuaFnGetFriendPoint(sceneId, selfId, friendID)得到和 ID 为 friendID 的好友的友好度 脚本中 16 处调用 |
| LuaFnGetFriendPointByGUID | LuaFnGetFriendPointByGUID(sceneId, selfId, friendGUID)按好友 GUID 取得友好度。 脚本中 2 处调用 |
| LuaFnGetJieBaiName | LuaFnGetJieBaiName(sceneId, selfId)// 返回当前结拜称号;没有结拜称号时不压入返回值。 脚本中 1 处调用 |
| LuaFnGetMasterGUID | LuaFnGetMasterGUID(sceneId, selfId)得到师傅的 GUID 脚本中 3 处调用 |
| LuaFnGetmasterLevel | LuaFnGetmasterLevel(sceneId, selfId)取得当前角色的师傅等级。 脚本中 7 处调用 |
| LuaFnGetPrenticeBetrayTime | LuaFnGetPrenticeBetrayTime(sceneId, selfId)得到最后一次徒弟叛师的时间 脚本中未见调用 |
| LuaFnGetPrenticeCount | LuaFnGetPrenticeCount(sceneId, selfId)得要徒弟数量 脚本中 1 处调用 |
| LuaFnGetPrenticeGUID | LuaFnGetPrenticeGUID(sceneId, selfId, nIndex)按索引读取玩家徒弟的角色 GUID。 脚本中 3 处调用 |
| LuaFnGetSpouseGUID | LuaFnGetSpouseGUID(sceneId, selfId)得到配偶的 GUID 脚本中 26 处调用 |
| LuaFnHaveMaster | LuaFnHaveMaster(sceneId, selfId)判断 selfId 是否有师傅 脚本中 8 处调用 |
| LuaFnIfAllTeamAgreeSwear | LuaFnIfAllTeamAgreeSwear(sceneId, selfId)判断当前队伍成员是否已经全部同意结拜。 脚本中 2 处调用 |
| LuaFnIsBrother | LuaFnIsBrother(sceneId, selfId, targetId)判断 targetId 是否是 selfId 的结拜兄弟 脚本中 8 处调用 |
| LuaFnIsFriend | LuaFnIsFriend(sceneId, selfId, friendID)判断 selfId 和 friendID 是否为好友 脚本中 46 处调用 |
| LuaFnIsMarried | LuaFnIsMarried(sceneId, selfId)判断调用者是否已婚 脚本中 26 处调用 |
| LuaFnIsMaster | LuaFnIsMaster(sceneId, selfId, targetId)判断 targetId 是否是 selfId 的师傅 脚本中 14 处调用 |
| LuaFnIsMasterEver | LuaFnIsMasterEver(sceneId, selfId, targetId)判断目标是否曾作为当前人物的师傅,不受出师任务标志影响。 脚本中 6 处调用 |
| LuaFnIsPrentice | LuaFnIsPrentice(sceneId, selfId, targetId)判断 targetId 是否是 selfId 的徒弟 脚本中 3 处调用 |
| LuaFnIsSpouses | LuaFnIsSpouses(sceneId, selfId, targetId)判断 selfId 和 targetId 是否是夫妻 脚本中 7 处调用 |
| LuaFnIsSweared | LuaFnIsSweared(sceneId, selfId)判断当前人物是否已经结拜。 脚本中 7 处调用 |
| LuaFnMarry | LuaFnMarry(sceneId, selfId, spouseId, nWeddingType)sceneId 和 spouseId 结为夫妻 脚本中 2 处调用 |
| LuaFnSetFriendPoint | LuaFnSetFriendPoint(sceneId, selfId, friendID, nFriendPoint)设置 selfId 与 friendID 的友好度为 friendPoint 脚本中 2 处调用 |
| LuaFnSetFriendPointByGUID | LuaFnSetFriendPointByGUID(sceneId, selfId, friendGUID, nFriendPoint)设置 selfId 与 friendGUID 的友好度为 friendPoint 脚本中 4 处调用 |
| LuaFnSetmasterLevel | LuaFnSetmasterLevel(sceneId, selfId, nMasterLevel)设置当前角色的师傅等级并标记关系数据为脏。 脚本中 1 处调用 |
| LuaFnTeamSnapshort | LuaFnTeamSnapshort(sceneId, selfId)// 保存队伍成员快照,供结拜确认阶段校验队伍是否发生变化。 脚本中 2 处调用 |
| LuaFnUnMarry | LuaFnUnMarry(sceneId, selfId, spouseId)sceneId 和 spouseId 离婚 脚本中 1 处调用 |
| LuaFnUnswear | LuaFnUnswear(sceneId, selfId, guid)解除与指定 GUID 的结拜关系。 脚本中 2 处调用 |
| LuaFnVerifyTeamWithSnapshort | LuaFnVerifyTeamWithSnapshort(sceneId, selfId)// 核对当前队伍与之前保存的结拜队伍快照。 脚本中 1 处调用 |
| LuaGetPrenticeSupplyExp | LuaGetPrenticeSupplyExp(sceneId, selfId)取得师傅当前可领取的徒弟贡献储备经验。 脚本中 3 处调用 |
| LuaGetProfMasterExp | LuaGetProfMasterExp(sceneId, selfId)取得徒弟尚未结算给师傅的职业师傅经验。 脚本中未见调用 |