mirror of
https://github.com/mangosfour/server.git
synced 2025-12-27 01:37:04 +00:00
[11417] Add dummy effect of spell 45583
Another dummy that need static Gameobject spawns in database. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
ed6bc11c76
commit
9aaa8069e2
2 changed files with 45 additions and 1 deletions
|
|
@ -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<MaNGOS::NearestGameObjectEntryInPosRangeCheck> checker1(pGo, go_check_big);
|
||||
|
||||
Cell::VisitGridObjects(unitTarget, checker1, fMaxDist);
|
||||
|
||||
if (pGo && !pGo->isSpawned())
|
||||
{
|
||||
pGo->SetRespawnTime(MINUTE/2);
|
||||
pGo->Refresh();
|
||||
}
|
||||
|
||||
// small fire
|
||||
std::list<GameObject*> lList;
|
||||
|
||||
MaNGOS::GameObjectEntryInPosRangeCheck go_check_small(*unitTarget, 187676, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), fMaxDist);
|
||||
MaNGOS::GameObjectListSearcher<MaNGOS::GameObjectEntryInPosRangeCheck> checker2(lList, go_check_small);
|
||||
|
||||
Cell::VisitGridObjects(unitTarget, checker2, fMaxDist);
|
||||
|
||||
for(std::list<GameObject*>::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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue