mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8101] Prevent use talents as quest rewards or spell_learn_spell learned spells.
This commit is contained in:
parent
2b71634187
commit
dc10620148
3 changed files with 26 additions and 6 deletions
|
|
@ -3595,13 +3595,20 @@ void ObjectMgr::LoadQuests()
|
|||
qinfo->RewSpell = 0; // no spell reward will display for this quest
|
||||
}
|
||||
|
||||
else if(!SpellMgr::IsSpellValid(spellInfo))
|
||||
if(!SpellMgr::IsSpellValid(spellInfo))
|
||||
{
|
||||
sLog.outErrorDb("Quest %u has `RewSpell` = %u but spell %u is broken, quest can't be done.",
|
||||
sLog.outErrorDb("Quest %u has `RewSpell` = %u but spell %u is broken, quest will not have a spell reward.",
|
||||
qinfo->GetQuestId(),qinfo->RewSpell,qinfo->RewSpell);
|
||||
qinfo->RewSpell = 0; // no spell reward will display for this quest
|
||||
}
|
||||
|
||||
if(GetTalentSpellCost(qinfo->RewSpell))
|
||||
{
|
||||
sLog.outErrorDb("Quest %u has `RewSpell` = %u but spell %u is talent, quest will not have a spell reward.",
|
||||
qinfo->GetQuestId(),qinfo->RewSpell,qinfo->RewSpell);
|
||||
qinfo->RewSpell = 0; // no spell reward will display for this quest
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(qinfo->RewSpellCast)
|
||||
|
|
@ -3615,13 +3622,20 @@ void ObjectMgr::LoadQuests()
|
|||
qinfo->RewSpellCast = 0; // no spell will be casted on player
|
||||
}
|
||||
|
||||
else if(!SpellMgr::IsSpellValid(spellInfo))
|
||||
if(!SpellMgr::IsSpellValid(spellInfo))
|
||||
{
|
||||
sLog.outErrorDb("Quest %u has `RewSpellCast` = %u but spell %u is broken, quest can't be done.",
|
||||
sLog.outErrorDb("Quest %u has `RewSpellCast` = %u but spell %u is broken, quest will not have a spell reward.",
|
||||
qinfo->GetQuestId(),qinfo->RewSpellCast,qinfo->RewSpellCast);
|
||||
qinfo->RewSpellCast = 0; // no spell will be casted on player
|
||||
}
|
||||
|
||||
if(GetTalentSpellCost(qinfo->RewSpellCast))
|
||||
{
|
||||
sLog.outErrorDb("Quest %u has `RewSpell` = %u but spell %u is talent, quest will not have a spell reward.",
|
||||
qinfo->GetQuestId(),qinfo->RewSpellCast,qinfo->RewSpellCast);
|
||||
qinfo->RewSpellCast = 0; // no spell will be casted on player
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(qinfo->RewMailTemplateId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue