mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Merge pull request #2777 from KoffeinKaio/fishing
Core/Spells: Fixed fishing bobber landing angle.
This commit is contained in:
@@ -2030,8 +2030,9 @@ void Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)
|
||||
float min_dis = m_spellInfo->GetMinRange(true);
|
||||
float max_dis = m_spellInfo->GetMaxRange(true);
|
||||
float dis = (float)rand_norm() * (max_dis - min_dis) + min_dis;
|
||||
float x, y, z;
|
||||
m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE, dis);
|
||||
float x, y, z, angle;
|
||||
angle = (float)rand_norm() * static_cast<float>(M_PI * 70.0f / 180.0f) - static_cast<float>(M_PI * 35.0f / 180.0f);
|
||||
m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE, dis, angle);
|
||||
m_targets.SetDst(x, y, z, m_caster->GetOrientation());
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user