mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[8493] Avoid unexpected multiply error messages at wrong quest_template.RewSpell*
This commit is contained in:
parent
610703c14b
commit
5fb608fec6
2 changed files with 5 additions and 11 deletions
|
|
@ -3620,20 +3620,17 @@ void ObjectMgr::LoadQuests()
|
||||||
qinfo->GetQuestId(),qinfo->RewSpell,qinfo->RewSpell);
|
qinfo->GetQuestId(),qinfo->RewSpell,qinfo->RewSpell);
|
||||||
qinfo->RewSpell = 0; // no spell reward will display for this quest
|
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 will not have a spell reward.",
|
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->GetQuestId(),qinfo->RewSpell,qinfo->RewSpell);
|
||||||
qinfo->RewSpell = 0; // no spell reward will display for this quest
|
qinfo->RewSpell = 0; // no spell reward will display for this quest
|
||||||
}
|
}
|
||||||
|
else if(GetTalentSpellCost(qinfo->RewSpell))
|
||||||
if(GetTalentSpellCost(qinfo->RewSpell))
|
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Quest %u has `RewSpell` = %u but spell %u is talent, quest will not have a spell reward.",
|
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->GetQuestId(),qinfo->RewSpell,qinfo->RewSpell);
|
||||||
qinfo->RewSpell = 0; // no spell reward will display for this quest
|
qinfo->RewSpell = 0; // no spell reward will display for this quest
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3647,20 +3644,17 @@ void ObjectMgr::LoadQuests()
|
||||||
qinfo->GetQuestId(),qinfo->RewSpellCast,qinfo->RewSpellCast);
|
qinfo->GetQuestId(),qinfo->RewSpellCast,qinfo->RewSpellCast);
|
||||||
qinfo->RewSpellCast = 0; // no spell will be casted on player
|
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 will not have a spell reward.",
|
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->GetQuestId(),qinfo->RewSpellCast,qinfo->RewSpellCast);
|
||||||
qinfo->RewSpellCast = 0; // no spell will be casted on player
|
qinfo->RewSpellCast = 0; // no spell will be casted on player
|
||||||
}
|
}
|
||||||
|
else if(GetTalentSpellCost(qinfo->RewSpellCast))
|
||||||
if(GetTalentSpellCost(qinfo->RewSpellCast))
|
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Quest %u has `RewSpell` = %u but spell %u is talent, quest will not have a spell reward.",
|
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->GetQuestId(),qinfo->RewSpellCast,qinfo->RewSpellCast);
|
||||||
qinfo->RewSpellCast = 0; // no spell will be casted on player
|
qinfo->RewSpellCast = 0; // no spell will be casted on player
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8492"
|
#define REVISION_NR "8493"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue