mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 21:57:01 +01:00
Core/Scripts/Oculus: Improved Arcane Beam ability of Azure Ring Captain (Varos Encounter)
Signed-off-by: Manuel <manue.l@live.com.ar>
This commit is contained in:
@@ -37,7 +37,9 @@ enum Spells
|
||||
SPELL_CALL_AZURE_RING_CAPTAIN_4 = 51008, //Effect Send Event (18455)*/
|
||||
SPELL_CALL_AMPLIFY_MAGIC = 51054,
|
||||
|
||||
SPELL_ICE_BEAM = 49549
|
||||
SPELL_ICE_BEAM = 49549,
|
||||
SPELL_ARCANE_BEAM_PERIODIC = 51019,
|
||||
SPELL_SUMMON_ARCANE_BEAM = 51017
|
||||
};
|
||||
|
||||
enum Events
|
||||
@@ -62,7 +64,7 @@ public:
|
||||
{
|
||||
boss_varosAI(Creature* creature) : BossAI(creature, DATA_VAROS_EVENT)
|
||||
{
|
||||
if (instance->GetData(DATA_DRAKOS_EVENT) != DONE)
|
||||
if (instance->GetBossState(DATA_DRAKOS_EVENT) != DONE)
|
||||
DoCast(me,SPELL_CENTRIFUGE_SHIELD);
|
||||
}
|
||||
|
||||
@@ -175,14 +177,17 @@ class npc_azure_ring_captain : public CreatureScript
|
||||
{
|
||||
targetGUID = 0;
|
||||
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING + MOVEMENTFLAG_FLYING);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellEntry const* spell)
|
||||
{
|
||||
if (spell->Id == SPELL_ICE_BEAM)
|
||||
EnterEvadeMode();
|
||||
{
|
||||
target->CastSpell(target,SPELL_SUMMON_ARCANE_BEAM,true);
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -226,6 +231,7 @@ class npc_azure_ring_captain : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 targetGUID;
|
||||
InstanceScript* instance;
|
||||
|
||||
@@ -86,31 +86,13 @@ public:
|
||||
if (eventId != EVENT_CALL_DRAGON)
|
||||
return;
|
||||
|
||||
if (azureDragonsList.empty())
|
||||
return;
|
||||
|
||||
Creature* nearestDragon = NULL;
|
||||
Creature* varos = instance->GetCreature(varosGUID);
|
||||
|
||||
for (std::list<uint64>::const_iterator itr = azureDragonsList.begin(); itr != azureDragonsList.end(); ++itr)
|
||||
{
|
||||
if (Creature* dragon = instance->GetCreature(*itr))
|
||||
{
|
||||
if (!dragon->isAlive() && dragon->isInCombat())
|
||||
continue;
|
||||
if (!varos)
|
||||
return;
|
||||
|
||||
if (!nearestDragon)
|
||||
nearestDragon = dragon;
|
||||
else if (varos)
|
||||
{
|
||||
if (nearestDragon->GetExactDist(varos) > dragon->GetExactDist(varos))
|
||||
nearestDragon = dragon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (nearestDragon)
|
||||
nearestDragon->AI()->DoAction(ACTION_CALL_DRAGON_EVENT);
|
||||
if (Creature* drake = varos->SummonCreature(NPC_AZURE_RING_GUARDIAN,varos->GetPositionX(),varos->GetPositionY(),varos->GetPositionZ()+40))
|
||||
drake->AI()->DoAction(ACTION_CALL_DRAGON_EVENT);
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
@@ -129,9 +111,6 @@ public:
|
||||
case NPC_EREGOS:
|
||||
eregosGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_AZURE_RING_GUARDIAN:
|
||||
azureDragonsList.push_back(creature->GetGUID());
|
||||
break;
|
||||
case NPC_CENTRIFUGE_CONSTRUCT:
|
||||
if (creature->isAlive())
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT,++centrifugueConstructCounter);
|
||||
|
||||
@@ -42,8 +42,8 @@ enum Bosses
|
||||
NPC_UROM = 27655,
|
||||
NPC_EREGOS = 27656,
|
||||
|
||||
NPC_AZURE_RING_GUARDIAN = 27638,
|
||||
NPC_CENTRIFUGE_CONSTRUCT = 27641
|
||||
NPC_AZURE_RING_GUARDIAN = 28236,
|
||||
NPC_CENTRIFUGE_CONSTRUCT = 27641,
|
||||
};
|
||||
|
||||
enum GameObjects
|
||||
|
||||
Reference in New Issue
Block a user