From ae42ce6418dfc5a7b6fc7e320ef0918d96c05321 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Sun, 29 Mar 2009 18:54:36 +0400 Subject: [PATCH] [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. --- src/game/SpellEffects.cpp | 27 +++++++++++++++------------ src/shared/revision_nr.h | 2 +- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 0b90dc0aa..45fa66be7 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1112,18 +1112,7 @@ void Spell::EffectDummy(uint32 i) } case 58418: // Portal to Orgrimmar case 58420: // Portal to Stormwind - { - 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; - } + return; // implemented in EffectScript[0] } //All IconID Check in there @@ -4834,6 +4823,20 @@ void Spell::EffectScriptEffect(uint32 effIndex) unitTarget->CastSpell(unitTarget, damage, false); 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 case 60893: // Northrend Alchemy Research case 61177: // Northrend Inscription Research diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index d3569b8f0..75a94e0cc 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7580" + #define REVISION_NR "7581" #endif // __REVISION_NR_H__