Report Plymorph not working in Mangos One Posted August 14, 2018 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.
Plymorph not working
-
-
-
-
-
in Mangos One
Posted
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.