Index: src/game/GameObject.cpp =================================================================== --- src/game/GameObject.cpp (revision 6126) +++ src/game/GameObject.cpp (working copy) @@ -752,8 +752,17 @@ if(!trapSpell) // checked at load already return; - float range = GetSpellMaxRange(sSpellRangeStore.LookupEntry(trapSpell->rangeIndex)); - + //all spells associated with GO type 6 have range 0 yards (self), use effect radius for trap search + float distance = 0.0f; + float radius; + //search largest Effect Radius + for (int i = 0; i < 3; i++) + { + radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(trapSpell->EffectRadiusIndex[i])); + if ( radius > distance ) distance = radius; + } + + sLog.outDebug("Triggering trap [id: %u] with Spell [entry:%u] in distance %f yards",trapEntry,trapInfo->trap.spellId, distance); // search nearest linked GO GameObject* trapGO = NULL; { @@ -762,7 +771,7 @@ Cell cell(p); cell.data.Part.reserved = ALL_DISTRICT; - MaNGOS::NearestGameObjectEntryInObjectRangeCheck go_check(*target,trapEntry,range); + MaNGOS::NearestGameObjectEntryInObjectRangeCheck go_check(*target,trapEntry,distance); MaNGOS::GameObjectLastSearcher checker(trapGO,go_check); TypeContainerVisitor, GridTypeMapContainer > object_checker(checker); @@ -774,6 +783,7 @@ // FIXME: when GO casting will be implemented trap must cast spell to target if(trapGO) target->CastSpell(target,trapSpell,true); + else sLog.outDebug("Trap [id: %u] not found in distance %f yards",trapEntry, distance); } GameObject* GameObject::LookupFishingHoleAround(float range)