diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 6718d71cf..84c4cd1f9 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1527,6 +1527,31 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx) } return; } + case 46171: // Scuttle Wrecked Flying Machine + { + if (!unitTarget || m_caster->GetTypeId() != TYPEID_PLAYER) + return; + + ((Player*)m_caster)->KilledMonsterCredit(unitTarget->GetEntry(), unitTarget->GetObjectGuid()); + + // look for gameobject within max spell range of unitTarget, and respawn if found + GameObject* pGo = NULL; + + float fMaxDist = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex)); + + MaNGOS::NearestGameObjectEntryInPosRangeCheck go_check(*unitTarget, 187675, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), fMaxDist); + MaNGOS::GameObjectSearcher checker(pGo, go_check); + + Cell::VisitGridObjects(unitTarget, checker, fMaxDist); + + if (pGo && !pGo->isSpawned()) + { + pGo->SetRespawnTime(MINUTE/2); + pGo->Refresh(); + } + + return; + } case 46485: // Greatmother's Soulcatcher { if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 4a3515ef0..de100b993 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 "11415" + #define REVISION_NR "11416" #endif // __REVISION_NR_H__