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:
@@ -17416,11 +17416,11 @@ void Unit::SetRooted(bool apply)
|
|||||||
|
|
||||||
if (IsFalling())
|
if (IsFalling())
|
||||||
{
|
{
|
||||||
AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
|
AddUnitMovementFlag(MOVEMENTFLAG_PENDING_ROOT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AddUnitMovementFlag(MOVEMENTFLAG_PENDING_ROOT);
|
AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creature specific
|
// Creature specific
|
||||||
|
|||||||
@@ -971,7 +971,27 @@ public:
|
|||||||
void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) override
|
void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) override
|
||||||
{
|
{
|
||||||
if (apply)
|
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;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (who->GetEntry() == NPC_HYLDSMEET_DRAKERIDER)
|
if (who->GetEntry() == NPC_HYLDSMEET_DRAKERIDER)
|
||||||
_accessoryRespawnTimer = 5 * MINUTE * IN_MILLISECONDS;
|
_accessoryRespawnTimer = 5 * MINUTE * IN_MILLISECONDS;
|
||||||
|
|||||||
Reference in New Issue
Block a user