Skip to content

Commit

Permalink
fix(bridge/nd): add boss check (#1578)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andyyy7666 committed Dec 30, 2023
1 parent b94196b commit e7e7838
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/bridge/nd/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ function server.buyLicense(inv, license)
return true, "have_purchased"
end

---@diagnostic disable-next-line: duplicate-set-field
function server.isPlayerBoss(playerId, group)
local player = NDCore.getPlayer(playerId)
if not player then return end

local groupInfo = player.getGroup(group)
return groupInfo and groupInfo.isBoss
end

---@param entityId number
---@return number | string
---@diagnostic disable-next-line: duplicate-set-field
Expand Down

0 comments on commit e7e7838

Please sign in to comment.