fix(Scripts/Spells) charge Auto attack (#11693)

* Update MotionMaster.h

* Update MotionMaster.cpp

* Update SpellEffects.cpp

* Update MotionMaster.cpp

* Update MotionMaster.h

* Update MotionMaster.cpp

* Update MotionMaster.h

* Update SpellEffects.cpp

* Update Spell.cpp

* Update Spell.cpp

* Update SpellEffects.cpp
This commit is contained in:
天鹿
2022-05-10 14:21:43 +08:00
committed by GitHub
parent 02b93ee708
commit 32b7531295
3 changed files with 5 additions and 5 deletions

View File

@@ -4875,7 +4875,7 @@ void Spell::EffectCharge(SpellEffIndex /*effIndex*/)
if (!m_preGeneratedPath)
{
Position pos = unitTarget->GetFirstCollisionPosition(unitTarget->GetCombatReach(), unitTarget->GetRelativeAngle(m_caster));
m_caster->GetMotionMaster()->MoveCharge(pos.m_positionX, pos.m_positionY, pos.m_positionZ, speed);
m_caster->GetMotionMaster()->MoveCharge(pos.m_positionX, pos.m_positionY, pos.m_positionZ, speed, EVENT_CHARGE, nullptr, false, 0.0f, targetGUID);
if (m_caster->GetTypeId() == TYPEID_PLAYER)
{
@@ -4884,7 +4884,7 @@ void Spell::EffectCharge(SpellEffIndex /*effIndex*/)
}
else
{
m_caster->GetMotionMaster()->MoveCharge(*m_preGeneratedPath, speed);
m_caster->GetMotionMaster()->MoveCharge(*m_preGeneratedPath, speed, targetGUID);
if (m_caster->GetTypeId() == TYPEID_PLAYER)
{