Skip to content

Commit

Permalink
[CORE] reverts
Browse files Browse the repository at this point in the history
  • Loading branch information
ike3 committed Jul 17, 2023
1 parent 720ae94 commit 860a72d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
13 changes: 3 additions & 10 deletions src/game/MotionGenerators/TargetedMovementGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,11 @@ bool TargetedMovementGeneratorMedium<T, D>::Update(T& owner, const uint32& time_
}

// prevent movement while casting spells with cast time or channel time
if (owner.IsNonMeleeSpellCasted(false, false, true, true))
if (owner.IsNonMeleeSpellCasted(false, false, true))
{
if (!owner.movespline->Finalized())
if (!owner.IsStopped())
{
if (owner.IsClientControlled())
{
owner.StopMoving(true);
}
else
{
owner.InterruptMoving();
}
owner.StopMoving();
}
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/Object/Creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3305,7 +3305,7 @@ SpellCastResult Creature::TryToCast(Unit* pTarget, const SpellEntry* pSpellInfo,
return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
}

if (hasUnitState(UNIT_STAT_STUNNED)) {
if (hasUnitState(UNIT_STAT_STUNNED) || IsFeared() || IsPolymorphed() || IsCharmed()) {
return SPELL_FAILED_STUNNED;
}

Expand Down
4 changes: 2 additions & 2 deletions src/game/Object/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint8 updateFlags) const
MANGOS_ASSERT(unit);
if (unit->IsStopped() && unit->m_movementInfo.HasMovementFlag(MOVEFLAG_SPLINE_ENABLED))
{
sLog.outError("%s is not moving but have spline movement enabled!", GetGuidStr().c_str());
((Unit*)this)->m_movementInfo.RemoveMovementFlag(MovementFlags(MOVEFLAG_SPLINE_ENABLED | MOVEFLAG_FORWARD));
//sLog.outError("%s is not moving but have spline movement enabled!", GetGuidStr().c_str());
//((Unit*)this)->m_movementInfo.RemoveMovementFlag(MovementFlags(MOVEFLAG_SPLINE_ENABLED | MOVEFLAG_FORWARD));
}

*data << unit->m_movementInfo;
Expand Down

0 comments on commit 860a72d

Please sign in to comment.