[11942] Add option to NearestCreatureEntryWithLiveState.. GridSearcher to be able to also search for both alive and corpse creatures

This commit is contained in:
Schmoozerd 2012-04-06 23:57:00 +02:00
parent fcbde94267
commit a42a55da84
5 changed files with 10 additions and 9 deletions

View file

@ -827,7 +827,7 @@ bool ScriptAction::GetScriptProcessTargets(WorldObject* pOrigSource, WorldObject
{
Creature* pCreatureBuddy = NULL;
MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*pSearcher, m_script->buddyEntry, true, m_script->searchRadius);
MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*pSearcher, m_script->buddyEntry, true, false, m_script->searchRadius);
MaNGOS::CreatureLastSearcher<MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(pCreatureBuddy, u_check);
Cell::VisitGridObjects(pSearcher, searcher, m_script->searchRadius);