Fix Provoke not provoking monsters.

This commit is contained in:
sigonasr2 2017-01-19 00:19:13 -06:00
parent 35ada09a50
commit 7b45ad4ca3
2 changed files with 3 additions and 2 deletions

Binary file not shown.

View File

@ -1361,9 +1361,10 @@ public class CustomDamage {
m.addPotionEffect(new PotionEffect(PotionEffectType.GLOWING,duration,0),true); m.addPotionEffect(new PotionEffect(PotionEffectType.GLOWING,duration,0),true);
} }
static void applyProvokeAggro(Monster m, ItemStack weapon) { static void applyProvokeAggro(Monster m, Player p, ItemStack weapon) {
if (ArtifactAbility.containsEnchantment(ArtifactAbility.PROVOKE, weapon)) { if (ArtifactAbility.containsEnchantment(ArtifactAbility.PROVOKE, weapon)) {
//This is allowed, get the level on the weapon. //This is allowed, get the level on the weapon.
setMonsterTarget(m,p);
setAggroGlowTickTime(m,(int)(GenericFunctions.getAbilityValue(ArtifactAbility.PROVOKE, weapon)*20)); setAggroGlowTickTime(m,(int)(GenericFunctions.getAbilityValue(ArtifactAbility.PROVOKE, weapon)*20));
} }
} }
@ -1374,7 +1375,7 @@ public class CustomDamage {
} }
if (m instanceof Monster) { if (m instanceof Monster) {
applyDefenderAggro((Monster)m,p); applyDefenderAggro((Monster)m,p);
applyProvokeAggro((Monster)m,weapon); applyProvokeAggro((Monster)m,p,weapon);
leaderRallyNearbyMonsters((Monster)m,p); leaderRallyNearbyMonsters((Monster)m,p);
applyDonnerSetAggro((Monster)m,p); applyDonnerSetAggro((Monster)m,p);
} }