mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
[11416] Add dummy effect of spell 46171
Another case of respawning GO from database, DB devs be aware. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
864ec71941
commit
ed6bc11c76
2 changed files with 26 additions and 1 deletions
|
|
@ -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<MaNGOS::NearestGameObjectEntryInPosRangeCheck> 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)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11415"
|
||||
#define REVISION_NR "11416"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue