mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[7579] Check quest state and more generic code use for 58418, 58420.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
8c23d3cd50
commit
426da8ad3d
2 changed files with 8 additions and 10 deletions
|
|
@ -1111,19 +1111,17 @@ void Spell::EffectDummy(uint32 i)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case 58418: // Portal to Orgrimmar
|
case 58418: // Portal to Orgrimmar
|
||||||
{
|
|
||||||
if(!unitTarget)
|
|
||||||
return;
|
|
||||||
|
|
||||||
unitTarget->CastSpell(unitTarget, 58419, true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
case 58420: // Portal to Stormwind
|
case 58420: // Portal to Stormwind
|
||||||
{
|
{
|
||||||
if(!unitTarget)
|
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||||
return;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7578"
|
#define REVISION_NR "7579"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue