diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 84c4cd1f9..5706aa45e 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1445,6 +1445,50 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx) break; } + case 45583: // Throw Gnomish Grenade + { + 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 + + // big fire + GameObject* pGo = NULL; + + float fMaxDist = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex)); + + MaNGOS::NearestGameObjectEntryInPosRangeCheck go_check_big(*unitTarget, 187675, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), fMaxDist); + MaNGOS::GameObjectSearcher checker1(pGo, go_check_big); + + Cell::VisitGridObjects(unitTarget, checker1, fMaxDist); + + if (pGo && !pGo->isSpawned()) + { + pGo->SetRespawnTime(MINUTE/2); + pGo->Refresh(); + } + + // small fire + std::list lList; + + MaNGOS::GameObjectEntryInPosRangeCheck go_check_small(*unitTarget, 187676, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), fMaxDist); + MaNGOS::GameObjectListSearcher checker2(lList, go_check_small); + + Cell::VisitGridObjects(unitTarget, checker2, fMaxDist); + + for(std::list::iterator iter = lList.begin(); iter != lList.end(); ++iter) + { + if (!(*iter)->isSpawned()) + { + (*iter)->SetRespawnTime(MINUTE/2); + (*iter)->Refresh(); + } + } + + return; + } case 45958: // Signal Alliance { m_caster->CastSpell(m_caster, m_spellInfo->CalculateSimpleValue(eff_idx), true); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index de100b993..3a06b4d95 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 "11416" + #define REVISION_NR "11417" #endif // __REVISION_NR_H__