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