[svn] Fix the bug that next melee spells and auto shoot do not work.
--HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+8
-10
@@ -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;
|
||||
}
|
||||
|
||||
/*********************************************************/
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user