mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-28 16:16:27 +00:00
fix(Core/Unit): Introduce animtier to malygos to fix flying animations (#24067)
This commit is contained in:
@@ -596,7 +596,7 @@ void Unit::UpdateSplineMovement(uint32 t_diff)
|
||||
DisableSpline();
|
||||
|
||||
if (movespline->HasAnimation() && IsCreature() && IsAlive())
|
||||
SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, movespline->GetAnimationType());
|
||||
SetAnimTier(AnimTier(movespline->GetAnimationType()));
|
||||
}
|
||||
|
||||
// pussywizard: update always! not every 400ms, because movement generators need the actual position
|
||||
@@ -15284,6 +15284,11 @@ float Unit::GetSpellMinRangeForTarget(Unit const* target, SpellInfo const* spell
|
||||
return spellInfo->GetMinRange(!IsHostileTo(target));
|
||||
}
|
||||
|
||||
void Unit::SetAnimTier(AnimTier animTier)
|
||||
{
|
||||
SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, uint8(animTier));
|
||||
}
|
||||
|
||||
uint32 Unit::GetCreatureType() const
|
||||
{
|
||||
if (IsPlayer())
|
||||
|
||||
@@ -774,6 +774,8 @@ public:
|
||||
inline bool IsCrowdControlled() const { return HasFlag(UNIT_FIELD_FLAGS, (UNIT_FLAG_CONFUSED | UNIT_FLAG_FLEEING | UNIT_FLAG_STUNNED)); }
|
||||
inline bool IsImmobilizedState() const { return HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED); }
|
||||
|
||||
void SetAnimTier(AnimTier animTier);
|
||||
|
||||
/*********************************************************/
|
||||
/*** UNIT TYPES, CLASSES, RACES... ***/
|
||||
/*********************************************************/
|
||||
|
||||
Reference in New Issue
Block a user