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 min_dis = m_spellInfo->GetMinRange(true);
|
||||||
float max_dis = m_spellInfo->GetMaxRange(true);
|
float max_dis = m_spellInfo->GetMaxRange(true);
|
||||||
float dis = (float)rand_norm() * (max_dis - min_dis) + min_dis;
|
float dis = (float)rand_norm() * (max_dis - min_dis) + min_dis;
|
||||||
float x, y, z;
|
float x, y, z, angle;
|
||||||
m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE, dis);
|
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());
|
m_targets.SetDst(x, y, z, m_caster->GetOrientation());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user