mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
Updated with master branch
This commit is contained in:
@@ -828,37 +828,25 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
|
||||
// cast spells after mark quest complete (some spells have quest completed state requirements in spell_area data)
|
||||
if (quest->GetRewSpellCast() > 0)
|
||||
{
|
||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(quest->GetRewSpellCast()))
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(quest->GetRewSpellCast());
|
||||
if (questGiver->IsUnit() && !spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL) && !spellInfo->HasEffect(SPELL_EFFECT_CREATE_ITEM) && !spellInfo->IsSelfCast())
|
||||
{
|
||||
if (questGiver->IsUnit() && !spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL) && !spellInfo->HasEffect(SPELL_EFFECT_CREATE_ITEM) && !spellInfo->IsSelfCast())
|
||||
{
|
||||
if (Creature* creature = GetMap()->GetCreature(questGiver->GetGUID()))
|
||||
{
|
||||
creature->CastSpell(this, quest->GetRewSpellCast(), true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CastSpell(this, quest->GetRewSpellCast(), true);
|
||||
}
|
||||
if (Creature* creature = GetMap()->GetCreature(questGiver->GetGUID()))
|
||||
creature->CastSpell(this, quest->GetRewSpellCast(), true);
|
||||
}
|
||||
else
|
||||
CastSpell(this, quest->GetRewSpellCast(), true);
|
||||
}
|
||||
else if (quest->GetRewSpell() > 0)
|
||||
{
|
||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(quest->GetRewSpell()))
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(quest->GetRewSpell());
|
||||
if (questGiver->IsUnit() && !spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL) && !spellInfo->HasEffect(SPELL_EFFECT_CREATE_ITEM) && !spellInfo->IsSelfCast())
|
||||
{
|
||||
if (questGiver->IsUnit() && !spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL) && !spellInfo->HasEffect(SPELL_EFFECT_CREATE_ITEM) && !spellInfo->IsSelfCast())
|
||||
{
|
||||
if (Creature* creature = GetMap()->GetCreature(questGiver->GetGUID()))
|
||||
{
|
||||
creature->CastSpell(this, quest->GetRewSpell(), true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CastSpell(this, quest->GetRewSpell(), true);
|
||||
}
|
||||
if (Creature* creature = GetMap()->GetCreature(questGiver->GetGUID()))
|
||||
creature->CastSpell(this, quest->GetRewSpell(), true);
|
||||
}
|
||||
else
|
||||
CastSpell(this, quest->GetRewSpell(), true);
|
||||
}
|
||||
|
||||
if (quest->GetZoneOrSort() > 0)
|
||||
|
||||
Reference in New Issue
Block a user