Jump to content
  • Plymorph not working

    • Main Category: Core / Mangos Daemon
      Sub-Category: Spell
      Version: 22.1

    when i give polymorph to creature, the creatures can attack me in polymorph.

    User Feedback

    Recommended Comments

    One of the cases would be in the CreatureEventAI - the polymorphed target is trying to cast a spell. I.e., CreatureEventAI::ProcessAction:

    case ACTION_T_CAST:                     //11
    CanCastResult castResult = DoCastSpellIfCan(target, action.cast.spellId, action.cast.castFlags);
    if (cmFlags)
        if (!(action.cast.castFlags & CAST_NO_MELEE_IF_OOM))
            SetCombatMovement(true, true);

    So the spell fails with CAST_FAIL_STATE, resulting in non-zero cmFlags starting the combat movement.

    Is this code really necessary? E.g., in mangos-zero there only a DoCastSpellIfCan() call without hadling its results.

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use