@Override public boolean checkTarget(Character target) { // полукчаем игрока из цели Player player = target.getPlayer(); // если это игрок на ивенте ,то можно бить return player != null && player.isEvent(); }
@Override public void causingDamage(Skill skill, AttackInfo info, Character attacker) { // полукчаем игрока из атакующего Player player = attacker.getPlayer(); if (!player.isEvent()) return; super.causingDamage(skill, info, attacker); }
@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); }
@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); }
@Override public void onDelete(TObject object) { if (!object.isPlayer()) { return; } Player player = object.getPlayer(); if (!player.isEvent()) { return; } onDelete(player); }