* @param caster Creature
*/
@Override
protected void onEvtSeeSpell(Skill skill, Creature caster)
{
final BlockInstance actor = (BlockInstance) getActor();
if (caster == null)
{
return;
}
if (!caster.isPlayer())
{
return;
}
final Player player = caster.getPlayer();
final int arena = player.getBlockCheckerArena();
if ((arena == -1) || (arena > 3))
{
return;
}
if (player.getTarget().equals(actor))
{
if ((skill.getId() == 5852) || (skill.getId() == 5853))
{
final ArenaParticipantsHolder holder = HandysBlockCheckerManager.getInstance().getHolder(arena);
if ((holder.getPlayerTeam(player) == 0) && !actor.isRed())
{
actor.changeColor();
increaseTeamPointsAndSend(player, holder.getEvent());
}
else if ((holder.getPlayerTeam(player) == 1) && actor.isRed())
{
actor.changeColor();
increaseTeamPointsAndSend(player, holder.getEvent());
}
else
{
return;