TrinityCore/TrinityCore — Issue #4933: Vehicle Extra Movment Flags
Author: Teiby1
Created: 2012-01-23 18:34:33+00:00
State: open

if a player leave a vehicle and the vehicle has flags like MOVEMENTFLAG2_NO_JUMPING, the player will have the flag although the player has leave the vehicle. so remove the flag if the player leave the vehicle. thanks

you can test this with all vehicle in ulduar (without chopper).

a solution with customscript:

OnCharmed(bool apply)
{
if(apply == false)
{
if(Unit* unit = me->GetCharmer())
if(Player* plr = unit->ToPlayer())
{
if (plr->HasExtraUnitMovementFlag(MOVEMENTFLAG2_NO_STRAFE))
plr->RemoveExtraUnitMovementFlag(MOVEMENTFLAG2_NO_STRAFE);

if (plr->HasExtraUnitMovementFlag(MOVEMENTFLAG2_NO_JUMPING))
plr->RemoveExtraUnitMovementFlag(MOVEMENTFLAG2_NO_JUMPING);

if (plr->HasExtraUnitMovementFlag(MOVEMENTFLAG2_FULL_SPEED_TURNING))
plr->RemoveExtraUnitMovementFlag(MOVEMENTFLAG2_FULL_SPEED_TURNING);

if (plr->HasExtraUnitMovementFlag(MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING))
plr->RemoveExtraUnitMovementFlag(MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING);

if (plr->HasExtraUnitMovementFlag(MOVEMENTFLAG2_FULL_SPEED_PITCHING))
plr->RemoveExtraUnitMovementFlag(MOVEMENTFLAG2_FULL_SPEED_PITCHING);
}
}
}

have tested this and it works. but is better to fix this in main code