Solo event status related additions.

This commit is contained in:
MobiusDevelopment
2021-10-30 13:54:02 +00:00
parent 4df8d007bd
commit 593e36fc3a
118 changed files with 263 additions and 120 deletions

View File

@@ -412,6 +412,7 @@ public class PlayerInstance extends Playable
private final int[] _race = new int[2];
private final BlockList _blockList = new BlockList(this);
private boolean _isRegisteredOnEvent = false;
private boolean _isOnSoloEvent = false;
private boolean _isOnEvent = false;
private int _team = 0;
private int _alliedVarkaKetra = 0;
@@ -9095,7 +9096,7 @@ public class PlayerInstance extends Playable
final PlayerInstance player = attacker.getActingPlayer();
if ((player != null) && player.isOnEvent())
{
return getTeam() != player.getTeam();
return isOnSoloEvent() || (getTeam() != player.getTeam());
}
}
@@ -9862,7 +9863,7 @@ public class PlayerInstance extends Playable
// Check if player and target are in events and on the same team.
if ((target instanceof PlayerInstance) && isOnEvent() && skill.isOffensive())
{
return target.getActingPlayer().isOnEvent() && (getTeam() != target.getActingPlayer().getTeam());
return target.getActingPlayer().isOnEvent() && (isOnSoloEvent() || (getTeam() != target.getActingPlayer().getTeam()));
}
// check for PC->PC Pvp status
@@ -11297,6 +11298,16 @@ public class PlayerInstance extends Playable
_isOnEvent = value;
}
public boolean isOnSoloEvent()
{
return _isOnSoloEvent;
}
public void setOnSoloEvent(boolean value)
{
_isOnSoloEvent = value;
}
/**
* Sets the team.
* @param team the new team

View File

@@ -98,7 +98,7 @@ public class AttackRequest implements IClientIncomingPacket
}
// No attacks to same team in event
if (player.isOnEvent())
if (player.isOnEvent() && !player.isOnSoloEvent())
{
if (target instanceof PlayerInstance)
{