* @param packet
*/
public void broadcastToOppositTeam(L2PcInstance player, L2GameServerPacket packet)
{
if (player == null || !player.isInDuel()) return;
Duel duel = getDuel(player.getDuelId());
if (duel == null) return;
if (duel.getPlayerA() == null || duel.getPlayerB() == null) return;
if (duel.getPlayerA() == player)
{
duel.broadcastToTeam2(packet);
}
else if (duel.getPlayerB() == player)
{
duel.broadcastToTeam1(packet);
}
else if (duel.isPartyDuel())
{
if (duel.getPlayerA().getParty() != null &&
duel.getPlayerA().getParty().getPartyMembers().contains(player))
{
duel.broadcastToTeam2(packet);
}
else if (duel.getPlayerB().getParty() != null &&
duel.getPlayerB().getParty().getPartyMembers().contains(player))
{
duel.broadcastToTeam1(packet);
}
}
}