mirror of
https://github.com/mangosfour/server.git
synced 2025-12-24 01:37:02 +00:00
[10462] Implement spell 6495
Also implement proper work CMSG_FAR_SIGHT. This packet control switch view point from far sight object to caster and back wihtout modify far sight object seelction.
This commit is contained in:
parent
1341345216
commit
aa90aa8fdf
5 changed files with 51 additions and 22 deletions
|
|
@ -49,11 +49,10 @@ void Camera::UpdateForCurrentViewPoint()
|
|||
if (GridType* grid = m_source->GetViewPoint().m_grid)
|
||||
grid->AddWorldObject(this);
|
||||
|
||||
m_owner.SetUInt64Value(PLAYER_FARSIGHT, (m_source == &m_owner ? 0 : m_source->GetGUID()));
|
||||
UpdateVisibilityForOwner();
|
||||
}
|
||||
|
||||
void Camera::SetView(WorldObject *obj)
|
||||
void Camera::SetView(WorldObject *obj, bool update_far_sight_field /*= true*/)
|
||||
{
|
||||
MANGOS_ASSERT(obj);
|
||||
|
||||
|
|
@ -84,6 +83,9 @@ void Camera::SetView(WorldObject *obj)
|
|||
|
||||
m_source->GetViewPoint().Attach(this);
|
||||
|
||||
if (update_far_sight_field)
|
||||
m_owner.SetUInt64Value(PLAYER_FARSIGHT, (m_source == &m_owner ? 0 : m_source->GetGUID()));
|
||||
|
||||
UpdateForCurrentViewPoint();
|
||||
}
|
||||
|
||||
|
|
@ -93,9 +95,9 @@ void Camera::Event_ViewPointVisibilityChanged()
|
|||
ResetView();
|
||||
}
|
||||
|
||||
void Camera::ResetView()
|
||||
void Camera::ResetView(bool update_far_sight_field /*= true*/)
|
||||
{
|
||||
SetView(&m_owner);
|
||||
SetView(&m_owner, update_far_sight_field);
|
||||
}
|
||||
|
||||
void Camera::Event_AddedToWorld()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue