aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Player.cpp12
-rw-r--r--src/game/SpellEffects.cpp2
2 files changed, 11 insertions, 3 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index dfb4c078f04..9d4f60c571d 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -18887,8 +18887,13 @@ bool Player::canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList, bool
return false;
// always seen by owner
- if(GetGUID() == u->GetCharmerOrOwnerGUID())
- return true;
+ if(uint64 guid = u->GetCharmerOrOwnerGUID())
+ if(GetGUID() == guid)
+ return true;
+
+ if(uint64 guid = GetUInt64Value(PLAYER_FARSIGHT))
+ if(u->GetGUID() == guid)
+ return true;
// different visible distance checks
if(isInFlight()) // what see player in flight
@@ -20525,6 +20530,9 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
return;
}
+ // farsight dynobj or puppet may be very far away
+ UpdateVisibilityOf(target);
+
if(target->isType(TYPEMASK_UNIT) && !m_Vehicle)
((Unit*)target)->AddPlayerToVision(this);
}
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index be4aef15ff0..1bf46269461 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3706,7 +3706,7 @@ void Spell::EffectAddFarsight(uint32 i)
// Need to update visibility of object for client to accept farsight guid
((Player*)m_caster)->SetViewpoint(dynObj, true);
- ((Player*)m_caster)->UpdateVisibilityOf(dynObj);
+ //((Player*)m_caster)->UpdateVisibilityOf(dynObj);
}
void Spell::EffectTeleUnitsFaceCaster(uint32 i)