Reverted entering combat with self damage skills prohibition.

This commit is contained in:
MobiusDevelopment
2020-09-01 13:42:09 +00:00
parent a798e88a35
commit f9d7d5fa77
15 changed files with 75 additions and 120 deletions

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4397,15 +4397,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4397,15 +4397,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4397,15 +4397,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4397,15 +4397,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4397,15 +4397,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4397,15 +4397,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4397,15 +4397,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4396,15 +4396,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4387,15 +4387,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4387,15 +4387,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4387,15 +4387,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4400,15 +4400,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4400,15 +4400,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4399,15 +4399,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;

View File

@@ -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) && (player != target))
if (player != null)
{
AttackStanceTaskManager.getInstance().addAttackStanceTask(player);
player.updatePvPStatus(target);
@@ -4387,15 +4387,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Start attack stance and notify being attacked.
if ((this != target))
if (target.hasAI())
{
if (target.hasAI())
{
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
target.getAI().clientStartAutoAttack();
target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
}
getAI().clientStartAutoAttack();
// ImmobileDamageBonus and ImmobileDamageResist effect bonuses.
double damage = damageValue;