313 {
315 {
316 std::list<GameObject*> blockList;
317 caster->GetGameObjectListWithEntryInGrid(blockList,
GO_SARONITE_ROCK, 100.0f);
318
319 if (!blockList.empty())
320 {
321 for (std::list<WorldObject*>::iterator itrU = targets.begin(); itrU != targets.end(); ++itrU)
323 {
324 bool valid = true;
325 if (!caster->IsWithinMeleeRange(target->ToUnit()))
326 for (std::list<GameObject*>::const_iterator itr = blockList.begin(); itr != blockList.end(); ++itr)
327 if (!(*itr)->IsInvisibleDueToDespawn())
328 if ((*itr)->IsInBetween(caster, target, 4.0f))
329 {
330 valid = false;
331 break;
332 }
333 if (valid)
334 {
335 if (
Aura* aur = target->ToUnit()->GetAura(70336))
336 if (aur->GetStackAmount() >= 10 && caster->IsCreature())
337 caster->ToCreature()->AI()->SetData(1, aur->GetStackAmount());
339 }
340 }
341 }
342 else
343 {
345 return;
346 }
347 }
348
350 }
@ GO_SARONITE_ROCK
Definition: boss_forgemaster_garfrost.cpp:43
Definition: SpellAuras.h:87
Unit * GetCaster()
Definition: SpellScript.cpp:401
std::list< WorldObject * > targetList
Definition: boss_forgemaster_garfrost.cpp:305