add 200ms damage delay to cannon damages. and add temporary damage holograms

This commit is contained in:
Ben 2016-03-15 00:49:37 +00:00
parent 813a3833ae
commit d7de4381a3

View File

@ -41,6 +41,7 @@ import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilText;
import mineplex.core.common.util.UtilTextMiddle;
import mineplex.core.hologram.Hologram;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.game.clans.clans.ClanInfo;
@ -469,13 +470,18 @@ public abstract class SiegeWeapon implements Listener
return;
}
if (!_ownerClan.isMember(player))
if (Recharge.Instance.use(player, "Damage Cannon", 200, false, false))
{
int health = calculateDamage(player);
removeHealth(health);
UtilTextMiddle.display(UtilText.possesive(_ownerClan.getName(), _name), C.cRed + "-" + health, 0, 10, 0, player);
new Hologram(
_siegeManager.getClansManager().getHologramManager(),
_location.add(UtilMath.random(-1, 1),1.4, UtilMath.random(-1, 1)),
3500l,
C.cRed + "-" + health)
.start();
}
}