Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/config/CustomMods/BossSettings.ini b/config/CustomMods/BossSettings.ini
- index a3c3f9d..d6ca9f7 100644
- --- a/config/CustomMods/BossSettings.ini
- +++ b/config/CustomMods/BossSettings.ini
- @@ -38,6 +38,14 @@
- # Default: False
- AllowDirectTeleportToBossRoom = False
- +#=============================================================
- +# Block Heal Raid Boss/Grand Boss
- +#=============================================================
- +# If True: Player can heal RB
- +# If False: Player can't heal RB
- +# Default: True
- +PlayersCanHealRb = False
- +
- #=============================================================
- diff --git a/java/net/sf/l2j/Config.java b/java/net/sf/l2j/Config.java
- index 180a405..e43ccb4 100644
- --- a/java/net/sf/l2j/Config.java
- +++ b/java/net/sf/l2j/Config.java
- @@ -87,6 +87,7 @@
- public static int ALLOWED_BOXES;
- public static boolean ALLOW_DUALBOX_OLY;
- public static boolean ALT_GAME_SUBCLASS_EVERYWHERE;
- + public static boolean PLAYERS_CAN_HEAL_RB;
- /** Raid info*/
- public static int RAID_BOSS_INFO_PAGE_LIMIT;
- public static int RAID_BOSS_DROP_PAGE_LIMIT;
- @@ -1110,6 +1111,7 @@
- private static final void loadBoss()
- {
- final ExProperties Boss = initProperties(BOSSESETTIGNS);
- + PLAYERS_CAN_HEAL_RB = Boolean.parseBoolean(Boss.getProperty("PlayersCanHealRb", "false"));
- RAID_BOSS_INFO_PAGE_LIMIT = Integer.parseInt(Boss.getProperty("RaidBossInfoPageLimit", "15"));
- RAID_BOSS_DROP_PAGE_LIMIT = Integer.parseInt(Boss.getProperty("RaidBossDropPageLimit", "15"));
- RAID_BOSS_DATE_FORMAT = Boss.getProperty("RaidBossDateFormat", "MMM dd, HH:mm");
- diff --git a/java/net/sf/l2j/gameserver/handler/skillhandlers/Heal.java b/java/net/sf/l2j/gameserver/handler/skillhandlers/Heal.java
- index a66fb80..43f7687 100644
- --- a/java/net/sf/l2j/gameserver/handler/skillhandlers/Heal.java
- +++ b/java/net/sf/l2j/gameserver/handler/skillhandlers/Heal.java
- @@ -1,5 +1,6 @@
- package net.sf.l2j.gameserver.handler.skillhandlers;
- +import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.enums.items.ShotType;
- import net.sf.l2j.gameserver.enums.skills.SkillType;
- import net.sf.l2j.gameserver.enums.skills.Stats;
- @@ -11,6 +12,8 @@
- import net.sf.l2j.gameserver.model.actor.Player;
- import net.sf.l2j.gameserver.model.actor.Summon;
- import net.sf.l2j.gameserver.model.actor.instance.Door;
- +import net.sf.l2j.gameserver.model.actor.instance.GrandBoss;
- +import net.sf.l2j.gameserver.model.actor.instance.RaidBoss;
- import net.sf.l2j.gameserver.model.actor.instance.SiegeFlag;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- @@ -81,7 +84,11 @@
- final Creature target = ((Creature) obj);
- if (target.isDead() || target.isInvul())
- continue;
- -
- + // Player can't heal rb config
- + if (!Config.PLAYERS_CAN_HEAL_RB && activeChar instanceof Player && !((Player) activeChar).isGM() && (target instanceof RaidBoss || target instanceof GrandBoss) && (skill.getSkillType() == SkillType.HEAL || skill.getSkillType() == SkillType.HEAL_PERCENT))
- + {
- + return;
- + }
- if (target instanceof Door || target instanceof SiegeFlag)
- continue;
- diff --git a/java/net/sf/l2j/gameserver/handler/skillhandlers/HealPercent.java b/java/net/sf/l2j/gameserver/handler/skillhandlers/HealPercent.java
- index d8cdf85..1763eac 100644
- --- a/java/net/sf/l2j/gameserver/handler/skillhandlers/HealPercent.java
- +++ b/java/net/sf/l2j/gameserver/handler/skillhandlers/HealPercent.java
- @@ -1,5 +1,6 @@
- package net.sf.l2j.gameserver.handler.skillhandlers;
- +import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.enums.skills.SkillType;
- import net.sf.l2j.gameserver.handler.ISkillHandler;
- import net.sf.l2j.gameserver.handler.SkillHandler;
- @@ -7,6 +8,8 @@
- import net.sf.l2j.gameserver.model.actor.Creature;
- import net.sf.l2j.gameserver.model.actor.Player;
- import net.sf.l2j.gameserver.model.actor.instance.Door;
- +import net.sf.l2j.gameserver.model.actor.instance.GrandBoss;
- +import net.sf.l2j.gameserver.model.actor.instance.RaidBoss;
- import net.sf.l2j.gameserver.model.actor.instance.SiegeFlag;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- @@ -37,7 +40,10 @@
- final Creature target = ((Creature) obj);
- if (target.isDead() || target.isInvul())
- continue;
- -
- + if (!Config.PLAYERS_CAN_HEAL_RB && activeChar instanceof Player && !((Player) activeChar).isGM() && (target instanceof RaidBoss || target instanceof GrandBoss) && (skill.getSkillType() == SkillType.HEAL || skill.getSkillType() == SkillType.HEAL_PERCENT))
- + {
- + return;
- + }
- // Doors and flags can't be healed in any way
- if (target instanceof Door || target instanceof SiegeFlag)
- continue;
Add Comment
Please, Sign In to add comment