319 {
321 {
322 std::list<GameObject*> blockList;
323 caster->GetGameObjectListWithEntryInGrid(blockList,
GO_SARONITE_ROCK, 100.0f);
324
325 if (!blockList.empty())
326 {
327 for (std::list<WorldObject*>::iterator itrU = targets.begin(); itrU != targets.end(); ++itrU)
329 {
330 bool valid = true;
331 if (!caster->IsWithinMeleeRange(target->ToUnit()))
332 for (std::list<GameObject*>::const_iterator itr = blockList.begin(); itr != blockList.end(); ++itr)
333 if (!(*itr)->IsInvisibleDueToDespawn())
334 if ((*itr)->IsInBetween(caster, target, 4.0f))
335 {
336 valid = false;
337 break;
338 }
339 if (valid)
340 {
341 if (
Aura* aur = target->ToUnit()->GetAura(70336))
342 if (aur->GetStackAmount() >= 10 && caster->GetTypeId() ==
TYPEID_UNIT)
343 caster->ToCreature()->AI()->SetData(1, aur->GetStackAmount());
345 }
346 }
347 }
348 else
349 {
351 return;
352 }
353 }
354
356 }
@ TYPEID_UNIT
Definition: ObjectGuid.h:37
@ GO_SARONITE_ROCK
Definition: boss_forgemaster_garfrost.cpp:44
Definition: SpellAuras.h:87
Unit * GetCaster()
Definition: SpellScript.cpp:401
std::list< WorldObject * > targetList
Definition: boss_forgemaster_garfrost.cpp:311