Use of AltCommandChannelFriends configuration at Player isAutoAttackable method.

Contributed by Enryu.
This commit is contained in:
MobiusDevelopment
2022-06-12 12:08:06 +00:00
parent df44eccf01
commit 0c4c85f3b6
23 changed files with 138 additions and 0 deletions

View File

@@ -8396,6 +8396,12 @@ public class Player extends Playable
return false;
}
// Same Command Channel are friends.
if (Config.ALT_COMMAND_CHANNEL_FRIENDS && (isInParty() && (getParty().getCommandChannel() != null) && attacker.isInParty() && (attacker.getParty().getCommandChannel() != null) && (getParty().getCommandChannel() == attacker.getParty().getCommandChannel())))
{
return false;
}
// Get Player
final Player attackerPlayer = attacker.getActingPlayer();
final Clan clan = getClan();