aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 7e24bc4f81d..46bbd8fbb0b 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1241,19 +1241,17 @@ void Spell::EffectDummy(uint32 i)
return;
}
case 58418: // Portal to Orgrimmar
- {
- if(!unitTarget)
- return;
-
- unitTarget->CastSpell(unitTarget, 58419, true);
- return;
- }
case 58420: // Portal to Stormwind
{
- if(!unitTarget)
+ if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
- unitTarget->CastSpell(unitTarget, 58421, true);
+ 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;
}
}