diff options
author | Trazom62 <none@none> | 2010-01-25 20:45:02 +0100 |
---|---|---|
committer | Trazom62 <none@none> | 2010-01-25 20:45:02 +0100 |
commit | 275ffe4f28a0ab7f43e52a52051aaa38defc8d08 (patch) | |
tree | a00aba787f5139a5cca84211df46ed9bf0f0d9f6 /src | |
parent | 89574b13ed43ee5aca97c4727099065261f660b5 (diff) |
Fix SpellEffect Quest Complete: shall work if player is the unitTarget
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellEffects.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 6d16cba265b..ed85d0767c5 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -6601,13 +6601,17 @@ void Spell::EffectReputation(uint32 i) void Spell::EffectQuestComplete(uint32 i) { - if(m_caster->GetTypeId() != TYPEID_PLAYER) - return; + Player *pPlayer; - Player *_player = (Player*)m_caster; + if (m_caster->GetTypeId() == TYPEID_PLAYER) + pPlayer = (Player*)m_caster; + else if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER) + pPlayer = (Player*)unitTarget; + else + return; uint32 quest_id = m_spellInfo->EffectMiscValue[i]; - _player->AreaExploredOrEventHappens(quest_id); + pPlayer->AreaExploredOrEventHappens(quest_id); } void Spell::EffectForceDeselect(uint32 i) |