more fixies
This commit is contained in:
parent
4d128d9c7a
commit
4a70e4da90
@ -113,7 +113,7 @@ public class Inferno extends SkillActive
|
||||
itemStack.setItemMeta(meta);
|
||||
|
||||
Item fire = cur.getWorld().dropItem(cur.getEyeLocation().add(cur.getLocation().getDirection()), itemStack);
|
||||
Factory.Fire().Add(fire, cur, 0.7, 0, 0.3 + (0.1 * level), 1, GetName());
|
||||
Factory.Fire().Add(fire, cur, 0.7, 0, 0.3 + (0.1 * level), 1, GetName(), false);
|
||||
|
||||
fire.teleport(cur.getEyeLocation());
|
||||
double x = 0.07 - (UtilMath.r(14)/100d);
|
||||
|
@ -156,7 +156,7 @@ public class NapalmShot extends SkillActive
|
||||
{
|
||||
Projectile proj = event.getEntity();
|
||||
|
||||
if (!_arrows.remove(proj))
|
||||
if (!_arrows.contains(proj))
|
||||
return;
|
||||
|
||||
if (proj.getShooter() == null)
|
||||
@ -179,7 +179,7 @@ public class NapalmShot extends SkillActive
|
||||
itemStack.setItemMeta(meta);
|
||||
|
||||
Item fire = proj.getWorld().dropItemNaturally(proj.getLocation(), itemStack);
|
||||
Factory.Fire().Add(fire, damager, 16, 0.25, 2, 0.25, GetName());
|
||||
Factory.Fire().Add(fire, damager, 16, 0.25, 2, 0.25, GetName(), true);
|
||||
fire.setVelocity(fire.getVelocity().multiply(1 + (0.15 * level)));
|
||||
}
|
||||
|
||||
|
@ -42,9 +42,9 @@ public class Fire extends MiniPlugin
|
||||
_damageManager = damageManager;
|
||||
}
|
||||
|
||||
public void Add(Item item, LivingEntity owner, double expireTime, double delayTime, double burnTime, double damage, String skillName)
|
||||
public void Add(Item item, LivingEntity owner, double expireTime, double delayTime, double burnTime, double damage, String skillName, boolean hitSelf)
|
||||
{
|
||||
_fire.put(item, new FireData(owner, expireTime, delayTime, burnTime, damage, skillName));
|
||||
_fire.put(item, new FireData(owner, expireTime, delayTime, burnTime, damage, skillName, hitSelf));
|
||||
item.setPickupDelay(0);
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ public class Fire extends MiniPlugin
|
||||
if (ent.getLocation().getBlock().getTypeId() == 8 || ent.getLocation().getBlock().getTypeId() == 9)
|
||||
continue;
|
||||
|
||||
if (ent.equals(_fire.get(fire).GetOwner()))
|
||||
if (!_fire.get(fire).canHitOwner() && ent.equals(_fire.get(fire).GetOwner()))
|
||||
continue;
|
||||
|
||||
if (_conditionManager.HasCondition(ent, ConditionType.FIRE_ITEM_IMMUNITY, null))
|
||||
@ -111,7 +111,7 @@ public class Fire extends MiniPlugin
|
||||
if (!_fire.containsKey(fire))
|
||||
return;
|
||||
|
||||
if (_fire.get(fire).GetOwner().equals(player))
|
||||
if (!_fire.get(fire).canHitOwner() && _fire.get(fire).GetOwner().equals(player))
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
|
@ -10,8 +10,9 @@ public class FireData
|
||||
private double _burnTime;
|
||||
private double _damage;
|
||||
private String _skillName;
|
||||
private boolean _hitOwner;
|
||||
|
||||
public FireData(LivingEntity owner, double expireTime, double delayTime, double burnTime, double damage, String skillName)
|
||||
public FireData(LivingEntity owner, double expireTime, double delayTime, double burnTime, double damage, String skillName, boolean hitSelf)
|
||||
{
|
||||
_owner = owner;
|
||||
_expireTime = System.currentTimeMillis() + (long)(1000 * expireTime);
|
||||
@ -19,6 +20,7 @@ public class FireData
|
||||
_burnTime = burnTime;
|
||||
_damage = damage;
|
||||
_skillName = skillName;
|
||||
_hitOwner = hitSelf;
|
||||
}
|
||||
|
||||
public LivingEntity GetOwner()
|
||||
@ -50,4 +52,9 @@ public class FireData
|
||||
{
|
||||
return System.currentTimeMillis() > _expireTime;
|
||||
}
|
||||
|
||||
public boolean canHitOwner()
|
||||
{
|
||||
return _hitOwner;
|
||||
}
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ public class PerkFlamingSwordEVO extends Perk
|
||||
{
|
||||
//Fire
|
||||
Item fire = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.BLAZE_POWDER));
|
||||
Manager.GetFire().Add(fire, player, 0.7, 0, 0.5, 1, "Inferno");
|
||||
Manager.GetFire().Add(fire, player, 0.7, 0, 0.5, 1, "Inferno", false);
|
||||
|
||||
fire.teleport(player.getEyeLocation());
|
||||
double x = 0.07 - (UtilMath.r(14)/100d);
|
||||
|
Loading…
Reference in New Issue
Block a user