Prohibit entering combat with self damage skills.
This commit is contained in:
@@ -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,14 +4400,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
// Start attack stance and notify being attacked.
|
||||
if (target.hasAI())
|
||||
if ((this != target))
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
if (target.hasAI())
|
||||
{
|
||||
target.getAI().clientStartAutoAttack();
|
||||
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||
}
|
||||
getAI().clientStartAutoAttack();
|
||||
}
|
||||
|
||||
getAI().clientStartAutoAttack();
|
||||
|
||||
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
|
||||
double damage = damageValue;
|
||||
if (target.isImmobilized())
|
||||
|
||||
Reference in New Issue
Block a user