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/SpellAuras.cpp

    r229 r233  
    19651965    else 
    19661966    { 
    1967         if( m_target->GetTypeId() == TYPEID_PLAYER && 
    1968             ( GetSpellProto()->Effect[0]==72 || GetSpellProto()->Effect[0]==6 && 
    1969             ( GetSpellProto()->EffectApplyAuraName[0]==1 || GetSpellProto()->EffectApplyAuraName[0]==128 ) ) ) 
     1967        if( m_target->GetTypeId() == TYPEID_PLAYER && GetSpellProto()->Effect[0]==72 ) 
    19701968        { 
    19711969            // spells with SpellEffect=72 and aura=4: 6196, 6197, 21171, 21425 
    1972             m_target->SetUInt64Value(PLAYER_FARSIGHT, 0); 
    1973             WorldPacket data(SMSG_CLEAR_FAR_SIGHT_IMMEDIATE, 0); 
    1974             ((Player*)m_target)->GetSession()->SendPacket(&data); 
     1970            ((Player*)m_target)->ClearFarsight(); 
    19751971            return; 
    19761972        } 
     
    22282224 
    22292225                ((Player*)m_target)->AddSpellMod(m_spellmod, apply); 
     2226                return; 
     2227            } 
     2228 
     2229            // Sentry Totem 
     2230            if (GetId() == 6495 && caster->GetTypeId() == TYPEID_PLAYER) 
     2231            { 
     2232                if (apply) 
     2233                { 
     2234                    uint64 guid = caster->m_TotemSlot[3]; 
     2235                    if (guid) 
     2236                    { 
     2237                        Creature *totem = ObjectAccessor::GetCreature(*caster, guid); 
     2238                        if (totem && totem->isTotem()) 
     2239                            totem->AddPlayerToVision((Player*)caster); 
     2240                    } 
     2241                }  
     2242                else 
     2243                    ((Player*)caster)->RemoveFarsightTarget(); 
    22302244                return; 
    22312245            } 
     
    28312845        return; 
    28322846 
    2833     caster->SetUInt64Value(PLAYER_FARSIGHT,apply ? m_target->GetGUID() : 0); 
     2847    if (apply) 
     2848        m_target->AddPlayerToVision((Player*)caster); 
     2849    else 
     2850        m_target->RemovePlayerFromVision((Player*)caster); 
    28342851} 
    28352852