本文整理汇总了C++中DoCastVictim函数的典型用法代码示例。如果您正苦于以下问题:C++ DoCastVictim函数的具体用法?C++ DoCastVictim怎么用?C++ DoCastVictim使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DoCastVictim函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoCastVictim
void boss_attumen::boss_attumenAI::UpdateAI(uint32 diff)
{
if (ResetTimer)
{
if (ResetTimer <= diff)
{
ResetTimer = 0;
Unit* pMidnight = ObjectAccessor::GetUnit(*me, Midnight);
if (pMidnight)
{
pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
pMidnight->SetVisible(true);
}
Midnight.Clear();
me->SetVisible(false);
me->KillSelf();
} else ResetTimer -= diff;
}
//Return since we have no target
if (!UpdateVictim())
return;
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE))
return;
if (CleaveTimer <= diff)
{
DoCastVictim(SPELL_SHADOWCLEAVE);
CleaveTimer = urand(10000, 15000);
} else CleaveTimer -= diff;
if (CurseTimer <= diff)
{
DoCastVictim(SPELL_INTANGIBLE_PRESENCE);
CurseTimer = 30000;
} else CurseTimer -= diff;
if (RandomYellTimer <= diff)
{
Talk(SAY_RANDOM);
RandomYellTimer = urand(30000, 60000);
} else RandomYellTimer -= diff;
if (me->GetUInt32Value(UNIT_FIELD_DISPLAYID) == MOUNTED_DISPLAYID)
{
if (ChargeTimer <= diff)
{
Unit* target = NULL;
ThreatContainer::StorageType const &t_list = me->getThreatManager().getThreatList();
std::vector<Unit*> target_list;
for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr != t_list.end(); ++itr)
{
target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
if (target && !target->IsWithinDist(me, ATTACK_DISTANCE, false))
target_list.push_back(target);
target = NULL;
}
if (!target_list.empty())
target = *(target_list.begin() + rand32() % target_list.size());
DoCast(target, SPELL_BERSERKER_CHARGE);
ChargeTimer = 20000;
} else ChargeTimer -= diff;
}
else
{
if (HealthBelowPct(25))
{
Creature* pMidnight = ObjectAccessor::GetCreature(*me, Midnight);
if (pMidnight && pMidnight->GetTypeId() == TYPEID_UNIT)
{
ENSURE_AI(boss_midnight::boss_midnightAI, (pMidnight->AI()))->Mount(me);
me->SetHealth(pMidnight->GetHealth());
DoResetThreat();
}
}
}
DoMeleeAttackIfReady();
}
示例2: UpdateAI
void UpdateAI(uint32 const diff)
{
if (!UpdateVictim() || !CheckInRoom())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_INHALE_BLIGHT:
{
RemoveBlight();
if (_inhaleCounter == 3)
{
Talk(EMOTE_WARN_PUNGENT_BLIGHT);
Talk(SAY_PUNGENT_BLIGHT);
DoCast(me, SPELL_PUNGENT_BLIGHT);
_inhaleCounter = 0;
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
professor->AI()->DoAction(ACTION_FESTERGUT_GAS);
events.RescheduleEvent(EVENT_GAS_SPORE, urand(20000, 25000));
}
else
{
DoCast(me, SPELL_INHALE_BLIGHT);
// just cast and dont bother with target, conditions will handle it
++_inhaleCounter;
if (_inhaleCounter < 3)
me->CastSpell(me, gaseousBlight[_inhaleCounter], true, NULL, NULL, me->GetGUID());
}
events.ScheduleEvent(EVENT_INHALE_BLIGHT, urand(33500, 35000));
break;
}
case EVENT_VILE_GAS:
{
std::list<Unit*> targets;
uint32 minTargets = RAID_MODE<uint32>(3, 8, 3, 8);
SelectTargetList(targets, minTargets, SELECT_TARGET_RANDOM, -5.0f, true);
float minDist = 0.0f;
if (targets.size() >= minTargets)
minDist = -5.0f;
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, minDist, true))
DoCast(target, SPELL_VILE_GAS);
events.ScheduleEvent(EVENT_VILE_GAS, urand(28000, 35000));
break;
}
case EVENT_GAS_SPORE:
Talk(EMOTE_WARN_GAS_SPORE);
Talk(EMOTE_GAS_SPORE);
me->CastCustomSpell(SPELL_GAS_SPORE, SPELLVALUE_MAX_TARGETS, RAID_MODE<int32>(2, 3, 2, 3), me);
events.ScheduleEvent(EVENT_GAS_SPORE, urand(40000, 45000));
events.RescheduleEvent(EVENT_VILE_GAS, urand(28000, 35000));
break;
case EVENT_GASTRIC_BLOAT:
DoCastVictim(SPELL_GASTRIC_BLOAT);
events.ScheduleEvent(EVENT_GASTRIC_BLOAT, urand(15000, 17500));
break;
case EVENT_BERSERK:
DoCast(me, SPELL_BERSERK2);
Talk(SAY_BERSERK);
break;
default:
break;
}
}
DoMeleeAttackIfReady();
}
示例3: UpdateAI
void UpdateAI(uint32 diff) override
{
// I have a feeling this isn't blizzlike, but owell, I'm only passing by and cleaning up.
if (!_hasAura)
{
for (uint8 i = 0; i < MAX_SPELL_PAIRS; ++i)
if (_auraPairs[i].npcEntry == me->GetEntry())
DoCast(me, _auraPairs[i].spellId);
_hasAura = true;
}
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_CHARGE_TARGET:
DoCastVictim(SPELL_CHARGE);
events.ScheduleEvent(EVENT_CHARGE, urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS));
break;
case EVENT_CLEAVE:
DoCastVictim(SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, urand(10 * IN_MILLISECONDS, 16 * IN_MILLISECONDS));
break;
case EVENT_DEMORALIZING_SHOUT:
DoCast(me, SPELL_DEMORALIZING_SHOUT);
events.ScheduleEvent(EVENT_DEMORALIZING_SHOUT, urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS));
break;
case EVENT_WHIRLWIND:
DoCast(me, SPELL_WHIRLWIND);
events.ScheduleEvent(EVENT_WHIRLWIND, urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS));
break;
case EVENT_ENRAGE:
DoCast(me, SPELL_ENRAGE);
events.ScheduleEvent(EVENT_ENRAGE, urand(10 * IN_MILLISECONDS, 30 * IN_MILLISECONDS));
break;
case EVENT_CHECK_RESET:
{
Position const& _homePosition = me->GetHomePosition();
if (me->GetDistance2d(_homePosition.GetPositionX(), _homePosition.GetPositionY()) > 50.0f)
{
EnterEvadeMode();
return;
}
events.ScheduleEvent(EVENT_CHECK_RESET, 5000);
break;
}
}
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
}
DoMeleeAttackIfReady();
}
示例4: UpdateAI
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_SHIMMER:
{
// Remove old vulnerabilty spell
if (CurrentVurln_Spell)
me->RemoveAurasDueToSpell(CurrentVurln_Spell);
// Cast new random vulnerabilty on self
uint32 spell = RAND(SPELL_FIRE_VULNERABILITY, SPELL_FROST_VULNERABILITY, SPELL_SHADOW_VULNERABILITY, SPELL_NATURE_VULNERABILITY, SPELL_ARCANE_VULNERABILITY);
DoCast(me, spell);
CurrentVurln_Spell = spell;
Talk(EMOTE_SHIMMER);
events.ScheduleEvent(EVENT_SHIMMER, 45000);
break;
}
case EVENT_BREATH_1:
DoCastVictim(Breath1_Spell);
events.ScheduleEvent(EVENT_BREATH_1, 60000);
break;
case EVENT_BREATH_2:
DoCastVictim(Breath2_Spell);
events.ScheduleEvent(EVENT_BREATH_2, 60000);
break;
case EVENT_AFFLICTION:
{
Map::PlayerList const &players = me->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
if (Player* player = itr->GetSource()->ToPlayer())
{
DoCast(player, RAND(SPELL_BROODAF_BLUE, SPELL_BROODAF_BLACK, SPELL_BROODAF_RED, SPELL_BROODAF_BRONZE, SPELL_BROODAF_GREEN), true);
if (player->HasAura(SPELL_BROODAF_BLUE) &&
player->HasAura(SPELL_BROODAF_BLACK) &&
player->HasAura(SPELL_BROODAF_RED) &&
player->HasAura(SPELL_BROODAF_BRONZE) &&
player->HasAura(SPELL_BROODAF_GREEN))
{
DoCast(player, SPELL_CHROMATIC_MUT_1);
}
}
}
}
events.ScheduleEvent(EVENT_AFFLICTION, 10000);
break;
case EVENT_FRENZY:
DoCast(me, SPELL_FRENZY);
events.ScheduleEvent(EVENT_FRENZY, urand(10000, 15000));
break;
}
}
// Enrage if not already enraged and below 20%
if (!Enraged && HealthBelowPct(20))
{
DoCast(me, SPELL_ENRAGE);
Enraged = true;
}
DoMeleeAttackIfReady();
}
示例5: UpdateAI
void UpdateAI(uint32 diff)
{
if (!_phase)
return;
events.Update(diff);
if ((_phase != PHASE_BIRTH && !UpdateVictim()) || !CheckInRoom())
return;
if (_canTheHundredClub)
{
if (_checkFrostResistTimer <= diff)
{
CheckPlayersFrostResist();
_checkFrostResistTimer = 5 * IN_MILLISECONDS;
}
else
_checkFrostResistTimer -= diff;
}
if (_phase == PHASE_GROUND)
{
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_BERSERK:
Talk(EMOTE_ENRAGE);
DoCast(me, SPELL_BERSERK);
return;
case EVENT_CLEAVE:
DoCastVictim(SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, urand(5, 15) * IN_MILLISECONDS, 0, PHASE_GROUND);
return;
case EVENT_TAIL:
DoCastAOE(SPELL_TAIL_SWEEP);
events.ScheduleEvent(EVENT_TAIL, urand(5, 15) * IN_MILLISECONDS, 0, PHASE_GROUND);
return;
case EVENT_DRAIN:
DoCastAOE(SPELL_LIFE_DRAIN);
events.ScheduleEvent(EVENT_DRAIN, 24 * IN_MILLISECONDS, 0, PHASE_GROUND);
return;
case EVENT_BLIZZARD:
{
//DoCastAOE(SPELL_SUMMON_BLIZZARD);
if (Creature* summon = DoSummon(NPC_BLIZZARD, me, 0.0f, urand(25, 30) * IN_MILLISECONDS, TEMPSUMMON_TIMED_DESPAWN))
summon->GetMotionMaster()->MoveRandom(40);
events.ScheduleEvent(EVENT_BLIZZARD, RAID_MODE(20, 7) * IN_MILLISECONDS, 0, PHASE_GROUND);
break;
}
case EVENT_FLIGHT:
if (HealthAbovePct(10))
{
_phase = PHASE_FLIGHT;
events.SetPhase(PHASE_FLIGHT);
me->SetReactState(REACT_PASSIVE);
me->AttackStop();
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
me->GetMotionMaster()->MovePoint(1, x, y, z);
return;
}
break;
}
}
DoMeleeAttackIfReady();
}
else
{
if (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_LIFTOFF:
Talk(EMOTE_AIR_PHASE);
me->SetDisableGravity(true);
me->SendMovementFlagUpdate();
events.ScheduleEvent(EVENT_ICEBOLT, 1500);
_iceboltCount = RAID_MODE(2, 3);
return;
case EVENT_ICEBOLT:
{
std::vector<Unit*> targets;
std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
for (; i != me->getThreatManager().getThreatList().end(); ++i)
if ((*i)->getTarget()->GetTypeId() == TYPEID_PLAYER && !(*i)->getTarget()->HasAura(SPELL_ICEBOLT))
targets.push_back((*i)->getTarget());
if (targets.empty())
_iceboltCount = 0;
else
{
std::vector<Unit*>::const_iterator itr = targets.begin();
advance(itr, rand()%targets.size());
_iceblocks.insert(std::make_pair((*itr)->GetGUID(), 0));
DoCast(*itr, SPELL_ICEBOLT);
--_iceboltCount;
}
//.........这里部分代码省略.........
示例6: UpdateAI
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
return;
if (uiPhaseTimer <= diff)
{
switch (Phase)
{
case CASTING_FLAME_SPHERES:
{
Creature* pSpheres[3];
//DoCast(me, SPELL_FLAME_SPHERE_SUMMON_1);
pSpheres[0] = DoSpawnCreature(CREATURE_FLAME_SPHERE, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS);
Unit* pSphereTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
if (pSphereTarget && pSpheres[0])
{
float angle, x, y;
angle = pSpheres[0]->GetAngle(pSphereTarget);
x = pSpheres[0]->GetPositionX() + DATA_SPHERE_DISTANCE * cos(angle);
y = pSpheres[0]->GetPositionY() + DATA_SPHERE_DISTANCE * sin(angle);
pSpheres[0]->GetMotionMaster()->MovePoint(0, x, y, pSpheres[0]->GetPositionZ());
}
if (IsHeroic())
{
//DoCast(me, H_SPELL_FLAME_SPHERE_SUMMON_1);
pSpheres[1] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_1, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS);
//DoCast(me, H_SPELL_FLAME_SPHERE_SUMMON_2);
pSpheres[2] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_2, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS);
if (pSphereTarget && pSpheres[1] && pSpheres[2])
{
float angle, x, y;
angle = pSpheres[1]->GetAngle(pSphereTarget) + DATA_SPHERE_ANGLE_OFFSET;
x = pSpheres[1]->GetPositionX() + DATA_SPHERE_DISTANCE/2 * cos(angle);
y = pSpheres[1]->GetPositionY() + DATA_SPHERE_DISTANCE/2 * sin(angle);
pSpheres[1]->GetMotionMaster()->MovePoint(0, x, y, pSpheres[1]->GetPositionZ());
angle = pSpheres[2]->GetAngle(pSphereTarget) - DATA_SPHERE_ANGLE_OFFSET;
x = pSpheres[2]->GetPositionX() + DATA_SPHERE_DISTANCE/2 * cos(angle);
y = pSpheres[2]->GetPositionY() + DATA_SPHERE_DISTANCE/2 * sin(angle);
pSpheres[2]->GetMotionMaster()->MovePoint(0, x, y, pSpheres[2]->GetPositionZ());
}
}
Phase = NORMAL;
uiPhaseTimer = 0;
break;
}
case JUST_VANISHED:
if (Unit* pEmbraceTarget = GetEmbraceTarget())
{
me->GetMotionMaster()->Clear();
me->SetSpeed(MOVE_WALK, 2.0f, true);
me->GetMotionMaster()->MoveChase(pEmbraceTarget);
}
Phase = VANISHED;
uiPhaseTimer = 1300;
break;
case VANISHED:
if (Unit* pEmbraceTarget = GetEmbraceTarget())
DoCast(pEmbraceTarget, DUNGEON_MODE(SPELL_EMBRACE_OF_THE_VAMPYR, H_SPELL_EMBRACE_OF_THE_VAMPYR));
Talk(SAY_FEED);
me->GetMotionMaster()->Clear();
me->SetSpeed(MOVE_WALK, 1.0f, true);
me->GetMotionMaster()->MoveChase(me->getVictim());
Phase = FEEDING;
uiPhaseTimer = 20*IN_MILLISECONDS;
break;
case FEEDING:
Phase = NORMAL;
uiPhaseTimer = 0;
uiEmbraceTarget = 0;
break;
case NORMAL:
if (uiBloodthirstTimer <= diff)
{
DoCast(me, SPELL_BLOODTHIRST);
uiBloodthirstTimer = 10*IN_MILLISECONDS;
} else uiBloodthirstTimer -= diff;
if (uiFlamesphereTimer <= diff)
{
// because TARGET_UNIT_TARGET_ENEMY we need a target selected to cast
DoCastVictim(SPELL_CONJURE_FLAME_SPHERE);
Phase = CASTING_FLAME_SPHERES;
uiPhaseTimer = 3*IN_MILLISECONDS + diff;
uiFlamesphereTimer = 15*IN_MILLISECONDS;
} else uiFlamesphereTimer -= diff;
if (uiVanishTimer <= diff)
{
//Count alive players
Unit* target = NULL;
std::list<HostileReference*> t_list = me->getThreatManager().getThreatList();
std::vector<Unit*> target_list;
for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
target = Unit::GetUnit(*me, (*itr)->getUnitGuid());
// exclude pets & totems
if (target && target->GetTypeId() == TYPEID_PLAYER && target->isAlive())
target_list.push_back(target);
//.........这里部分代码省略.........
示例7: UpdateAI
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_FEL_FIREBALL:
DoCastVictim(SPELL_FEL_FIREBALL);
events.ScheduleEvent(EVENT_FEL_FIREBALL, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
return;
case EVENT_FEL_LIGHTNING:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_LORD_HITTIN))
DoCast(target, SPELL_FEL_LIGHTING);
events.ScheduleEvent(EVENT_FEL_LIGHTNING, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
return;
case EVENT_INCINERATE_FLESH:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_LORD_HITTIN))
{
Talk(EMOTE_INCINERATE, target->GetGUID());
Talk(SAY_INCINERATE);
DoCast(target, SPELL_INCINERATE_FLESH);
}
events.ScheduleEvent(EVENT_INCINERATE_FLESH, urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS));
return;
case EVENT_NETHER_POWER:
me->CastCustomSpell(SPELL_NETHER_POWER, SPELLVALUE_AURA_STACK, RAID_MODE<uint32>(5, 10, 5,10), me, true);
events.ScheduleEvent(EVENT_NETHER_POWER, 40*IN_MILLISECONDS);
return;
case EVENT_LEGION_FLAME:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_LORD_HITTIN))
{
Talk(EMOTE_LEGION_FLAME, target->GetGUID());
DoCast(target, SPELL_LEGION_FLAME);
}
events.ScheduleEvent(EVENT_LEGION_FLAME, 30*IN_MILLISECONDS);
return;
case EVENT_SUMMONO_NETHER_PORTAL:
Talk(EMOTE_NETHER_PORTAL);
Talk(SAY_MISTRESS_OF_PAIN);
DoCast(SPELL_NETHER_PORTAL);
events.ScheduleEvent(EVENT_SUMMONO_NETHER_PORTAL, 2*MINUTE*IN_MILLISECONDS);
return;
case EVENT_SUMMON_INFERNAL_ERUPTION:
Talk(EMOTE_INFERNAL_ERUPTION);
Talk(SAY_INFERNAL_ERUPTION);
DoCast(SPELL_INFERNAL_ERUPTION);
events.ScheduleEvent(EVENT_SUMMON_INFERNAL_ERUPTION, 2*MINUTE*IN_MILLISECONDS);
return;
}
}
DoMeleeAttackIfReady();
}
示例8: UpdateAI
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim() && !(events.GetPhaseMask() & (1 << PHASE_INTRO)))
return;
events.Update(diff);
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_INTRO_1:
//DoScriptText(SAY_GORKUN_INTRO_2, pGorkunOrVictus);
break;
case EVENT_INTRO_2:
DoScriptText(SAY_TYRANNUS_INTRO_3, me);
break;
case EVENT_INTRO_3:
me->ExitVehicle();
me->GetMotionMaster()->MovePoint(0, miscPos);
break;
case EVENT_COMBAT_START:
if (Creature* rimefang = me->GetCreature(*me, instance->GetData64(DATA_RIMEFANG)))
rimefang->AI()->DoAction(ACTION_START_RIMEFANG); //set rimefang also infight
events.SetPhase(PHASE_COMBAT);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetReactState(REACT_AGGRESSIVE);
DoCast(me, SPELL_FULL_HEAL);
DoZoneInCombat();
events.ScheduleEvent(EVENT_OVERLORD_BRAND, urand(5000, 7000));
events.ScheduleEvent(EVENT_FORCEFUL_SMASH, urand(14000, 16000));
events.ScheduleEvent(EVENT_MARK_OF_RIMEFANG, urand(25000, 27000));
break;
case EVENT_OVERLORD_BRAND:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
DoCast(target, SPELL_OVERLORD_BRAND);
events.ScheduleEvent(EVENT_OVERLORD_BRAND, urand(11000, 12000));
break;
case EVENT_FORCEFUL_SMASH:
DoCastVictim(SPELL_FORCEFUL_SMASH);
events.ScheduleEvent(EVENT_UNHOLY_POWER, 1000);
break;
case EVENT_UNHOLY_POWER:
DoScriptText(SAY_DARK_MIGHT_1, me);
DoScriptText(SAY_DARK_MIGHT_2, me);
DoCast(me, SPELL_UNHOLY_POWER);
events.ScheduleEvent(EVENT_FORCEFUL_SMASH, urand(40000, 48000));
break;
case EVENT_MARK_OF_RIMEFANG:
DoScriptText(SAY_MARK_RIMEFANG_1, me);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
{
DoScriptText(SAY_MARK_RIMEFANG_2, me, target);
DoCast(target, SPELL_MARK_OF_RIMEFANG);
}
events.ScheduleEvent(EVENT_MARK_OF_RIMEFANG, urand(24000, 26000));
break;
}
}
DoMeleeAttackIfReady();
}
示例9: UpdateAI
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
{
events.Update(diff);
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_PATH_2:
me->GetMotionMaster()->MovePath(NEFARIUS_PATH_2, false);
events.ScheduleEvent(EVENT_CHAOS_1, 7000);
break;
case EVENT_CHAOS_1:
if (Creature* gyth = me->FindNearestCreature(NPC_GYTH, 75.0f, true))
{
me->SetFacingToObject(gyth);
Talk(SAY_CHAOS_SPELL);
}
events.ScheduleEvent(EVENT_CHAOS_2, 2000);
break;
case EVENT_CHAOS_2:
DoCast(SPELL_CHROMATIC_CHAOS);
me->SetFacingTo(1.570796f);
break;
case EVENT_SUCCESS_1:
if (Unit* player = me->SelectNearestPlayer(60.0f))
{
me->SetFacingToObject(player);
Talk(SAY_SUCCESS);
if (GameObject* portcullis1 = me->FindNearestGameObject(GO_PORTCULLIS_ACTIVE, 65.0f))
portcullis1->SetGoState(GO_STATE_ACTIVE);
if (GameObject* portcullis2 = me->FindNearestGameObject(GO_PORTCULLIS_TOBOSSROOMS, 80.0f))
portcullis2->SetGoState(GO_STATE_ACTIVE);
}
events.ScheduleEvent(EVENT_SUCCESS_2, 4000);
break;
case EVENT_SUCCESS_2:
DoCast(me, SPELL_VAELASTRASZZ_SPAWN);
me->DespawnOrUnsummon(1000);
break;
case EVENT_PATH_3:
me->GetMotionMaster()->MovePath(NEFARIUS_PATH_3, false);
break;
default:
break;
}
}
return;
}
// Only do this if we haven't spawned nefarian yet
if (UpdateVictim() && SpawnedAdds <= 42)
{
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_SHADOW_BOLT:
switch (urand(0, 1))
{
case 0:
DoCastVictim(SPELL_SHADOWBOLT_VOLLEY);
break;
case 1:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true))
DoCast(target, SPELL_SHADOWBOLT);
break;
}
DoResetThreat();
events.ScheduleEvent(EVENT_SHADOW_BOLT, urand(3000, 10000));
break;
case EVENT_FEAR:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true))
DoCast(target, SPELL_FEAR);
events.ScheduleEvent(EVENT_FEAR, urand(10000, 20000));
break;
case EVENT_MIND_CONTROL:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true))
DoCast(target, SPELL_SHADOW_COMMAND);
events.ScheduleEvent(EVENT_MIND_CONTROL, urand(30000, 35000));
break;
case EVENT_SPAWN_ADD:
for (uint8 i=0; i<2; ++i)
{
uint32 CreatureID;
if (urand(0, 2) == 0)
CreatureID = NPC_CHROMATIC_DRAKANOID;
else
CreatureID = Entry[urand(0, 4)];
if (Creature* dragon = me->SummonCreature(CreatureID, DrakeSpawnLoc[i]))
{
dragon->setFaction(103);
dragon->AI()->AttackStart(me->GetVictim());
//.........这里部分代码省略.........
示例10: UpdateAI
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
{
if (phase == PHASE_FLIGHT && !me->IsInEvadeMode())
EnterEvadeMode();
return;
}
events.Update(diff);
if (me->IsNonMeleeSpellCast(false))
return;
if (phase == PHASE_GROUND)
{
switch (events.ExecuteEvent())
{
case EVENT_BERSERK:
Talk(YELL_BERSERK);
DoCast(me, SPELL_BERSERK, true);
events.ScheduleEvent(EVENT_BERSERK, 10000);
break;
case EVENT_CLEAVE:
DoCastVictim(SPELL_CLEAVE, false);
events.ScheduleEvent(EVENT_CLEAVE, urand(5000, 10000));
break;
case EVENT_CORROSION:
DoCastVictim(SPELL_CORROSION, false);
events.ScheduleEvent(EVENT_CORROSION, urand(20000, 30000));
break;
case EVENT_GAS_NOVA:
DoCast(me, SPELL_GAS_NOVA, false);
events.ScheduleEvent(EVENT_GAS_NOVA, urand(20000, 25000));
break;
case EVENT_ENCAPSULATE:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true))
DoCast(target, SPELL_ENCAPSULATE_CHANNEL, false);
events.ScheduleEvent(EVENT_ENCAPSULATE, urand(25000, 30000));
break;
case EVENT_FLIGHT:
EnterPhase(PHASE_FLIGHT);
break;
default:
DoMeleeAttackIfReady();
break;
}
}
if (phase == PHASE_FLIGHT)
{
switch (events.ExecuteEvent())
{
case EVENT_BERSERK:
Talk(YELL_BERSERK);
DoCast(me, SPELL_BERSERK, true);
break;
case EVENT_FLIGHT_SEQUENCE:
HandleFlightSequence();
break;
case EVENT_SUMMON_FOG:
{
float x, y, z;
me->GetPosition(x, y, z);
me->UpdateGroundPositionZ(x, y, z);
if (Creature* Fog = me->SummonCreature(NPC_VAPOR_TRAIL, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000))
{
Fog->RemoveAurasDueToSpell(SPELL_TRAIL_TRIGGER);
Fog->CastSpell(Fog, SPELL_FOG_TRIGGER, true);
me->CastSpell(Fog, SPELL_FOG_FORCE, true);
}
}
events.ScheduleEvent(EVENT_SUMMON_FOG, 1000);
break;
}
}
}
示例11: UpdateAI
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim())
return;
switch (m_uiStage)
{
case 0:
if (m_uiFreezeSlashTimer <= uiDiff)
{
DoCastVictim(SPELL_FREEZE_SLASH);
m_uiFreezeSlashTimer = 15*IN_MILLISECONDS;
} else m_uiFreezeSlashTimer -= uiDiff;
if (m_uiPenetratingColdTimer <= uiDiff)
{
me->CastCustomSpell(RAID_MODE(SPELL_PENETRATING_COLD_10_N, SPELL_PENETRATING_COLD_25_N, SPELL_PENETRATING_COLD_10_H, SPELL_PENETRATING_COLD_25_H) , SPELLVALUE_MAX_TARGETS, RAID_MODE(2, 5));
m_uiPenetratingColdTimer = 20*IN_MILLISECONDS;
} else m_uiPenetratingColdTimer -= uiDiff;
if (m_uiSummonNerubianTimer <= uiDiff && (IsHeroic() || !m_bReachedPhase3))
{
me->CastCustomSpell(SPELL_SUMMON_BURROWER, SPELLVALUE_MAX_TARGETS, RAID_MODE(1, 2, 2, 4));
m_uiSummonNerubianTimer = 45*IN_MILLISECONDS;
} else m_uiSummonNerubianTimer -= uiDiff;
if (IsHeroic() && m_uiNerubianShadowStrikeTimer <= uiDiff)
{
Summons.DoAction(NPC_BURROWER, ACTION_SHADOW_STRIKE);
m_uiNerubianShadowStrikeTimer = 30*IN_MILLISECONDS;
} else m_uiNerubianShadowStrikeTimer -= uiDiff;
if (m_uiSubmergeTimer <= uiDiff && !m_bReachedPhase3 && !me->HasAura(SPELL_BERSERK))
{
m_uiStage = 1;
m_uiSubmergeTimer = 60*IN_MILLISECONDS;
} else m_uiSubmergeTimer -= uiDiff;
break;
case 1:
DoCast(me, SPELL_SUBMERGE_ANUBARAK);
DoCast(me, SPELL_CLEAR_ALL_DEBUFFS);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
DoScriptText(SAY_BURROWER, me);
m_uiScarabSummoned = 0;
m_uiSummonScarabTimer = 4*IN_MILLISECONDS;
m_uiStage = 2;
break;
case 2:
if (m_uiPursuingSpikeTimer <= uiDiff)
{
DoCast(SPELL_SPIKE_CALL);
// Just to make sure it won't happen again in this phase
m_uiPursuingSpikeTimer = 90*IN_MILLISECONDS;
} else m_uiPursuingSpikeTimer -= uiDiff;
if (m_uiSummonScarabTimer <= uiDiff)
{
/* WORKAROUND
* - The correct implementation is more likely the comment below but it needs spell knowledge
*/
std::list<uint64>::iterator i = m_vBurrowGUID.begin();
uint32 at = urand(0, m_vBurrowGUID.size()-1);
for (uint32 k = 0; k < at; k++)
++i;
if (Creature *pBurrow = Unit::GetCreature(*me, *i))
pBurrow->CastSpell(pBurrow, 66340, false);
m_uiScarabSummoned++;
m_uiSummonScarabTimer = 4*IN_MILLISECONDS;
if (m_uiScarabSummoned == 4) m_uiSummonScarabTimer = RAID_MODE(4, 20)*IN_MILLISECONDS;
/*It seems that this spell have something more that needs to be taken into account
//Need more sniff info
DoCast(SPELL_SUMMON_BEATLES);
// Just to make sure it won't happen again in this phase
m_uiSummonScarabTimer = 90*IN_MILLISECONDS;*/
} else m_uiSummonScarabTimer -= uiDiff;
if (m_uiSubmergeTimer <= uiDiff)
{
m_uiStage = 3;
m_uiSubmergeTimer = 80*IN_MILLISECONDS;
} else m_uiSubmergeTimer -= uiDiff;
break;
case 3:
m_uiStage = 0;
DoCast(SPELL_SPIKE_TELE);
Summons.DespawnEntry(NPC_SPIKE);
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_ANUBARAK);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
DoCast(me, SPELL_EMERGE_ANUBARAK);
me->GetMotionMaster()->MoveChase(me->getVictim());
m_uiSummonNerubianTimer = 10*IN_MILLISECONDS;
m_uiNerubianShadowStrikeTimer = 30*IN_MILLISECONDS;
m_uiSummonScarabTimer = 2*IN_MILLISECONDS;
break;
}
if (!IsHeroic())
{
if (m_uiSummonFrostSphereTimer <= uiDiff)
//.........这里部分代码省略.........
示例12: UpdateAI
//.........这里部分代码省略.........
{
if (uiUndergroundPhase > 1)
{
for (uint8 i = 0; i < 2; ++i)
{
if (Creature *Venomancer = me->SummonCreature(CREATURE_VENOMANCER, SpawnPoint[i], TEMPSUMMON_CORPSE_DESPAWN, 0))
{
Venomancer->AddThreat(me->getVictim(), 0.0f);
DoZoneInCombat(Venomancer);
}
}
bVenomancerSummoned = true;
}
} else uiVenomancerTimer -= diff;
}
if (!bDatterSummoned)
{
if (uiDatterTimer <= diff)
{
if (uiUndergroundPhase > 2)
{
for (uint8 i = 0; i < 2; ++i)
{
if (Creature *Datter = me->SummonCreature(CREATURE_DATTER, SpawnPoint[i], TEMPSUMMON_CORPSE_DESPAWN, 0))
{
Datter->AddThreat(me->getVictim(), 0.0f);
DoZoneInCombat(Datter);
}
}
bDatterSummoned = true;
}
} else uiDatterTimer -= diff;
}
if (uiUndergroundTimer <= diff)
{
me->RemoveAura(SPELL_SUBMERGE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
uiPhase = PHASE_MELEE;
} else uiUndergroundTimer -= diff;
break;
case PHASE_MELEE:
if (((uiUndergroundPhase == 0 && HealthBelowPct(75))
|| (uiUndergroundPhase == 1 && HealthBelowPct(50))
|| (uiUndergroundPhase == 2 && HealthBelowPct(25)))
&& !me->HasUnitState(UNIT_STAT_CASTING))
{
bGuardianSummoned = false;
bVenomancerSummoned = false;
bDatterSummoned = false;
uiUndergroundTimer = 40*IN_MILLISECONDS;
uiVenomancerTimer = 25*IN_MILLISECONDS;
uiDatterTimer = 32*IN_MILLISECONDS;
uiImpalePhase = 0;
uiImpaleTimer = 9*IN_MILLISECONDS;
DoCast(me, SPELL_SUBMERGE, false);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
uiPhase = PHASE_UNDERGROUND;
++uiUndergroundPhase;
}
if (bChanneling == true)
{
for (uint8 i = 0; i < 8; ++i)
DoCast(me->getVictim(), SPELL_SUMMON_CARRION_BEETLES, true);
bChanneling = false;
}
else if (uiCarrionBeetlesTimer <= diff)
{
bChanneling = true;
DoCastVictim(SPELL_CARRION_BEETLES);
uiCarrionBeetlesTimer = 25*IN_MILLISECONDS;
} else uiCarrionBeetlesTimer -= diff;
if (uiLeechingSwarmTimer <= diff)
{
DoCast(me, SPELL_LEECHING_SWARM, true);
uiLeechingSwarmTimer = 19*IN_MILLISECONDS;
} else uiLeechingSwarmTimer -= diff;
if (uiPoundTimer <= diff)
{
if (Unit *target = me->getVictim())
{
if (Creature *pImpaleTarget = DoSummonImpaleTarget(target))
me->CastSpell(pImpaleTarget, DUNGEON_MODE(SPELL_POUND, SPELL_POUND_H), false);
}
uiPoundTimer = 16500;
} else uiPoundTimer -= diff;
DoMeleeAttackIfReady();
break;
}
}
示例13: UpdateAI
void UpdateAI(const uint32 diff)
{
if (!beam)
{
SummonBeams();
beam=true;
}
if (!UpdateVictim())
return;
if (CorruptedForm)
{
if (MarkOfCorruptionTimer <= diff)
{
if (MarkOfCorruption_Count <= 5)
{
uint32 mark_spell = 0;
switch (MarkOfCorruption_Count)
{
case 0:
mark_spell = SPELL_MARK_OF_CORRUPTION1;
break;
case 1:
mark_spell = SPELL_MARK_OF_CORRUPTION2;
break;
case 2:
mark_spell = SPELL_MARK_OF_CORRUPTION3;
break;
case 3:
mark_spell = SPELL_MARK_OF_CORRUPTION4;
break;
case 4:
mark_spell = SPELL_MARK_OF_CORRUPTION5;
break;
case 5:
mark_spell = SPELL_MARK_OF_CORRUPTION6;
break;
}
DoCastVictim(mark_spell);
if (MarkOfCorruption_Count < 5)
++MarkOfCorruption_Count;
}
MarkOfCorruptionTimer = 15000;
}
else MarkOfCorruptionTimer -= diff;
if (VileSludgeTimer <= diff)
{
if (Unit* target = SelectTarget(TARGET_RANDOM, 0))
{
DoCast(target, SPELL_VILE_SLUDGE);
VileSludgeTimer = 15000;
}
}
else VileSludgeTimer -= diff;
if (PosCheckTimer <= diff)
{
if (me->IsWithinDist2d(HYDROSS_X, HYDROSS_Y, SWITCH_RADIUS))
{
// switch to clean form
me->SetDisplayId(MODEL_CLEAN);
CorruptedForm = false;
MarkOfHydross_Count = 0;
DoSendQuantumText(SAY_SWITCH_TO_CLEAN, me);
DoResetThreat();
SummonBeams();
// spawn 4 adds
DoSpawnCreature(NPC_PURE_SPAWN, SPAWN_X_DIFF1, SPAWN_Y_DIFF1, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
DoSpawnCreature(NPC_PURE_SPAWN, SPAWN_X_DIFF2, SPAWN_Y_DIFF2, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
DoSpawnCreature(NPC_PURE_SPAWN, SPAWN_X_DIFF3, SPAWN_Y_DIFF3, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
DoSpawnCreature(NPC_PURE_SPAWN, SPAWN_X_DIFF4, SPAWN_Y_DIFF4, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
me->SetMeleeDamageSchool(SPELL_SCHOOL_FROST);
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
}
PosCheckTimer = 2500;
}
else PosCheckTimer -=diff;
}
// clean form
else
{
if (MarkOfHydrossTimer <= diff)
{
if (MarkOfHydross_Count <= 5)
{
uint32 mark_spell = 0;
switch (MarkOfHydross_Count)
{
//.........这里部分代码省略.........
示例14: UpdateAI
void UpdateAI(uint32 diff) override
{
events.Update(diff);
if (!UpdateVictim())
{
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case INTRO_1:
me->GetMotionMaster()->MovePath(KIRTONOS_PATH, false);
break;
case INTRO_2:
me->GetMotionMaster()->MovePoint(0, PosMove[0]);
events.ScheduleEvent(INTRO_3, 1000);
break;
case INTRO_3:
if (GameObject* gate = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(GO_GATE_KIRTONOS)))
gate->SetGoState(GO_STATE_READY);
me->SetFacingTo(0.01745329f);
events.ScheduleEvent(INTRO_4, 3000);
break;
case INTRO_4:
if (GameObject* brazier = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(GO_BRAZIER_OF_THE_HERALD)))
brazier->SetGoState(GO_STATE_READY);
me->SetWalk(true);
me->SetDisableGravity(false);
DoCast(me, SPELL_KIRTONOS_TRANSFORM);
me->SetCanFly(false);
events.ScheduleEvent(INTRO_5, 1000);
break;
case INTRO_5:
me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_KIRTONOS_STAFF));
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_AGGRESSIVE);
events.ScheduleEvent(INTRO_6, 5000);
break;
case INTRO_6:
me->GetMotionMaster()->MovePoint(0, PosMove[1]);
break;
default:
break;
}
}
return;
}
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_SWOOP:
DoCast(me, SPELL_SWOOP);
events.ScheduleEvent(EVENT_SWOOP, 15s);
break;
case EVENT_WING_FLAP:
DoCast(me, SPELL_WING_FLAP);
events.ScheduleEvent(EVENT_WING_FLAP, 13s);
break;
case EVENT_PIERCE_ARMOR:
DoCastVictim(SPELL_PIERCE_ARMOR, true);
events.ScheduleEvent(EVENT_PIERCE_ARMOR, 12s);
break;
case EVENT_DISARM:
DoCastVictim(SPELL_DISARM, true);
events.ScheduleEvent(EVENT_DISARM, 11s);
break;
case EVENT_SHADOW_BOLT:
DoCastVictim(SPELL_SHADOW_BOLT, true);
events.ScheduleEvent(EVENT_SHADOW_BOLT, 42s);
break;
case EVENT_CURSE_OF_TONGUES:
DoCastVictim(SPELL_CURSE_OF_TONGUES, true);
events.ScheduleEvent(EVENT_CURSE_OF_TONGUES, 35s);
break;
case EVENT_DOMINATE_MIND:
DoCastVictim(SPELL_DOMINATE_MIND, true);
events.ScheduleEvent(EVENT_DOMINATE_MIND, 44s, 48s);
break;
case EVENT_KIRTONOS_TRANSFORM:
if (me->HasAura(SPELL_KIRTONOS_TRANSFORM))
{
me->RemoveAura(SPELL_KIRTONOS_TRANSFORM);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(0));
me->SetCanFly(false);
}
else
{
DoCast(me, SPELL_KIRTONOS_TRANSFORM);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_KIRTONOS_STAFF));
me->SetCanFly(true);
}
events.ScheduleEvent(EVENT_KIRTONOS_TRANSFORM, 16s, 18s);
break;
//.........这里部分代码省略.........
示例15: UpdateAI
void UpdateAI(uint32 const diff)
{
if (_introEvent)
{
if (_introTimer <= diff)
{
switch (_introEvent)
{
case INTRO_1:
if (_currentPoint < POINT_KIRTONOS_LAND)
me->GetMotionMaster()->MovePoint(_currentPoint, kirtonosIntroWaypoint[_currentPoint]);
else
{
_introTimer = 1000;
_introEvent = INTRO_2;
}
break;
case INTRO_2:
me->SetWalk(true);
me->GetMotionMaster()->MovePoint(0, 299.4884f, 92.76137f, 105.6335f);
_introTimer = 1000;
_introEvent = INTRO_3;
break;
case INTRO_3:
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_KIRTONOS)))
gate->SetGoState(GO_STATE_READY);
me->SetFacingTo(0.01745329f);
_introTimer = 3000;
_introEvent = INTRO_4;
break;
case INTRO_4:
if (GameObject* brazier = me->GetMap()->GetGameObject(instance->GetData64(GO_BRAZIER_OF_THE_HERALD)))
brazier->SetGoState(GO_STATE_READY);
me->SetDisableGravity(false);
DoCast(me, SPELL_KIRTONOS_TRANSFORM);
_introTimer = 1000;
_introEvent = INTRO_5;
break;
case INTRO_5:
me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_KIRTONOS_STAFF));
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_AGGRESSIVE);
_introTimer = 5000;
_introEvent = INTRO_6;
case INTRO_6:
me->GetMotionMaster()->MovePoint(0, 314.8673f, 90.3021f, 101.6459f);
_introTimer = 0;
_introEvent = 0;
break;
}
}
else
_introTimer -= diff;
}
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_SWOOP:
DoCast(me, SPELL_SWOOP);
events.ScheduleEvent(EVENT_SWOOP, 15000);
break;
case EVENT_WING_FLAP:
DoCast(me, SPELL_WING_FLAP);
events.ScheduleEvent(EVENT_WING_FLAP, 13000);
break;
case EVENT_PIERCE_ARMOR:
DoCastVictim(SPELL_PIERCE_ARMOR, true);
events.ScheduleEvent(EVENT_PIERCE_ARMOR, 12000);
break;
case EVENT_DISARM:
DoCastVictim(SPELL_DISARM, true);
events.ScheduleEvent(EVENT_DISARM, 11000);
break;
case EVENT_SHADOW_BOLT:
DoCastVictim(SPELL_SHADOW_BOLT, true);
events.ScheduleEvent(EVENT_SHADOW_BOLT, 42000);
break;
case EVENT_CURSE_OF_TONGUES:
DoCastVictim(SPELL_CURSE_OF_TONGUES, true);
events.ScheduleEvent(EVENT_CURSE_OF_TONGUES, 35000);
break;
case EVENT_DOMINATE_MIND:
DoCastVictim(SPELL_DOMINATE_MIND, true);
events.ScheduleEvent(EVENT_DOMINATE_MIND, urand(44000, 48000));
break;
case EVENT_KIRTONOS_TRANSFORM:
if (me->HasAura(SPELL_KIRTONOS_TRANSFORM))
{
me->RemoveAura(SPELL_KIRTONOS_TRANSFORM);
//.........这里部分代码省略.........