本文整理汇总了C++中DoStartNoMovement函数的典型用法代码示例。如果您正苦于以下问题:C++ DoStartNoMovement函数的具体用法?C++ DoStartNoMovement怎么用?C++ DoStartNoMovement使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DoStartNoMovement函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoStartNoMovement
void Scripted_NoMovementAI::AttackStart(Unit* pWho)
{
if (!m_creature->CanAttackByItself())
return;
if (pWho && m_creature->Attack(pWho, true))
{
m_creature->AddThreat(pWho);
m_creature->SetInCombatWith(pWho);
pWho->SetInCombatWith(m_creature);
DoStartNoMovement(pWho);
}
}
示例2: DoStartNoMovement
void Scripted_NoMovementAI::AttackStart(Unit* who)
{
if (!who)
return;
if (m_creature->Attack(who, true))
{
m_creature->AddThreat(who, 0.0f);
m_creature->SetInCombatWith(who);
who->SetInCombatWith(m_creature);
DoStartNoMovement(who);
}
}
示例3: Reset
void Reset()
{
m_uiColdFlameTimer = 900;
SpellEntry* spell = GET_SPELL(SPELL_COLD_FLAME);
if (spell)
spell->EffectRadiusIndex[0] = 16; //prevent stack damage
DoCast(me, SPELL_COLD_FLAME);
me->SetVisible(false);
DoStartNoMovement(me->getVictim());
m_uiStage = 1;
m_uiRadius = 2;
m_uiOwnerEntry = 0;
}
示例4: AttackStart
void AttackStart(Unit* pWho) override
{
if (m_bIsIntroEvent || !m_bIsMainEvent)
return;
if (m_creature->Attack(pWho, true))
{
m_creature->AddThreat(pWho);
m_creature->SetInCombatWith(pWho);
pWho->SetInCombatWith(m_creature);
if (m_bPhase)
DoStartNoMovement(pWho);
else
DoStartMovement(pWho);
}
}
示例5: AttackStart
void AttackStart(Unit* who)
{
if (IsIntroEvent || !IsMainEvent)
return;
if (m_creature->Attack(who, true))
{
m_creature->AddThreat(who);
m_creature->SetInCombatWith(who);
who->SetInCombatWith(m_creature);
if (Phase)
DoStartNoMovement(who);
else
DoStartMovement(who);
}
}
示例6: MoveInLineOfSight
void MoveInLineOfSight(Unit* who) override
{
if (!who || me->GetVictim())
return;
if (me->CanCreatureAttack(who))
{
float attackRadius = me->GetAttackDistance(who);
if (me->IsWithinDistInMap(who, attackRadius) && me->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && me->IsWithinLOSInMap(who))
{
if (!me->IsInCombat())
{
DoStartNoMovement(who);
}
}
}
else if (IntroStepCounter == 10 && me->IsWithinLOSInMap(who)&& me->IsWithinDistInMap(who, 30))
IntroStepCounter = 0;
}
示例7: AttackStart
void AttackStart(Unit* who)
{
if (!who)
return;
if (me->GetPositionZ() > 518.63f)
DoStartNoMovement(who);
if (me->GetPositionZ() < 518.63f)
{
if (me->Attack(who, true))
{
Talk(SAY_AGGRO);
me->SetInCombatWith(who);
who->SetInCombatWith(me);
me->GetMotionMaster()->MoveChase(who, 0, 0);
}
}
}
示例8: EnterCombat
void EnterCombat(Unit* who)
{
events.Reset();
events.SetPhase(PHASE_ONE);
// phase-independent events
events.ScheduleEvent(EVENT_BERSERK, 600000);
events.ScheduleEvent(EVENT_DEATH_AND_DECAY, 10000);
// phase one only
events.ScheduleEvent(EVENT_P1_SUMMON_WAVE, 5000, 0, PHASE_ONE);
events.ScheduleEvent(EVENT_P1_SHADOW_BOLT, urand(5500, 6000), 0, PHASE_ONE);
events.ScheduleEvent(EVENT_P1_EMPOWER_CULTIST, urand(20000, 30000), 0, PHASE_ONE);
if (getDifficulty() != RAID_DIFFICULTY_10MAN_NORMAL)
events.ScheduleEvent(EVENT_DOMINATE_MIND_H, 27000);
DoScriptText(SAY_AGGRO, me);
DoStartNoMovement(who);
me->RemoveAurasDueToSpell(SPELL_SHADOW_CHANNELING);
DoCast(me, SPELL_MANA_BARRIER, true);
instance->SetBossState(DATA_LADY_DEATHWHISPER, IN_PROGRESS);
}
示例9: AttackStart
void AttackStart(Unit* pWho)
{
if (!pWho)
return;
if (me->GetPositionZ() > 518.63f)
DoStartNoMovement(pWho);
if (me->GetPositionZ() < 518.63f)
{
if (me->Attack(pWho, true))
{
DoScriptText(SayAggro[3], me);
me->SetInCombatWith(pWho);
pWho->SetInCombatWith(me);
me->GetMotionMaster()->MoveChase(pWho, 0, 0);
}
}
}
示例10: UpdateAI
void UpdateAI(const uint32 diff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
// Shoot
if (m_uiShootTimer < diff)
{
if (m_creature->GetDistance2d(m_creature->getVictim()) >= 5.0f && DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHOOT_2) == CAST_OK)
m_uiShootTimer = urand(2500, 3500);
}
else
m_uiShootTimer -= diff;
if (!IsCombatMovement())
{ //Melee
if (!m_bInMelee && (m_creature->GetDistance2d(m_creature->getVictim()) < 5.0f || m_creature->GetDistance2d(m_creature->getVictim()) > 95.0f || !m_creature->IsWithinLOSInMap(m_creature->getVictim())))
{
SetCombatMovement(true);
DoStartMovement(m_creature->getVictim());
m_bInMelee = true;
return;
}
}
else
{ //Range
if (m_bInMelee && m_creature->GetDistance2d(m_creature->getVictim()) >= 5.0f && m_creature->GetDistance2d(m_creature->getVictim()) <= 95.0f && m_creature->IsWithinLOSInMap(m_creature->getVictim()))
{
SetCombatMovement(false);
m_bInMelee = false;
DoStartNoMovement(m_creature->getVictim());
return;
}
}
DoMeleeAttackIfReady();
}
示例11: UpdateAI
void UpdateAI(const uint32 diff)
{
if (!Phase)
return;
if (me->getThreatManager().getThreatList().empty()) // Reset if event is begun and we don't have a threatlist
{
EnterEvadeMode();
return;
}
Creature* Essence = NULL;
if (EssenceGUID)
{
Essence = Unit::GetCreature(*me, EssenceGUID);
if (!Essence)
{
EnterEvadeMode();
return;
}
}
if (Timer <= diff)
{
switch (Counter)
{
case 0:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H); // I R ANNNGRRRY!
DoStartNoMovement(me);
Timer = 3000;
break;
case 1:
Timer = 2800;
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_SUBMERGE); // Release the cube
DoCast(me, SPELL_SUBMERGE);
DoStartNoMovement(me);
break;
case 2:
Timer = 5000;
if (Creature* Summon = DoSpawnCreature(23417+Phase, 0, 0, 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0))
{
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED); // Ribs: open
Summon->AI()->AttackStart(SelectTarget(SELECT_TARGET_TOPAGGRO, 0));
EssenceGUID = Summon->GetGUID();
DoStartNoMovement(me);
} else EnterEvadeMode();
break;
case 3:
Timer = 1000;
if (Phase == 3)
{
if (!Essence->isAlive())
DoCast(me, 7, true);
else return;
}
else
{
if (Essence->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
{
MergeThreatList(Essence);
Essence->RemoveAllAuras();
Essence->DeleteThreatList();
Essence->GetMotionMaster()->MoveFollow(me, 0.0f, 0.0f);
} else return;
}
break;
case 4:
Timer = 1500;
if (Essence->IsWithinDistInMap(me, 10))
{
Essence->SetUInt32Value(UNIT_NPC_EMOTESTATE, 374); //rotate and disappear
Timer = 2000;
me->RemoveAurasDueToSpell(SPELL_SUBMERGE);
}
else
{
MergeThreatList(Essence);
Essence->RemoveAllAuras();
Essence->DeleteThreatList();
Essence->GetMotionMaster()->MoveFollow(me, 0, 0);
return;
}
break;
case 5:
if (Phase == 1)
{
DoScriptText(SUFF_SAY_AFTER, Essence);
}
else
{
DoScriptText(DESI_SAY_AFTER, Essence);
}
Essence->DespawnOrUnsummon();
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
EssenceGUID = 0;
SoulCount = 0;
SoulDeathCount = 0;
Timer = 3000;
break;
case 6:
//.........这里部分代码省略.........
示例12: UpdateAI
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim())
return;
if (m_uiBerserkTimer <= uiDiff)
{
DoScriptText(SAY_BERSERK, me);
DoCast(SPELL_BERSERK);
m_uiBerserkTimer = 600000;
} else m_uiBerserkTimer -= uiDiff;
if (IsHeroic() || !me->HasAura(SPELL_BONE_STORM))
{
if (m_uiBoneSpikeGraveyardTimer < uiDiff)
{
for (uint8 i = 1; i <= m_uiBoneCount; ++i)
{
if(Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true, -SPELL_SPIKE_IMPALING))
{
Creature* pBone = me->SummonCreature(CREATURE_BONE_SPIKE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 999999);
CAST_AI(npc_bone_spike::npc_bone_spikeAI, pBone->AI())->SetPrisoner(pTarget->GetGUID());
pTarget->AddAura(SPELL_SPIKE_IMPALING, pTarget);
}
}
DoScriptText(RAND(SAY_SPIKE_1,SAY_SPIKE_2,SAY_SPIKE_3), me);
m_uiBoneSpikeGraveyardTimer = 15000;
} else m_uiBoneSpikeGraveyardTimer -= uiDiff;
}
if (!me->HasAura(SPELL_BONE_STORM))
{
if (m_uiBoneStormTimer <= uiDiff)
{
DoCast(SPELL_BONE_STORM);
DoScriptText(SAY_STORM, me);
DoScriptText(STORM_EMOTE, me);
DoStartNoMovement(me->getVictim());
me->SetSpeed(MOVE_RUN, fBaseSpeed*3.0f, true);
m_uiBoneStormTimer = 45000; //bone storm 30 second + other spell casting time
} else m_uiBoneStormTimer -= uiDiff;
if (m_uiColdFlameTimer <= uiDiff)
{
if(Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, -8.0f, true))
{
pInstance->SetData(DATA_ANGLE, (me->GetAngle(pTarget)*1000));
DoCast(pTarget, SPELL_COLD_FLAME_SPAWN);
}
else
{
pInstance->SetData(DATA_ANGLE, (me->GetAngle(me->getVictim())*1000));
DoCast(me->getVictim(), SPELL_COLD_FLAME_SPAWN);
}
m_uiColdFlameTimer = 10000;
} else m_uiColdFlameTimer -= uiDiff;
if (m_uiSaberSlashTimer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_SABER_SLASH);
m_uiSaberSlashTimer = 7000;
} else m_uiSaberSlashTimer -= uiDiff;
}
else
{
if (m_uiBoneStormRemoveTimer <= uiDiff)
{
me->RemoveAurasDueToSpell(SPELL_BONE_STORM);
DoStartMovement(me->getVictim());
me->SetSpeed(MOVE_RUN, fBaseSpeed, true);
m_uiBoneStormRemoveTimer = RAID_MODE(20000,30000,20000,30000);
} else m_uiBoneStormRemoveTimer -= uiDiff;
if(m_uiMoveTimer <= uiDiff)
{
float x, y, z;
if(Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
pTarget->GetPosition(x, y, z);
me->GetMotionMaster()->MovePoint(0, x, y, z);
}
DoCast(SPELL_COLD_FLAME_SPAWN_B);
m_uiMoveTimer = 5000;
} else m_uiMoveTimer -= uiDiff;
}
DoMeleeAttackIfReady();
}
示例13: UpdateAI
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
return;
if (!m_pInstance || m_pInstance->GetData(DATA_VALITHRIA_DREAMWALKER_EVENT) != IN_PROGRESS)
summons.DespawnAll();
if (m_uiResetTimer <= diff)
{
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 90)
EnterEvadeMode();
m_uiResetTimer = 5000;
} else m_uiResetTimer -= diff;
if (Phase == 1)
{
DoStartNoMovement(me->getVictim());
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
m_uiEndTimer = 999999999;
if (m_uiSummonTimer <= diff)
{
if (getDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL || getDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC)
{
DoSummon(CREATURE_ZOMBIE, Pos[RAND(0,4)]);
DoSummon(CREATURE_SKELETON, Pos[RAND(0,4)]);
DoSummon(CREATURE_ARCHMAGE, Pos[RAND(0,4)]);
DoSummon(CREATURE_SUPPRESSER, Pos[RAND(0,4)]);
DoSummon(CREATURE_ABOMINATION, Pos[RAND(0,4)]);
}
if (getDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || getDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC)
{
DoSummon(CREATURE_ZOMBIE, Pos[RAND(0,1,2,3)]);
DoSummon(CREATURE_SKELETON, Pos[RAND(0,1,2,3)]);
DoSummon(CREATURE_ARCHMAGE, Pos[RAND(0,1,2,3)]);
DoSummon(CREATURE_SUPPRESSER, Pos[RAND(0,1,2,3)]);
DoSummon(CREATURE_ABOMINATION, Pos[RAND(0,1,2,3)]);
}
m_uiSummonTimer = 28000;
} else m_uiSummonTimer -= diff;
if (m_uiPortalTimer <= diff)
{
DoScriptText(SAY_OPEN_PORTAL, me);
me->SummonCreature(CREATURE_PORTAL, me->GetPositionX()+15, me->GetPositionY()+15, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 15000);
me->SummonCreature(CREATURE_PORTAL, me->GetPositionX()+10, me->GetPositionY()+25, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 15000);
me->SummonCreature(CREATURE_PORTAL, me->GetPositionX()+15, me->GetPositionY()-25, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 15000);
m_uiPortalTimer = 30000;
} else m_uiPortalTimer -= diff;
if (!ABOVEHP && (me->GetHealth()*100 / me->GetMaxHealth()) > 75)
{
DoScriptText(SAY_ABOVE_75, me);
ABOVEHP = true;
}
if (!BELOWHP && (me->GetHealth()*100 / me->GetMaxHealth()) < 25)
{
DoScriptText(SAY_BELOW_25, me);
BELOWHP = true;
}
if ((me->GetHealth()*100 / me->GetMaxHealth()) > 99)
{
Phase = 2;
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
me->RemoveAurasDueToSpell(SPELL_CORRUPTION);
end = true;
}
if ((me->GetHealth()*100 / me->GetMaxHealth()) > 2)
{
Phase = 4;
m_uiEndTimer = 2000;
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
me->SetReactState(REACT_PASSIVE);
me->RemoveAurasDueToSpell(SPELL_CORRUPTION);
}
}
if (Phase == 2)
{
Phase = 3;
m_uiEnd2Timer = 1000;
m_uiEnd3Timer = 8000;
DoScriptText(SAY_END, me);
}
if (Phase == 4)
{
if (m_uiEndTimer <= diff)
{
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if(pTarget && !pTarget->IsFriendlyTo(me))
{
//.........这里部分代码省略.........
示例14: UpdateAI
void UpdateAI(const uint32 uiDiff)
{
if(m_uiPhase == 1)
DoStartNoMovement(me->getVictim());
else if(m_uiPhase == 2)
DoStartMovement(me->getVictim());
if (m_uiIntroTimer <= uiDiff && bIntro && m_uiIntroPhase < 7)
{
switch (m_uiIntroPhase)
{
case 1: DoScriptText(SAY_INTRO_2, me); m_uiIntroTimer = 10000; break;
case 2: DoScriptText(SAY_INTRO_3, me); m_uiIntroTimer = 7000; break;
case 3: DoScriptText(SAY_INTRO_4, me); m_uiIntroTimer = 12000; break;
case 4: DoScriptText(SAY_INTRO_5, me); m_uiIntroTimer = 7000; break;
case 5: DoScriptText(SAY_INTRO_6, me); m_uiIntroTimer = 11000; break;
case 6: DoScriptText(SAY_INTRO_7, me); m_uiIntroTimer = 20000; break;
}
++m_uiIntroPhase;
} else m_uiIntroTimer -= uiDiff;
if (!UpdateVictim())
return;
if (m_uiBerserkTimer < uiDiff)
{
DoCast(me, SPELL_BERSERK);
DoScriptText(SAY_BERSERK, me);
m_uiBerserkTimer = 600000;
} else m_uiBerserkTimer -= uiDiff;
if (m_uiCultTimer < uiDiff)
{
EmpowerCultist();
m_uiCultTimer = urand(20000, 23000);
} else m_uiCultTimer -= uiDiff;
if (m_uiDeathandDecayTimer < uiDiff)
{
if(Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1))
DoCast(pTarget, SPELL_DEATH_AND_DECAY);
m_uiDeathandDecayTimer = 11000;
} else m_uiDeathandDecayTimer -= uiDiff;
if (m_uiDominateMindTimer < uiDiff)
{
for (uint8 i = 1; i <= RAID_MODE(0,1,1,3); ++i)
{
if(Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true, -SPELL_DOMINATE_MIND))
DoCast(pTarget, SPELL_DOMINATE_MIND);
}
DoScriptText(SAY_DOMINATE_MIND, me);
m_uiDominateMindTimer = 15000;
} else m_uiDominateMindTimer -= uiDiff;
if (m_uiPhase == 1)
{
if (m_uiShadowBoltTimer < uiDiff)
{
if(Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1))
DoCast(pTarget, SPELL_SHADOW_BOLT);
m_uiShadowBoltTimer = 6000;
} else m_uiShadowBoltTimer -= uiDiff;
if (m_uiSummonWaveTimer < uiDiff)
{
if (Difficulty() == RAID_DIFFICULTY_10MAN_NORMAL || Difficulty() == RAID_DIFFICULTY_10MAN_HEROIC)
RandomSpawn();
else
{
DoSummon(CREATURE_FANATIC, SpawnLoc[0]);
DoSummon(CREATURE_ADHERENT, SpawnLoc[1]);
DoSummon(CREATURE_FANATIC, SpawnLoc[2]);
DoSummon(CREATURE_ADHERENT, SpawnLoc[3]);
DoSummon(CREATURE_FANATIC, SpawnLoc[4]);
DoSummon(CREATURE_ADHERENT, SpawnLoc[5]);
DoSummon(RAND(CREATURE_FANATIC,CREATURE_ADHERENT), SpawnLoc[6]);
}
bFirstSummon = false ? true : true;
m_uiSummonWaveTimer = !bFirstSummon ? 10000 : 60000;
} else m_uiSummonWaveTimer -= uiDiff;
}
if (m_uiPhase == 2)
{
if (m_uiFrostBoltTimer < uiDiff)
{
DoCast(me->getVictim(), SPELL_FROST_BOLT);
m_uiFrostBoltTimer = 10000;
} else m_uiFrostBoltTimer -= uiDiff;
if (m_uiFrostValleyTimer < uiDiff)
{
DoCast(SPELL_FROST_BOLT_VALLEY);
m_uiFrostValleyTimer = 19000;
} else m_uiFrostValleyTimer -= uiDiff;
if (m_uiInsignificanceTimer < uiDiff)
{
DoCast(me->getVictim(), SPELL_INSIGNIFICANCE);
//.........这里部分代码省略.........
示例15: UpdateAI
//.........这里部分代码省略.........
Blizzard->SetInCombatWithZone();
Blizzard->SetFaction(me->GetFaction());
me->CastSpell(Blizzard, SPELL_SUMMON_BLIZZ, false);
Blizzard->CastSpell(Blizzard, SPELL_CIRCULAR_BLIZZARD, false);
Blizzard->GetMotionMaster()->MovePath(110110101, false);
}
break;
}
SuperCastTimer = urand(35000, 40000);
}
else SuperCastTimer -= diff;
if (!ElementalsSpawned && HealthBelowPct(40))
{
ElementalsSpawned = true;
Creature* ElementalOne = NULL;
Creature* ElementalTwo = NULL;
Creature* ElementalThree = NULL;
Creature* ElementalFour = NULL;
ElementalOne = me->SummonCreature(NPC_WATER_ELEMENTAL, -11168.1f, -1939.29f, 232.092f, 1.46f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000);
ElementalTwo = me->SummonCreature(NPC_WATER_ELEMENTAL, -11138.2f, -1915.38f, 232.092f, 3.00f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000);
ElementalThree = me->SummonCreature(NPC_WATER_ELEMENTAL, -11161.7f, -1885.36f, 232.092f, 4.59f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000);
ElementalFour = me->SummonCreature(NPC_WATER_ELEMENTAL, -11192.4f, -1909.36f, 232.092f, 6.19f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000);
if (ElementalOne)
{
Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (!pTarget)
return;
DoStartNoMovement(pTarget);
ElementalOne->SetInCombatWithZone();
ElementalOne->CombatStart(pTarget);
ElementalOne->SetFaction(me->GetFaction());
ElementalOne->SetRooted(true);
ElementalOne->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
ElementalOne->SetModifierValue(UNIT_MOD_RESISTANCE_FROST, BASE_VALUE, 0);
}
if (ElementalTwo)
{
Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (!pTarget)
return;
DoStartNoMovement(pTarget);
ElementalTwo->SetInCombatWithZone();
ElementalTwo->CombatStart(pTarget);
ElementalTwo->SetFaction(me->GetFaction());
ElementalTwo->SetRooted(true);
ElementalTwo->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
ElementalTwo->SetModifierValue(UNIT_MOD_RESISTANCE_FROST, BASE_VALUE, 0);
}
if (ElementalThree)
{
Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (!pTarget)
return;
DoStartNoMovement(pTarget);
ElementalThree->SetInCombatWithZone();
ElementalThree->CombatStart(pTarget);