aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectMgr.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-07-01 18:07:57 -0500
committermegamage <none@none>2009-07-01 18:07:57 -0500
commitde4faabbcbaa0b4ae565a6eabf482e584b7f2c27 (patch)
treed694cd6b05bbb5be4cc28142ee098f8555665a45 /src/game/ObjectMgr.cpp
parente1d93bd00f676701b1de87f86a1f2fc5cfc11438 (diff)
[8101] Prevent use talents as quest rewards or spell_learn_spell learned spells. Author: VladimirMangos
--HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r--src/game/ObjectMgr.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 94c05b99c57..bff6975ae81 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -3904,13 +3904,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)
@@ -3924,13 +3931,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)