Jump to content

ike33

Members
  • Posts

    2
  • Joined

  • Last visited

  • Donations

    0.00 GBP 

Bug Comments posted by ike33

  1. 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);
    
    ...
    case CAST_FAIL_STATE:
        cmFlags |= COMBAT_MOVEMENT_SILENCE;
        break;
    ...
    if (cmFlags)
    {
        if (!(action.cast.castFlags & CAST_NO_MELEE_IF_OOM))
        {
            AddCombatMovementFlags(cmFlags);
            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.

×
×
  • 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