Changeset 236 for trunk

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

[svn] Fix the bug that next melee spells and auto shoot do not work.

Original author: megamage
Date: 2008-11-15 10:21:37-06:00

Location:
trunk/src/game
Files:
5 modified

Legend:

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

    r231 r236  
    21432143        m_selfContainer = &(m_caster->m_currentSpells[GetCurrentContainer()]); 
    21442144        SendSpellStart(); 
    2145         m_caster->addUnitState(UNIT_STAT_CASTING); 
    21462145    } 
    21472146} 
  • trunk/src/game/SpellAuras.cpp

    r233 r236  
    18831883    } 
    18841884    m_target->CastSpell(target, triggeredSpellInfo, true, 0, this, originalCasterGUID); 
    1885     /*// All ok cast by default case 
    1886     Spell *spell = new Spell(m_target, triggeredSpellInfo, true, originalCasterGUID ); 
    1887  
    1888     SpellCastTargets targets; 
    1889     targets.setUnitTarget( target ); 
    1890  
    1891     // if spell create dynamic object extract area from it 
    1892     if(DynamicObject* dynObj = caster->GetDynObject(GetId())) 
    1893         targets.setDestination(dynObj->GetPositionX(),dynObj->GetPositionY(),dynObj->GetPositionZ()); 
    1894  
    1895     spell->prepare(&targets, this);*/ 
     1885} 
     1886 
     1887Unit* Aura::GetTriggerTarget() const 
     1888{ 
     1889    Unit* target = ObjectAccessor::GetUnit(*m_target, 
     1890        /*m_target->GetTypeId()==TYPEID_PLAYER ? 
     1891        ((Player*)m_target)->GetSelection() :*/ 
     1892        m_target->GetUInt64Value(UNIT_FIELD_TARGET)); 
     1893    return target ? target : m_target; 
    18961894} 
    18971895 
  • trunk/src/game/SpellAuras.h

    r139 r236  
    288288        void SetAuraProcCharges(int32 charges) { m_procCharges = charges; } 
    289289 
    290         virtual Unit* GetTriggerTarget() const { return m_target; } 
     290        Unit* GetTriggerTarget() const; 
    291291 
    292292        // add/remove SPELL_AURA_MOD_SHAPESHIFT (36) linked auras 
  • trunk/src/game/SpellMgr.cpp

    r229 r236  
    17041704        case 31347: // Doom 
    17051705        case 41635: // Prayer of Mending 
     1706        case 44869: // Spectral Blast 
     1707        case 45027: // Revitalize 
     1708        case 45976: // Muru Portal Channel 
    17061709            mSpellCustomAttrMap[tempSpell->Id] |= SPELL_ATTR_CU_PLAYERS_ONLY; 
    17071710            tempSpell->MaxAffectedTargets = 1; 
  • trunk/src/game/Unit.cpp

    r233 r236  
    33053305                m_AutoRepeatFirstCast = true; 
    33063306            } 
     3307            addUnitState(UNIT_STAT_CASTING); 
    33073308        } break; 
    33083309 
     
    33173318                m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Category == 351 ) 
    33183319                InterruptSpell(CURRENT_AUTOREPEAT_SPELL); 
     3320            addUnitState(UNIT_STAT_CASTING); 
    33193321        } break; 
    33203322