diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index d46d22e..0e3fd5d 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/sig/plugin/TwosideKeeper/CustomDamage.java b/src/sig/plugin/TwosideKeeper/CustomDamage.java index d9da859..b12a2c0 100644 --- a/src/sig/plugin/TwosideKeeper/CustomDamage.java +++ b/src/sig/plugin/TwosideKeeper/CustomDamage.java @@ -692,6 +692,9 @@ public class CustomDamage { public static void IncreaseWeaponCharges(Player p, int amt) { PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); if (pd.rage_time<=TwosideKeeper.getServerTickTime()) { + if (ItemSet.hasFullSet(GenericFunctions.getEquipment(p), p, ItemSet.DAWNTRACKER)) { + amt*=2; + } pd.weaponcharges+=amt; GenericFunctions.sendActionBarMessage(p, ""); } @@ -699,6 +702,9 @@ public class CustomDamage { public static void IncreaseLifestealStacks(Player p, int amt) { PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); + if (ItemSet.hasFullSet(GenericFunctions.getEquipment(p), p, ItemSet.DAWNTRACKER)) { + amt*=2; + } pd.lifestealstacks=Math.min(100,pd.lifestealstacks+amt*((pd.rage_time>TwosideKeeper.getServerTickTime())?2:1)); GenericFunctions.sendActionBarMessage(p, ""); } diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java index e0c5672..d520dbd 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java @@ -3945,8 +3945,10 @@ public class GenericFunctions { GenericFunctions.sendActionBarMessage(p, ChatColor.GRAY+"Resistance "+WorldShop.toRomanNumeral(GenericFunctions.getPotionEffectLevel(PotionEffectType.DAMAGE_RESISTANCE, p)+1)); }*/ if (swiftaegislv>0) { + if (pd.swiftaegisamt<10) { + pd.swiftaegistime=TwosideKeeper.getServerTickTime(); + } pd.swiftaegisamt=Math.min(10,getSwiftAegisAmt(p)+swiftaegislv); - pd.swiftaegistime=TwosideKeeper.getServerTickTime(); GenericFunctions.sendActionBarMessage(p, ChatColor.GRAY+"Resist "+WorldShop.toRomanNumeral(pd.swiftaegisamt)); } } @@ -4209,7 +4211,7 @@ public class GenericFunctions { public static void PerformAssassinate(Player player, Material name) { //Try to find a target to look at. - LivingEntity target = aPlugin.API.getTargetEntity(player, 100); + LivingEntity target = aPlugin.API.rayTraceTargetEntity(player, 100); if (target!=null && !target.isDead()) { //We found a target, try to jump behind them now. double mult = 0.0; @@ -4383,6 +4385,7 @@ public class GenericFunctions { //Automatically appends status effect buffs to the beginning of it. public static void sendActionBarMessage(Player p, String message, boolean important) { PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); + String finalmsg = ""; if (pd.rage_time>TwosideKeeper.getServerTickTime()) { message = ChatColor.RED+" !! RAGE ACTIVE !! "+message; } @@ -4391,17 +4394,29 @@ public class GenericFunctions { String prefix=ActionBarBuffUpdater.getActionBarPrefix(p); if (prefix.length()>0) { aPlugin.API.sendActionBarMessage(p, message+" "+prefix); + finalmsg=message+" "+prefix; } else { if (message.length()>0) { aPlugin.API.sendActionBarMessage(p, message); + finalmsg=message; } } if (important) { pd.lastimportantactionbarmsg=TwosideKeeper.getServerTickTime(); } + TwosideKeeper.lastActionBarMessage=finalmsg; } } + public static void sendLastImportantActionBarMsgTime(Player p, long last_important_msg_time) { + PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); + pd.lastimportantactionbarmsg=last_important_msg_time; + } + + public static String getLastActionBarMessage() { + return TwosideKeeper.lastActionBarMessage; + } + public static String getDisplayName(LivingEntity ent) { //Strips off the suffix of a mob. if (ent.getCustomName()==null) { diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java b/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java index d804277..04d8366 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/ItemSet.java @@ -317,8 +317,8 @@ public enum ItemSet { lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Lifesteal"); lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+" Max Health"); lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Powered Mock"); - lore.add(ChatColor.GRAY+" Mock debuff duration increases from"); - lore.add(ChatColor.GRAY+" 10 -> 20 seconds, making it stackable."); + lore.add(ChatColor.GRAY+" Mock cooldown decreases from"); + lore.add(ChatColor.GRAY+" 20 -> 10 seconds, making it stackable."); lore.add(ChatColor.GRAY+" All Lifesteal Stacks and Weapon Charges"); lore.add(ChatColor.GRAY+" gained are doubled."); }break; diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java index 0bc12aa..9e03d43 100644 --- a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java +++ b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java @@ -579,7 +579,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener { public static final int LIFESAVER_COOLDOWN=6000; public static final int ARROWBARRAGE_COOLDOWN=2400; public static final int SIPHON_COOLDOWN = 700; - private static final int MOCK_COOLDOWN = 400; + public static final int MOCK_COOLDOWN = 400; + + public static String lastActionBarMessage=""; public static File filesave; public static HashMap playerdata; diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java b/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java index 27fdf79..24ec184 100644 --- a/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java +++ b/src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java @@ -421,6 +421,12 @@ public final class TwosideKeeperAPI { public static String getActionBarSuffix(LivingEntity ent) { return ActionBarBuffUpdater.getActionBarPrefix(ent); } + public static String getCurrentActionBarText(Player p) { + return GenericFunctions.getLastActionBarMessage(); + } + public static void setActionBarLastImportantMessageTime(Player p, long last_important_msg_time) { + GenericFunctions.sendLastImportantActionBarMsgTime(p, last_important_msg_time); + } /** * @deprecated Use the version that requires a short. Using a byte makes no sense * as durability can be larger than 256.