From d8ea895a2055e245ccd993d1fd8554ef243397ce Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Sun, 1 May 2011 16:48:44 +0200 Subject: [PATCH] [11413] Extend dummy effect for spell 52369 and 52371 Search for gameobject near target and respawn if not already spawned. Att. DB devs: gameobject should be added to database, with negative spawntimesecs. Signed-off-by: NoFantasy --- src/game/SpellEffects.cpp | 20 ++++++++++++++++++++ src/shared/revision_nr.h | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 2cb158c91..6718d71cf 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1994,6 +1994,26 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx) // Cosmetic - Explosion unitTarget->CastSpell(unitTarget, 46419, true); + + // look for gameobjects within max spell range of unitTarget, and respawn if found + std::list lList; + + float fMaxDist = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex)); + + MaNGOS::GameObjectEntryInPosRangeCheck go_check(*unitTarget, 182071, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), fMaxDist); + MaNGOS::GameObjectListSearcher checker(lList, go_check); + + Cell::VisitGridObjects(unitTarget, checker, fMaxDist); + + for(std::list::iterator iter = lList.begin(); iter != lList.end(); ++iter) + { + if (!(*iter)->isSpawned()) + { + (*iter)->SetRespawnTime(MINUTE/2); + (*iter)->Refresh(); + } + } + return; } case 52759: // Ancestral Awakening diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 68ad4a450..e601f4f22 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 "11412" + #define REVISION_NR "11413" #endif // __REVISION_NR_H__