Core/Pets: ported a couple changes from 3.3.5 branch that went missing and corrected a master branch spell check that was allowing non-charmed player controlled units to bypass the ai movement check exception (pets are not meant to be charmed, only controlled)

This commit is contained in:
Ovahlord committed 2023-12-17 05:17:57 +01:00
1 parent 2c38b2f4be
commit 924273363f
6 files changed
+27 -17

No files matched your search

+1 -1
View File
@@ -4093,7 +4093,7 @@ void Spell::update(uint32 difftime)
// if charmed by creature, trust the AI not to cheat and allow the cast to proceed
// @todo this is a hack, "creature" movesplines don't differentiate turning/moving right now
// however, checking what type of movement the spline is for every single spline would be really expensive
if (!m_caster->ToUnit()->GetCharmerGUID().IsCreature())
if (!m_caster->ToUnit()->IsControlledByPlayer())
cancel();
}