Core/Entities: Restore group of player after teleport from BG.
This commit is contained in:
@@ -2329,6 +2329,7 @@ bool Player::TeleportToBGEntryPoint()
|
|||||||
|
|
||||||
ScheduleDelayedOperation(DELAYED_BG_MOUNT_RESTORE);
|
ScheduleDelayedOperation(DELAYED_BG_MOUNT_RESTORE);
|
||||||
ScheduleDelayedOperation(DELAYED_BG_TAXI_RESTORE);
|
ScheduleDelayedOperation(DELAYED_BG_TAXI_RESTORE);
|
||||||
|
ScheduleDelayedOperation(DELAYED_BG_GROUP_RESTORE);
|
||||||
return TeleportTo(m_bgData.joinPos);
|
return TeleportTo(m_bgData.joinPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2383,7 +2384,13 @@ void Player::ProcessDelayedOperations()
|
|||||||
ContinueTaxiFlight();
|
ContinueTaxiFlight();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_DelayedOperations & DELAYED_BG_GROUP_RESTORE)
|
||||||
|
{
|
||||||
|
if (Group *g = GetGroup())
|
||||||
|
g->SendUpdateToPlayer(GetGUID());
|
||||||
|
}
|
||||||
|
|
||||||
//we have executed ALL delayed ops, so clear the flag
|
//we have executed ALL delayed ops, so clear the flag
|
||||||
m_DelayedOperations = 0;
|
m_DelayedOperations = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -820,6 +820,7 @@ enum PlayerDelayedOperations
|
|||||||
DELAYED_SPELL_CAST_DESERTER = 0x04,
|
DELAYED_SPELL_CAST_DESERTER = 0x04,
|
||||||
DELAYED_BG_MOUNT_RESTORE = 0x08, ///< Flag to restore mount state after teleport from BG
|
DELAYED_BG_MOUNT_RESTORE = 0x08, ///< Flag to restore mount state after teleport from BG
|
||||||
DELAYED_BG_TAXI_RESTORE = 0x10, ///< Flag to restore taxi state after teleport from BG
|
DELAYED_BG_TAXI_RESTORE = 0x10, ///< Flag to restore taxi state after teleport from BG
|
||||||
|
DELAYED_BG_GROUP_RESTORE = 0x20, ///< Flag to restore group state after teleport from BG
|
||||||
DELAYED_END
|
DELAYED_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user