Prohibit entering combat with self damage skills.
This commit is contained in:
parent
a5219616ff
commit
2e51962345
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1166,7 +1166,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4397,13 +4397,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1166,7 +1166,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4397,13 +4397,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1166,7 +1166,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4397,13 +4397,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1166,7 +1166,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4397,13 +4397,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1166,7 +1166,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4397,13 +4397,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1166,7 +1166,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4397,13 +4397,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1166,7 +1166,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4397,13 +4397,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1166,7 +1166,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4396,13 +4396,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
@ -71,10 +71,10 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return info.getSkill().isToggle();
|
||||
}
|
||||
|
||||
damage = info.getEffected().getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
info.getEffected().reduceCurrentHpByDOT(damage, info.getEffector(), info.getSkill());
|
||||
info.getEffected().notifyDamageReceived(damage, info.getEffector(), info.getSkill(), false, true);
|
||||
return info.getSkill().isToggle();
|
||||
|
@ -71,10 +71,10 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return info.getSkill().isToggle();
|
||||
}
|
||||
|
||||
damage = info.getEffected().getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
info.getEffected().reduceCurrentHpByDOT(damage, info.getEffector(), info.getSkill());
|
||||
info.getEffected().notifyDamageReceived(damage, info.getEffector(), info.getSkill(), false, true);
|
||||
return info.getSkill().isToggle();
|
||||
|
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1166,7 +1166,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4387,13 +4387,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1166,7 +1166,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4387,13 +4387,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1166,7 +1166,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4387,13 +4387,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1167,7 +1167,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4400,13 +4400,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1167,7 +1167,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4400,13 +4400,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1167,7 +1167,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4399,13 +4399,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
@ -71,13 +71,11 @@ public class DamOverTimePercent extends AbstractEffect
|
||||
{
|
||||
return skill.isToggle();
|
||||
}
|
||||
|
||||
damage = effected.getCurrentHp() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
effector.doAttack(damage, effected, skill, true, false, false, false);
|
||||
|
||||
return skill.isToggle();
|
||||
}
|
||||
}
|
||||
|
@ -1166,7 +1166,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
// Flag the attacker if it's a PlayerInstance outside a PvP area
|
||||
final PlayerInstance player = getActingPlayer();
|
||||
if (player != null)
|
||||
if ((player != null) && (player != target))
|
||||
{
|
||||
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
|
||||
player.updatePvPStatus(target);
|
||||
@ -4387,13 +4387,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if ((this != target))
|
||||
{
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
|
Loading…
Reference in New Issue
Block a user