[10908] Imporve detection need use reagents by triggered spell.

Now regagent used if main spell (if infor about provided to triggered cast)
not have regent data.

This fix reagetn use for spell 43723. But maybe need another fixes for proper animation.
This commit is contained in:
VladimirMangos 2010-12-23 00:54:15 +03:00
parent e1074c0ac1
commit a84d67a389
3 changed files with 7 additions and 4 deletions

View file

@ -5811,6 +5811,11 @@ bool Spell::IgnoreItemRequirements() const
if (targetItem->GetOwnerGuid() != m_caster->GetObjectGuid()) if (targetItem->GetOwnerGuid() != m_caster->GetObjectGuid())
return false; return false;
/// Some triggered spells have same reagents that have master spell
/// expected in test: master spell have reagents in first slot then triggered don't must use own
if (m_triggeredBySpellInfo && !m_triggeredBySpellInfo->Reagent[0])
return false;
return true; return true;
} }

View file

@ -1220,16 +1220,14 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
return; return;
} }
// Demon Broiled Surprise // Demon Broiled Surprise
/* FIX ME: Required for correct work implementing implicit target 7 (in pair (22,7))
case 43723: case 43723:
{ {
if (m_caster->GetTypeId() != TYPEID_PLAYER) if (m_caster->GetTypeId() != TYPEID_PLAYER)
return; return;
((Player*)m_caster)->CastSpell(unitTarget, 43753, true); ((Player*)m_caster)->CastSpell(unitTarget, 43753, true, m_CastItem, NULL, m_originalCasterGUID, m_spellInfo);
return; return;
} }
*/
case 43882: // Scourging Crystal Controller Dummy case 43882: // Scourging Crystal Controller Dummy
{ {
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT) if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "10907" #define REVISION_NR "10908"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__