Solo event status related additions.
This commit is contained in:
@@ -399,6 +399,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;
|
||||
@@ -8943,7 +8944,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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9696,7 +9697,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
|
||||
@@ -11002,6 +11003,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
|
||||
|
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user