mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[12704] Fix (at least) two false positive startup errors
* Fix startup-error related to quest 10162 * Fix startup-error for spell 53821 (original author @Schmoozerd)
This commit is contained in:
parent
1b9c1a44ee
commit
a5a5009d44
4 changed files with 5 additions and 18 deletions
|
|
@ -4414,15 +4414,13 @@ void ObjectMgr::LoadQuests()
|
||||||
if (!quest)
|
if (!quest)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!quest->HasSpecialFlag(QUEST_SPECIAL_FLAG_EXPLORATION_OR_EVENT))
|
// Exclude false positive of quest 10162
|
||||||
|
if (!quest->HasSpecialFlag(QUEST_SPECIAL_FLAG_EXPLORATION_OR_EVENT) && spellInfo->Id != 33824 && quest_id != 10162)
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE for quest %u , but quest does not have SpecialFlags QUEST_SPECIAL_FLAG_EXPLORATION_OR_EVENT (2) set. Quest SpecialFlags should be corrected to enable this objective.", spellInfo->Id, quest_id);
|
sLog.outErrorDb("Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE for quest %u , but quest does not have SpecialFlags QUEST_SPECIAL_FLAG_EXPLORATION_OR_EVENT (2) set. Quest SpecialFlags should be corrected to enable this objective.", spellInfo->Id, quest_id);
|
||||||
|
|
||||||
// The below forced alteration has been disabled because of spell 33824 / quest 10162.
|
|
||||||
// A startup error will still occur with proper data in quest_template, but it will be possible to sucessfully complete the quest with the expected data.
|
|
||||||
|
|
||||||
// this will prevent quest completing without objective
|
// this will prevent quest completing without objective
|
||||||
// const_cast<Quest*>(quest)->SetSpecialFlag(QUEST_SPECIAL_FLAG_EXPLORATION_OR_EVENT);
|
const_cast<Quest*>(quest)->SetSpecialFlag(QUEST_SPECIAL_FLAG_EXPLORATION_OR_EVENT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2649,7 +2649,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
// TODO - maybe use an (internal) value for the map for neat far teleport handling
|
// TODO - maybe use an (internal) value for the map for neat far teleport handling
|
||||||
|
|
||||||
// far-teleport spells are handled in SpellEffect, elsewise report an error about an unexpected map (spells are always locally)
|
// far-teleport spells are handled in SpellEffect, elsewise report an error about an unexpected map (spells are always locally)
|
||||||
if (st->target_mapId != m_caster->GetMapId() && spellEffect && spellEffect->Effect != SPELL_EFFECT_TELEPORT_UNITS)
|
if (st->target_mapId != m_caster->GetMapId() && spellEffect && spellEffect->Effect != SPELL_EFFECT_TELEPORT_UNITS && spellEffect->Effect != SPELL_EFFECT_BIND)
|
||||||
sLog.outError("SPELL: wrong map (%u instead %u) target coordinates for spell ID %u", st->target_mapId, m_caster->GetMapId(), m_spellInfo->Id);
|
sLog.outError("SPELL: wrong map (%u instead %u) target coordinates for spell ID %u", st->target_mapId, m_caster->GetMapId(), m_spellInfo->Id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1182,17 +1182,6 @@ void SpellMgr::LoadSpellTargetPositions()
|
||||||
continue;
|
continue;
|
||||||
if (spellEffect->EffectImplicitTargetA==TARGET_TABLE_X_Y_Z_COORDINATES || spellEffect->EffectImplicitTargetB==TARGET_TABLE_X_Y_Z_COORDINATES)
|
if (spellEffect->EffectImplicitTargetA==TARGET_TABLE_X_Y_Z_COORDINATES || spellEffect->EffectImplicitTargetB==TARGET_TABLE_X_Y_Z_COORDINATES)
|
||||||
{
|
{
|
||||||
// additional requirements
|
|
||||||
if (spellEffect->Effect==SPELL_EFFECT_BIND && spellEffect->EffectMiscValue)
|
|
||||||
{
|
|
||||||
uint32 zone_id = sTerrainMgr.GetAreaId(st.target_mapId, st.target_X, st.target_Y, st.target_Z);
|
|
||||||
if (int32(zone_id) != spellEffect->EffectMiscValue)
|
|
||||||
{
|
|
||||||
sLog.outErrorDb("Spell (Id: %u) listed in `spell_target_position` expected point to zone %u bit point to zone %u.",Spell_ID, spellEffect->EffectMiscValue, zone_id);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "12703"
|
#define REVISION_NR "12704"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue