Core/Spells: fix wrong distance calculations in AoE spells
Port From (https://github.com/TrinityCore/TrinityCore/commit/5d076cfe291980bc5be9d44ffbae887e3dd5ad59)
This commit is contained in:
@@ -102,7 +102,7 @@ namespace Scripts.Northrend.DraktharonKeep.KingDred
|
||||
DoCastVictim(SpellIds.RaptorCall);
|
||||
|
||||
float x, y, z;
|
||||
me.GetClosePoint(out x, out y, out z, me.GetObjectSize() / 3, 10.0f);
|
||||
me.GetClosePoint(out x, out y, out z, me.GetCombatReach() / 3, 10.0f);
|
||||
me.SummonCreature(RandomHelper.RAND(DTKCreatureIds.DrakkariGutripper, DTKCreatureIds.DrakkariScytheclaw), x, y, z, 0, TempSummonType.DeadDespawn, 1000);
|
||||
task.Repeat();
|
||||
});
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace Scripts.Northrend.FrozenHalls.ForgeOfSouls.Bronjahm
|
||||
{
|
||||
summons.Summon(summon);
|
||||
summon.SetReactState(ReactStates.Passive);
|
||||
summon.GetMotionMaster().MoveFollow(me, me.GetObjectSize(), 0.0f);
|
||||
summon.GetMotionMaster().MoveFollow(me, me.GetCombatReach(), 0.0f);
|
||||
summon.CastSpell(summon, SpellIds.PurpleBanishVisual, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ namespace Scripts.Northrend.IcecrownCitadel
|
||||
{
|
||||
float ang = Position.NormalizeOrientation(pos.GetAngle(me));
|
||||
me.SetOrientation(ang);
|
||||
owner.GetNearPoint2D(out pos.posX, out pos.posY, 5.0f - owner.GetObjectSize(), ang);
|
||||
owner.GetNearPoint2D(out pos.posX, out pos.posY, 5.0f - owner.GetCombatReach(), ang);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -372,7 +372,7 @@ namespace Scripts.Northrend.IcecrownCitadel
|
||||
|
||||
float ang = Position.NormalizeOrientation(pos.GetAngle(target));
|
||||
me.SetOrientation(ang);
|
||||
owner.GetNearPoint2D(out pos.posX, out pos.posY, 15.0f - owner.GetObjectSize(), ang);
|
||||
owner.GetNearPoint2D(out pos.posX, out pos.posY, 15.0f - owner.GetCombatReach(), ang);
|
||||
}
|
||||
|
||||
me.NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), me.GetPositionZ(), me.GetOrientation());
|
||||
@@ -471,7 +471,7 @@ namespace Scripts.Northrend.IcecrownCitadel
|
||||
{
|
||||
targets.Clear();
|
||||
// select any unit but not the tank (by owners threatlist)
|
||||
Unit target = GetCaster().GetAI().SelectTarget(SelectAggroTarget.Random, 1, -GetCaster().GetObjectSize(), true, -(int)Spells.Impaled);
|
||||
Unit target = GetCaster().GetAI().SelectTarget(SelectAggroTarget.Random, 1, -GetCaster().GetCombatReach(), true, -(int)Spells.Impaled);
|
||||
if (!target)
|
||||
target = GetCaster().GetAI().SelectTarget(SelectAggroTarget.Random, 0, 0.0f, true); // or the tank if its solo
|
||||
if (!target)
|
||||
|
||||
@@ -452,7 +452,7 @@ namespace Scripts.World
|
||||
uint BirdEntry = 0;
|
||||
|
||||
float fX, fY, fZ;
|
||||
go.GetClosePoint(out fX, out fY, out fZ, go.GetObjectSize(), SharedConst.InteractionDistance);
|
||||
go.GetClosePoint(out fX, out fY, out fZ, go.GetCombatReach(), SharedConst.InteractionDistance);
|
||||
|
||||
switch (go.GetEntry())
|
||||
{
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace Scripts.World
|
||||
return true;
|
||||
|
||||
float x, y, z;
|
||||
go.GetClosePoint(out x, out y, out z, go.GetObjectSize() / 3, 7.0f);
|
||||
go.GetClosePoint(out x, out y, out z, go.GetCombatReach() / 3, 7.0f);
|
||||
go.SummonGameObject(ItemScriptConst.GoHighQualityFur, go, Quaternion.fromEulerAnglesZYX(go.GetOrientation(), 0.0f, 0.0f), 1);
|
||||
TempSummon summon = player.SummonCreature(ItemScriptConst.NpcNesingwaryTrapper, x, y, z, go.GetOrientation(), TempSummonType.DeadDespawn, 1000);
|
||||
if (summon)
|
||||
|
||||
Reference in New Issue
Block a user