예제 #1
0
  @Override
  public boolean checkTarget(Character target) {
    // полукчаем игрока из цели
    Player player = target.getPlayer();

    // если это игрок на ивенте ,то можно бить
    return player != null && player.isEvent();
  }
예제 #2
0
  @Override
  public void causingDamage(Skill skill, AttackInfo info, Character attacker) {
    // полукчаем игрока из атакующего
    Player player = attacker.getPlayer();

    if (!player.isEvent()) return;

    super.causingDamage(skill, info, attacker);
  }
예제 #3
0
  @Override
  public void causingDamage(Skill skill, AttackInfo info, Character attacker) {
    // пробуем получить игрока
    Player player = attacker.getPlayer();

    // если это игрок и он не на ивенте, выходим
    if (player != null && !player.isEvent()) return;

    super.causingDamage(skill, info, attacker);
  }
예제 #4
0
  @Override
  public void onDie(Character killer, Character killed) {

    if (!isCheckDieState() || !killed.isPlayer()) {
      return;
    }

    Player player = killed.getPlayer();

    if (!player.isEvent() || !players.containsKey(killed.getObjectId())) {
      return;
    }

    onDie(player, killer);
  }
예제 #5
0
  @Override
  public void onDelete(TObject object) {

    if (!object.isPlayer()) {
      return;
    }

    Player player = object.getPlayer();

    if (!player.isEvent()) {
      return;
    }

    onDelete(player);
  }