diff options
| author | megamage <none@none> | 2009-08-22 18:29:32 -0500 | 
|---|---|---|
| committer | megamage <none@none> | 2009-08-22 18:29:32 -0500 | 
| commit | 61b6abea581940bc77ba133ba1006af9d66451de (patch) | |
| tree | 219b15f0dfdd48210adf7c2d8802fe0dc07dc3f5 | |
| parent | 58bafbf2cd137a6fbe637aa06fc1f70710eb74e8 (diff) | |
*Update visibility of puppet immediately when it is summoned. This should fix the bug that eye cannot fly in some cases.
--HG--
branch : trunk
| -rw-r--r-- | src/game/Player.cpp | 12 | ||||
| -rw-r--r-- | src/game/SpellEffects.cpp | 2 | 
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)  | 
