[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_caster->SetCurrentCastedSpell( this );
|
||||||
m_selfContainer = &(m_caster->m_currentSpells[GetCurrentContainer()]);
|
m_selfContainer = &(m_caster->m_currentSpells[GetCurrentContainer()]);
|
||||||
SendSpellStart();
|
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);
|
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;
|
Unit* Aura::GetTriggerTarget() const
|
||||||
targets.setUnitTarget( target );
|
{
|
||||||
|
Unit* target = ObjectAccessor::GetUnit(*m_target,
|
||||||
// if spell create dynamic object extract area from it
|
/*m_target->GetTypeId()==TYPEID_PLAYER ?
|
||||||
if(DynamicObject* dynObj = caster->GetDynObject(GetId()))
|
((Player*)m_target)->GetSelection() :*/
|
||||||
targets.setDestination(dynObj->GetPositionX(),dynObj->GetPositionY(),dynObj->GetPositionZ());
|
m_target->GetUInt64Value(UNIT_FIELD_TARGET));
|
||||||
|
return target ? target : m_target;
|
||||||
spell->prepare(&targets, this);*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ class TRINITY_DLL_SPEC Aura
|
|||||||
int32 m_procCharges;
|
int32 m_procCharges;
|
||||||
void SetAuraProcCharges(int32 charges) { m_procCharges = charges; }
|
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
|
// add/remove SPELL_AURA_MOD_SHAPESHIFT (36) linked auras
|
||||||
void HandleShapeshiftBoosts(bool apply);
|
void HandleShapeshiftBoosts(bool apply);
|
||||||
|
|||||||
@@ -1703,6 +1703,9 @@ void SpellMgr::LoadSpellCustomAttr()
|
|||||||
case 45004: case 45006: case 45010: // Wild Magic
|
case 45004: case 45006: case 45010: // Wild Magic
|
||||||
case 31347: // Doom
|
case 31347: // Doom
|
||||||
case 41635: // Prayer of Mending
|
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;
|
mSpellCustomAttrMap[tempSpell->Id] |= SPELL_ATTR_CU_PLAYERS_ONLY;
|
||||||
tempSpell->MaxAffectedTargets = 1;
|
tempSpell->MaxAffectedTargets = 1;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -3304,6 +3304,7 @@ void Unit::SetCurrentCastedSpell( Spell * pSpell )
|
|||||||
InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
|
InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
|
||||||
m_AutoRepeatFirstCast = true;
|
m_AutoRepeatFirstCast = true;
|
||||||
}
|
}
|
||||||
|
addUnitState(UNIT_STAT_CASTING);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case CURRENT_CHANNELED_SPELL:
|
case CURRENT_CHANNELED_SPELL:
|
||||||
@@ -3316,6 +3317,7 @@ void Unit::SetCurrentCastedSpell( Spell * pSpell )
|
|||||||
if ( m_currentSpells[CURRENT_AUTOREPEAT_SPELL] &&
|
if ( m_currentSpells[CURRENT_AUTOREPEAT_SPELL] &&
|
||||||
m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Category == 351 )
|
m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Category == 351 )
|
||||||
InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
|
InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
|
||||||
|
addUnitState(UNIT_STAT_CASTING);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case CURRENT_AUTOREPEAT_SPELL:
|
case CURRENT_AUTOREPEAT_SPELL:
|
||||||
|
|||||||
Reference in New Issue
Block a user