Declare War

Issue #274 resolved
josellyto created an issue

Invalid Target when trying to use magic skills.

Here: https://www.youtube.com/watch?v=f03OxqGZk8g

the worse that when the player is in the olympiad or event happens the same problem. can not use magic skills

Comments (9)

  1. Vyacheslav Urievich

    still reproducible. skill which has TargetType: EnemyOnly does not work properly at clan war players, even if you pressed ctrl, untill target player flagged you

    I have found in the logic. Class EnemyOnly and added in condition method checkPvpSkill

    if (target.isDead() || (!target.isAttackable() && //
                        (player != null) && //
                        !player.isInPartyWith(target) && //
                        !player.isInClanWith(target) && //
                        !player.isInAllyWith(target) && // TODO(Zoey76): Confirm.
                        !player.isInCommandChannelWith(target) && // TODO(Zoey76): Confirm.
                        !player.checkPvpSkill(target, skill) &&
                        !player.checkIfPvP(target)))
                    {
                        activeChar.sendPacket(INCORRECT_TARGET);
                        return EMPTY_TARGET_LIST;
                    }
    

    May be make sense to remove checkIfPvP from condition since checkPvpSkill doing same logic, this method checkPvpSkill included duel, clan war, siege, party, etc..

    But there is a misunderstanding in method checkPvpSkill

    if ((skill.isAOE() && (skill.getEffectRange() > 0)) && isCtrlPressed && (getTarget() == target)) {
        return true;
    }
    

    method skill.isAOE() returns false because skill has target type EnemyOnly which is not added in method isAOE.

    1. What if full name of this method isAOE? Should be added EnemyOnly type in this method or can be removed skill.isAOE from condition for clan war?
    2. To use skills does need player press ctrl at clan war? if no, then isCtrlPressed should be removed. Some skills are working without pressed ctrl at clan war, some should be pressed ctrl 🙂 I think at clan war should be the same logic for all skill as well as for siege, duel, olimpiad.

    @Zoey76

  2. Log in to comment