fix(Core/Movement): Fixed adding wrong flag on root. (#9803)

* fix(Core/Movement): Fixed addind wrong flag on root.

Fixes #5891
This commit is contained in:
UltraNix
2021-12-22 17:54:23 +01:00
committed by GitHub
parent 81cf9e3aa7
commit 07c93c2dfa
2 changed files with 22 additions and 2 deletions

View File

@@ -971,7 +971,27 @@ public:
void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) override
{
if (apply)
{
class DelayedTransportPositionOffsets : public BasicEvent
{
public:
DelayedTransportPositionOffsets(Unit* owner) : _owner(owner) { }
bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override
{
_owner->m_movementInfo.transport.pos.Relocate(-3.5f, 0.f, -0.2f, 0.f);
return true;
}
private:
Unit* _owner;
};
if (who->IsPlayer())
who->m_Events.AddEvent(new DelayedTransportPositionOffsets(who), who->m_Events.CalculateTime(500));
return;
}
if (who->GetEntry() == NPC_HYLDSMEET_DRAKERIDER)
_accessoryRespawnTimer = 5 * MINUTE * IN_MILLISECONDS;