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

amount when hit.
This commit is contained in:
sigonasr2 2016-09-20 19:52:06 -05:00
parent ea1432af6c
commit 01af59a81a
3 changed files with 8 additions and 1 deletions

Binary file not shown.

View File

@ -778,7 +778,7 @@ public class CustomDamage {
private static void reduceSwiftAegisBuff(Player p) {
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
if (pd.swiftaegisamt>0) {
/*if (pd.swiftaegisamt>0) {
if (p.hasPotionEffect(PotionEffectType.DAMAGE_RESISTANCE)) {
int resistancelv = GenericFunctions.getPotionEffectLevel(PotionEffectType.DAMAGE_RESISTANCE, p);
int resistance_duration = GenericFunctions.getPotionEffectDuration(PotionEffectType.DAMAGE_RESISTANCE, p);
@ -798,6 +798,12 @@ public class CustomDamage {
} else {
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.");
}
}

View File

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