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

    r207 r233  
    353353        return; 
    354354 
    355     // Remove possess/charm aura from the possessed/charmed as well 
     355    // Remove possess/charm/sight aura from the possessed/charmed as well 
    356356    // TODO: Remove this once the ability to cancel aura sets at once is implemented 
    357     if(_player->GetCharm()) 
     357    if(_player->GetCharm() || _player->GetFarsightTarget()) 
    358358    { 
    359359        for (int i = 0; i < 3; ++i) 
     
    361361            if (spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_POSSESS || 
    362362                spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_POSSESS_PET || 
    363                 spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_CHARM) 
     363                spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_CHARM || 
     364                spellInfo->EffectApplyAuraName[i] == SPELL_AURA_BIND_SIGHT) 
    364365            { 
    365366                _player->RemoveAurasDueToSpellByCancel(spellId); 
    366                 _player->GetCharm()->RemoveAurasDueToSpellByCancel(spellId); 
     367                if (_player->GetCharm()) 
     368                    _player->GetCharm()->RemoveAurasDueToSpellByCancel(spellId); 
     369                else if (_player->GetFarsightTarget()->GetTypeId() != TYPEID_DYNAMICOBJECT) 
     370                    ((Unit*)_player->GetFarsightTarget())->RemoveAurasDueToSpellByCancel(spellId); 
    367371                return; 
    368372            } 
     
    465469 
    466470    Creature* totem = ObjectAccessor::GetCreature(*_player,_player->m_TotemSlot[slotId]); 
    467     if(totem && totem->isTotem()) 
     471    // Don't unsummon sentry totem 
     472    if(totem && totem->isTotem() && totem->GetEntry() != SENTRY_TOTEM_ENTRY) 
    468473        ((Totem*)totem)->UnSummon(); 
    469474}