Fake player aggression checks.

This commit is contained in:
MobiusDev
2018-02-21 08:15:34 +00:00
parent 055da88da9
commit 08e4c8f50a
15 changed files with 95 additions and 0 deletions

View File

@ -690,6 +690,12 @@ public class L2Attackable extends L2Npc
return;
}
// Check if fake players should aggro each other.
if (isFakePlayer() && !Config.FAKE_PLAYER_AGGRO_FPC && attacker.isFakePlayer())
{
return;
}
L2PcInstance targetPlayer = attacker.getActingPlayer();
final L2Character summoner = attacker.getSummoner();
if (attacker.isNpc() && (summoner != null) && summoner.isPlayer() && !attacker.isTargetable())

View File

@ -4298,6 +4298,12 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
public void doAttack(double damage, L2Character target, Skill skill, boolean isDOT, boolean directlyToHp, boolean critical, boolean reflect)
{
// Check if fake players should aggro each other.
if (isFakePlayer() && !Config.FAKE_PLAYER_AGGRO_FPC && target.isFakePlayer())
{
return;
}
// Start attack stance and notify being attacked.
if (target.hasAI())
{