Prevent Test Dummies from giving Artifact EXP and Tactics EXP.
This commit is contained in:
parent
bf62dccbdb
commit
25bb73a670
Binary file not shown.
@ -164,7 +164,9 @@ public class CustomDamage {
|
|||||||
TwosideKeeper.logHealth(target,target.getHealth(),dmg,damager);
|
TwosideKeeper.logHealth(target,target.getHealth(),dmg,damager);
|
||||||
}
|
}
|
||||||
EntityDamagedEvent ev = new EntityDamagedEvent(target,damager,dmg,reason,flags);
|
EntityDamagedEvent ev = new EntityDamagedEvent(target,damager,dmg,reason,flags);
|
||||||
|
if (!Dummy.isDummy(target)) {
|
||||||
Bukkit.getPluginManager().callEvent(ev);
|
Bukkit.getPluginManager().callEvent(ev);
|
||||||
|
}
|
||||||
if (!ev.isCancelled()) {
|
if (!ev.isCancelled()) {
|
||||||
//TwosideKeeper.log("Inside of here.", 0);
|
//TwosideKeeper.log("Inside of here.", 0);
|
||||||
DealDamageToEntity(dmg, damager, target, weapon, reason, flags);
|
DealDamageToEntity(dmg, damager, target, weapon, reason, flags);
|
||||||
@ -605,7 +607,7 @@ public class CustomDamage {
|
|||||||
double ratio = 1.0-CalculateDamageReduction(1,target,p);
|
double ratio = 1.0-CalculateDamageReduction(1,target,p);
|
||||||
if (p.getEquipment().getItemInMainHand().getType()!=Material.BOW) {
|
if (p.getEquipment().getItemInMainHand().getType()!=Material.BOW) {
|
||||||
//Do this with a 1 tick delay, that way it can account for items that are dropped one tick earlier and still work.
|
//Do this with a 1 tick delay, that way it can account for items that are dropped one tick earlier and still work.
|
||||||
if (!isFlagSet(flags,NOAOE)) {
|
if (!isFlagSet(flags,NOAOE) && !Dummy.isDummy(target)) {
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(TwosideKeeper.plugin, new Runnable() {
|
Bukkit.getScheduler().scheduleSyncDelayedTask(TwosideKeeper.plugin, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -619,7 +621,9 @@ public class CustomDamage {
|
|||||||
}
|
}
|
||||||
List<LivingEntity> hitlist = new ArrayList<LivingEntity>();
|
List<LivingEntity> hitlist = new ArrayList<LivingEntity>();
|
||||||
if (!isFlagSet(flags,NOAOE)) {
|
if (!isFlagSet(flags,NOAOE)) {
|
||||||
|
if (!Dummy.isDummy(target)) {
|
||||||
increaseArtifactArmorXP(p,(int)(ratio*10)+1);
|
increaseArtifactArmorXP(p,(int)(ratio*10)+1);
|
||||||
|
}
|
||||||
hitlist = getAOEList(weapon,target);
|
hitlist = getAOEList(weapon,target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user