mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[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 <nofantasy@nf.no>
This commit is contained in:
parent
f076575a7b
commit
d8ea895a20
2 changed files with 21 additions and 1 deletions
|
|
@ -1994,6 +1994,26 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
|
||||||
|
|
||||||
// Cosmetic - Explosion
|
// Cosmetic - Explosion
|
||||||
unitTarget->CastSpell(unitTarget, 46419, true);
|
unitTarget->CastSpell(unitTarget, 46419, true);
|
||||||
|
|
||||||
|
// look for gameobjects within max spell range of unitTarget, and respawn if found
|
||||||
|
std::list<GameObject*> lList;
|
||||||
|
|
||||||
|
float fMaxDist = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex));
|
||||||
|
|
||||||
|
MaNGOS::GameObjectEntryInPosRangeCheck go_check(*unitTarget, 182071, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), fMaxDist);
|
||||||
|
MaNGOS::GameObjectListSearcher<MaNGOS::GameObjectEntryInPosRangeCheck> checker(lList, go_check);
|
||||||
|
|
||||||
|
Cell::VisitGridObjects(unitTarget, checker, fMaxDist);
|
||||||
|
|
||||||
|
for(std::list<GameObject*>::iterator iter = lList.begin(); iter != lList.end(); ++iter)
|
||||||
|
{
|
||||||
|
if (!(*iter)->isSpawned())
|
||||||
|
{
|
||||||
|
(*iter)->SetRespawnTime(MINUTE/2);
|
||||||
|
(*iter)->Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case 52759: // Ancestral Awakening
|
case 52759: // Ancestral Awakening
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11412"
|
#define REVISION_NR "11413"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue