Skip to content
This repository was archived by the owner on Apr 19, 2025. It is now read-only.

Commit e7e7838

Browse files
authored
fix(bridge/nd): add boss check (#1578)
1 parent b94196b commit e7e7838

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

modules/bridge/nd/server.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ function server.buyLicense(inv, license)
9898
return true, "have_purchased"
9999
end
100100

101+
---@diagnostic disable-next-line: duplicate-set-field
102+
function server.isPlayerBoss(playerId, group)
103+
local player = NDCore.getPlayer(playerId)
104+
if not player then return end
105+
106+
local groupInfo = player.getGroup(group)
107+
return groupInfo and groupInfo.isBoss
108+
end
109+
101110
---@param entityId number
102111
---@return number | string
103112
---@diagnostic disable-next-line: duplicate-set-field

0 commit comments

Comments
 (0)