return;
}
}
if(isInOlympiadMode())
{
OlympiadGame olymp_game = Olympiad.getOlympiadGame(getOlympiadGameId());
if(olymp_game != null)
{
if(olymp_game.getState() <= 0)
{
attacker.getPlayer().sendPacket(Msg.INVALID_TARGET);
return;
}
if(this != attacker)
{
olymp_game.addDamage(this, Math.min(hp, i));
}
if(i >= hp)
{
if(olymp_game.getType() != CompType.TEAM && olymp_game.getType() != CompType.TEAM_RANDOM)
{
olymp_game.setWinner(getOlympiadSide() == 1 ? 2 : 1);
olymp_game.endGame(20000, false);
setCurrentHp(1, false);
attacker.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
attacker.sendActionFailed();
return;
}
else if(olymp_game.doDie(this)) // Все умерли
{
olymp_game.setWinner(getOlympiadSide() == 1 ? 2 : 1);
olymp_game.endGame(20000, false);
}
}
}
else
{