Merge pull request #2777 from KoffeinKaio/fishing

Core/Spells: Fixed fishing bobber landing angle.
This commit is contained in:
QAston
2011-09-03 07:52:47 -07:00

View File

@@ -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;
}