From 91ab0288c74301f7aef2f45923f266bad50b531d Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 8 Dec 2008 18:22:10 -0600 Subject: *Allow zero entry for script target (players). --HG-- branch : trunk --- src/game/Spell.h | 2 +- src/game/SpellMgr.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/game/Spell.h b/src/game/Spell.h index 9ba620b66b8..1bdb7154177 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -618,7 +618,7 @@ namespace Trinity }break; case SPELL_TARGETS_ENTRY: { - if(itr->getSource()->GetTypeId()!=TYPEID_UNIT || itr->getSource()->GetEntry()!= i_entry) + if(itr->getSource()->GetEntry()!= i_entry) continue; }break; default: continue; diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 8d17d94ec8e..4091efd2003 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1685,12 +1685,13 @@ void SpellMgr::LoadSpellScriptTarget() } default: { - if( targetEntry==0 ) + //players + /*if( targetEntry==0 ) { sLog.outErrorDb("Table `spell_script_target`: target entry == 0 for not GO target type (%u).",type); continue; - } - if(!sCreatureStorage.LookupEntry(targetEntry)) + }*/ + if(targetEntry && !sCreatureStorage.LookupEntry(targetEntry)) { sLog.outErrorDb("Table `spell_script_target`: creature template entry %u does not exist.",targetEntry); continue; -- cgit v1.2.3