tweak: remove job if it's group is removed

This commit is contained in:
Andyyy7666
2023-12-28 20:38:16 +01:00
parent 0e1fb43cd2
commit 0500cef32f

View File

@@ -342,6 +342,12 @@ local function createCharacterTable(info)
function self.removeGroup(name)
local group = self.groups[name]
if not group then return end
if self.job == name then
self.job = nil
self.jobInfo = nil
end
self.groups[name] = nil
self.triggerEvent("ND:updateCharacter", removeCharacterFunctions(self))
lib.removePrincipal(self.source, ("group.%s"):format(name))