From a5a5009d444284e22bb0a6572f4acf2c8ae219bb Mon Sep 17 00:00:00 2001 From: sanctum32 Date: Mon, 21 Oct 2013 10:14:34 +0300 Subject: [PATCH] [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) --- src/game/ObjectMgr.cpp | 8 +++----- src/game/Spell.cpp | 2 +- src/game/SpellMgr.cpp | 11 ----------- src/shared/revision_nr.h | 2 +- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 727483dae..cbc5d8cf4 100755 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -4414,15 +4414,13 @@ void ObjectMgr::LoadQuests() if (!quest) 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); - // 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 - // const_cast(quest)->SetSpecialFlag(QUEST_SPECIAL_FLAG_EXPLORATION_OR_EVENT); + const_cast(quest)->SetSpecialFlag(QUEST_SPECIAL_FLAG_EXPLORATION_OR_EVENT); } } } diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 17c685a89..c3d1356ea 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -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 // 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); } else diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 3c8d011f5..ee0c140b1 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1182,17 +1182,6 @@ void SpellMgr::LoadSpellTargetPositions() continue; 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; break; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 2cc81a598..79dd33598 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12703" + #define REVISION_NR "12704" #endif // __REVISION_NR_H__