Show
Ignore:
Timestamp:
11/19/08 13:49:07 (17 years ago)
Author:
yumileroy
Message:

[svn] * Reimplemented packet/update forwarding in more generic way
* Implemented far sight spells (Far Sight, Eagle Eye, etc) at unlimited range and properly forward packets
* Implemented bind vision spells (Mind Vision, etc) to forward packets at unlimited distance
* Implemented Sentry Totem (both vision switching/forwarding and alerting)
* Other misc possession fixes
* Added .bindsight and .unbindsight commands

Please test out the above spells (including Mind Control) and report any issues on the forums.

Original author: gvcoman
Date: 2008-11-14 20:40:35-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/ObjectAccessor.cpp

    r206 r233  
    625625    { 
    626626        BuildPacket(iter->getSource()); 
    627         if (iter->getSource()->isPossessedByPlayer()) 
    628             BuildPacket((Player*)iter->getSource()->GetCharmer()); 
     627        if (!iter->getSource()->GetSharedVisionList().empty()) 
     628        { 
     629            SharedVisionList::const_iterator it = iter->getSource()->GetSharedVisionList().begin(); 
     630            for ( ; it != iter->getSource()->GetSharedVisionList().end(); ++it) 
     631                BuildPacket(*it); 
     632        } 
    629633    } 
    630634} 
     
    634638{ 
    635639    for(CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter) 
    636         if (iter->getSource()->isPossessedByPlayer()) 
    637             BuildPacket((Player*)iter->getSource()->GetCharmer()); 
     640    { 
     641        if (!iter->getSource()->GetSharedVisionList().empty()) 
     642        { 
     643            SharedVisionList::const_iterator it = iter->getSource()->GetSharedVisionList().begin(); 
     644            for ( ; it != iter->getSource()->GetSharedVisionList().end(); ++it) 
     645                BuildPacket(*it); 
     646        } 
     647    } 
     648} 
     649 
     650void 
     651ObjectAccessor::WorldObjectChangeAccumulator::Visit(DynamicObjectMapType &m) 
     652{ 
     653    for(DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter) 
     654    { 
     655        if (IS_PLAYER_GUID(iter->getSource()->GetCasterGUID())) 
     656        { 
     657            Player* caster = (Player*)iter->getSource()->GetCaster(); 
     658            if (caster->GetUInt64Value(PLAYER_FARSIGHT) == iter->getSource()->GetGUID()) 
     659                BuildPacket(caster); 
     660        } 
     661    } 
    638662} 
    639663