2
0
Эх сурвалжийг харах

Bleed only tells you that you've started bleeding if you aren't already bleeding.

nossr50 6 жил өмнө
parent
commit
92de75e002

+ 9 - 8
src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java

@@ -52,6 +52,15 @@ public class SwordsManager extends SkillManager {
     public void ruptureCheck(LivingEntity target) {
         if (SkillUtils.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.SWORDS_RUPTURE, getPlayer(), this.skill, getSkillLevel(), activationChance)) {
 
+            if (target instanceof Player) {
+                Player defender = (Player) target;
+
+                if (UserManager.getPlayer(defender).useChatNotifications()) {
+                    if(!BleedTimerTask.isBleeding(defender))
+                        NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding.Started");
+                }
+            }
+
             if (getSkillLevel() >= AdvancedConfig.getInstance().getMaxBonusLevel(SubSkillType.SWORDS_RUPTURE)) {
                 BleedTimerTask.add(target, getBleedTicks(), RankUtils.getRank(getPlayer(), SubSkillType.SWORDS_RUPTURE));
             }
@@ -62,14 +71,6 @@ public class SwordsManager extends SkillManager {
             if (mcMMOPlayer.useChatNotifications()) {
                 NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding");
             }
-
-            if (target instanceof Player) {
-                Player defender = (Player) target;
-
-                if (UserManager.getPlayer(defender).useChatNotifications()) {
-                    NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding.Started");
-                }
-            }
         }
     }