SHOW:
|
|
- or go back to the newest paste.
1 | diff --git a/config/CustomMods/BossSettings.ini b/config/CustomMods/BossSettings.ini | |
2 | index a3c3f9d..d6ca9f7 100644 | |
3 | --- a/config/CustomMods/BossSettings.ini | |
4 | +++ b/config/CustomMods/BossSettings.ini | |
5 | @@ -38,6 +38,14 @@ | |
6 | # Default: False | |
7 | AllowDirectTeleportToBossRoom = False | |
8 | ||
9 | +#============================================================= | |
10 | +# Block Heal Raid Boss/Grand Boss | |
11 | +#============================================================= | |
12 | +# If True: Player can heal RB | |
13 | +# If False: Player can't heal RB | |
14 | +# Default: True | |
15 | +PlayersCanHealRb = False | |
16 | + | |
17 | ||
18 | ||
19 | #============================================================= | |
20 | diff --git a/java/net/sf/l2j/Config.java b/java/net/sf/l2j/Config.java | |
21 | index 180a405..e43ccb4 100644 | |
22 | --- a/java/net/sf/l2j/Config.java | |
23 | +++ b/java/net/sf/l2j/Config.java | |
24 | @@ -87,6 +87,7 @@ | |
25 | public static int ALLOWED_BOXES; | |
26 | public static boolean ALLOW_DUALBOX_OLY; | |
27 | public static boolean ALT_GAME_SUBCLASS_EVERYWHERE; | |
28 | + public static boolean PLAYERS_CAN_HEAL_RB; | |
29 | /** Raid info*/ | |
30 | public static int RAID_BOSS_INFO_PAGE_LIMIT; | |
31 | public static int RAID_BOSS_DROP_PAGE_LIMIT; | |
32 | @@ -1110,6 +1111,7 @@ | |
33 | private static final void loadBoss() | |
34 | { | |
35 | final ExProperties Boss = initProperties(BOSSESETTIGNS); | |
36 | + PLAYERS_CAN_HEAL_RB = Boolean.parseBoolean(Boss.getProperty("PlayersCanHealRb", "false")); | |
37 | RAID_BOSS_INFO_PAGE_LIMIT = Integer.parseInt(Boss.getProperty("RaidBossInfoPageLimit", "15")); | |
38 | RAID_BOSS_DROP_PAGE_LIMIT = Integer.parseInt(Boss.getProperty("RaidBossDropPageLimit", "15")); | |
39 | RAID_BOSS_DATE_FORMAT = Boss.getProperty("RaidBossDateFormat", "MMM dd, HH:mm"); | |
40 | diff --git a/java/net/sf/l2j/gameserver/handler/skillhandlers/Heal.java b/java/net/sf/l2j/gameserver/handler/skillhandlers/Heal.java | |
41 | index a66fb80..43f7687 100644 | |
42 | --- a/java/net/sf/l2j/gameserver/handler/skillhandlers/Heal.java | |
43 | +++ b/java/net/sf/l2j/gameserver/handler/skillhandlers/Heal.java | |
44 | @@ -1,5 +1,6 @@ | |
45 | package net.sf.l2j.gameserver.handler.skillhandlers; | |
46 | ||
47 | +import net.sf.l2j.Config; | |
48 | import net.sf.l2j.gameserver.enums.items.ShotType; | |
49 | import net.sf.l2j.gameserver.enums.skills.SkillType; | |
50 | import net.sf.l2j.gameserver.enums.skills.Stats; | |
51 | @@ -11,6 +12,8 @@ | |
52 | import net.sf.l2j.gameserver.model.actor.Player; | |
53 | import net.sf.l2j.gameserver.model.actor.Summon; | |
54 | import net.sf.l2j.gameserver.model.actor.instance.Door; | |
55 | +import net.sf.l2j.gameserver.model.actor.instance.GrandBoss; | |
56 | +import net.sf.l2j.gameserver.model.actor.instance.RaidBoss; | |
57 | import net.sf.l2j.gameserver.model.actor.instance.SiegeFlag; | |
58 | import net.sf.l2j.gameserver.network.SystemMessageId; | |
59 | import net.sf.l2j.gameserver.network.serverpackets.SystemMessage; | |
60 | @@ -81,7 +84,11 @@ | |
61 | final Creature target = ((Creature) obj); | |
62 | if (target.isDead() || target.isInvul()) | |
63 | continue; | |
64 | - | |
65 | + // Player can't heal rb config | |
66 | + 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)) | |
67 | + { | |
68 | + return; | |
69 | + } | |
70 | if (target instanceof Door || target instanceof SiegeFlag) | |
71 | continue; | |
72 | ||
73 | diff --git a/java/net/sf/l2j/gameserver/handler/skillhandlers/HealPercent.java b/java/net/sf/l2j/gameserver/handler/skillhandlers/HealPercent.java | |
74 | index d8cdf85..1763eac 100644 | |
75 | --- a/java/net/sf/l2j/gameserver/handler/skillhandlers/HealPercent.java | |
76 | +++ b/java/net/sf/l2j/gameserver/handler/skillhandlers/HealPercent.java | |
77 | @@ -1,5 +1,6 @@ | |
78 | package net.sf.l2j.gameserver.handler.skillhandlers; | |
79 | ||
80 | +import net.sf.l2j.Config; | |
81 | import net.sf.l2j.gameserver.enums.skills.SkillType; | |
82 | import net.sf.l2j.gameserver.handler.ISkillHandler; | |
83 | import net.sf.l2j.gameserver.handler.SkillHandler; | |
84 | @@ -7,6 +8,8 @@ | |
85 | import net.sf.l2j.gameserver.model.actor.Creature; | |
86 | import net.sf.l2j.gameserver.model.actor.Player; | |
87 | import net.sf.l2j.gameserver.model.actor.instance.Door; | |
88 | +import net.sf.l2j.gameserver.model.actor.instance.GrandBoss; | |
89 | +import net.sf.l2j.gameserver.model.actor.instance.RaidBoss; | |
90 | import net.sf.l2j.gameserver.model.actor.instance.SiegeFlag; | |
91 | import net.sf.l2j.gameserver.network.SystemMessageId; | |
92 | import net.sf.l2j.gameserver.network.serverpackets.SystemMessage; | |
93 | @@ -37,7 +40,10 @@ | |
94 | final Creature target = ((Creature) obj); | |
95 | if (target.isDead() || target.isInvul()) | |
96 | continue; | |
97 | - | |
98 | + 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)) | |
99 | + { | |
100 | + return; | |
101 | + } | |
102 | // Doors and flags can't be healed in any way | |
103 | if (target instanceof Door || target instanceof SiegeFlag) | |
104 | continue; | |
105 |