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

[svn] Implemented player on player and player on creature possession:
* Implemented packet and vision forwarding through possessed units
* Added new OnPossess? script call alerting scripts on when possession is applied/removed
* Moved fall damage and fall under map calculations into the Player class
* Added new PossessedAI that is applied only while possession on creature is active
* Implemented summon possessed spell effect
* Fixed Eyes of the Beast

Original author: gvcoman
Date: 2008-11-05 20:51:05-06:00

Files:
1 modified

Legend:

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

    r102 r174  
    303303    } 
    304304 
     305    // can't use our own spells when we're in possession of another unit, 
     306    if(_player->isPossessing()) 
     307        return; 
     308 
    305309    // client provided targets 
    306310    SpellCastTargets targets; 
     
    348352    if (!spellInfo) 
    349353        return; 
     354 
     355    // Remove possess aura from the possessed as well 
     356    if(_player->isPossessing()) 
     357    { 
     358        for (int i = 0; i < 3; ++i) 
     359        { 
     360            if (spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_POSSESS || 
     361                spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_POSSESS_PET) 
     362            { 
     363                _player->RemoveAurasDueToSpellByCancel(spellId); 
     364                _player->GetCharm()->RemoveAurasDueToSpellByCancel(spellId); 
     365                return; 
     366            } 
     367        } 
     368    } 
    350369 
    351370    // not allow remove non positive spells and spells with attr SPELL_ATTR_CANT_CANCEL