diff options
-rw-r--r-- | src/game/Spell.cpp | 1 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 18 | ||||
-rw-r--r-- | src/game/SpellAuras.h | 2 | ||||
-rw-r--r-- | src/game/SpellMgr.cpp | 3 | ||||
-rw-r--r-- | src/game/Unit.cpp | 2 |
5 files changed, 14 insertions, 12 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 5d9c81ea3fc..f2b23484e78 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2142,7 +2142,6 @@ void Spell::prepare(SpellCastTargets * targets, Aura* triggeredByAura) m_caster->SetCurrentCastedSpell( this ); m_selfContainer = &(m_caster->m_currentSpells[GetCurrentContainer()]); SendSpellStart(); - m_caster->addUnitState(UNIT_STAT_CASTING); } } diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 8edac052288..37c02fb549d 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1882,17 +1882,15 @@ void Aura::TriggerSpell() } } m_target->CastSpell(target, triggeredSpellInfo, true, 0, this, originalCasterGUID); - /*// All ok cast by default case - Spell *spell = new Spell(m_target, triggeredSpellInfo, true, originalCasterGUID ); - - SpellCastTargets targets; - targets.setUnitTarget( target ); - - // if spell create dynamic object extract area from it - if(DynamicObject* dynObj = caster->GetDynObject(GetId())) - targets.setDestination(dynObj->GetPositionX(),dynObj->GetPositionY(),dynObj->GetPositionZ()); +} - spell->prepare(&targets, this);*/ +Unit* Aura::GetTriggerTarget() const +{ + Unit* target = ObjectAccessor::GetUnit(*m_target, + /*m_target->GetTypeId()==TYPEID_PLAYER ? + ((Player*)m_target)->GetSelection() :*/ + m_target->GetUInt64Value(UNIT_FIELD_TARGET)); + return target ? target : m_target; } /*********************************************************/ diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index aa65f6af15d..e4fe29fbc60 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -287,7 +287,7 @@ class TRINITY_DLL_SPEC Aura int32 m_procCharges; void SetAuraProcCharges(int32 charges) { m_procCharges = charges; } - virtual Unit* GetTriggerTarget() const { return m_target; } + Unit* GetTriggerTarget() const; // add/remove SPELL_AURA_MOD_SHAPESHIFT (36) linked auras void HandleShapeshiftBoosts(bool apply); diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 9ea0c48b54e..07a0df04450 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1703,6 +1703,9 @@ void SpellMgr::LoadSpellCustomAttr() case 45004: case 45006: case 45010: // Wild Magic case 31347: // Doom case 41635: // Prayer of Mending + case 44869: // Spectral Blast + case 45027: // Revitalize + case 45976: // Muru Portal Channel mSpellCustomAttrMap[tempSpell->Id] |= SPELL_ATTR_CU_PLAYERS_ONLY; tempSpell->MaxAffectedTargets = 1; break; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 2ff5fe47705..8d94a7fea5e 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3304,6 +3304,7 @@ void Unit::SetCurrentCastedSpell( Spell * pSpell ) InterruptSpell(CURRENT_AUTOREPEAT_SPELL); m_AutoRepeatFirstCast = true; } + addUnitState(UNIT_STAT_CASTING); } break; case CURRENT_CHANNELED_SPELL: @@ -3316,6 +3317,7 @@ void Unit::SetCurrentCastedSpell( Spell * pSpell ) if ( m_currentSpells[CURRENT_AUTOREPEAT_SPELL] && m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Category == 351 ) InterruptSpell(CURRENT_AUTOREPEAT_SPELL); + addUnitState(UNIT_STAT_CASTING); } break; case CURRENT_AUTOREPEAT_SPELL: |