diff --git a/src/game/Object/Unit.cpp b/src/game/Object/Unit.cpp index 9a46b40d..2713f400 100644 --- a/src/game/Object/Unit.cpp +++ b/src/game/Object/Unit.cpp @@ -8801,12 +8801,18 @@ bool Unit::IsStandState() const return !IsSitState() && s != UNIT_STAND_STATE_SLEEP && s != UNIT_STAND_STATE_KNEEL; } +bool Unit::IsSeatedState() const +{ + uint8 standState = getStandState(); + return standState != UNIT_STAND_STATE_SLEEP && standState != UNIT_STAND_STATE_STAND; +} + void Unit::SetStandState(uint8 state) { SetByteValue(UNIT_FIELD_BYTES_1, 0, state); - if (IsStandState()) - { RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_NOT_SEATED); } + if (!IsSeatedState()) + RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_NOT_SEATED); if (GetTypeId() == TYPEID_PLAYER) { diff --git a/src/game/Object/Unit.h b/src/game/Object/Unit.h index f42c3ccf..110a3184 100644 --- a/src/game/Object/Unit.h +++ b/src/game/Object/Unit.h @@ -1785,6 +1785,8 @@ class Unit : public WorldObject * @return true if the Unit is standing normally, false otherwise */ bool IsStandState() const; + + bool IsSeatedState() const; /** * Change the stand state for this Unit. For possible values check * UnitStandStateType.