Core/Spells: Core/Spells: Improve teleport destination for a certain class of spells (Killing Spree, Shadowstep, ...)
Port From (https://github.com/TrinityCore/TrinityCore/commit/540678be069b24664ad95f1922288d026b7e0e41)
This commit is contained in:
@@ -953,12 +953,9 @@ namespace Game.Spells
|
||||
if (effect != null)
|
||||
{
|
||||
float angle = targetType.CalcDirectionAngle();
|
||||
float objSize = target.GetCombatReach();
|
||||
float dist = effect.CalcRadius(m_caster);
|
||||
if (dist < objSize)
|
||||
dist = objSize;
|
||||
else if (targetType.GetTarget() == Targets.DestRandom)
|
||||
dist = objSize + (dist - objSize) * (float)RandomHelper.NextDouble();
|
||||
float dist = effect.CalcRadius(null);
|
||||
if (targetType.GetTarget() == Targets.DestRandom)
|
||||
dist *= (float)RandomHelper.NextDouble();
|
||||
|
||||
Position pos = dest.Position;
|
||||
target.MovePositionToFirstCollision(ref pos, dist, angle);
|
||||
|
||||
Reference in New Issue
Block a user