Fix Action bar messages for Swift Aegis. Properly reduce swift aegis

amount when hit.
dev
sigonasr2 9 years ago
parent ea1432af6c
commit 01af59a81a
  1. BIN
      TwosideKeeper.jar
  2. 8
      src/sig/plugin/TwosideKeeper/CustomDamage.java
  3. 1
      src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java

Binary file not shown.

@ -778,7 +778,7 @@ public class CustomDamage {
private static void reduceSwiftAegisBuff(Player p) { private static void reduceSwiftAegisBuff(Player p) {
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
if (pd.swiftaegisamt>0) { /*if (pd.swiftaegisamt>0) {
if (p.hasPotionEffect(PotionEffectType.DAMAGE_RESISTANCE)) { if (p.hasPotionEffect(PotionEffectType.DAMAGE_RESISTANCE)) {
int resistancelv = GenericFunctions.getPotionEffectLevel(PotionEffectType.DAMAGE_RESISTANCE, p); int resistancelv = GenericFunctions.getPotionEffectLevel(PotionEffectType.DAMAGE_RESISTANCE, p);
int resistance_duration = GenericFunctions.getPotionEffectDuration(PotionEffectType.DAMAGE_RESISTANCE, p); int resistance_duration = GenericFunctions.getPotionEffectDuration(PotionEffectType.DAMAGE_RESISTANCE, p);
@ -798,6 +798,12 @@ public class CustomDamage {
} else { } else {
GenericFunctions.sendActionBarMessage(p, ChatColor.GRAY+"Swift Aegis Resistance Removed."); GenericFunctions.sendActionBarMessage(p, ChatColor.GRAY+"Swift Aegis Resistance Removed.");
} }
}*/
pd.swiftaegisamt=Math.max(0, GenericFunctions.getSwiftAegisAmt(p)-1);
if (GenericFunctions.getSwiftAegisAmt(p)>0) {
GenericFunctions.sendActionBarMessage(p, ChatColor.GRAY+"Resist "+WorldShop.toRomanNumeral(GenericFunctions.getSwiftAegisAmt(p)+1));
} else {
GenericFunctions.sendActionBarMessage(p, ChatColor.GRAY+"Swift Aegis Resist Removed.");
} }
} }

@ -3946,6 +3946,7 @@ public class GenericFunctions {
}*/ }*/
pd.swiftaegisamt=Math.min(10,getSwiftAegisAmt(p)+swiftaegislv); pd.swiftaegisamt=Math.min(10,getSwiftAegisAmt(p)+swiftaegislv);
pd.swiftaegistime=TwosideKeeper.getServerTickTime(); pd.swiftaegistime=TwosideKeeper.getServerTickTime();
GenericFunctions.sendActionBarMessage(p, ChatColor.GRAY+"Resist "+WorldShop.toRomanNumeral(pd.swiftaegisamt+1));
} }
public static int getSwiftAegisAmt(Player p) { public static int getSwiftAegisAmt(Player p) {

Loading…
Cancel
Save