mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 14:10:18 -04:00
Core/Movement: Use SetLevitate(true/false) instead of AddUnit/RemoveUnit.
This commit is contained in:
@@ -731,12 +731,12 @@ void SmartAI::SetFly(bool fly)
|
||||
{
|
||||
if (fly)
|
||||
{
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
me->SetLevitate(true);
|
||||
me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x01);
|
||||
}
|
||||
else
|
||||
{
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
me->SetLevitate(false);
|
||||
me->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, 0x01);
|
||||
}
|
||||
me->SetFlying(fly);
|
||||
|
||||
Reference in New Issue
Block a user