[7581] Move spell 58418, 58420 to script effect (first) from dummy (second).

In new spell data second dummy effect often use for additional info (script+dummy) or (dummy+dummy) and not called in fact.
This commit is contained in:
VladimirMangos 2009-03-29 18:54:36 +04:00
parent 4d8aec2c7d
commit ae42ce6418
2 changed files with 16 additions and 13 deletions

View file

@ -1112,18 +1112,7 @@ void Spell::EffectDummy(uint32 i)
} }
case 58418: // Portal to Orgrimmar case 58418: // Portal to Orgrimmar
case 58420: // Portal to Stormwind case 58420: // Portal to Stormwind
{ return; // implemented in EffectScript[0]
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
uint32 spellID = m_spellInfo->EffectBasePoints[0] + 1;
uint32 questID = m_spellInfo->EffectBasePoints[1] + 1;
if( ((Player*)unitTarget)->GetQuestStatus(questID) == QUEST_STATUS_COMPLETE && !((Player*)unitTarget)->GetQuestRewardStatus (questID) )
unitTarget->CastSpell(unitTarget, spellID, true);
return;
}
} }
//All IconID Check in there //All IconID Check in there
@ -4834,6 +4823,20 @@ void Spell::EffectScriptEffect(uint32 effIndex)
unitTarget->CastSpell(unitTarget, damage, false); unitTarget->CastSpell(unitTarget, damage, false);
break; break;
} }
case 58418: // Portal to Orgrimmar
case 58420: // Portal to Stormwind
{
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER || effIndex!=0)
return;
uint32 spellID = m_spellInfo->EffectBasePoints[0] + 1;
uint32 questID = m_spellInfo->EffectBasePoints[1] + 1;
if( ((Player*)unitTarget)->GetQuestStatus(questID) == QUEST_STATUS_COMPLETE && !((Player*)unitTarget)->GetQuestRewardStatus (questID) )
unitTarget->CastSpell(unitTarget, spellID, true);
return;
}
// random spell learn instead placeholder // random spell learn instead placeholder
case 60893: // Northrend Alchemy Research case 60893: // Northrend Alchemy Research
case 61177: // Northrend Inscription Research case 61177: // Northrend Inscription Research

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 "7580" #define REVISION_NR "7581"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__