修复权限组飞行发光设置不生效问题

This commit is contained in:
zhangyuheng 2024-06-30 09:48:28 +08:00
parent 2f8a0f2e23
commit 73fe76c3c7
1 changed files with 20 additions and 2 deletions

View File

@ -285,7 +285,16 @@ public class Cache {
}
PlayerPrivilegeDTO privilege = getPlayerPrivilege(player, dominion);
if (privilege != null) {
player.setGlowing(privilege.getFlagValue(Flag.GLOW));
if (privilege.getGroupId() == -1) {
player.setGlowing(privilege.getFlagValue(Flag.GLOW));
} else {
GroupDTO group = getGroup(privilege.getGroupId());
if (group != null) {
player.setGlowing(group.getFlagValue(Flag.GLOW));
} else {
player.setGlowing(dominion.getFlagValue(Flag.GLOW));
}
}
} else {
player.setGlowing(dominion.getFlagValue(Flag.GLOW));
}
@ -313,7 +322,16 @@ public class Cache {
}
PlayerPrivilegeDTO privilege = getPlayerPrivilege(player, dominion);
if (privilege != null) {
player.setAllowFlight(privilege.getFlagValue(Flag.FLY));
if (privilege.getGroupId() == -1) {
player.setAllowFlight(privilege.getFlagValue(Flag.FLY));
} else {
GroupDTO group = getGroup(privilege.getGroupId());
if (group != null) {
player.setAllowFlight(group.getFlagValue(Flag.FLY));
} else {
player.setAllowFlight(dominion.getFlagValue(Flag.FLY));
}
}
} else {
player.setAllowFlight(dominion.getFlagValue(Flag.FLY));
}