Adjustment to Player::SetViewpoint to allow for Mind Vision "hops". (#17041)

* Adjustment to Player::SetViewpoint to allow for Mind Vision "hops".

* Dynamic objects should not be a valid viewpoint for spells like Mind Vision.

* Dynamic objects should not be a valid viewpoint for spells like Mind Vision.

* Removed redundant TYPEMASK_PLAYER check.

* Moved SetSeer outside of if statement.
This commit is contained in:
Alan Deutscher authored and Aokromes committed 2016-07-20 16:36:39 +02:00
1 parent 3ef2ed31e2
commit 7cfe75acf0
1 file changed
+2 -1
+2 -1
View File
@@ -24659,6 +24659,7 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
if (target->isType(TYPEMASK_UNIT) && target != GetVehicleBase())
static_cast<Unit*>(target)->AddPlayerToVision(this);
SetSeer(target);
}
else
{
@@ -24674,7 +24675,7 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
static_cast<Unit*>(target)->RemovePlayerFromVision(this);
//must immediately set seer back otherwise may crash
m_seer = this;
SetSeer(this);
//WorldPacket data(SMSG_CLEAR_FAR_SIGHT_IMMEDIATE, 0);
//GetSession()->SendPacket(&data);