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:
1 parent
3ef2ed31e2
commit
7cfe75acf0
1 file changed
+2
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user