Core/Objects: fixed destination calculation for destination based spells casted by flying units
Port From (https://github.com/TrinityCore/TrinityCore/commit/0c15b2ac7cd8f57004b009a99ec357ef2eefecb3)
This commit is contained in:
@@ -169,7 +169,7 @@ namespace Game.Movement
|
||||
{
|
||||
Log.outDebug(LogFilter.Maps, "++ BuildPolyPath . (startPoly == 0 || endPoly == 0)\n");
|
||||
BuildShortcut();
|
||||
bool path = _source.IsTypeId(TypeId.Unit) && _source.ToCreature().CanFly();
|
||||
bool path = _source.IsTypeId(TypeId.Unit) && _source.ToCreature().IsFlying();
|
||||
|
||||
bool waterPath = _source.IsTypeId(TypeId.Unit) && _source.ToCreature().CanSwim();
|
||||
if (waterPath)
|
||||
@@ -224,7 +224,7 @@ namespace Game.Movement
|
||||
Unit _sourceUnit = _source.ToUnit();
|
||||
if (_sourceUnit != null)
|
||||
{
|
||||
if (_sourceUnit.CanFly())
|
||||
if (_sourceUnit.IsFlying())
|
||||
buildShotrcut = true;
|
||||
// Allow to build a shortcut if the unit is falling and it's trying to move downwards towards a target (i.e. charging)
|
||||
else if (_sourceUnit.IsFalling() && endPos.Z < startPos.Z)
|
||||
|
||||
Reference in New Issue
Block a user