Fix Ignore issue

This commit is contained in:
Snaiker 2024-11-18 21:22:27 +00:00 committed by ArpyAge
parent e6bb8157b2
commit f4955ff039
3 changed files with 9 additions and 9 deletions

View File

@ -1,3 +1,6 @@
--New bot walking settings --New bot walking settings
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.bot.limit.walking.distance', '1'); INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.bot.limit.walking.distance', '1');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.bot.limit.walking.distance.radius', '5'); INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.bot.limit.walking.distance.radius', '5');
--New permission
ALTER TABLE `permissions` ADD COLUMN `acc_unignorable` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `acc_infinite_friends`;

View File

@ -43,6 +43,7 @@ public class Permission {
public static String ACC_HELPER_GIVE_GUIDE_TOURS = "acc_helper_give_guide_tours"; public static String ACC_HELPER_GIVE_GUIDE_TOURS = "acc_helper_give_guide_tours";
public static String ACC_HELPER_JUDGE_CHAT_REVIEWS = "acc_helper_judge_chat_reviews"; public static String ACC_HELPER_JUDGE_CHAT_REVIEWS = "acc_helper_judge_chat_reviews";
public static String ACC_FLOORPLAN_EDITOR = "acc_floorplan_editor"; public static String ACC_FLOORPLAN_EDITOR = "acc_floorplan_editor";
public static String ACC_UNIGNORABLE = "acc_unignorable";
public final String key; public final String key;
public final PermissionSetting setting; public final PermissionSetting setting;
public Permission(String key, PermissionSetting setting) { public Permission(String key, PermissionSetting setting) {

View File

@ -7,6 +7,7 @@ import com.eu.habbo.habbohotel.achievements.Achievement;
import com.eu.habbo.habbohotel.achievements.AchievementManager; import com.eu.habbo.habbohotel.achievements.AchievementManager;
import com.eu.habbo.habbohotel.achievements.TalentTrackType; import com.eu.habbo.habbohotel.achievements.TalentTrackType;
import com.eu.habbo.habbohotel.catalog.CatalogItem; import com.eu.habbo.habbohotel.catalog.CatalogItem;
import com.eu.habbo.habbohotel.permissions.Permission;
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles; import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
import com.eu.habbo.habbohotel.rooms.RoomTrade; import com.eu.habbo.habbohotel.rooms.RoomTrade;
import com.eu.habbo.habbohotel.users.cache.HabboOfferPurchase; import com.eu.habbo.habbohotel.users.cache.HabboOfferPurchase;
@ -741,14 +742,9 @@ public class HabboStats implements Runnable {
public boolean ignoreUser(GameClient gameClient, int userId) { public boolean ignoreUser(GameClient gameClient, int userId) {
final Habbo target = Emulator.getGameEnvironment().getHabboManager().getHabbo(userId); final Habbo target = Emulator.getGameEnvironment().getHabboManager().getHabbo(userId);
if (!Emulator.getConfig().getBoolean("hotel.allow.ignore.staffs")) { if (!Emulator.getConfig().getBoolean("hotel.allow.ignore.staffs") && target.hasPermission(Permission.ACC_UNIGNORABLE)) {
final int ownRank = gameClient.getHabbo().getHabboInfo().getRank().getId(); gameClient.getHabbo().whisper(Emulator.getTexts().getValue("generic.error.ignore_higher_rank"), RoomChatMessageBubbles.ALERT);
final int targetRank = target.getHabboInfo().getRank().getId(); return false;
if (targetRank >= ownRank) {
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("generic.error.ignore_higher_rank"), RoomChatMessageBubbles.ALERT);
return false;
}
} }
if (!this.userIgnored(userId)) { if (!this.userIgnored(userId)) {